Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAlreadyExists = errors.New("already exists")
ErrAlreadyExists is returned when a route already exists.
View Source
var HTTPMethods = []string{ http.MethodGet, http.MethodPost, http.MethodPut, http.MethodDelete, http.MethodPatch, http.MethodHead, http.MethodOptions, http.MethodTrace, http.MethodConnect, }
HTTPMethods is a list of supported HTTP methods.
Functions ¶
func IsValidHTTPMethod ¶
IsValidHTTPMethod checks if the given method is a valid HTTP method.
Types ¶
type Children ¶
type Children struct {
Node *node
Path string
}
Children represents a child node with its path.
type NodeType ¶
type NodeType int32
NodeType indicates the type of the node.
const ( // Exact means the path must be matched exactly. Exact NodeType = iota // PreferentialPrefix means the path must be matched as a preferential prefix. PreferentialPrefix // Prefix means the path must be matched as a prefix. Prefix // Regex means the path must be matched as a regular expression. Regex )
Click to show internal directories.
Click to hide internal directories.