Documentation
¶
Index ¶
- func GetAdditionalLogs(resp interface{}) map[string]interface{}
- func GetCtxHeadersFromContext(ctx context.Context) map[string]interface{}
- func GetFriendlyRequestName(req interface{}) string
- func GetRequestBodyLimit(ctx context.Context) *int
- func InjectCtxHeaders(ctx *context.Context, headers map[string]interface{})
- func MixinCtxHeaders(ctx context.Context, headers map[string]interface{}) context.Context
- func SetRequestBodyLimit(ctx *context.Context, limit int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAdditionalLogs ¶
func GetAdditionalLogs(resp interface{}) map[string]interface{}
GetAdditionalLogs
If a response implements response.ExtendedLog, then this function will retrieve the attached logs and return.
func GetCtxHeadersFromContext ¶
GetCtxHeadersFromContext
Retrieve the saved headers from the request context. Returns nil if not found.
func GetFriendlyRequestName ¶
func GetFriendlyRequestName(req interface{}) string
GetFriendlyRequestName
Gets the friendly request name of an object. If the object does not implement a known type, this function will use reflection to get the objects type name.
func GetRequestBodyLimit ¶
GetRequestBodyLimit
Gets the request body size limit that was assigned. If this value is not present, the result will be nil.
func InjectCtxHeaders ¶
InjectCtxHeaders
Inject the given context with the given headers. No-op if context is nil.
func MixinCtxHeaders ¶
MixinCtxHeaders
Similar in function to InjectCtxHeaders, except this will use the WithValue pattern and return a wrapped context.Context value.
func SetRequestBodyLimit ¶ added in v1.2.1
Types ¶
This section is empty.