utils

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const JWT_CONTEXT_KEY = "jwt_context_key"

Variables

This section is empty.

Functions

func CreateJwtToken

func CreateJwtToken(name string, dcId int) (string, error)

func GetLogger

func GetLogger() *zap.Logger

func NewLoggerServer

func NewLoggerServer()

func ParseToken

func ParseToken(token string) (jwt.MapClaims, error)

Types

type LogErrorHandler

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

func NewZapLogErrorHandler

func NewZapLogErrorHandler(logger *zap.Logger) *LogErrorHandler

func (*LogErrorHandler) Handle

func (h *LogErrorHandler) Handle(ctx context.Context, err error)

type Token

type Token struct {
	Name string
	DcId int
	jwt.StandardClaims
}

Jump to

Keyboard shortcuts

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