domain

package
v0.2.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 27, 2025 License: MIT Imports: 3 Imported by: 1

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

type PageNotFoundError struct {
	Method string
	Path   string
}

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

type ResponseError struct {
	Code               *string `json:"code"`
	TroubleshootingTip *string `json:"troubleshooting"`
	Message            string  `json:"message"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL