mw

package
v0.6.12 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: AGPL-3.0 Imports: 16 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClientContextInterceptor

func NewClientContextInterceptor(serviceName, secret string) *clientContextInterceptor

NewClientContextInterceptor ..

func NewErrInterceptor

func NewErrInterceptor() *errInterceptor

NewErrInterceptor ..

func NewLogInterceptor

func NewLogInterceptor() *logInterceptor

NewLogInterceptor ..

func NewLogInterceptorWithOptions

func NewLogInterceptorWithOptions(
	options LogOptions,
) *logInterceptor

NewLogInterceptorWithOptions ..

func NewRoleAuthInterceptor

func NewRoleAuthInterceptor(desc RoleAuthDescriptor) *userRoleInterceptor

NewRoleAuthInterceptor ..

func NewServerContextInterceptor

func NewServerContextInterceptor(secret string) *serverContextInterceptor

NewServerContextInterceptor ..

func RecoverUnaryServerInterceptor

func RecoverUnaryServerInterceptor() grpc.UnaryServerInterceptor

RecoverUnaryServerInterceptor ...

Types

type GrpcServerInterceptor

type GrpcServerInterceptor interface {
	Unary() grpc.UnaryServerInterceptor
	Stream() grpc.StreamServerInterceptor
}

GrpcServerInterceptor ..

type LogOptions

type LogOptions struct {
	RedactRequestFunc  func(any) any
	RedactResponseFunc func(any) any
	RedactCtxValueFunc func(string, any) any
	LogLevelFunc       func(error) func(context.Context, string, ...interface{})
}

LogOptions lets clients configure interceptor behavior

type RoleAuthDescriptor

type RoleAuthDescriptor struct {
	Prefix       string
	GuestMethods []string
}

RoleAuthDescriptor ..

Jump to

Keyboard shortcuts

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