package
Version:
v0.0.0-...-4131fa7
Opens a new window with list of versions in this module.
Published: Oct 23, 2020
License: MIT
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Authentication struct {
ID int `db:"id"`
UserID int `db:"user_id"`
ValidUntil time.Time `db:"valid_until"`
Token string `db:"token"`
}
type Image struct {
ID int `db:"id" json:"id"`
Path string `db:"path" json:"path"`
ProductID int `db:"product_id" json:"product_id"`
}
type Models struct {
Products productsRepo
Users usersRepo
Auth authRepo
}
type Product struct {
ID int `db:"id" json:"id"`
Price float64 `db:"price" json:"price"`
Name string `db:"name" json:"name"`
Description string `db:"description" json:"description"`
Images []*Image `db:"-" json:"images"`
}
type User struct {
ID int `db:"id"`
Username string `db:"username"`
Password string `db:"password"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.