interfaces

package
v0.0.0-...-cb83cae Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DbArticleRepo

type DbArticleRepo DbRepo

func NewDbArticleRepo

func NewDbArticleRepo(dbHandler DbHandler) *DbArticleRepo

func (*DbArticleRepo) FetchAll

func (repo *DbArticleRepo) FetchAll() ([]*entity.Article, error)

func (*DbArticleRepo) GetByTitle

func (repo *DbArticleRepo) GetByTitle(title string) (*entity.Article, error)

func (*DbArticleRepo) Store

func (repo *DbArticleRepo) Store(article entity.Article) error

type DbHandler

type DbHandler interface {
	GetAll() ([]map[string]interface{}, error)
	GetByTitle(title string) (map[string]interface{}, error)
	Save(article map[string]interface{}) error
}

TODO

type DbRepo

type DbRepo struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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