grpc

package
v0.4.16 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AuthorizationHeaderKey is the key for the authorization header
	AuthorizationHeaderKey = "authorization"

	// JwtCtxClaimsKey is the key for the JWT context claims
	JwtCtxClaimsKey = "jwt_claims"
)

Variables

View Source
var (
	InternalServerError = errors.New("internal server error")
	ServiceUnavailable  = errors.New("service unavailable")
	Unauthenticated     = errors.New("unauthenticated")
	Unauthorized        = errors.New("unauthorized")
)

Functions

func SetContextClaims added in v0.4.0

func SetContextClaims(ctx *context.Context, claims jwt.Claims) context.Context

SetContextClaims sets the claims in the context

Types

type AuthorizationIdx added in v0.4.0

type AuthorizationIdx int
const (
	TokenIdx AuthorizationIdx = iota
)

func (AuthorizationIdx) Int added in v0.4.0

func (i AuthorizationIdx) Int() int

Int returns the integer value of the index

type Uri added in v0.4.5

type Uri struct {
	Host string
	Port string
	Uri  string
}

Uri is the URI for the gRPC service

func LoadUri added in v0.4.5

func LoadUri(hostKey string, portKey string) (*Uri, error)

LoadUri loads the URI from the environment

Directories

Path Synopsis
client
server

Jump to

Keyboard shortcuts

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