Documentation ¶
Index ¶
- func NewEndpointsMux(endpoints ...EndpointHandler) http.Handler
- type EndpointHandler
- type EndpointWithTimeout
- type HandlerError
- func BadGatewayError(message string) HandlerError
- func BadRequestError(message string) HandlerError
- func ConflictError(message string) HandlerError
- func ExpectationFailedError(message string) HandlerError
- func FailedDependencyError(message string) HandlerError
- func ForbiddenError(message string) HandlerError
- func GatewayTimeoutError(message string) HandlerError
- func GoneError(message string) HandlerError
- func HTTPVersionNotSupportedError(message string) HandlerError
- func InsufficientStorageError(message string) HandlerError
- func InternalServerErrorError(message string) HandlerError
- func LengthRequiredError(message string) HandlerError
- func LockedError(message string) HandlerError
- func LoopDetectedError(message string) HandlerError
- func MethodNotAllowedError(message string) HandlerError
- func MisdirectedRequestError(message string) HandlerError
- func NetworkAuthenticationRequiredError(message string) HandlerError
- func NewHandlerError(code int, message string) HandlerError
- func NotAcceptableError(message string) HandlerError
- func NotExtendedError(message string) HandlerError
- func NotFoundError(message string) HandlerError
- func NotImplementedError(message string) HandlerError
- func PaymentRequiredError(message string) HandlerError
- func PreconditionFailedError(message string) HandlerError
- func PreconditionRequiredError(message string) HandlerError
- func ProxyAuthRequiredError(message string) HandlerError
- func RequestEntityTooLargeError(message string) HandlerError
- func RequestHeaderFieldsTooLargeError(message string) HandlerError
- func RequestTimeoutError(message string) HandlerError
- func RequestURITooLongError(message string) HandlerError
- func RequestedRangeNotSatisfiableError(message string) HandlerError
- func ServiceUnavailableError(message string) HandlerError
- func TeapotError(message string) HandlerError
- func TooEarlyError(message string) HandlerError
- func TooManyRequestsError(message string) HandlerError
- func UnauthorizedError(message string) HandlerError
- func UnavailableForLegalReasonsError(message string) HandlerError
- func UnprocessableEntityError(message string) HandlerError
- func UnsupportedMediaTypeError(message string) HandlerError
- func UpgradeRequiredError(message string) HandlerError
- func VariantAlsoNegotiatesError(message string) HandlerError
- type MiddlewareFromSlice
- type MiddlewareFunc
- type MiddlewareHandler
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEndpointsMux ¶
func NewEndpointsMux(endpoints ...EndpointHandler) http.Handler
NewEndpointsMux will create a new mux with the given [EndpointHandler]s. This will also be setup with the appropriate routing, so they can serve HTTP requests.
Types ¶
type EndpointHandler ¶
type EndpointHandler interface {
EndpointPattern() string
}
EndpointHandler allows for the registration of an endpoint with a route. The implementation will also need a "Handle" method.
type EndpointWithTimeout ¶
type HandlerError ¶
HandlerError is the error to return from an [EndpointHandler] handler method to return with a message and status back to the caller.
func BadGatewayError ¶
func BadGatewayError(message string) HandlerError
func BadRequestError ¶
func BadRequestError(message string) HandlerError
func ConflictError ¶
func ConflictError(message string) HandlerError
func ExpectationFailedError ¶
func ExpectationFailedError(message string) HandlerError
func FailedDependencyError ¶
func FailedDependencyError(message string) HandlerError
func ForbiddenError ¶
func ForbiddenError(message string) HandlerError
func GatewayTimeoutError ¶
func GatewayTimeoutError(message string) HandlerError
func GoneError ¶
func GoneError(message string) HandlerError
func HTTPVersionNotSupportedError ¶
func HTTPVersionNotSupportedError(message string) HandlerError
func InsufficientStorageError ¶
func InsufficientStorageError(message string) HandlerError
func InternalServerErrorError ¶
func InternalServerErrorError(message string) HandlerError
func LengthRequiredError ¶
func LengthRequiredError(message string) HandlerError
func LockedError ¶
func LockedError(message string) HandlerError
func LoopDetectedError ¶
func LoopDetectedError(message string) HandlerError
func MethodNotAllowedError ¶
func MethodNotAllowedError(message string) HandlerError
func MisdirectedRequestError ¶
func MisdirectedRequestError(message string) HandlerError
func NetworkAuthenticationRequiredError ¶
func NetworkAuthenticationRequiredError(message string) HandlerError
func NewHandlerError ¶
func NewHandlerError(code int, message string) HandlerError
func NotAcceptableError ¶
func NotAcceptableError(message string) HandlerError
func NotExtendedError ¶
func NotExtendedError(message string) HandlerError
func NotFoundError ¶
func NotFoundError(message string) HandlerError
func NotImplementedError ¶
func NotImplementedError(message string) HandlerError
func PaymentRequiredError ¶
func PaymentRequiredError(message string) HandlerError
func PreconditionFailedError ¶
func PreconditionFailedError(message string) HandlerError
func PreconditionRequiredError ¶
func PreconditionRequiredError(message string) HandlerError
func ProxyAuthRequiredError ¶
func ProxyAuthRequiredError(message string) HandlerError
func RequestEntityTooLargeError ¶
func RequestEntityTooLargeError(message string) HandlerError
func RequestHeaderFieldsTooLargeError ¶
func RequestHeaderFieldsTooLargeError(message string) HandlerError
func RequestTimeoutError ¶
func RequestTimeoutError(message string) HandlerError
func RequestURITooLongError ¶
func RequestURITooLongError(message string) HandlerError
func RequestedRangeNotSatisfiableError ¶
func RequestedRangeNotSatisfiableError(message string) HandlerError
func ServiceUnavailableError ¶
func ServiceUnavailableError(message string) HandlerError
func TeapotError ¶
func TeapotError(message string) HandlerError
func TooEarlyError ¶
func TooEarlyError(message string) HandlerError
func TooManyRequestsError ¶
func TooManyRequestsError(message string) HandlerError
func UnauthorizedError ¶
func UnauthorizedError(message string) HandlerError
func UnavailableForLegalReasonsError ¶
func UnavailableForLegalReasonsError(message string) HandlerError
func UnprocessableEntityError ¶
func UnprocessableEntityError(message string) HandlerError
func UnsupportedMediaTypeError ¶
func UnsupportedMediaTypeError(message string) HandlerError
func UpgradeRequiredError ¶
func UpgradeRequiredError(message string) HandlerError
func VariantAlsoNegotiatesError ¶
func VariantAlsoNegotiatesError(message string) HandlerError
func (HandlerError) Error ¶
func (h HandlerError) Error() string
type MiddlewareFromSlice ¶
type MiddlewareFromSlice struct {
Middlewares []MiddlewareFunc
}
func (MiddlewareFromSlice) Middleware ¶
func (m MiddlewareFromSlice) Middleware() []MiddlewareFunc
type MiddlewareFunc ¶
type MiddlewareHandler ¶
type MiddlewareHandler interface {
Middleware() []MiddlewareFunc
}
MiddlewareHandler allows for [MiddlewareFunc]s to be attached to an EndpointHandler.
Click to show internal directories.
Click to hide internal directories.