Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decorator ¶
Decorator
Executes per request, before the request. Use to apply special CORS rules for a single request. The returned function will be passed the http.Handler associated with the request.
type HttpRequest ¶
type HttpRequest interface {
Info() HttpRouteInfo
}
HttpRequest
Indicates essential fields that provide the ability to tag and categorize requests for logging, metrics and other functionality.
type HttpRouteInfo ¶
type HttpRouteInfo struct {
// Name
//
// The name of the request that is sent to the logging middleware. This MUST be unique
// among all other services that are defined.
Name string
// Method
//
// HTTP request Method
Method Method
// Path
// eg. "/path/one" or "v1/path/two"
// The relative path to the custom root path provided.
Path string
// Description
//
// A helpful text that describes the service. This will appear in logs.
Description string
}
type OpenAPIExtended ¶ added in v1.1.0
type OpenAPIExtended interface {
OpenAPIExtensions() map[string]interface{}
}
OpenAPIExtended
Provides the ability to attach openAPI extensions to a request object. These extensions will be parsed by the openapi spec generator and added to the operation.
type OpenAPISecure ¶ added in v1.1.0
OpenAPISecure
Provides the ability to attach security extensions to a request object. These extensions will be parsed by the openapi spec generator and added to the operation.
type Validator ¶
type Validator interface {
// Validate
//
// This method, when implemented, will perform one or more validations of the state of the
// request after being received from the client. If the state is not accepted, a non-nil result
// is returned for the accompanying error.
Validate() error
}
Validator
Indicates that the request will have an accompanying validation.