Documentation ¶
Index ¶
- type BaseController
- type HomeController
- type IndexController
- func (ctrl *IndexController) ArticleIdCtx(next http.Handler) http.Handler
- func (ctrl *IndexController) Category(w http.ResponseWriter, r *http.Request)
- func (ctrl *IndexController) DeleteArticleId(w http.ResponseWriter, r *http.Request)
- func (ctrl *IndexController) GetArticleId(w http.ResponseWriter, r *http.Request)
- func (ctrl *IndexController) Home(w http.ResponseWriter, r *http.Request)
- func (ctrl *IndexController) Info(w http.ResponseWriter, r *http.Request)
- func (ctrl *IndexController) MockPanic(w http.ResponseWriter, r *http.Request)
- func (ctrl *IndexController) Test(w http.ResponseWriter, r *http.Request)
- func (ctrl *IndexController) UpdateArticleId(w http.ResponseWriter, r *http.Request)
- type InfoReq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseController ¶
type BaseController struct{}
type HomeController ¶
type HomeController struct {
BaseController
}
HomeController home ctrl.
func (*HomeController) Hello ¶
func (h *HomeController) Hello(w http.ResponseWriter, r *http.Request)
Hello hello func.
func (*HomeController) Info ¶
func (h *HomeController) Info(w http.ResponseWriter, r *http.Request)
Info 测试参数校验 http://localhost:1338/get-info?limit=12&uid=1&name=abcdeabcde
func (*HomeController) Post ¶
func (h *HomeController) Post(w http.ResponseWriter, r *http.Request)
Post post.
func (*HomeController) Test ¶
func (h *HomeController) Test(w http.ResponseWriter, r *http.Request)
Test test.
type IndexController ¶
type IndexController struct{}
IndexController index ctrl.
func (*IndexController) ArticleIdCtx ¶
func (ctrl *IndexController) ArticleIdCtx(next http.Handler) http.Handler
ArticleIdCtx 设置http context value 中间件
func (*IndexController) Category ¶
func (ctrl *IndexController) Category(w http.ResponseWriter, r *http.Request)
Category category
func (*IndexController) DeleteArticleId ¶
func (ctrl *IndexController) DeleteArticleId(w http.ResponseWriter, r *http.Request)
DeleteArticleId delete.
func (*IndexController) GetArticleId ¶
func (ctrl *IndexController) GetArticleId(w http.ResponseWriter, r *http.Request)
GetArticleId get art id.
func (*IndexController) Home ¶
func (ctrl *IndexController) Home(w http.ResponseWriter, r *http.Request)
Home home.
func (*IndexController) Info ¶
func (ctrl *IndexController) Info(w http.ResponseWriter, r *http.Request)
Info from a route like /info/{userID}
func (*IndexController) MockPanic ¶
func (ctrl *IndexController) MockPanic(w http.ResponseWriter, r *http.Request)
MockPanic 模拟发生panic操作
func (*IndexController) Test ¶
func (ctrl *IndexController) Test(w http.ResponseWriter, r *http.Request)
Test test.
func (*IndexController) UpdateArticleId ¶
func (ctrl *IndexController) UpdateArticleId(w http.ResponseWriter, r *http.Request)
UpdateArticleId update art id.
Click to show internal directories.
Click to hide internal directories.