Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Article ¶
type Article struct { Title string `json:"title,omitempty"` Link string `json:"link,omitempty"` Description string `json:"description,omitempty"` Published time.Time `json:"published,omitempty"` GUID string `json:"guid,omitempty"` Thumbnail string `json:"thumbnail,omitempty"` Categories []string `json:"categories,omitempty"` Provider string `json:"provider,omitempty"` }
Article defines a news article
type ArticleRepository ¶
type ArticleRepository interface { InsertArticles(ctx context.Context, p []Article) ([]string, error) GetArticles(ctx context.Context, offset, count int, category, provider []string) ([]Article, error) }
ArticleRepository defines functionality to CRUD articles in underlying store
type ErrNotFound ¶
type ErrNotFound struct {
Message string
}
ErrNotFound is returned when an item requested is not found
func (ErrNotFound) Error ¶
func (e ErrNotFound) Error() string
type Provider ¶
type Provider struct { Type string `json:"type,omitempty"` Label string `json:"label,omitempty"` FeedURL string `json:"feedURL,omitempty"` PollFrequencySeconds int `json:"pollFrequencySeconds,omitempty"` }
Provider represents a provider
type ProviderRepository ¶
type ProviderRepository interface { InsertProviders(ctx context.Context, p []Provider) ([]string, error) GetProviders(ctx context.Context, offset, count int) ([]Provider, error) GetProvider(ctx context.Context, providerID string) (Provider, error) }
ProviderRepository defines functionality to CRUD providers in underlying store
Click to show internal directories.
Click to hide internal directories.