本文整理汇总了Golang中github.com/astaxie/beego.NSInclude函数的典型用法代码示例。如果您正苦于以下问题:Golang NSInclude函数的具体用法?Golang NSInclude怎么用?Golang NSInclude使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了NSInclude函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: init
func init() {
ns := beego.NewNamespace("/v1",
beego.NSNamespace("/moment",
beego.NSInclude(
&controllers.MomentController{},
),
),
beego.NSNamespace("/comment",
beego.NSInclude(
&controllers.CommentController{},
),
),
beego.NSNamespace("/like",
beego.NSInclude(
&controllers.LikeController{},
),
),
beego.NSNamespace("/block",
beego.NSInclude(
&controllers.BlockController{},
),
),
beego.NSNamespace("/unshare",
beego.NSInclude(
&controllers.UnshareController{},
),
),
)
beego.AddNamespace(ns)
}
开发者ID:soyking,项目名称:MomentAPI,代码行数:30,代码来源:router.go
示例2: init
func init() {
ns := beego.NewNamespace("/v1",
beego.NSNamespace("/comments",
beego.NSInclude(
&controllers.CommentsController{},
),
),
beego.NSNamespace("/posts",
beego.NSInclude(
&controllers.PostsController{},
),
),
beego.NSNamespace("/users",
beego.NSInclude(
&controllers.UsersController{},
),
),
beego.NSNamespace("/jwt",
beego.NSInclude(
&controllers.JwtController{},
),
),
)
beego.AddNamespace(ns)
}
开发者ID:thuongdinh,项目名称:beeblog,代码行数:28,代码来源:router.go
示例3: init
func init() {
if beego.BConfig.RunMode == "dev" {
beego.BConfig.WebConfig.DirectoryIndex = true
beego.BConfig.WebConfig.StaticDir["/doc"] = "swagger"
}
ns := beego.NewNamespace("/v1.0",
beego.NSNamespace("/auth", beego.NSInclude(&controllers.AuthController{})),
beego.NSNamespace("/user", beego.NSInclude(&controllers.UserController{})),
beego.NSNamespace("/host", beego.NSInclude(&controllers.HostController{})),
)
beego.AddNamespace(ns)
}
开发者ID:yubo,项目名称:falcon,代码行数:14,代码来源:router.go
示例4: init
func init() {
ns := beego.NewNamespace("/v1",
beego.NSNamespace("/ai",
beego.NSInclude(
&controllers.AIController{},
),
),
beego.NSNamespace("/webchat",
beego.NSInclude(
&controllers.WebChatController{},
),
),
)
beego.AddNamespace(ns)
}
开发者ID:guojienumberone,项目名称:japi,代码行数:15,代码来源:router.go
示例5: init
func init() {
ns := beego.NewNamespace("/v1",
beego.NSNamespace("/object",
beego.NSInclude(
&controllers.ObjectController{},
),
),
beego.NSNamespace("/user",
beego.NSInclude(
&controllers.UserController{},
),
),
)
beego.AddNamespace(ns)
}
开发者ID:kyawmyintthein,项目名称:donate.me_api,代码行数:15,代码来源:router.go
示例6: init
func init() {
ns := beego.NewNamespace("/cddapi/SpeCpMobile",
beego.NSNamespace("/get_sites_status",
beego.NSInclude(
&controllers.SitesStatusController{},
),
),
beego.NSNamespace("/user",
beego.NSInclude(
&controllers.UserController{},
),
),
)
beego.AddNamespace(ns)
}
开发者ID:whiskerman,项目名称:nexusguard,代码行数:15,代码来源:router.go
示例7: init
func init() {
ns := beego.NewNamespace("/v1",
beego.NSNamespace("/lov",
beego.NSInclude(
&controllers.LovController{},
),
),
beego.NSNamespace("/invest",
beego.NSInclude(
&controllers.InvestContractController{},
),
),
)
beego.AddNamespace(ns)
}
开发者ID:joyplus,项目名称:finprocess,代码行数:16,代码来源:router.go
示例8: init
func init() {
ns := beego.NewNamespace("/fault",
beego.NSNamespace("/fault_data",
beego.NSInclude(
&controllers.FaultDataController{},
),
),
beego.NSNamespace("/down",
beego.NSInclude(
&controllers.DownController{},
),
),
)
beego.AddNamespace(ns)
beego.Router("fault", &controllers.FaultDataController{})
}
开发者ID:guaiguaihw,项目名称:fault,代码行数:16,代码来源:router.go
示例9: init
func init() {
fmt.Println("start route config")
beego.Router("/", &controllers.MainController{})
//beego.Router("/post", &controllers.PostController{})
//beego.Router("/user", &controllers.UserController{})
ns := beego.NewNamespace("/v1",
beego.NSCond(func(ctx *context.Context) bool {
//if ctx.Input.Domain() == "api.genffy.com" {
// return true
//}
//return false
fmt.Println(ctx.Input.Domain())
return true
}),
// beego.NSRouter("/index", &controllers.MainController{}, "get:ShowAPIVersion"),
// beego.NSBefore(auth),
beego.NSNamespace("/post",
beego.NSInclude(
// 对应的注解路由
&controllers.PostController{},
),
),
beego.NSNamespace("/auth",
beego.NSInclude(
&controllers.UserController{},
),
),
beego.NSNamespace("/comment",
beego.NSInclude(
&controllers.CommentController{},
),
),
beego.NSNamespace("/meta",
beego.NSInclude(
&controllers.MetaController{},
),
),
// 测试超时
// beego.NSNamespace("test",
// beego.NSInclude(
// &controllers.TestController{},
// ),
// ),
)
beego.AddNamespace(ns)
}
开发者ID:Genffy,项目名称:api.genffy.com,代码行数:47,代码来源:router.go
示例10: init
func init() {
ns := beego.NewNamespace("/v1",
beego.NSNamespace("/departments",
beego.NSInclude(
&controllers.DepartmentsController{},
),
),
beego.NSNamespace("/employees",
beego.NSInclude(
&controllers.EmployeesController{},
),
),
)
beego.AddNamespace(ns)
}
开发者ID:mayra-cabrera,项目名称:employees_api_project,代码行数:17,代码来源:router.go
示例11: main
func main() {
ns := beego.NewNamespace("/js",
beego.NSInclude(&controllers.NewsController{}),
)
beego.AddNamespace(ns)
app := beego.Include(&controllers.NewsVController{})
app.Run()
}
开发者ID:shaalx,项目名称:news,代码行数:8,代码来源:main.go
示例12: init
func init() {
ns := beego.NewNamespace("/v1",
beego.NSNamespace("/post",
beego.NSInclude(
&controllers.PostController{},
),
),
)
beego.AddNamespace(ns)
}
开发者ID:jf,项目名称:gwp,代码行数:10,代码来源:router.go
示例13: init
func init() {
ns := beego.NewNamespace("/v1",
beego.NSNamespace("/crawl",
beego.NSInclude(
&controllers.ObjectController{},
),
),
)
beego.AddNamespace(ns)
}
开发者ID:coseyo,项目名称:getsale,代码行数:10,代码来源:router.go
示例14: init
func init() {
ns := beego.NewNamespace("/v1", //v1 :版本号
beego.NSNamespace("/weather", //天气API e.g. http://127.0.0.1:8888/v1/weather/:id
beego.NSInclude(
&controllers.ShowWeatherController{},
),
),
beego.NSNamespace("/city", //城市id API e.g. http://127.0.0.1:8888/v1/city/:name
beego.NSInclude(
&controllers.CityContentController{},
),
),
beego.NSNamespace("/cocserver", //cocserver API e.g. http://127.0.0.1:8888/v1/cocserver/:warid
beego.NSInclude(
&controllers.WarDataController{},
),
),
)
beego.AddNamespace(ns)
}
开发者ID:luckily248,项目名称:dataserver,代码行数:20,代码来源:router.go
示例15: init
func init() {
ns := beego.NewNamespace("/v1",
beego.NSNamespace("/user",
beego.NSInclude(
&controllers.UserController{},
),
),
beego.NSNamespace("/status",
beego.NSInclude(
&controllers.StatusController{},
),
),
beego.NSNamespace("/category",
beego.NSInclude(
&controllers.CategoryController{},
),
),
)
beego.AddNamespace(ns)
}
开发者ID:lenfree,项目名称:restopos,代码行数:20,代码来源:router.go
示例16: init
func init() {
ns := beego.NewNamespace("/v1",
beego.NSNamespace("/app",
beego.NSInclude(
&controllers.AppController{},
),
),
)
beego.AddNamespace(ns)
}
开发者ID:sshitaime,项目名称:go-study,代码行数:11,代码来源:router.go
示例17: init
func init() {
ns := beego.NewNamespace("/v1",
beego.NSNamespace("/auth",
beego.NSInclude(
&controllers.AuthenticationController{},
),
),
)
beego.AddNamespace(ns)
}
开发者ID:thanpogi,项目名称:beegotest,代码行数:11,代码来源:router.go
示例18: init
func init() {
ns := beego.NewNamespace("/v1",
beego.NSNamespace("/manage",
beego.NSInclude(
&controllers.ManageController{},
),
),
)
beego.AddNamespace(ns)
}
开发者ID:thanpogi,项目名称:beegotest,代码行数:11,代码来源:router.go
示例19: init
func init() {
ns := beego.NewNamespace("/v1",
beego.NSNamespace("/users",
beego.NSInclude(
&controllers.UsersController{},
),
),
beego.NSNamespace("/tokens",
beego.NSInclude(
&controllers.TokensController{},
),
),
beego.NSNamespace("/verifications",
beego.NSInclude(
&controllers.VerificationsController{},
),
),
)
beego.AddNamespace(ns)
}
开发者ID:Piasy,项目名称:BeegoTDDBootStrap,代码行数:20,代码来源:router.go
示例20: init
func init() {
beego.Router("/", &controllers.MainController{}, "get:Home")
ns := beego.NewNamespace("/v1",
beego.NSNamespace("/posts",
beego.NSInclude(
&controllers.PostController{},
),
),
)
beego.AddNamespace(ns)
}
开发者ID:iamxy,项目名称:beego_react,代码行数:12,代码来源:router.go
注:本文中的github.com/astaxie/beego.NSInclude函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论