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, MIT Imports: 16 Imported by: 3 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Data

Documentation

Index

Constants

This section is empty.

Variables

ProviderSet is data providers.

Functions

func GetDb

func GetDb(ctx context.Context, provider gorm.DbProvider) *g.DB

func NewMenuRepo

func NewMenuRepo(dbProvider sgorm.DbProvider, eventbus *eventbus.EventBus) biz.MenuRepo

Types

type Data

type Data struct {
	DbProvider gorm.DbProvider
}

Data .

func NewData

func NewData(c *kconf.Data, dbProvider gorm.DbProvider, logger log.Logger) (*Data, func(), error)

NewData .

type MenuRepo struct {
	*kitgorm.Repo[biz.Menu, string, v1.ListMenuRequest]
}
func (c *MenuRepo) BuildDetailScope(withDetail bool) func(db *gorm.DB) *gorm.DB

BuildDetailScope preload relations

func (c *MenuRepo) BuildFilterScope(q *v1.ListMenuRequest) func(db *gorm.DB) *gorm.DB

BuildFilterScope filter

func (c *MenuRepo) DefaultSorting() []string
func (c *MenuRepo) Delete(ctx context.Context, id string) error
func (c *MenuRepo) FindByName(ctx context.Context, name string) (*biz.Menu, error)
func (c *MenuRepo) GetDb(ctx context.Context) *gorm.DB
func (c *MenuRepo) UpdateAssociation(ctx context.Context, entity *biz.Menu) error

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

Jump to

Keyboard shortcuts

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