articlesstore

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 21, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArticleModel

type ArticleModel struct {
	Id          string
	Title       string
	Author      string
	Description string
}

type Client

type Client struct {
	database.Client
}

func NewClient

func NewClient(loggerService logger.Service, config config.Config) Client

func (*Client) CreateArticle

func (c *Client) CreateArticle(payload *articlesservice.Article) (ArticleModel, error)

func (*Client) DeleteArticle

func (c *Client) DeleteArticle(articleId string) error

func (*Client) GetArticle

func (c *Client) GetArticle(articleId string) (ArticleModel, error)

func (*Client) UpdateArticle

func (c *Client) UpdateArticle(payload *articlesservice.Article) (ArticleModel, error)

type Store

type Store interface {
	GetArticle(articleId string) (ArticleModel, error)
	CreateArticle(payload *articlesservice.Article) (ArticleModel, error)
	UpdateArticle(payload *articlesservice.Article) (ArticleModel, error)
	DeleteArticle(articleId string) error
}

Jump to

Keyboard shortcuts

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