cache

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearProjectAuth

func ClearProjectAuth(userID int64)

func GetProjectAuth

func GetProjectAuth(ctx context.Context, userID int64, roleIDs []int64) (map[int64]*sys.ProjectAuth, error)

Types

type ApiAuth

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

func NewApiAuth

func NewApiAuth(store kv.Store) *ApiAuth

type Captcha

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

func NewCaptcha

func NewCaptcha(store kv.Store) *Captcha

func (*Captcha) GenKey

func (c *Captcha) GenKey(Type, Use, codeID string) string

func (*Captcha) Store

func (c *Captcha) Store(ctx context.Context, Type, Use, codeID, code string, account string, expire int64) error

func (*Captcha) Verify

func (c *Captcha) Verify(ctx context.Context, Type, Use, codeID, code string) string

type PwdCheck

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

func NewPwdCheck

func NewPwdCheck(store kv.Store) *PwdCheck

func (*PwdCheck) CheckAccountOrIpForbidden

func (p *PwdCheck) CheckAccountOrIpForbidden(ctx context.Context, list []*conf.LoginSafeCtlInfo) (int32, bool)

func (*PwdCheck) CheckPasswordTimes

func (p *PwdCheck) CheckPasswordTimes(ctx context.Context, list []*conf.LoginSafeCtlInfo) (bool, error)

func (*PwdCheck) ClearWrongpassKeys

func (p *PwdCheck) ClearWrongpassKeys(ctx context.Context, list []*conf.LoginSafeCtlInfo)

type Slot

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

func NewSlot

func NewSlot() *Slot

func (*Slot) Get

func (c *Slot) Get(ctx context.Context, code string, subCode string) slot.Infos

type UserToken

type UserToken struct {
	*caches.Cache[users.UserInfo, int64]
}

func NewUserToken

func NewUserToken(FastEvent *eventBus.FastEvent) (*UserToken, error)

Jump to

Keyboard shortcuts

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