repo

package
v0.0.0-...-70b0572 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UIDKey        = "uid"
	UIDPrefixKey  = "uid:"
	UserKey       = "user"
	UserPrefixKey = "user:"
)

UIDKey and other redis params

Variables

This section is empty.

Functions

This section is empty.

Types

type UserRepo

type UserRepo interface {
	Create(ctx context.Context, req models.User) (string, error)
	Update(ctx context.Context, req models.User) (string, error)
	Delete(ctx context.Context, req models.IDRequest) error
	Search(ctx context.Context, req models.UserSearchRequest) (interface{}, error)
	Get(ctx context.Context, req models.IDRequest) (models.User, error)
	Find(ctx context.Context, req models.UserFindRequest) (models.User, error)
}

UserRepo interface declaration

func NewUserMgoRepo

func NewUserMgoRepo(db *mgo.Database) UserRepo

func NewUserRedis

func NewUserRedis(client *redis.Client) UserRepo

NewUserRedis func declaration

Jump to

Keyboard shortcuts

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