Versions in this module Expand all Collapse all v4 v4.0.0 Jun 10, 2022 Changes in this version + type Database interface + Add func(...*entry.Entry) error + Been func() ([]string, error) + ByDate func(opts *QueryOptions, year, month, day int) ([]string, error) + ByEmoji func(opt *QueryOptions, emoji string) ([]string, error) + ByProperty func(opts *QueryOptions, property, value string) ([]string, error) + BySection func(opt *QueryOptions, sections ...string) ([]string, error) + ByTag func(opt *QueryOptions, tag string) ([]string, error) + Close func() + GetAll func(opts *QueryOptions) ([]string, error) + GetDeleted func(opts *PaginationOptions) ([]string, error) + GetDrafts func(opts *PaginationOptions) ([]string, error) + GetEmojis func() ([]string, error) + GetPrivate func(opts *PaginationOptions, audience string) ([]string, error) + GetTags func() ([]string, error) + GetUnlisted func(opts *PaginationOptions) ([]string, error) + ReadsSummary func() (*entry.ReadsSummary, error) + Remove func(id string) + Search func(opt *QueryOptions, query string) ([]string, error) + SectionsCount func() (map[string]int, error) + WatchesSummary func() (*entry.WatchesSummary, error) + func NewDatabase(cfg *config.PostgreSQL) (Database, error) + type PaginationOptions struct + Limit int + Page int + type Postgres struct + func (d *Postgres) Add(entries ...*entry.Entry) error + func (d *Postgres) Been() ([]string, error) + func (d *Postgres) ByDate(opts *QueryOptions, year, month, day int) ([]string, error) + func (d *Postgres) ByEmoji(opts *QueryOptions, emoji string) ([]string, error) + func (d *Postgres) ByProperty(opts *QueryOptions, property, value string) ([]string, error) + func (d *Postgres) BySection(opts *QueryOptions, sections ...string) ([]string, error) + func (d *Postgres) ByTag(opts *QueryOptions, tag string) ([]string, error) + func (d *Postgres) Close() + func (d *Postgres) GetAll(opts *QueryOptions) ([]string, error) + func (d *Postgres) GetDeleted(opts *PaginationOptions) ([]string, error) + func (d *Postgres) GetDrafts(opts *PaginationOptions) ([]string, error) + func (d *Postgres) GetEmojis() ([]string, error) + func (d *Postgres) GetPrivate(opts *PaginationOptions, audience string) ([]string, error) + func (d *Postgres) GetTags() ([]string, error) + func (d *Postgres) GetUnlisted(opts *PaginationOptions) ([]string, error) + func (d *Postgres) ReadsSummary() (*entry.ReadsSummary, error) + func (d *Postgres) Remove(id string) + func (d *Postgres) Search(opts *QueryOptions, query string) ([]string, error) + func (d *Postgres) SectionsCount() (map[string]int, error) + func (d *Postgres) WatchesSummary() (*entry.WatchesSummary, error) + type QueryOptions struct + Audience string + Visibility []entry.Visibility + WithDeleted bool + WithDrafts bool Other modules containing this package github.com/hacdias/eagle/v2