utils

package
v0.0.0-...-7745932 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BcryptCheck

func BcryptCheck(password, hash string) bool

func BcryptEncrypt

func BcryptEncrypt(password string) string

func NewJwtToken

func NewJwtToken(secretKey, uuid, roleString string, iat, seconds, roleId int64) (string, error)

func ParseTags

func ParseTags(lang string) []language.Tag

Types

type RedisStore

type RedisStore struct {
	Expiration time.Duration
	PreKey     string
	Context    context.Context
	Redis      *redis.Redis
}

func NewRedisStore

func NewRedisStore(r *redis.Redis) *RedisStore

func (*RedisStore) Get

func (r *RedisStore) Get(key string, clear bool) string

func (*RedisStore) Set

func (r *RedisStore) Set(id string, value string) error

func (*RedisStore) UseWithCtx

func (r *RedisStore) UseWithCtx(ctx context.Context) base64Captcha.Store

func (*RedisStore) Verify

func (r *RedisStore) Verify(id, answer string, clear bool) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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