repository

package
v1.9.5 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder added in v1.7.13

type Builder interface {
	Execute(db *gorm.DB, object interface{}) error
}

Builder .

type GORMRepository added in v1.7.13

type GORMRepository interface {
	Worker() freedom.Worker
	// contains filtered or unexported methods
}

GORMRepository .

type GoodsRepository

type GoodsRepository struct {
	freedom.Repository
	EventManager *domainevent.EventManager
}

GoodsRepository .

func (*GoodsRepository) Get

func (repo *GoodsRepository) Get(ID int) (result *entity.Goods, e error)

Get .

func (*GoodsRepository) GetAll

func (repo *GoodsRepository) GetAll() (result []*entity.Goods, e error)

GetAll .

func (*GoodsRepository) Save

func (repo *GoodsRepository) Save(goods *entity.Goods) (e error)

Save .

type Limiter added in v1.8.12

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

Limiter .

func NewAscLimiter added in v1.8.12

func NewAscLimiter(column string, size int) *Limiter

NewAscLimiter .

func NewDescLimiter added in v1.8.12

func NewDescLimiter(column string, size int) *Limiter

NewDescLimiter .

func (*Limiter) Execute added in v1.8.12

func (limiter *Limiter) Execute(db *gorm.DB, object interface{}) (e error)

Execute .

type OrderRepository

type OrderRepository struct {
	freedom.Repository
	EventManager *domainevent.EventManager
}

OrderRepository .

func (*OrderRepository) Create

func (repo *OrderRepository) Create(goodsID, num, userID int) error

Create .

func (*OrderRepository) Get

func (repo *OrderRepository) Get(ID, userID int) (result *entity.Order, e error)

Get .

func (*OrderRepository) GetAll

func (repo *OrderRepository) GetAll(userID int) (result []*entity.Order, e error)

GetAll .

type Pager added in v1.8.1

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

Pager .

func NewAscPager added in v1.8.1

func NewAscPager(column string, columns ...string) *Pager

NewAscPager .

func NewDescPager added in v1.8.1

func NewDescPager(column string, columns ...string) *Pager

NewDescPager .

func (*Pager) Execute added in v1.8.1

func (p *Pager) Execute(db *gorm.DB, object interface{}) (e error)

Execute .

func (*Pager) Order added in v1.8.1

func (p *Pager) Order() interface{}

Order .

func (*Pager) SetPage added in v1.8.1

func (p *Pager) SetPage(page, pageSize int) *Pager

SetPage .

func (*Pager) TotalPage added in v1.8.1

func (p *Pager) TotalPage() int

TotalPage .

Jump to

Keyboard shortcuts

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