config

package
v0.0.0-...-89144a2 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func NewRouter

func NewRouter() *echo.Echo

func NewValidator

func NewValidator() *validator.Validate

func ValidateReactionType

func ValidateReactionType(fe validator.FieldLevel) bool

Types

type JwtHandler

type JwtHandler struct {
	ATSecretKey   string
	RTSecretKey   string
	ATExpiredTime time.Duration
	RTExpiredTime time.Duration
}

func NewJwtHandler

func NewJwtHandler(env *env.Env) *JwtHandler

func (*JwtHandler) GenerateToken

func (j *JwtHandler) GenerateToken(id string, tokenType TokenType) (string, error)

func (*JwtHandler) ValidateToken

func (j *JwtHandler) ValidateToken(reqToken string, tokenType TokenType) (string, error)

type TokenType

type TokenType = string
var (
	AccessToken  TokenType = "accessToken"
	RefreshToken TokenType = "refreshToken"
)

Jump to

Keyboard shortcuts

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