Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BeforeHTTPFunc ¶
BeforeHTTPFunc adds metadata into context
func EncodeHTTPResponse ¶
func EncodeHTTPResponse(ctx context.Context, w http.ResponseWriter, response interface{}) error
EncodeHTTPResponse writes the error from response if the response is a type of endpoint.Failer or returns the json encoded error
func ReadRemoteIP ¶
ReadRemoteIP tries to find the public address ip from the http header
Types ¶
type Link ¶
A Link is a single URL and related parameters
type Links ¶
type Links []Link
Links is a slice of Link structs
func Parse ¶
Parse parses a raw Link header in the form:
<url>; rel="foo", <url>; rel="bar"; wat="dis"
returning a slice of Link structs
func ParseMultiple ¶
ParseMultiple is like Parse, but accepts a slice of headers rather than just one header string
func (Links) FilterByRel ¶
FilterByRel filters a group of Links by the provided Rel attribute
Click to show internal directories.
Click to hide internal directories.