data

package
v0.0.0-...-490d541 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: MIT Imports: 11 Imported by: 0

README

Data

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEnt

func NewEnt(cfg *config.Bootstrap) *ent.Client

func NewGreeterRepo

func NewGreeterRepo(data *Data, logger log.Logger) biz.GreeterRepo

NewGreeterRepo .

func NewRDBClient

func NewRDBClient(conf *conf.Bootstrap) *redis.Client

func NewUserRepo

func NewUserRepo(data *Data, logger log.Logger) biz.UserRepo

func UserPoToBo

func UserPoToBo(po *ent.User) *biz.User

func UserPosToBos

func UserPosToBos(po []*ent.User) []*biz.User

Types

type Data

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

Data .

func NewData

func NewData(client *ent.Client, rdb *redis.Client, logger log.Logger) (*Data, func(), error)

NewData .

type UserRepo

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

func (UserRepo) CountUserByUsername

func (repo UserRepo) CountUserByUsername(ctx context.Context, username string) (int, error)

func (UserRepo) CreateUser

func (repo UserRepo) CreateUser(ctx context.Context, param *biz.User) (*biz.User, error)

func (UserRepo) GetDB

func (repo UserRepo) GetDB() *ent.Client

func (UserRepo) GetUser

func (u UserRepo) GetUser(ctx context.Context, username string) (*biz.User, error)

Directories

Path Synopsis
ent

Jump to

Keyboard shortcuts

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