server

package
v1.80.0-v2.18 Latest Latest
Warning

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

Go to latest
Published: May 2, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateGateway

func CreateGateway(ctx context.Context, g Gateway, port uint16) (http.Handler, string, error)

func CreateServer

func CreateServer(verifier *authz.TokenVerifier, authConfig authz.Config, queries *query.Queries, hostHeaderName string) *grpc.Server

Types

type Gateway

type Gateway interface {
	RegisterGateway() GatewayFunc
	GatewayPathPrefix() string
}

type GatewayFunc

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

type Server

type Server interface {
	Gateway
	RegisterServer(*grpc.Server)
	AppName() string
	MethodPrefix() string
	AuthMethods() authz.MethodMapping
}

type ValidationFunction

type ValidationFunction func(ctx context.Context) error

type Validator

type Validator struct {
	// contains filtered or unexported fields
}

func NewValidator

func NewValidator(validations map[string]ValidationFunction) *Validator

func (*Validator) Healthz

func (v *Validator) Healthz(_ context.Context, e *empty.Empty) (*empty.Empty, error)

func (*Validator) Ready

func (v *Validator) Ready(ctx context.Context, e *empty.Empty) (*empty.Empty, error)

func (*Validator) Validate

func (v *Validator) Validate(ctx context.Context, _ *empty.Empty) (*structpb.Struct, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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