domain

package
v0.0.0-...-ccb81ee Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Article

type Article struct {
	ID     string
	Title  string
	Author string
	Link   url.URL
	Date   time.Time
	Tags   []string
}

Article represents a editorial piece to read

type ArticleRepository

type ArticleRepository interface {
	All(ctx context.Context) ([]Article, error)
	Get(ctx context.Context, id string) (Article, error)
}

ArticleRepository can fetch Articles

type ReadingList

type ReadingList struct {
	ID       string
	Articles []Article
}

ReadingList stores Articles for future reading

func (*ReadingList) AddArticle

func (l *ReadingList) AddArticle(ctx context.Context, a Article)

AddArticle to the list

type ReadingListRepository

type ReadingListRepository interface {
	Load(ctx context.Context, id string) (*ReadingList, error)
	Save(ctx context.Context, l *ReadingList) error
}

ReadingListRepository can store and load ReadingLists

Jump to

Keyboard shortcuts

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