injector

package
v0.0.0-...-c31c563 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTP

func HTTP(next http.Handler) http.Handler

func HTTPFunc

func HTTPFunc(next http.HandlerFunc) http.HandlerFunc
func Header(ctx context.Context) http.Header

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

func NewContextWithHeader(ctx context.Context, hdr http.Header) context.Context

func NewContextWithInitPayload

func NewContextWithInitPayload(ctx context.Context, initPayload transport.InitPayload) context.Context

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL