-
Notifications
You must be signed in to change notification settings - Fork 19
/
route.go
38 lines (33 loc) · 900 Bytes
/
route.go
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
37
38
// @APIVersion 1.0.0
// @Title Goyangi API
// @Description Goyangi API usually works as expected. But sometimes its not true
// @Contact api@contact.me
// @TermsOfServiceUrl http://google.com/
// @License BSD
// @LicenseUrl http://opensource.org/licenses/BSD-2-Clause
// @SubApi Authentication [/authentications]
// @SubApi Users [/users]
// @SubApi Oauth [/oauth]
// @SubApi Roles [/roles]
// @SubApi Articles [/articles]
// @SubApi Upload [/upload]
// @SubApi Commands [/commands]
package api
import (
"github.com/gin-gonic/gin"
"github.com/spf13/viper"
v1 "github.com/dorajistyle/goyangi/api/v1"
)
// RouteAPI contains router groups for API
func RouteAPI(parentRoute *gin.Engine) {
route := parentRoute.Group(viper.GetString("api.url"))
{
v1.Users(route)
v1.Roles(route)
v1.Authentications(route)
v1.Articles(route)
v1.Upload(route)
v1.Commands(route)
v1.Oauth(route)
}
}