Documentation
¶
Index ¶
Constants ¶
View Source
const HttpMetricPointName = "http"
Variables ¶
View Source
var ( HttpPathKey = namespace.Namespace{Parent: &HttpRequestContextKey, Identifier: "path"} HttpFullPathKey = namespace.Namespace{Parent: &HttpRequestContextKey, Identifier: "fullPath"} HttpMethodKey = namespace.Namespace{Parent: &HttpRequestContextKey, Identifier: "method"} HttpRequestIdKey = namespace.Namespace{Parent: &HttpRequestContextKey, Identifier: "request_id", IsMetricTag: true} HttpCorrelationIdKey = namespace.Namespace{Parent: &HttpRequestContextKey, Identifier: "correlation_id", IsMetricTag: true} )
View Source
var ( LogHTTPScope = namespace.Namespace{Identifier: "http"} LogRouteScope = namespace.Namespace{Parent: &LogHTTPScope, Identifier: "route"} LogResponseScope = namespace.Namespace{Parent: &LogHTTPScope, Identifier: "response"} )
View Source
var ( LogHttpMethodField = namespace.Namespace{Parent: &LogRouteScope, Identifier: "method"} LogHttpPathField = namespace.Namespace{Parent: &LogRouteScope, Identifier: "path"} LogHttpHandlerCountField = namespace.Namespace{Parent: &LogRouteScope, Identifier: "handler_count"} LogHttpHandlerNameField = namespace.Namespace{Parent: &LogRouteScope, Identifier: "handler"} LogHttpResponseStatusCodeField = namespace.Namespace{Parent: &LogResponseScope, Identifier: "status"} LogHttpResponseTimeField = namespace.Namespace{Parent: &LogResponseScope, Identifier: "ms"} )
View Source
var HeaderXCorrelationId = "X-Correlation-ID"
View Source
var HeaderXRequestId = "X-Request-ID"
View Source
var HttpContextKey = namespace.Namespace{Identifier: "http"}
View Source
var HttpRequestContextKey = namespace.Namespace{Parent: &HttpContextKey, Identifier: "request"}
View Source
var HttpResponseContextKey = namespace.Namespace{Parent: &HttpContextKey, Identifier: "response"}
Functions ¶
This section is empty.
Types ¶
type PageNotFoundError ¶
func NewPageNotFoundError ¶ added in v0.2.11
func NewPageNotFoundError(method string, path string) PageNotFoundError
func (PageNotFoundError) Error ¶
func (p PageNotFoundError) Error() string
func (PageNotFoundError) Unwrap ¶ added in v0.2.11
func (p PageNotFoundError) Unwrap() error
type Response ¶ added in v0.2.2
type Response struct {
Body *map[string]interface{} `json:"body,omitempty"`
CorrelationId *string `json:"correlationId,omitempty"`
Error *ResponseError `json:"error,omitempty"`
RequestId *string `json:"requestId,omitempty"`
Status int `json:"status"`
}
type ResponseError ¶
Click to show internal directories.
Click to hide internal directories.