Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArticleRepo ¶
type ArticleRepo struct {
Coll *mgo.Collection
}
func (*ArticleRepo) All ¶
func (r *ArticleRepo) All() (ArticlesCollection, error)
func (*ArticleRepo) Create ¶
func (r *ArticleRepo) Create(article *article) error
func (*ArticleRepo) Delete ¶
func (r *ArticleRepo) Delete(id string) error
func (*ArticleRepo) Find ¶
func (r *ArticleRepo) Find(id string) (ArticleResource, error)
func (*ArticleRepo) Update ¶
func (r *ArticleRepo) Update(article *article) error
type ArticleResource ¶
type ArticleResource struct {
Data article `json:"data"`
}
type ArticlesCollection ¶
type ArticlesCollection struct {
Data []article `json:"data"`
}
Click to show internal directories.
Click to hide internal directories.