login

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	LocalCache *gocache.Cache
	Dao        *db.StoreDbClient
	RedisCache *trace_redis.RedisInstance
}

func New

func New() (*Service, error)

func (*Service) CacheUser added in v1.0.0

func (s *Service) CacheUser(c *gin.Context, data *protos.Person)

func (*Service) Check

func (s *Service) Check(c *gin.Context, token string) (*protos.Person, error)

func (*Service) LockByName added in v1.0.0

func (s *Service) LockByName(c *gin.Context, userName string) bool

func (*Service) Register added in v1.0.0

func (s *Service) Register(c *gin.Context, userName, pwd string) (err error)

func (*Service) VerifyUser

func (s *Service) VerifyUser(c *gin.Context, userName, pwd string) (id int32, err error)

func (*Service) VerifyUserName added in v1.0.0

func (s *Service) VerifyUserName(c *gin.Context, userName string) (ok bool, err error)

VerifyUserName 验证用户名是否存在

Jump to

Keyboard shortcuts

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