mw

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: AGPL-3.0 Imports: 16 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdminSecretHeader added in v0.6.18

func AdminSecretHeader() string

func AppIDHeader added in v0.6.18

func AppIDHeader() string

func AppPlatformHeader added in v0.6.18

func AppPlatformHeader() string

func AppVersionHeader added in v0.6.18

func AppVersionHeader() string

func BannedFlagHeader added in v0.6.18

func BannedFlagHeader() string

func GuestRoleName added in v0.6.18

func GuestRoleName() string

func NewClientContextInterceptor

func NewClientContextInterceptor(serviceName, secret string) *clientContextInterceptor

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

func RecoverUnaryServerInterceptor

func RecoverUnaryServerInterceptor() grpc.UnaryServerInterceptor

RecoverUnaryServerInterceptor ...

func ServiceNameHeader added in v0.6.18

func ServiceNameHeader() string

func TraceIDHeader added in v0.6.18

func TraceIDHeader() string

func UserIDHeader added in v0.6.18

func UserIDHeader() string

func UserRoleHeader added in v0.6.18

func UserRoleHeader() string

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 {
	GuestMethods []string
}

RoleAuthDescriptor ..

Jump to

Keyboard shortcuts

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