Documentation ¶
Index ¶
- Constants
- func Limit(opts LimitOptions) echo.MiddlewareFunc
- func LimitGetAvailable(ctx echo.Context) (val int64, ok bool)
- func Log(opts LogOptions) echo.MiddlewareFunc
- func Logger(ctx echo.Context) *zap.Logger
- func Sugar(ctx echo.Context) *zap.SugaredLogger
- func Trace(opts TraceOptions) echo.MiddlewareFunc
- type Binder
- type LimitOptions
- type Limiter
- type LogOptions
- type TraceOptions
Constants ¶
View Source
const (
ContextKeyLimitAvailable = "advecho.limit/available"
)
Variables ¶
This section is empty.
Functions ¶
func Limit ¶
func Limit(opts LimitOptions) echo.MiddlewareFunc
func LimitGetAvailable ¶
func Log ¶
func Log(opts LogOptions) echo.MiddlewareFunc
func Sugar ¶
func Sugar(ctx echo.Context) *zap.SugaredLogger
func Trace ¶
func Trace(opts TraceOptions) echo.MiddlewareFunc
Types ¶
type LimitOptions ¶
type LimitOptions struct {
Limiter Limiter
}
type Limiter ¶
type Limiter interface { Take() Available() int64 Return() }
func FixedBucketLimiter ¶
type LogOptions ¶
type TraceOptions ¶
type TraceOptions struct {
Tracer opentracing.Tracer
}
Click to show internal directories.
Click to hide internal directories.