Documentation
¶
Index ¶
- Variables
- func GetRequestID(ctx context.Context) string
- func Read(ctx context.Context, body io.Reader) ([]byte, error)
- func ReadJSON(ctx context.Context, body io.Reader, intr interface{}) error
- func ReadWithLimit(ctx context.Context, body io.Reader, limit int64) ([]byte, error)
- func SetRequestID(ctx context.Context, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // RequestIDHeaderKey is the request header key RequestIDHeaderKey = "x-request-id" // RequestID holds the type for request ids RequestID = requestID(RequestIDHeaderKey) // HostHeaderKey is the request header key HostHeaderKey = "host" // XForwardedHostHeaderKey is the request header key XForwardedHostHeaderKey = "x-forwarded-host" )
Functions ¶
func ReadWithLimit ¶
ReadWithLimit reads an io reader with a limit and closes
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.