Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Main = gcmd.Command{ Name: "main", Usage: "main", Brief: "start http server", Func: func(ctx context.Context, parser *gcmd.Parser) (err error) { s := g.Server() s.Group("/", func(group *ghttp.RouterGroup) { group.Middleware(middleware.Response) group.Group("/admin", func(group *ghttp.RouterGroup) { group.Group("/", func(group *ghttp.RouterGroup) { group.Bind(login.NewV1()) }) group.Group("/", func(group *ghttp.RouterGroup) { group.Middleware(middleware.Auth) group.Group("/v1", func(group *ghttp.RouterGroup) { group.Bind( account.NewV1(), article.NewV1(), article_grp.NewV1(), file.NewV1(), saying.NewV1(), link.NewV1(), reply.NewV1(), ) }) }) }) group.Group("/app", func(group *ghttp.RouterGroup) { group.Bind( article.NewApp(), article_grp.NewApp(), reply.NewApp(), other.NewApp(), ) }) }) s.Run() return nil }, } )
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.