Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultHeaderName = "X-Webpa-Convey"
DefaultHeaderName is the HTTP header assumed to contain Convey data when no header is supplied
Variables ¶
View Source
var ErrMissingHeader = errors.New("No convey header present")
ErrMissingHeader indicates that no HTTP header exists which contains convey information
Functions ¶
This section is empty.
Types ¶
type HeaderTranslator ¶
type HeaderTranslator interface { // FromHeader extracts the configued header and attempts to parse it as a convey map FromHeader(http.Header) (convey.C, error) // ToHeader takes the given convey map, converts it to a string, and sets that string into the supplied header ToHeader(http.Header, convey.C) error }
HeaderTranslator is an analog to convey.Translator, except that this type works with http.Header.
func NewHeaderTranslator ¶
func NewHeaderTranslator(headerName string, translator convey.Translator) HeaderTranslator
NewHeaderTranslator creates a HeaderTranslator that uses a convey.Translator to produce convey maps.
Click to show internal directories.
Click to hide internal directories.