Documentation ¶
Index ¶
- type DB
- func (db *DB) GetDayHighlights(timestamp time.Time) ([]Highlight, error)
- func (db *DB) GetHighlight(highlightID string) (Highlight, error)
- func (db *DB) GetHighlightMirrors(highlightID string) ([]HighlightMirror, error)
- func (db *DB) GetHighlightsAfterTimestamp(timestamp time.Time) ([]Highlight, error)
- func (db *DB) SaveHighlightMirrors(highlightMirrors []HighlightMirror) ([]string, error)
- func (db *DB) SaveHighlights(highlights []Highlight) ([]string, error)
- type Datastore
- type Highlight
- type HighlightMirror
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
func (*DB) GetDayHighlights ¶
func (*DB) GetHighlightMirrors ¶
func (db *DB) GetHighlightMirrors(highlightID string) ([]HighlightMirror, error)
func (*DB) GetHighlightsAfterTimestamp ¶
func (*DB) SaveHighlightMirrors ¶
func (db *DB) SaveHighlightMirrors(highlightMirrors []HighlightMirror) ([]string, error)
type Datastore ¶
type Datastore interface { GetDayHighlights(timestamp time.Time) ([]Highlight, error) GetHighlightMirrors(highlightID string) ([]HighlightMirror, error) GetHighlightsAfterTimestamp(timestamp time.Time) ([]Highlight, error) GetHighlight(highlightID string) (Highlight, error) SaveHighlights(highlights []Highlight) ([]string, error) SaveHighlightMirrors(highlightMirrors []HighlightMirror) ([]string, error) }
type Highlight ¶
type Highlight struct { ID string `json:"id" db:"id"` URL string `json:"url" db:"url"` Title string `json:"title" db:"title"` CreatedAt time.Time `json:"createdAt" db:"created_at"` RedditSubmissionID string `json:"redditSubmissionId" db:"reddit_submission_id"` RedditPermalink string `json:"redditPermalink" db:"reddit_permalink"` RedditAuthor string `json:"redditAuthor" db:"reddit_author"` RedditCreatedAt time.Time `json:"redditCreatedAt" db:"reddit_created_at"` NumMirrors int64 `json:"numMirrors" db:"num_mirrors"` }
type HighlightMirror ¶
type HighlightMirror struct { ID string `json:"id" db:"id"` HighlightID string `json:"highlightId" db:"highlight_id"` URL string `json:"url" db:"url"` CreatedAt time.Time `json:"createdAt" db:"created_at"` RedditPermalink string `json:"redditPermalink" db:"reddit_permalink"` RedditAuthor string `json:"redditAuthor" db:"reddit_author"` RedditCreatedAt time.Time `json:"redditCreatedAt" db:"reddit_created_at"` }
Click to show internal directories.
Click to hide internal directories.