user_repo

package
v0.0.0-...-fff97c9 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KeyNotFound = errors.New("key not found")

Functions

This section is empty.

Types

type ICacheRepo

type ICacheRepo interface {
	GetUserByOpenid(ctx *beanctx.BizContext, openid string) (*do.User, error)
	SetUserCache(ctx *beanctx.BizContext, user *do.User) error
	GetUserCacheKey(openid string) string
}

type IUserRepo

type IUserRepo interface {
	GetUserByOpenid(ctx *beanctx.BizContext, openid string) (*do.User, error)
	CreateUser(ctx *beanctx.BizContext, user *do.User) error
}

type UserLocalCacheRepo

type UserLocalCacheRepo struct {
}

func (*UserLocalCacheRepo) GetUserByOpenid

func (u *UserLocalCacheRepo) GetUserByOpenid(ctx *beanctx.BizContext, openid string) (*do.User, error)

func (*UserLocalCacheRepo) GetUserCacheKey

func (u *UserLocalCacheRepo) GetUserCacheKey(openid string) string

func (*UserLocalCacheRepo) SetUserCache

func (u *UserLocalCacheRepo) SetUserCache(ctx *beanctx.BizContext, user *do.User) error

type UserRedisRepo

type UserRedisRepo struct {
}

func (*UserRedisRepo) GetUserByOpenid

func (u *UserRedisRepo) GetUserByOpenid(ctx *beanctx.BizContext, openid string) (*do.User, error)

func (*UserRedisRepo) GetUserCacheKey

func (u *UserRedisRepo) GetUserCacheKey(openid string) string

func (*UserRedisRepo) SetUserCache

func (u *UserRedisRepo) SetUserCache(ctx *beanctx.BizContext, user *do.User) error

type UserRepo

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

func NewUserRepo

func NewUserRepo() *UserRepo

func (*UserRepo) CreateUser

func (u *UserRepo) CreateUser(ctx *beanctx.BizContext, user *do.User) error

func (*UserRepo) GetUserByOpenid

func (u *UserRepo) GetUserByOpenid(ctx *beanctx.BizContext, openid string) (*do.User, error)

Jump to

Keyboard shortcuts

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