repository

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountRepository

type AccountRepository interface {
	data.Repository
	GetByUserName(ctx context.Context, username string) (*model.Account, error)
	GetList(ctx context.Context) ([]*model.Account, error)
	Update(ctx context.Context, account *model.Account) (*model.Account, error)
}

type AccountRepositoryImpl added in v1.3.7

type AccountRepositoryImpl struct {
	types.Repository `table:"account"`
	Mapper           *tk.Mapper      `wire:"tk_mapper:application.datasource@account"`
	DB               *gorm_plugin.DB `wire:"gorm_db:application.datasource@account"`
}

func (*AccountRepositoryImpl) GetByUserName added in v1.3.7

func (r *AccountRepositoryImpl) GetByUserName(ctx context.Context, username string) (*model.Account, error)

func (*AccountRepositoryImpl) GetList added in v1.3.7

func (r *AccountRepositoryImpl) GetList(ctx context.Context) ([]*model.Account, error)

func (*AccountRepositoryImpl) Update added in v1.3.7

func (r *AccountRepositoryImpl) Update(ctx context.Context, account *model.Account) (*model.Account, error)

type Factory added in v1.4.0

type Factory interface {
	GetAccountRepo() AccountRepository
}

type FactoryImpl added in v1.4.0

type FactoryImpl struct {
	types.Component   `name:"repository_factory"`
	AccountRepository AccountRepository `wire:""`
}

func (*FactoryImpl) GetAccountRepo added in v1.4.0

func (r *FactoryImpl) GetAccountRepo() AccountRepository

Jump to

Keyboard shortcuts

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