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 Header map[string][]string Url string Duration string ReqBody string RespBody string Status int }
日志内容
type MiddlewareBuilder ¶
type MiddlewareBuilder struct {
// contains filtered or unexported fields
}
func NewBuilder ¶
func NewBuilder(fn func(ctx context.Context, al *AccessLog)) *MiddlewareBuilder
func (*MiddlewareBuilder) AllowReqBody ¶
func (b *MiddlewareBuilder) AllowReqBody(ok bool) *MiddlewareBuilder
AllowReqBody 是否允许记录请求体
func (*MiddlewareBuilder) AllowRespBody ¶
func (b *MiddlewareBuilder) AllowRespBody(ok bool) *MiddlewareBuilder
AllowRespBody 是否允许记录响应体
Click to show internal directories.
Click to hide internal directories.