repository

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadRequest = errors.New("bad request")

ErrBadRequest ...

View Source
var ErrNoSuchEntity = errors.New("no such entity")

ErrNoSuchEntity ...

View Source
var ErrNotImplemented = errors.New("not implemented")

ErrNotImplemented ...

Functions

This section is empty.

Types

type ArticleRepository

type ArticleRepository interface {
	Get(ctx context.Context, id string) (*model.Article, error)
	GetAll(ctx context.Context) ([]*model.Article, error)
	Create(ctx context.Context, article *model.Article) (*model.Article, error)
	Update(ctx context.Context, article *model.Article) (*model.Article, error)
}

ArticleRepository ...

func NewArticleMockRepository

func NewArticleMockRepository() ArticleRepository

NewArticleMockRepository ...

func NewArticlePostgresqlRepository

func NewArticlePostgresqlRepository(dataSourceName string) (ArticleRepository, error)

NewArticlePostgresqlRepository ...

Jump to

Keyboard shortcuts

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