repo

package
v0.0.0-...-9677058 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2019 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrExists appears exists a record.
	ErrExists = errors.New("sql: a record exists")

	// AscOrder defines ORDER BY query as ascending
	AscOrder = qm.OrderBy("id ASC")
	// DescOrder defines ORDER BY query as descending
	DescOrder = qm.OrderBy("id DESC")
	// ProductPublic defines WHERE query
	ProductPublic = qm.Where("product_status_id = ?", 1)
	// ProductPrivate defines WHERE query
	ProductPrivate = qm.Where("product_status_id = ?", 2)
)

Functions

func Inject

func Inject(ctx context.Context, env util.Environment, g *inject.Graph, rt interface{})

Inject injects dependencies

Types

type DTBProducts

type DTBProducts interface {
	// Find ...
	Find(context.Context, uint) (*model.DTBProduct, error)
	FindBy(context.Context, []qm.QueryMod, ...string) (*model.DTBProduct, error)
	FindPreload(context.Context, uint, ...string) (*model.DTBProduct, error)
	// List ...
	ListBy(ctx context.Context, where []qm.QueryMod, loads ...string) (model.DTBProductSlice, error)
	ListPublic(ctx context.Context, loads ...string) (model.DTBProductSlice, error)
	ListPrivate(ctx context.Context, loads ...string) (model.DTBProductSlice, error)
	// All returns sort ordered records
	All(context.Context) (model.DTBProductSlice, error)
	AllPreload(context.Context, ...string) (model.DTBProductSlice, error)
	Exists(context.Context, uint) (bool, error)
}

DTBProducts manifests api interface

Jump to

Keyboard shortcuts

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