server

package
v0.0.0-...-31fb4b0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClientHeaderAccessKey = "client-id"
	ClientHeaderSecretKey = "client-secret"
)

Variables

This section is empty.

Functions

func NewAuthStreamServerInterception

func NewAuthStreamServerInterception() grpc.StreamServerInterceptor

func NewAuthUnaryServerInterceptor

func NewAuthUnaryServerInterceptor() grpc.UnaryServerInterceptor

func NewClientCredential

func NewClientCredential(cak, csk string) metadata.MD

Types

type GrpcAuther

type GrpcAuther struct {
}

func (*GrpcAuther) StreamServerInterception

func (a *GrpcAuther) StreamServerInterception(srv interface{}, ss grpc.ServerStream,
	info *grpc.StreamServerInfo, handler grpc.StreamHandler) error

Stream rpc interceptor

func (*GrpcAuther) UnaryServerInterceptor

func (a *GrpcAuther) UnaryServerInterceptor(ctx context.Context, req interface{},
	info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error)

Jump to

Keyboard shortcuts

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