Documentation ¶
Index ¶
- type BookmarkStore
- func (store BookmarkStore) Create(b *model.Bookmark) error
- func (store BookmarkStore) Delete(id string) error
- func (store BookmarkStore) GetAll() []model.Bookmark
- func (store BookmarkStore) GetByID(id string) (model.Bookmark, error)
- func (store BookmarkStore) GetByTag(tags []string) []model.Bookmark
- func (store BookmarkStore) GetByUser(user string) []model.Bookmark
- func (store BookmarkStore) Update(b model.Bookmark) error
- type UserStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BookmarkStore ¶
type BookmarkStore struct {
C *mgo.Collection
}
BookmarkStore provides CRUD operations against the collection "bookmarks".
func (BookmarkStore) Create ¶
func (store BookmarkStore) Create(b *model.Bookmark) error
Create inserts the value of struct Bookmark into collection.
func (BookmarkStore) Delete ¶
func (store BookmarkStore) Delete(id string) error
Delete removes an existing document from the collection.
func (BookmarkStore) GetAll ¶
func (store BookmarkStore) GetAll() []model.Bookmark
GetAll returns all documents from the collection.
func (BookmarkStore) GetByID ¶
func (store BookmarkStore) GetByID(id string) (model.Bookmark, error)
GetByID returns a single document from the collection.
func (BookmarkStore) GetByTag ¶
func (store BookmarkStore) GetByTag(tags []string) []model.Bookmark
GetByTag returns all documents from the collection filtering by tags.
Click to show internal directories.
Click to hide internal directories.