Documentation ¶
Index ¶
- Constants
- type Caster
- type Getter
- type IP
- type IpOption
- type Middleware
- func NewBool(logger log.Logger, options ...Option) Middleware
- func NewFloat64(logger log.Logger, options ...Option) Middleware
- func NewIP(options ...IpOption) Middleware
- func NewInt64(logger log.Logger, options ...Option) Middleware
- func NewParam(logger log.Logger, caster Caster, options ...Option) Middleware
- func NewString(logger log.Logger, options ...Option) Middleware
- func NewUUID(logger log.Logger, options ...Option) Middleware
- func NewUint64(logger log.Logger, options ...Option) Middleware
- type MiddlewareHandler
- type Option
Constants ¶
View Source
const ( PageFieldName = "page" LimitFieldName = "limit" CountHeaderName = "X-Pagination-Count" PageHeaderName = "X-Pagination-Page" LimitHeaderName = "X-Pagination-Limit" LimitDefault = uint(20) PageDefault = uint(1) )
View Source
const (
IpParamNameDefault = "ip"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IpOption ¶ added in v1.6.2
func IpWithName ¶ added in v1.6.2
type Middleware ¶
func NewFloat64 ¶ added in v1.1.2
func NewFloat64(logger log.Logger, options ...Option) Middleware
func NewIP ¶ added in v1.6.2
func NewIP(options ...IpOption) Middleware
type MiddlewareHandler ¶ added in v1.1.2
MiddlewareHandler general type of middleware with golang standard interfaces
func HttpDurationMiddleware ¶
func HttpDurationMiddleware(metrics *metrics.Metrics, informer log.Informer) MiddlewareHandler
HttpDurationMiddleware return MiddlewareHandler for add information to metric on request time
func HttpRequestTotalMiddleware ¶
func HttpRequestTotalMiddleware(metrics *metrics.Metrics, informer log.Informer) MiddlewareHandler
type Option ¶ added in v1.1.2
type Option func(param *param) *param
func WithCookie ¶ added in v1.3.2
func WithDefault ¶ added in v1.1.2
func WithDefault(value interface{}) Option
func WithHeader ¶ added in v1.1.2
Click to show internal directories.
Click to hide internal directories.