Documentation
¶
Index ¶
- Variables
- func ClientIPFromContext(ctx context.Context) (string, bool)
- func GetRequestHeader(ctx context.Context) (http.Header, bool)
- func GetResponseHeader(ctx context.Context) (http.Header, bool)
- func NewRequestHeaderContext(ctx context.Context, header http.Header) context.Context
- func NewResponseHeaderContext(ctx context.Context, header http.Header) context.Context
- func SendResponseHeader(ctx context.Context, header http.Header)
- type Context
Constants ¶
This section is empty.
Variables ¶
View Source
var BackwardResponseMessage = backwardResponseMessage
BackwardResponseMessage backwards message "resp" from REST client to client API.
View Source
var ForwardResponseMessage = forwardResponseMessage
ForwardResponseMessage forwards the message "resp" from server to REST client.
View Source
var HTTPError = defaultHTTPErrorHandler
HTTPError eplies to the request with an error.
View Source
var HideDetails bool
HideDetails represents whether hide the error details or not.
Functions ¶
func ClientIPFromContext ¶
ClientIPFromContext returns the remote client ip in ctx if it exists.
func GetRequestHeader ¶
GetRequestHeader returns request header attached in the context.
func GetResponseHeader ¶
GetResponseHeader returns response header attached in the context.
func NewRequestHeaderContext ¶
NewRequestHeaderContext creates a new context with request header attached.
func NewResponseHeaderContext ¶
NewResponseHeaderContext creates a new context with response header attached.
Types ¶
Click to show internal directories.
Click to hide internal directories.