Versions in this module Expand all Collapse all v0 v0.2.0 Aug 11, 2015 v0.1.0 Nov 13, 2015 Changes in this version + var Schema = schema + type Price struct + Amount float64 + Discount float64 + type Product struct + CreatedAt time.Time + Discount float64 + Name string + Price Price + Status Status + Tags []string + UpdatedAt time.Time + Url string + func (p *Product) BeforeInsert() error + func (p *Product) BeforeSave() error + type ProductQuery struct + func (q *ProductQuery) FindById(ids ...bson.ObjectId) *ProductQuery + type ProductResultSet struct + func (r *ProductResultSet) All() ([]*Product, error) + func (r *ProductResultSet) ForEach(f func(*Product) error) error + func (r *ProductResultSet) Get() (*Product, error) + func (r *ProductResultSet) Next() (returned bool) + func (r *ProductResultSet) One() (*Product, error) + type ProductStore struct + func NewProductStore(db *mgo.Database) *ProductStore + func (s *ProductStore) Find(query *ProductQuery) (*ProductResultSet, error) + func (s *ProductStore) FindOne(query *ProductQuery) (*Product, error) + func (s *ProductStore) Insert(doc *Product) error + func (s *ProductStore) MustFind(query *ProductQuery) *ProductResultSet + func (s *ProductStore) MustFindOne(query *ProductQuery) *Product + func (s *ProductStore) New(name string, price Price, createdAt time.Time) (doc *Product, err error) + func (s *ProductStore) Query() *ProductQuery + func (s *ProductStore) Save(doc *Product) (updated bool, err error) + func (s *ProductStore) Update(doc *Product) error + type Status int + const Draft + const Published + func (s *Status) BeforeInsert() error + func (s Status) AfterInsert() error Other modules containing this package gopkg.in/tyba/storable.v1