Documentation
¶
Index ¶
- Constants
- Variables
- func IsGatewayRequest(ctx context.Context) bool
- func NewGateway(ctx context.Context, endpoint string, serveMuxOptions []runtime.ServeMuxOption, ...) (http.Handler, error)
- func NewHTTPBodyMarshaler() runtime.Marshaler
- func NewParalusJSON() runtime.Marshaler
- func NewParalusYAML() runtime.Marshaler
- type HandlerFromEndpoint
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 ¶
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 ¶
NewHTTPBodyMarshaler returns new http body marshaler
func NewParalusJSON ¶
NewParalusJSON returns new grpc gateway paralus json marshaller
func NewParalusYAML ¶
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
Source Files
¶
Click to show internal directories.
Click to hide internal directories.