repo

package
v0.0.0-...-3d8a049 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const TableName = "basket"

Variables

View Source
var IDColumn = []string{"id"}
View Source
var InsertColumns = []string{"user_id"}
View Source
var SelectColumns = []string{"id", "user_id", "created", "updated"}

Functions

This section is empty.

Types

type Repo

type Repo interface {
	Add(ctx context.Context, basket *model.Basket) (uint64, error)
	Update(ctx context.Context, basket *model.Basket) (bool, error)
	Get(ctx context.Context, basketID uint64) (*model.Basket, error)
	List(ctx context.Context, limit uint64, offset uint64) (model.Baskets, error)
	Remove(ctx context.Context, basketID uint64) (bool, error)
}

Repo is the interface that wraps the basic methods of the database.

func NewRepo

func NewRepo(db *sqlx.DB) Repo

NewRepo returns the Repo interface.

Jump to

Keyboard shortcuts

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