Documentation
¶
Index ¶
- func AdminSecretHeader() string
- func AppIDHeader() string
- func AppPlatformHeader() string
- func AppVersionHeader() string
- func BannedFlagHeader() string
- func GuestRoleName() string
- func NewClientContextInterceptor(serviceName, secret string) *clientContextInterceptor
- func NewErrInterceptor() *errInterceptor
- func NewLogInterceptor() *logInterceptor
- func NewLogInterceptorWithOptions(options LogOptions) *logInterceptor
- func NewRoleAuthInterceptor(desc RoleAuthDescriptor) *userRoleInterceptor
- func NewServerContextInterceptor(secret string) *serverContextInterceptor
- func RecoverUnaryServerInterceptor() grpc.UnaryServerInterceptor
- func ServiceNameHeader() string
- func TraceIDHeader() string
- func UserIDHeader() string
- func UserRoleHeader() string
- type GrpcServerInterceptor
- type LogOptions
- type RoleAuthDescriptor
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 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 ..
Click to show internal directories.
Click to hide internal directories.