Documentation ¶
Index ¶
- func NewEnt(cfg *config.Bootstrap) *ent.Client
- func NewGreeterRepo(data *Data, logger log.Logger) biz.GreeterRepo
- func NewRDBClient(conf *conf.Bootstrap) *redis.Client
- func NewUserRepo(data *Data, logger log.Logger) biz.UserRepo
- func UserPoToBo(po *ent.User) *biz.User
- func UserPosToBos(po []*ent.User) []*biz.User
- type Data
- type UserRepo
- func (repo UserRepo) CountUserByUsername(ctx context.Context, username string) (int, error)
- func (repo UserRepo) CreateUser(ctx context.Context, param *biz.User) (*biz.User, error)
- func (repo UserRepo) GetDB() *ent.Client
- func (u UserRepo) GetUser(ctx context.Context, username string) (*biz.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGreeterRepo ¶
func NewGreeterRepo(data *Data, logger log.Logger) biz.GreeterRepo
NewGreeterRepo .
func NewRDBClient ¶
Types ¶
type UserRepo ¶
type UserRepo struct {
// contains filtered or unexported fields
}
func (UserRepo) CountUserByUsername ¶
func (UserRepo) CreateUser ¶
Click to show internal directories.
Click to hide internal directories.