utils

package
v0.0.0-...-501be23 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpError

type HttpError interface {
	Message() string
	Status() int
}

func NewHttpError

func NewHttpError(err error, status int) HttpError

type JWTStrategy

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

func NewJWTStrategy

func NewJWTStrategy(secret string, method jwt.SigningMethod) JWTStrategy

func (*JWTStrategy) CreateJWT

func (s *JWTStrategy) CreateJWT(id int) (string, HttpError)

func (*JWTStrategy) DecodeJWT

func (s *JWTStrategy) DecodeJWT(tokenStr string) (*payload, HttpError)

Jump to

Keyboard shortcuts

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