Documentation ¶
Overview ¶
Package injector implements HTTP and WS middlewares that injects the request headers and the WS payload into the context.
This is used in the demos to give the schema resolvers access to the request headers and the WS payload, since gqlgen doesn't expose this information.
Index ¶
- func HTTP(next http.Handler) http.Handler
- func HTTPFunc(next http.HandlerFunc) http.HandlerFunc
- func Header(ctx context.Context) http.Header
- func InitPayload(ctx context.Context) transport.InitPayload
- func InitPayloadFunc(ctx context.Context, initPayload transport.InitPayload) (context.Context, *transport.InitPayload, error)
- func NewContextWithHeader(ctx context.Context, hdr http.Header) context.Context
- func NewContextWithInitPayload(ctx context.Context, initPayload transport.InitPayload) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTTPFunc ¶
func HTTPFunc(next http.HandlerFunc) http.HandlerFunc
func InitPayload ¶
func InitPayload(ctx context.Context) transport.InitPayload
func InitPayloadFunc ¶
func InitPayloadFunc(ctx context.Context, initPayload transport.InitPayload) (context.Context, *transport.InitPayload, error)
func NewContextWithHeader ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.