blob: 3b057077945ba60f6329b8249ffbcb0ed6d8eb2b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
package api
import "github.com/gin-gonic/gin"
// Router provides the http routes used by the API
type Router interface {
Route()
}
// NewRouter returns a new router
func NewRouter() Router {
return &router{}
}
// router implements the router interface
type router struct {
}
func (r *router) Route() {
ginRouter := gin.Default()
ginRouter.LoadHTMLGlob("web/template/*")
apiGroup := ginRouter.Group("/api")
{
v1 := apiGroup.Group("/v1")
{
statusesGroup := v1.Group("/statuses")
{
statusesGroup.GET(":id", statusGet)
}
}
}
ginRouter.Run()
}
|