Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Product ¶
type Product struct { gorm.Model SKU string `json:"sku" gorm:"unique"` ProductName string `json:"product_name"` Qty float64 `json:"qty"` Price float64 `json:"price"` Unit string `json:"unit"` Status int32 `json:"status"` }
func (*Product) ListWithPagination ¶
func (p *Product) ListWithPagination(ctx context.Context, pg *util.Pagination, sort string) ([]Product, *util.Pagination, error)
type User ¶
type User struct { gorm.Model Email string `json:"email" gorm:"unique"` Password string `json:"password"` }
User defines the user in db
func (*User) CheckPassword ¶
CheckPassword checks user password
func (*User) HashPassword ¶
HashPassword encrypts user password
Click to show internal directories.
Click to hide internal directories.