Documentation ¶
Index ¶
- Variables
- func AddCategory(name, p, w string) error
- func AddSubcategory(cat, name string) error
- func Buckets(buckets ...string) func(*Query)
- func DeleteCategory(cat string) error
- func DeleteSubcategory(cat, subcat string) error
- func GetBackup(w http.ResponseWriter) error
- func GetBlogImage(key string) ([]byte, error)
- func GetCategories() ([]string, error)
- func GetImage(bucket, title, size string) ([]byte, error)
- func GetProductTitles(cat, subcat string) ([]string, error)
- func GetSubCategories(cat string) ([]string, error)
- func Init(c config.Config, opts ...func())
- func Key(k string) func(*Query)
- func ProductDescription(d string) func(*Product)
- func ProductImage(r io.Reader) func(*Product)
- func ProductPrice(price string) func(*Product)
- func RenameCategory(old, name string) error
- func RenameSubcategory(cat, old, name string) error
- func SavePasswordReset(email string) (string, error)
- func SetDB(d storer) func()
- func SetPrice(name string, price Price) error
- func Val(v []byte) func(*Query)
- type Address
- type Blog
- type BlogKey
- type Bolt
- func (b *Bolt) AddBucket(row Query) error
- func (b *Bolt) Delete(rows []Query) error
- func (b *Bolt) DeleteAll(bucket []byte) error
- func (b *Bolt) Get(rows []Query, f func(key, val []byte) error) error
- func (b *Bolt) GetAll(r Query, f func(key, val []byte) error) error
- func (b *Bolt) GetBackup(w http.ResponseWriter) error
- func (b *Bolt) Put(rows []Query) error
- func (b *Bolt) RenameBucket(src, dst Query) error
- type Permission
- type Price
- type Product
- type Query
- type Token
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //ErrExists indicates you are trying to add an item in the db that already exists ErrExists = errors.New("product already exists") )
View Source
var (
ErrNotFound = errors.New("not found")
)
Functions ¶
func AddCategory ¶
func AddSubcategory ¶
func DeleteCategory ¶
func DeleteSubcategory ¶
func GetBackup ¶
func GetBackup(w http.ResponseWriter) error
func GetBlogImage ¶
func GetCategories ¶
func GetProductTitles ¶
func GetSubCategories ¶
func ProductDescription ¶
func ProductImage ¶
func ProductPrice ¶
func RenameCategory ¶
func RenameSubcategory ¶
func SavePasswordReset ¶
Types ¶
type Address ¶
type Address struct { Address string `schema:"address" json:"address,omitempty"` Address2 string `schema:"address2" json:"address2,omitempty"` Zip string `schema:"zip" json:"zip,omitempty"` City string `schema:"city" json:"city,omitempty"` State string `schema:"state" json:"state,omitempty"` Country string `schema:"country" json:"country,omitempty"` }
type Blog ¶
type Blog struct { Title string `json:"title" schema:"title"` Date time.Time `json:"date" schema:"date"` Body string `json:"body" schema:"body"` // contains filtered or unexported fields }
func CurrentBlog ¶
type Bolt ¶
type Bolt struct {
// contains filtered or unexported fields
}
func (*Bolt) RenameBucket ¶
Rename bucket takes 2 rows, the first should point to
type Product ¶
type Product struct { Title string `json:"-"` Cat string `json:"-"` Subcat string `json:"-"` Price string `json:"-"` Total string `json:"-"` Quantity int `json:"-"` Description string `json:"description"` ID string `json:"id"` // contains filtered or unexported fields }
func NewProduct ¶
type User ¶
type User struct { Email string `schema:"email" json:"email"` //Wholesale stuff StoreName string `schema:"store_name" json:"store_name,omitempty"` DiscountCodeID int `schema:"discount_code_id" json:"discount_code_id,omitempty"` DiscountCode string `schema:"discount_code" json:"discount_code,omitempty"` Website string `schema:"website" json:"website,omitempty"` FirstName string `schema:"first_name" json:"first_name,omitempty"` LastName string `schema:"last_name" json:"last_name,omitempty"` Address Address `schema:"address" json:"address,omitempty"` ShippingAddress Address `schema:"shipping_address" json:"shipping_address,omitempty"` Permission Permission `json:"permission"` Password string `schema:"password" json:"-"` Password2 string `schema:"confirm-password" json:"-"` HashedPassword []byte `json:"hashed_password,omitempty"` //They clicked on the verification email link Verified bool `json:"verified"` //Admin approval as a real wholesaler Confirmed bool `json:"confirmed,omitempty"` }
func VerifyWholesaler ¶
func (*User) CheckPassword ¶
func (*User) UpdatePassword ¶
Click to show internal directories.
Click to hide internal directories.