Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessLog ¶
type AccessLog struct {
Method string `json:"method"`
Path string `json:"path"`
ReqBody string `json:"req_body"`
Duration string `json:"duration"`
StatusCode int `json:"status_code"`
RespBody string `json:"resp_body"`
}
AccessLog 自定义打印信息
type MiddlewareBuilder ¶
type MiddlewareBuilder struct {
// contains filtered or unexported fields
}
func NewMiddlewareBuilder ¶
func NewMiddlewareBuilder(fn func(ctx context.Context, al AccessLog)) *MiddlewareBuilder
func (*MiddlewareBuilder) AllowReqBody ¶
func (b *MiddlewareBuilder) AllowReqBody(ok bool) *MiddlewareBuilder
func (*MiddlewareBuilder) AllowRespBody ¶
func (b *MiddlewareBuilder) AllowRespBody() *MiddlewareBuilder
func (*MiddlewareBuilder) Build ¶
func (b *MiddlewareBuilder) Build() gin.HandlerFunc
Click to show internal directories.
Click to hide internal directories.