Documentation ¶
Index ¶
- Constants
- func CopyHTTPResponse(w http.ResponseWriter, resp *http.Response) error
- func CopyHeader(dst, src http.Header)
- func CopyRequestWithDSN(req *http.Request, dsn string) (*http.Request, error)
- func ErrResponse(errormsg string, code int) *http.Response
- func GetRequestID(r *http.Request) string
- func HashRequest(r *http.Request) (string, error)
- type ResponseWrapper
Constants ¶
View Source
const (
RequestIDHeader = "x-request-id"
)
Variables ¶
This section is empty.
Functions ¶
func CopyHTTPResponse ¶
func CopyHTTPResponse(w http.ResponseWriter, resp *http.Response) error
func CopyHeader ¶
func CopyRequestWithDSN ¶
func GetRequestID ¶
Types ¶
type ResponseWrapper ¶
type ResponseWrapper struct { http.ResponseWriter // contains filtered or unexported fields }
func NewResponseWrapper ¶
func NewResponseWrapper(w http.ResponseWriter) *ResponseWrapper
func (*ResponseWrapper) GetStatusCode ¶
func (w *ResponseWrapper) GetStatusCode() int
func (*ResponseWrapper) WriteHeader ¶
func (w *ResponseWrapper) WriteHeader(code int)
Click to show internal directories.
Click to hide internal directories.