mall

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	web.Model

	FirstName  string
	MiddleName string
	LastName   string
	Zip        string
	Street     string
	City       string
	State      string
	Country    string
	Phone      string
	Email      string

	UserID uint
	User   auth.User
}

Address address

func (Address) TableName

func (Address) TableName() string

TableName table name

type Engine

type Engine struct {
	Db   *gorm.DB  `inject:""`
	I18n *web.I18n `inject:""`
	Jwt  *auth.Jwt `inject:""`
}

Engine engine

func (*Engine) Atom

func (p *Engine) Atom(lang string) ([]*atom.Entry, error)

Atom rss.atom

func (*Engine) Mount

func (p *Engine) Mount(rt *gin.Engine)

Mount web mount-points

func (*Engine) RegisterWorker

func (p *Engine) RegisterWorker()

RegisterWorker register worker

func (*Engine) Shell

func (p *Engine) Shell() []cli.Command

Shell shell commands

func (*Engine) Sitemap

func (p *Engine) Sitemap() ([]stm.URL, error)

Sitemap sitemap.xml.gz

type Model

type Model struct {
	web.Model

	Name        string
	Type        string
	Description string
}

Model base model

type Product

type Product struct {
	Model

	VendorID uint
	Vendor   Vendor
	Tags     []Tag `gorm:"many2many:shop_products_tags;"`
	Variants []Variant
}

Product product

func (Product) TableName

func (Product) TableName() string

TableName table name

type Property

type Property struct {
	web.Model

	Name  string
	Value string

	VariantID uint
	Variant   Variant
}

Property property

func (Property) TableName

func (Property) TableName() string

TableName table name

type Store

type Store struct {
	Model

	Currency string

	OwnerID   uint
	Owner     auth.User
	AddressID uint
	Address   Address
}

Store store

func (Store) TableName

func (Store) TableName() string

TableName table name

type Tag

type Tag struct {
	Model

	Products []Product `gorm:"many2many:shop_products_tags;"`
}

Tag tag

func (Tag) TableName

func (Tag) TableName() string

TableName table name

type Variant

type Variant struct {
	web.Model

	Cost  float64
	Price float64

	ProductID  uint
	Product    Product
	Properties []Property
}

Variant variant

func (Variant) TableName

func (Variant) TableName() string

TableName table name

type Vendor

type Vendor struct {
	Model

	Products []Product
}

Vendor vendor

func (Vendor) TableName

func (Vendor) TableName() string

TableName table name

Jump to

Keyboard shortcuts

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