repo

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: May 8, 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 task by id
	GetByID(ctx contextx.Contextx, id string) (task *todo.Task, err error)

	// List serve caller to list all tasks
	List(ctx contextx.Contextx, limit, offset int) (tasks []*todo.Task, err error)

	// Create serve caller to create a task with title
	Create(ctx contextx.Contextx, newTask *todo.Task) (task *todo.Task, err error)

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

	// Update serve caller to update a task
	Update(ctx contextx.Contextx, updated *todo.Task) (task *todo.Task, err error)

	// Remove serve caller to remove a task by id
	Remove(ctx contextx.Contextx, id string) error
}

IRepo declare repository service function

func CreateIRepo

func CreateIRepo(path string) (IRepo, error)

func NewImpl

func NewImpl(client *mongo.Client) 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