db

package
v0.0.0-...-9fc0fad Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAccount

func AddAccount(a *model.Account)

AddAccount adds an account to db

func AddProduct

func AddProduct(prod *model.Product)

AddProduct adds product to db

func GetAccount

func GetAccount(id string) *model.Account

GetAccount retrieves account that has same id with given id

func GetAllProducts

func GetAllProducts() map[string]*model.Product

GetAllProducts retrieves all the products in db

func GetProduct

func GetProduct(id string) *model.Product

GetProduct retrieves a product with given id

func HasAccount

func HasAccount(id string) bool

HasAccount checks if the id exists in db

func HasProduct

func HasProduct(id string) bool

HasProduct returns true if a product with given id exists

Types

This section is empty.

Jump to

Keyboard shortcuts

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