Documentation ¶
Index ¶
- func IPFromContext(ctx context.Context) (string, bool)
- func NewIPContext(ctx context.Context, ip string) context.Context
- func NewRequestIDContext(ctx context.Context, id string) context.Context
- func RealIP(h http.Handler) http.Handler
- func RequestID(h http.Handler) http.Handler
- func RequestIDFromContext(ctx context.Context) string
- type ContextID
- type Recovery
- type RecoveryLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RequestIDFromContext ¶
Types ¶
type ContextID ¶
type ContextID struct {
// contains filtered or unexported fields
}
A ContextID represents context key for middleware.
func ContextKey ¶
ContextKey constructs context key using name supplied.
type Recovery ¶
type Recovery struct { Logger RecoveryLogger // contains filtered or unexported fields }
func NewRecovery ¶
type RecoveryLogger ¶
Click to show internal directories.
Click to hide internal directories.