models

package
v0.0.0-...-22efe1f Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2015 License: MIT Imports: 3 Imported by: 0

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"`
}

Jump to

Keyboard shortcuts

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