Documentation ¶
Index ¶
- Variables
- type DBLayer
- type DBORM
- func (db *DBORM) GetAllProducts() ([]models.Product, error)
- func (db *DBORM) GetCustomerByID(int) (models.Customer, error)
- func (db *DBORM) GetCustomerByName(string, string) (models.Customer, error)
- func (db *DBORM) GetCustomerOrdersByID(int) ([]models.Order, error)
- func (db *DBORM) GetProduct(uint) (models.Product, error)
- func (db *DBORM) GetPromos() ([]models.Product, error)
- func (db *DBORM) SignInUser(models.Customer) error
- func (db *DBORM) SignOutUserById(int) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrINVALIDPASSWORD = errors.New("Invalid password")
Functions ¶
This section is empty.
Types ¶
type DBLayer ¶
type DBLayer interface { GetAllProducts() ([]models.Product, error) GetPromos() ([]models.Product, error) GetCustomerByName(string, string) (models.Customer, error) GetCustomerByID(int) (models.Customer, error) GetProduct(int) (models.Product, error) AddUser(models.Customer) (models.Customer, error) SignInUser(username, password string) (models.Customer, error) SignOutUserById(int) error GetCustomerOrdersByID(int) ([]models.Order, error) AddOrder(models.Order) error GetCreditCardCID(int) (string, error) SaveCreditCardForCustomer(int, string) error }
type DBORM ¶
func (*DBORM) GetCustomerByName ¶
func (*DBORM) GetCustomerOrdersByID ¶
func (*DBORM) SignOutUserById ¶
Click to show internal directories.
Click to hide internal directories.