Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entries ¶
type Entries struct {
Storage StorageInterface
}
func NewFeedStorage ¶
func NewFeedStorage(store StorageInterface) *Entries
type Entry ¶
type Entry struct { ID *int64 `json:"id"` Language string `json:"language"` Title string `json:"title"` Url string `json:"url"` Updated *time.Time `json:"updated"` Published *time.Time `json:"published"` Created *time.Time `json:"created"` UpdatedAt *time.Time `json:"updated_at"` Summary string `json:"summary"` Content string `json:"content"` Author string `json:"author"` Number string `json:"number"` ResourceID int `json:"resource_id"` Chunk int `json:"chunk"` }
type StorageInterface ¶
type StorageInterface interface { FindByUrl(ctx context.Context, url string) (*Entry, error) FindAllByUrl(ctx context.Context, url string) ([]Entry, error) Insert(ctx context.Context, entry *Entry) (*int64, error) Update(ctx context.Context, entry *Entry) error Bulk(ctx context.Context, entries *[]Entry) error FindAll(ctx context.Context, limit int) (chan Entry, error) Delete(ctx context.Context, id *int64) error }
Click to show internal directories.
Click to hide internal directories.