grpc_helper

package
v0.99.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InvalidFullMethodName = errors.New("invalid full method name")
)

Functions

func AuthFromMD

func AuthFromMD(ctx context.Context, expectedScheme string, headerAuthorize ...string) (string, error)

github.com/grpc-ecosystem/go-grpc-middleware/auth/metadata.go:AuthFromMD

func GetSubjectTokenFromContext

func GetSubjectTokenFromContext(ctx context.Context) (string, error)

func GetTokenFromContext

func GetTokenFromContext(ctx context.Context) (string, error)

func HandleGRPCError

func HandleGRPCError(logger log.FieldLogger, err error, format string, args ...interface{}) error

func HttpStatusCode2GrpcStatusCode

func HttpStatusCode2GrpcStatusCode(code int) codes.Code

func StreamServerInterceptor

func StreamServerInterceptor() grpc.StreamServerInterceptor

func UnaryServerInterceptor

func UnaryServerInterceptor() grpc.UnaryServerInterceptor

Types

type MethodDescription

type MethodDescription struct {
	Package string
	Service string
	Method  string
}

func ParseMethodDescription

func ParseMethodDescription(fullMethodName string) (*MethodDescription, error)

Jump to

Keyboard shortcuts

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