Documentation ¶
Index ¶
Constants ¶
View Source
const (
CollectionName = "anime"
)
Variables ¶
This section is empty.
Functions ¶
func CreateSession ¶
func CreateSession() (*mgo.Session, error)
Types ¶
type AnimeRepository ¶
type AnimeRepository struct {
Session *mgo.Session
}
func (*AnimeRepository) Create ¶
func (repo *AnimeRepository) Create(anime *proto.Anime) error
Create new Anime
func (*AnimeRepository) FindAll ¶
func (repo *AnimeRepository) FindAll() ([]*proto.Anime, error)
FindAll anime possible with limit 20
func (*AnimeRepository) FindByQuery ¶
func (repo *AnimeRepository) FindByQuery(request map[string]interface{}) ([]*proto.Anime, error)
FindByQuery get anime by query provided
Click to show internal directories.
Click to hide internal directories.