repo

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProviderSet = wire.NewSet(NewImpl)

ProviderSet is a provider set for wire

Functions

This section is empty.

Types

type IRepo

type IRepo interface {
	// GetByID serve caller to get a record by id
	GetByID(ctx contextx.Contextx, id int64) (info *event.Record, err error)

	// List serve caller to list spend history of activity
	List(ctx contextx.Contextx, actID int64, limit, offset int) (infos []*event.Record, err error)

	// Create a new record into activity's spend history
	Create(ctx contextx.Contextx, created *event.Record) (info *event.Record, err error)

	// Delete a record by id
	Delete(ctx contextx.Contextx, id int64) error
}

IRepo declare history repository functions

func CreateRepo

func CreateRepo(logger *zap.Logger, rw *sqlx.DB) (IRepo, error)

CreateRepo serve caller to create an IRepo

func NewImpl

func NewImpl(logger *zap.Logger, rw *sqlx.DB) IRepo

NewImpl serve caller to create an IRepo

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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