Documentation ¶
Index ¶
- Constants
- func CopyRequestTrace(sourceRequest *rest.Request, destinationRequest *http.Request) error
- func GetRequestLogger(request *rest.Request) log.Logger
- func GetRequestTraceRequest(request *rest.Request) string
- func GetRequestTraceSession(request *rest.Request) string
- func SetRequestErrors(request *rest.Request, errors []*Error)
- func SetRequestLogger(request *rest.Request, logger log.Logger)
- func SetRequestTraceRequest(request *rest.Request, traceRequest string)
- func SetRequestTraceSession(request *rest.Request, traceSession string)
- type Context
- type Error
- type Source
Constants ¶
View Source
const ( HTTPHeaderTraceRequest = "X-Tidepool-Trace-Request" HTTPHeaderTraceSession = "X-Tidepool-Trace-Session" )
Variables ¶
This section is empty.
Functions ¶
func CopyRequestTrace ¶
func GetRequestTraceRequest ¶
func GetRequestTraceSession ¶
func SetRequestErrors ¶
func SetRequestTraceRequest ¶
func SetRequestTraceSession ¶
Types ¶
type Error ¶
type Error struct { Code string `json:"code,omitempty"` Title string `json:"title,omitempty"` Detail string `json:"detail,omitempty"` Status int `json:"status,string,omitempty"` Source *Source `json:"source,omitempty"` Meta interface{} `json:"meta,omitempty"` }
func ErrorInternalServerFailure ¶
func ErrorInternalServerFailure() *Error
func GetRequestErrors ¶
func (*Error) WithSourceParameter ¶
func (*Error) WithSourcePointer ¶
Click to show internal directories.
Click to hide internal directories.