interceptor

package
v0.0.0-...-f952efe Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthInterceptor

type AuthInterceptor struct {
	// contains filtered or unexported fields
}

func NewAuthInterceptor

func NewAuthInterceptor(db *gorm.DB, cnt connect.Connector) *AuthInterceptor

NewAuthInterceptor create new AuthInterceptor

func (*AuthInterceptor) GetToken

func (interceptor *AuthInterceptor) GetToken(ctx context.Context, method string) (string, error)

GetToken get jwt token on metadata

func (*AuthInterceptor) Stream

func (interceptor *AuthInterceptor) Stream() grpc.StreamServerInterceptor

Stream is stream interceptor which validate token and RBAC permissions

func (*AuthInterceptor) Unary

func (interceptor *AuthInterceptor) Unary() grpc.UnaryServerInterceptor

Unary is unary interceptor which validate token and RBAC permissions

type RecoveryInterceptor

type RecoveryInterceptor struct {
}

func NewRecoveryInterceptor

func NewRecoveryInterceptor() *RecoveryInterceptor

NewRecoveryInterceptor create new RecoveryInterceptor

func (*RecoveryInterceptor) Stream

func (interceptor *RecoveryInterceptor) Stream() grpc.StreamServerInterceptor

Unary is stream interceptor to recovery process from panic

func (*RecoveryInterceptor) Unary

func (interceptor *RecoveryInterceptor) Unary() grpc.UnaryServerInterceptor

Unary is unary interceptor to recovery process from panic

Jump to

Keyboard shortcuts

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