gateway

package
v0.2.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	GatewayRequest       = "x-gateway-request"
	GatewayURL           = "x-gateway-url"
	GatewaySessionCookie = "ory_kratos_session"
	GatewayAPIKey        = "X-Session-Token"
	APIKey               = "X-API-KEYID"
	APIKeyToken          = "X-API-TOKEN"
	GatewayMethod        = "x-gateway-method"
	UserAgent            = "x-gateway-user-agent"
	Host                 = "x-gateway-host"
	RemoteAddr           = "x-gateway-remote-addr"
)

Paralus Gateway annotations

Variables

View Source
var ErrNoHandlers = errors.New("no handlers defined")

ErrNoHandlers returned when not handlers are passed to gateway

Functions

func IsGatewayRequest

func IsGatewayRequest(ctx context.Context) bool

IsGatewayRequest returns true if the request is originated from Paralus Gateway

func NewGateway

func NewGateway(ctx context.Context, endpoint string, serveMuxOptions []runtime.ServeMuxOption, handlers ...HandlerFromEndpoint) (http.Handler, error)

NewGateway returns new grpc gateway

func NewHTTPBodyMarshaler

func NewHTTPBodyMarshaler() runtime.Marshaler

NewHTTPBodyMarshaler returns new http body marshaler

func NewParalusJSON

func NewParalusJSON() runtime.Marshaler

NewParalusJSON returns new grpc gateway paralus json marshaller

func NewParalusYAML

func NewParalusYAML() runtime.Marshaler

NewParalusYAML returns new grpc gateway yaml marshaller

Types

type HandlerFromEndpoint

type HandlerFromEndpoint func(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

HandlerFromEndpoint defines the function for registering grpc gateway handlers to grpc endpoint

Jump to

Keyboard shortcuts

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