Versions in this module Expand all Collapse all v1 v1.0.0 Sep 4, 2017 Changes in this version + type Bookmark struct + Description string + ID bson.ObjectId + Tags []string + Timestamp time.Time + Title string + URL string + func (b *Bookmark) SetID(id string) error + func (b Bookmark) GetID() string + func (b Bookmark) String() string + type MemoryStorage struct + func NewMemoryStorage() *MemoryStorage + func (s MemoryStorage) Count(q Query) (int, error) + func (s MemoryStorage) Delete(id string) error + func (s MemoryStorage) GetAll(q Query) ([]Bookmark, error) + func (s MemoryStorage) GetOne(id string) (Bookmark, error) + func (s MemoryStorage) GetPage(q Query, skip, limit int) ([]Bookmark, error) + func (s MemoryStorage) Insert(b *Bookmark) error + func (s MemoryStorage) Update(b *Bookmark) error + type MgoStorage struct + func NewMgoStorage(uri string) (MgoStorage, error) + func (s MgoStorage) Close() + func (s MgoStorage) Count(q Query) (int, error) + func (s MgoStorage) Delete(id string) error + func (s MgoStorage) GetAll(q Query) ([]Bookmark, error) + func (s MgoStorage) GetOne(id string) (Bookmark, error) + func (s MgoStorage) GetPage(q Query, skip, limit int) ([]Bookmark, error) + func (s MgoStorage) Insert(b *Bookmark) error + func (s MgoStorage) Update(b *Bookmark) error + type Paginator struct + Limit int + Skip int + func NewPaginator(r api2go.Request) (*Paginator, error) + type Query struct + func NewQuery(r api2go.Request) Query + func (q Query) Mgo() bson.M + type Resource struct + Storage Storage + func (s Resource) Create(obj interface{}, r api2go.Request) (api2go.Responder, error) + func (s Resource) Delete(id string, r api2go.Request) (api2go.Responder, error) + func (s Resource) FindAll(r api2go.Request) (api2go.Responder, error) + func (s Resource) FindOne(id string, r api2go.Request) (api2go.Responder, error) + func (s Resource) PaginatedFindAll(r api2go.Request) (uint, api2go.Responder, error) + func (s Resource) Update(obj interface{}, r api2go.Request) (api2go.Responder, error) + type Response struct + Code int + Res interface{} + func (r Response) Metadata() map[string]interface{} + func (r Response) Result() interface{} + func (r Response) StatusCode() int + type Storage interface + Count func(q Query) (int, error) + Delete func(id string) error + GetAll func(q Query) ([]Bookmark, error) + GetOne func(id string) (Bookmark, error) + GetPage func(q Query, skip, limit int) ([]Bookmark, error) + Insert func(b *Bookmark) error + Update func(b *Bookmark) error