// 注册路由 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) }
// 注册路由 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()) }
// 注册路由 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) }
// 注册路由 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()) }
// 注册路由 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) }
// 注册路由 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) }
// 注册路由 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) }
func (self ImageController) RegisterRoute(g *echo.Group) { g.POST("/image/upload", self.Upload) g.Match([]string{"GET", "POST"}, "/image/transfer", self.Transfer) }
// 注册路由 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) }
// 注册路由 func (self WikiController) RegisterRoute(g *echo.Group) { g.Match([]string{"GET", "POST"}, "/wiki/new", self.Create, middleware.NeedLogin(), middleware.Sensivite()) g.GET("/wiki", self.ReadList) g.GET("/wiki/:uri", self.Detail) }
// 注册路由 func (self ReadingController) RegisterRoute(g *echo.Group) { g.GET("/reading/list", self.ReadingList) g.POST("/reading/query.html", self.ReadingQuery) g.Match([]string{"GET", "POST"}, "/reading/publish", self.Publish) }