repo

package
v0.0.0-...-fa8c592 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repo

type Repo struct {
	Mongo *db.MONGO
}

* * Repo hold different datasources * Initialize Repo on each request

func (*Repo) AddViewToArticle

func (repo *Repo) AddViewToArticle(id string) error

AddViewToArticle adds new view to article in db

func (*Repo) CreateArticle

func (repo *Repo) CreateArticle(article *model.Article) error

CreateArticle creates new article in db

func (*Repo) GetArticle

func (repo *Repo) GetArticle(id string) (*model.Article, error)

GetArticle fetchs article from db

func (*Repo) GetMgSession

func (repo *Repo) GetMgSession() (*mgo.Database, *mgo.Session)

Jump to

Keyboard shortcuts

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