rpcx

package
v1.3.75 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthorizationKey = "authorization"
)

Variables

This section is empty.

Functions

func GetToken added in v1.1.12

func GetToken(ctx context.Context) string

获取token

func GetUserContextFromWithJwt added in v1.1.12

func GetUserContextFromWithJwt[T any](ctx context.Context, secret string, uc *T) *errx.Error

获取并验证jwt token

func LoggerInterceptor

func LoggerInterceptor(ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error)

func RegisterAppTokens added in v1.3.22

func RegisterAppTokens(appTokens map[string]string, key string, host string, password string)

func UserContextInterceptor

func UserContextInterceptor(ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error)

token 不强制传递token

Types

This section is empty.

Jump to

Keyboard shortcuts

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