當前位置: 首頁>>代碼示例>>Golang>>正文


Golang Group.Post方法代碼示例

本文整理匯總了Golang中github.com/labstack/echo.Group.Post方法的典型用法代碼示例。如果您正苦於以下問題:Golang Group.Post方法的具體用法?Golang Group.Post怎麽用?Golang Group.Post使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在github.com/labstack/echo.Group的用法示例。


在下文中一共展示了Group.Post方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: Configure

// Configure setups all resource functions in order to work with database operations
func Configure(g *echo.Group) {
	g.Use(auth.AnyAuth())
	g.Post("/", msg.JSONResource(Create))
	g.Get("/:id", msg.JSONResource(Retrieve))
	g.Patch("/:id", msg.JSONResource(Update))
	g.Delete("/:id", msg.JSONResource(Delete))
}
開發者ID:cedmundo,項目名稱:hablo,代碼行數:8,代碼來源:profiles.go

示例2: RegisterRoute

// 注冊路由
func (self AccountController) RegisterRoute(g *echo.Group) {
	g.Any("/account/register", self.Register)
	g.Post("/account/send_activate_email", self.SendActivateEmail)
	g.Get("/account/activate", self.Activate)
	g.Any("/account/login", self.Login)
	g.Any("/account/edit", self.Edit, middleware.NeedLogin())
	g.Post("/account/change_avatar", self.ChangeAvatar, middleware.NeedLogin())
	g.Post("/account/changepwd", self.ChangePwd, middleware.NeedLogin())
	g.Any("/account/forgetpwd", self.ForgetPasswd)
	g.Any("/account/resetpwd", self.ResetPasswd)
	g.Get("/account/logout", self.Logout, middleware.NeedLogin())
}
開發者ID:studygolang,項目名稱:studygolang,代碼行數:13,代碼來源:account.go

示例3: Configure

// Configure will set all routes needed by this module
func Configure(g *echo.Group) {
	g.Use(auth.AnyAuth())
	g.Get("/", msg.JSONResource(List))
	g.Get("/:gid", msg.JSONResource(Create))
	g.Post("/:gid", msg.JSONResource(Retrieve))
	g.Patch("/:gid", msg.JSONResource(Update))
	g.Delete("/:gid", msg.JSONResource(Delete))

	g.Post("/:gid/members/:mid", msg.JSONResource(AddMember))
	g.Post("/:gid/members/:mid/admin", msg.JSONResource(AddAdmin))
	g.Delete("/:gid/members/:mid/admin", msg.JSONResource(DelAdmin))
	g.Delete("/:gid/members/:mid", msg.JSONResource(DelMember))
}
開發者ID:cedmundo,項目名稱:hablo,代碼行數:14,代碼來源:groups.go

示例4: RegisterRoute

// 注冊路由
func (self FavoriteController) RegisterRoute(g *echo.Group) {
	g.Post("/favorite/:objid", self.Create, middleware.NeedLogin())
	g.Get("/favorites/:username", self.ReadList)
}
開發者ID:studygolang,項目名稱:studygolang,代碼行數:5,代碼來源:favorite.go

示例5: registerUserHandlers

// User related endpoints
func registerUserHandlers(router *echo.Group, userService handler.UserService) {
	router.Get("/users/:id", userService.Show)
	router.Get("/users", userService.List)
	router.Post("/users", userService.Create)
}
開發者ID:twanies,項目名稱:gonzo,代碼行數:6,代碼來源:main.go

示例6: RegisterRoute

func (self CommentController) RegisterRoute(g *echo.Group) {
	g.Get("/at/users", self.AtUsers)
	g.Post("/comment/:objid", self.Create, middleware.NeedLogin(), middleware.Sensivite(), middleware.PublishNotice())
	g.Get("/object/comments", self.CommentList)
}
開發者ID:studygolang,項目名稱:studygolang,代碼行數:5,代碼來源:comment.go

示例7: Configure

// Configure setups all resource functions in order to work with database operations
func Configure(g *echo.Group) {
	g.Use(auth.AnyAuth())
	g.Post("/", msg.JSONResource(ExchageDigits))
	g.Delete("/:id", msg.JSONResource(CloseSession))
}
開發者ID:cedmundo,項目名稱:hablo,代碼行數:6,代碼來源:sessions.go


注:本文中的github.com/labstack/echo.Group.Post方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。