data

package
v0.0.0-...-5b5d069 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

ProviderSet is data providers.

Functions

func NewAppRepo

func NewAppRepo(data *Data, logger log.Logger) biz.AppData

func NewClusterRepo

func NewClusterRepo(data *Data, c *conf.Bootstrap, logger log.Logger) biz.ClusterData

func NewProjectRepo

func NewProjectRepo(data *Data, c *conf.Bootstrap, logger log.Logger) biz.ProjectData

func NewServicesRepo

func NewServicesRepo(data *Data, logger log.Logger) biz.ServicesData

func NewUserRepo

func NewUserRepo(data *Data, c *conf.Bootstrap, logger log.Logger) biz.UserData

Types

type Data

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

func NewData

func NewData(c *conf.Bootstrap, logger log.Logger) (*Data, func(), error)

func (*Data) Error

func (d *Data) Error(ctx context.Context, msg string, args ...interface{})

func (*Data) Info

func (d *Data) Info(ctx context.Context, msg string, args ...interface{})

func (*Data) LogMode

func (d *Data) LogMode(level gormlogger.LogLevel) gormlogger.Interface

func (*Data) Trace

func (d *Data) Trace(ctx context.Context, begin time.Time, fc func() (sql string, rowsAffected int64), err error)

func (*Data) Warn

func (d *Data) Warn(ctx context.Context, msg string, args ...interface{})

type UserRepo

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

func (*UserRepo) DeleteUser

func (u *UserRepo) DeleteUser(ctx context.Context, id int64) error

func (*UserRepo) GetUserByBatchID

func (u *UserRepo) GetUserByBatchID(ctx context.Context, ids []int64) ([]*biz.User, error)

func (*UserRepo) GetUserByID

func (u *UserRepo) GetUserByID(ctx context.Context, id int64) (*biz.User, error)

func (*UserRepo) GetUserEmail

func (u *UserRepo) GetUserEmail(ctx context.Context, token string) (string, error)

func (*UserRepo) GetUserInfoByEmail

func (u *UserRepo) GetUserInfoByEmail(ctx context.Context, email string) (*biz.User, error)

func (*UserRepo) GetUsers

func (u *UserRepo) GetUsers(ctx context.Context, name, email string, pageNum, pageSize int) (users []*biz.User, total int64, err error)

func (*UserRepo) Save

func (u *UserRepo) Save(ctx context.Context, user *biz.User) error

func (*UserRepo) SignIn

func (u *UserRepo) SignIn(ctx context.Context, userParam *biz.User) error

Jump to

Keyboard shortcuts

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