Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
503c8cd8
Commit
503c8cd8
authored
Jun 20, 2018
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tech: adds comments about route register code
parent
24d0b43e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
pkg/api/route_register.go
+15
-0
No files found.
pkg/api/route_register.go
View file @
503c8cd8
...
@@ -14,15 +14,30 @@ type Router interface {
...
@@ -14,15 +14,30 @@ type Router interface {
// RouteRegister allows you to add routes and macaron.Handlers
// RouteRegister allows you to add routes and macaron.Handlers
// that the web server should serve.
// that the web server should serve.
type
RouteRegister
interface
{
type
RouteRegister
interface
{
// Get adds a list of handlers to a given route with a GET HTTP verb
Get
(
string
,
...
macaron
.
Handler
)
Get
(
string
,
...
macaron
.
Handler
)
// Post adds a list of handlers to a given route with a POST HTTP verb
Post
(
string
,
...
macaron
.
Handler
)
Post
(
string
,
...
macaron
.
Handler
)
// Delete adds a list of handlers to a given route with a DELETE HTTP verb
Delete
(
string
,
...
macaron
.
Handler
)
Delete
(
string
,
...
macaron
.
Handler
)
// Put adds a list of handlers to a given route with a PUT HTTP verb
Put
(
string
,
...
macaron
.
Handler
)
Put
(
string
,
...
macaron
.
Handler
)
// Patch adds a list of handlers to a given route with a PATCH HTTP verb
Patch
(
string
,
...
macaron
.
Handler
)
Patch
(
string
,
...
macaron
.
Handler
)
// Any adds a list of handlers to a given route with any HTTP verb
Any
(
string
,
...
macaron
.
Handler
)
Any
(
string
,
...
macaron
.
Handler
)
// Group allows you to pass a function that can add multiple routes
// with a shared prefix route.
Group
(
string
,
func
(
RouteRegister
),
...
macaron
.
Handler
)
Group
(
string
,
func
(
RouteRegister
),
...
macaron
.
Handler
)
// Register iterates over all routes added to the RouteRegister
// and add them to the `Router` pass as an parameter.
Register
(
Router
)
*
macaron
.
Router
Register
(
Router
)
*
macaron
.
Router
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment