dao

package
v0.0.0-...-73856a8 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2020 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Firestore *firestore.Client
)

Functions

func CreateAttribute

func CreateAttribute(ctx context.Context, attribute *domain.Attribute) error

func CreateAttributeValue

func CreateAttributeValue(ctx context.Context, val *domain.AttributeValue) error

func DeleteAttribute

func DeleteAttribute(ctx context.Context, attribute *domain.Attribute) error

func DeleteAttributeValue

func DeleteAttributeValue(ctx context.Context, val *domain.AttributeValue) error

func Init

func Init() io.Closer

Init starts up the database access object package and configures a database.

func ListAttributes

func ListAttributes(ctx context.Context) ([]*domain.Attribute, error)

func ListAttributesByItem

func ListAttributesByItem(ctx context.Context, itemID string) ([]*domain.AttributeValue, error)

func ReadAttribute

func ReadAttribute(ctx context.Context, id string) (*domain.Attribute, error)

func ReadAttributeBySlug

func ReadAttributeBySlug(ctx context.Context, slug string) (*domain.Attribute, error)

func ReadAttributeValue

func ReadAttributeValue(ctx context.Context, id string) (*domain.AttributeValue, error)

func UpdateAttribute

func UpdateAttribute(ctx context.Context, attribute *domain.Attribute) error

func UpdateAttributeValue

func UpdateAttributeValue(ctx context.Context, val *domain.AttributeValue) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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