repo

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 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 {
	// QueryByID serve caller to query a objective by id from database
	QueryByID(ctx contextx.Contextx, id string) (*okr.Objective, error)

	// Create serve caller to create a objective to database
	Create(ctx contextx.Contextx, created *okr.Objective) (*okr.Objective, error)

	// List serve caller to list all objectives from database
	List(ctx contextx.Contextx, offset, limit int) ([]*okr.Objective, error)

	// Count serve caller to count all objectives from database
	Count(ctx contextx.Contextx) (int, error)

	// Update serve caller to update a objective to database
	Update(ctx contextx.Contextx, updated *okr.Objective) (*okr.Objective, error)

	// Delete serve caller to delete a objective by id from database
	Delete(ctx contextx.Contextx, id string) (int, error)
}

IRepo declare okr repo service function

func CreateRepo

func CreateRepo(path string) (IRepo, error)

func NewImpl

func NewImpl(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