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 goal by id
	GetByID(ctx contextx.Contextx, userID, id int64) (info *okr.Goal, err error)

	// Create a goal
	Create(ctx contextx.Contextx, created *okr.Goal) (info *okr.Goal, err error)

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

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

	// Update serve caller to update a goal by id
	Update(ctx contextx.Contextx, updated *okr.Goal) (info *okr.Goal, err error)

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

IRepo declare goal repository 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