Documentation ¶
Overview ¶
Package source identifies the source of query requests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromContext ¶
FromContext extracts the typed source, or false if it doesn't exist.
func NewContext ¶
func NewContext(ctx context.Context, source []byte, deserialize Deserializer) (context.Context, error)
NewContext returns a new context with the source bytes as a value if the source is non-nil. If a non-nil deserializer is provided an additional typed value is added for easier use.
Types ¶
type Deserializer ¶
Deserializer deserializes the raw source bytes into a type for easier use. The raw source can be nil and the Deserializer can return a typed empty value for the application.
Click to show internal directories.
Click to hide internal directories.