Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ErrInvalidWeight ¶ added in v0.1.0
type ErrInvalidWeight struct {
// contains filtered or unexported fields
}
ErrInvalidWeight is thrown when a handler has a weight outside the acceptable bounds.
func (ErrInvalidWeight) Error ¶ added in v0.1.0
func (e ErrInvalidWeight) Error() string
type Handler ¶
type Handler struct { Weight int `yaml:"weight"` ResponseHeaders map[string]string `yaml:"response_headers"` StaticResponse string `yaml:"static_response"` ResponseStatus int `yaml:"response_status"` ResponsePath string `yaml:"response_path"` // contains filtered or unexported fields }
Handler includes all the metadata to decide on and serve a response.
type Route ¶
type Route struct { Path string `yaml:"path"` Method string `yaml:"method"` QueryParams map[string]string `yaml:"query_params"` RequestHeaders map[string]string `yaml:"request_headers"` Middleware map[string]map[string]string `yaml:"middleware"` Handlers []Handler `yaml:"handlers"` // contains filtered or unexported fields }
Route includes all routing data to build a route and forward to an appropriate router. This is handed off to the router for the live routing.
Click to show internal directories.
Click to hide internal directories.