repo

package
v1.3.17 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2021 License: GPL-3.0 Imports: 10 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 result by user id and id
	GetByID(ctx contextx.Contextx, userID, id, goalID int64) (result *okr.Result, err error)

	// List serve caller to list all results
	List(ctx contextx.Contextx, userID, goalID int64, limit, offset int) (results []*okr.Result, err error)

	// Create serve caller to create a result
	Create(ctx contextx.Contextx, created *okr.Result) (result *okr.Result, err error)

	// Count serve caller to count all results
	Count(ctx contextx.Contextx, userID, goalID int64) (total int, err error)

	// Update serve caller to update a result
	Update(ctx contextx.Contextx, updated *okr.Result) (result *okr.Result, err error)

	// Delete serve caller to delete a result by user id and id
	Delete(ctx contextx.Contextx, userID, id, goalID int64) error
}

IRepo declare result repo function

func CreateRepo

func CreateRepo(path string) (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