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


Golang Group.GET方法代碼示例

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


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

示例1: RegisterRoute

// 注冊路由
func (self RuleController) RegisterRoute(g *echo.Group) {
	g.GET("/crawl/rule/list", self.RuleList)
	g.POST("/crawl/rule/query.html", self.Query)
	g.Match([]string{"GET", "POST"}, "/crawl/rule/new", self.New)
	g.Match([]string{"GET", "POST"}, "/crawl/rule/modify", self.Modify)
	g.POST("/crawl/rule/del", self.Del)
}
開發者ID:studygolang,項目名稱:studygolang,代碼行數:8,代碼來源:rule.go

示例2: RegisterRoute

// 注冊路由
func (self TopicController) RegisterRoute(g *echo.Group) {
	g.GET("/topics", self.Topics)
	g.GET("/topics/no_reply", self.TopicsNoReply)
	g.GET("/topics/last", self.TopicsLast)
	g.GET("/topics/:tid", self.Detail)
	g.GET("/topics/node/:nid", self.NodeTopics)

	g.Match([]string{"GET", "POST"}, "/topics/new", self.Create, middleware.NeedLogin(), middleware.Sensivite(), middleware.PublishNotice())
	g.Match([]string{"GET", "POST"}, "/topics/modify", self.Modify, middleware.NeedLogin(), middleware.Sensivite())
}
開發者ID:studygolang,項目名稱:studygolang,代碼行數:11,代碼來源:topic.go

示例3: RegisterRoute

// 注冊路由
func (self ResourceController) RegisterRoute(g *echo.Group) {
	g.GET("/resources", self.ReadList)
	g.GET("/resources/cat/:catid", self.ReadCatResources)
	g.GET("/resources/:id", self.Detail)
	g.Match([]string{"GET", "POST"}, "/resources/new", self.Create, middleware.NeedLogin(), middleware.Sensivite(), middleware.PublishNotice())
	g.Match([]string{"GET", "POST"}, "/resources/modify", self.Modify, middleware.NeedLogin(), middleware.Sensivite())
}
開發者ID:studygolang,項目名稱:studygolang,代碼行數:8,代碼來源:resource.go

示例4: RegisterRoute

// 注冊路由
func (self ProjectController) RegisterRoute(g *echo.Group) {
	g.GET("/projects", self.ReadList)
	g.Match([]string{"GET", "POST"}, "/project/new", self.Create, middleware.NeedLogin(), middleware.Sensivite(), middleware.PublishNotice())
	g.Match([]string{"GET", "POST"}, "/project/modify", self.Modify, middleware.NeedLogin(), middleware.Sensivite())
	g.GET("/p/:uri", self.Detail)
	g.GET("/project/uri", self.CheckExist)
}
開發者ID:studygolang,項目名稱:studygolang,代碼行數:8,代碼來源:project.go

示例5: APIRoutes

// APIRoutes definition
// ========== API ROUTES ======
func APIRoutes(api *echo.Group) {

	// ======= ADMIN API ======
	admin := controllers.AdminController{}
	api.Get("/time", admin.GetTime)

	posts := controllers.PostsController{}
	api.GET("/posts/:id", posts.GetOne)
	api.GET("/posts", posts.Get)
	api.POST("/posts", posts.Save)
	api.PUT("/posts/:id", posts.Update)

	// CRUD /api/tags
	tags := controllers.TagsController{}
	api.GET("/tags/:id", tags.GetOne)
	api.GET("/tags", tags.Get)
	api.POST("/tags", tags.Save)
	api.PUT("/tags/:id", tags.Update)
	/*	api.Delete("/tags/:id", tags.Destroy)
	 */
}
開發者ID:mewben,項目名稱:onix,代碼行數:23,代碼來源:main.go

示例6: RegisterRoute

// 注冊路由
func (self InstallController) RegisterRoute(g *echo.Group) {
	g.GET("/install", self.SetupConfig)
	g.Match([]string{"GET", "POST"}, "/install/setup-config", self.SetupConfig)
	g.Match([]string{"GET", "POST"}, "/install/do", self.DoInstall)
	g.Match([]string{"GET", "POST"}, "/install/options", self.SetupOptions)
}
開發者ID:studygolang,項目名稱:studygolang,代碼行數:7,代碼來源:install.go

