Documentation
¶
Index ¶
- func NewRoundTripper(opts ...Option) http.RoundTripper
- func RequestToContext(r *http.Request) context.Context
- func Write(w http.ResponseWriter, contentType string, status int, body string)
- func WriteBadRequestError(w http.ResponseWriter, err error)
- func WriteInternalServerError(w http.ResponseWriter, err error)
- type Option
- type Options
- type Trie
- type TrieOption
- type TrieOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRoundTripper ¶
func NewRoundTripper(opts ...Option) http.RoundTripper
NewRoundTripper creates new http RoundTripper
func RequestToContext ¶
RequestToContext puts the `Authorization` header bearer token into context so calls to services will be authorized.
func Write ¶
func Write(w http.ResponseWriter, contentType string, status int, body string)
Write sets the status and body on a http ResponseWriter
func WriteBadRequestError ¶
func WriteBadRequestError(w http.ResponseWriter, err error)
WriteBadRequestError sets a 400 status code
func WriteInternalServerError ¶
func WriteInternalServerError(w http.ResponseWriter, err error)
WriteInternalServerError sets a 500 status code
Types ¶
type Trie ¶ added in v3.7.5
type Trie struct {
// contains filtered or unexported fields
}
Tree is a trie tree.
type TrieOption ¶ added in v3.7.6
type TrieOption func(*TrieOptions)
TrieOption func signature
func IgnoreCase ¶ added in v3.7.6
func IgnoreCase(b bool) TrieOption
IgnoreCase says that search must be case insensitive
type TrieOptions ¶ added in v3.7.6
type TrieOptions struct {
IgnoreCase bool
}
TrieOptions contains search options
Click to show internal directories.
Click to hide internal directories.