articles

package
v0.0.0-...-2610577 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2020 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service controls articles resource.

func NewService

func NewService(logger logger, sqldb *sql.DB) *Service

NewService returns a new articles service instance.

func (*Service) CreateArticle

func (s *Service) CreateArticle(
	ctx context.Context,
	body io.Reader,
	articleURL *url.URL,
	published *time.Time,
	sourceID *string,
) (*articles.Article, error)

CreateArticle creates a new article.

func (*Service) DeleteArticle

func (s *Service) DeleteArticle(ctx context.Context, request *articles.DeleteArticleRequest) (*empty.Empty, error)

DeleteArticle removes an article.

func (*Service) GetArticle

func (s *Service) GetArticle(ctx context.Context, request *articles.GetArticleRequest) (*articles.Article, error)

GetArticle returns an article.

func (*Service) ListArticles

ListArticles returns a list of articles.

func (*Service) UpdateArticle

func (s *Service) UpdateArticle(ctx context.Context, request *articles.UpdateArticleRequest) (*articles.Article, error)

UpdateArticle updates the article.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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