datastore

package
v0.0.0-...-54934fd Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserMySQL

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

func NewUserMySQL

func NewUserMySQL(db *gorm.DB) *UserMySQL

func (*UserMySQL) CreteUser

func (repo *UserMySQL) CreteUser(ctx context.Context, user *app.User) error

func (*UserMySQL) DeleteUser

func (repo *UserMySQL) DeleteUser(ctx context.Context, user *app.User) error

func (*UserMySQL) LockUserById

func (repo *UserMySQL) LockUserById(ctx context.Context, userId string) (app.User, error)

func (*UserMySQL) LoginUser

func (repo *UserMySQL) LoginUser(ctx context.Context, req *app.LoginUserRequest) (app.UserResponse, error)

func (*UserMySQL) QueryMultiUserByFilter

func (repo *UserMySQL) QueryMultiUserByFilter(ctx context.Context, filter *app.QueryMultiUserRequest) (app.MultiUserResponse, error)

func (*UserMySQL) QueryUserById

func (repo *UserMySQL) QueryUserById(ctx context.Context, userId string) (app.UserResponse, error)

func (*UserMySQL) UpdateUser

func (repo *UserMySQL) UpdateUser(ctx context.Context, user *app.User) error

type UserRedis

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

func NewUserRedis

func NewUserRedis(client *redis.Client) *UserRedis

func (*UserRedis) DeleteUser

func (repo *UserRedis) DeleteUser(ctx context.Context, resp *app.User) error

func (*UserRedis) QueryMultiUser

func (repo *UserRedis) QueryMultiUser(ctx context.Context, key string) (app.MultiUserResponse, error)

func (*UserRedis) QueryUser

func (repo *UserRedis) QueryUser(ctx context.Context, key string) (app.UserResponse, error)

func (*UserRedis) SetMultiUser

func (repo *UserRedis) SetMultiUser(ctx context.Context, key string, resp *app.MultiUserResponse) error

func (*UserRedis) SetUser

func (repo *UserRedis) SetUser(ctx context.Context, key string, resp *app.UserResponse) error

type UserRepository

type UserRepository struct {
	*UserMySQL
	// contains filtered or unexported fields
}

func NewUserRepository

func NewUserRepository(userMySQL *UserMySQL, cache *UserRedis) *UserRepository

func (*UserRepository) DeleteUser

func (repo *UserRepository) DeleteUser(ctx context.Context, user *app.User) error

func (*UserRepository) QueryMultiUserByFilter

func (repo *UserRepository) QueryMultiUserByFilter(ctx context.Context, filter *app.QueryMultiUserRequest) (app.MultiUserResponse, error)

func (*UserRepository) QueryUserById

func (repo *UserRepository) QueryUserById(ctx context.Context, userId string) (app.UserResponse, error)

func (*UserRepository) UpdateUser

func (repo *UserRepository) UpdateUser(ctx context.Context, user *app.User) error

Jump to

Keyboard shortcuts

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