repo

package
v0.0.0-...-787b776 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrParcelNotFound error = errors.New("parcel not found")
View Source
var Parcels []*model.Parcel = []*model.Parcel{
	&model.Parcel{ID: 1, Name: "first parcel"},
	&model.Parcel{ID: 2, Name: "second parcel"},
	&model.Parcel{ID: 3, Name: "third parcel"},
	&model.Parcel{ID: 4, Name: "fourth parcel"},
	&model.Parcel{ID: 5, Name: "fifth parcel"},
}

Functions

This section is empty.

Types

type Repo

type Repo interface {
	CreateParcel(ctx context.Context, name string) (*model.Parcel, error)
	DescribeParcel(ctx context.Context, parcelID uint64) (*model.Parcel, error)
	ListParcels(ctx context.Context, cursor, offset uint64) ([]*model.Parcel, error)
	RemoveParcel(ctx context.Context, parcelID uint64) (bool, error)
}

Repo is DAO for parcel

func NewRepo

func NewRepo(db *sqlx.DB, batchSize uint) Repo

NewRepo returns Repo interface

Jump to

Keyboard shortcuts

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