product

package
v0.0.0-...-5cf5ef9 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidName = errors.New("invalid product name")
	ErrInvalidID   = errors.New("invalid product id")
	ErrInvalidJSON = errors.New("invalid product json")
)

Functions

This section is empty.

Types

type Product

type Product struct {
	ID         bson.ObjectId `json:"id" bson:"_id"`
	Name       string        `json:"name" bson:"name"`
	Status     string        `json:"status" bson:"status,omitempty"`
	CreateTime time.Time     `json:"create_time" bson:"create_time"`
}

Product .

func Get

func Get(id string) (product *Product, err error)

Get .

func New

func New(name string) (product *Product, err error)

New .

func (*Product) String

func (p *Product) String() string

Jump to

Keyboard shortcuts

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