示例7: RegisterRoute

// 注冊路由
func (self ArticleController) RegisterRoute(g *echo.Group) {
	g.GET("/crawl/article/list", self.ArticleList)
	g.POST("/crawl/article/query.html", self.ArticleQuery)
	g.Match([]string{"GET", "POST"}, "/crawl/article/new", self.CrawlArticle)
	g.Match([]string{"GET", "POST"}, "/crawl/article/modify", self.Modify)
}
開發者ID:studygolang,項目名稱:studygolang,代碼行數:7,代碼來源:article.go

示例8: RegisterRoute

// 注冊路由
func (self SearchController) RegisterRoute(g *echo.Group) {
	g.GET("/search", self.Search)
}
開發者ID:studygolang,項目名稱:studygolang,代碼行數:4,代碼來源:search.go

示例9: RegisterRoute

func (this *WebsocketController) RegisterRoute(g *echo.Group) {
	g.GET("/ws", standard.WrapHandler(websocket.Handler(this.Ws)))
}
開發者ID:studygolang,項目名稱:studygolang,代碼行數:3,代碼來源:websocket.go

示例10: RegisterRoute

// 注冊路由
func (self ProjectController) RegisterRoute(g *echo.Group) {
	g.GET("/crawl/project/list", self.ProjectList)
	g.POST("/crawl/project/query.html", self.ProjectQuery)
	g.Match([]string{"GET", "POST"}, "/crawl/project/new", self.CrawlProject)
	g.Match([]string{"GET", "POST"}, "/crawl/project/modify", self.Modify)
}
開發者ID:studygolang,項目名稱:studygolang,代碼行數:7,代碼來源:project.go

示例11: RegisterRoute

// 注冊路由
func (self ToolController) RegisterRoute(g *echo.Group) {
	g.GET("/tool/sitemap", self.GenSitemap)
}
開發者ID:studygolang,項目名稱:studygolang,代碼行數:4,代碼來源:tool.go

示例12: RegisterRoute

// 注冊路由
func (self IndexController) RegisterRoute(g *echo.Group) {
	g.GET("/", self.Index)
	g.GET("/wr", self.WrapUrl)
	g.GET("/pkgdoc", self.Pkgdoc)
}
開發者ID:studygolang,項目名稱:studygolang,代碼行數:6,代碼來源:index.go

示例13: RegisterRoute

// 注冊路由
func (self WideController) RegisterRoute(g *echo.Group) {
	g.GET("/wide/playground", self.Playground)
}
開發者ID:studygolang,項目名稱:studygolang,代碼行數:4,代碼來源:wide.go

示例14: RegisterRoute

func (self SidebarController) RegisterRoute(g *echo.Group) {
	g.GET("/readings/recent", self.RecentReading)
	g.GET("/topics/:nid/others", self.OtherTopics)
	g.GET("/websites/stat", self.WebsiteStat)
	g.GET("/dynamics/recent", self.RecentDynamic)
	g.GET("/topics/recent", self.RecentTopic)
	g.GET("/articles/recent", self.RecentArticle)
	g.GET("/projects/recent", self.RecentProject)
	g.GET("/resources/recent", self.RecentResource)
	g.GET("/comments/recent", self.RecentComment)
	g.GET("/nodes/hot", self.HotNodes)
	g.GET("/users/active", self.ActiveUser)
	g.GET("/users/newest", self.NewestUser)
}
開發者ID:studygolang,項目名稱:studygolang,代碼行數:14,代碼來源:sidebar.go

示例15: RegisterRoute

// 注冊路由
func (self UserController) RegisterRoute(g *echo.Group) {
	g.GET("/user/:username", self.Home)
	g.GET("/users", self.ReadList)
	g.Match([]string{"GET", "POST"}, "/user/email/unsubscribe", self.EmailUnsub)
}
開發者ID:studygolang,項目名稱:studygolang,代碼行數:6,代碼來源:user.go


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