data

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2022 License: Apache-2.0 Imports: 18 Imported by: 1

README

Data

Documentation

Index

Constants

This section is empty.

Variables

ProviderSet is data providers.

Functions

func GetDb

func GetDb(ctx context.Context, provider dal.ConstDbProvider) *g.DB

func NewTenantRepo

func NewTenantRepo(eventbus *eventbus.EventBus, data *Data) biz.TenantRepo

Types

type Data

type Data struct {
	DbProvider dal.ConstDbProvider
}

Data .

func NewData

func NewData(c *kconf.Data, dbProvider dal.ConstDbProvider, logger log.Logger) (*Data, func(), error)

NewData .

type Migrate

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

func NewMigrate

func NewMigrate(data *Data) *Migrate

func (*Migrate) Seed

func (m *Migrate) Seed(ctx context.Context, sCtx *seed.Context) error

type TenantRepo

type TenantRepo struct {
	*kitgorm.Repo[biz.Tenant, string, v1.ListTenantRequest]
}

func (*TenantRepo) BuildDetailScope

func (g *TenantRepo) BuildDetailScope(withDetail bool) func(db *gg.DB) *gg.DB

func (*TenantRepo) BuildFilterScope

func (g *TenantRepo) BuildFilterScope(q *v1.ListTenantRequest) func(db *gg.DB) *gg.DB

func (*TenantRepo) DefaultSorting

func (g *TenantRepo) DefaultSorting() []string

func (*TenantRepo) FindByIdOrName

func (g *TenantRepo) FindByIdOrName(ctx context.Context, idOrName string) (*biz.Tenant, error)

func (*TenantRepo) GetDb

func (g *TenantRepo) GetDb(ctx context.Context) *gg.DB

func (*TenantRepo) UpdateAssociation

func (g *TenantRepo) UpdateAssociation(ctx context.Context, entity *biz.Tenant) error

Jump to

Keyboard shortcuts

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