Documentation ¶
Index ¶
- type Handler
- func (h *Handler) CreateBlog(c *gin.Context)
- func (h *Handler) DeleteBlog(c *gin.Context)
- func (h *Handler) DescribeBlog(c *gin.Context)
- func (h *Handler) Init() error
- func (h *Handler) Name() string
- func (h *Handler) QueryBlog(c *gin.Context)
- func (h *Handler) Registry(r gin.IRouter)
- func (h *Handler) UpdateBlog(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
处理Http报文的处理器 又这个handler类来负责实现具体的API 接口
func NewHandler ¶
func NewHandler() *Handler
为啥要用一个函数来构造 初始化一些基础数据 具体传递实现,在什么时候决定 典型的面向接口编程 使用ioc 替换掉 直接依赖
func (*Handler) DeleteBlog ¶
func (*Handler) DescribeBlog ¶
func (*Handler) Registry ¶
把你的请求和Http 路由对应上 r 就是一个gin http 的路由器 URL: /vblog/api/v1/blogs ---> 那个Handler(处理函数)
func (*Handler) UpdateBlog ¶
Click to show internal directories.
Click to hide internal directories.