Documentation ¶
Index ¶
- func Serve(db ServerStorage, config config.Config) error
- type ArticleGetter
- type ArticleSearchParams
- type DbPinger
- type GetArticleOption
- func WithDateEnd(dateEnd time.Time) GetArticleOption
- func WithDateStart(dateStart time.Time) GetArticleOption
- func WithFilter(filter string) GetArticleOption
- func WithLimit(limit uint64) GetArticleOption
- func WithOffset(offset uint64) GetArticleOption
- func WithResourceNames(names []string) GetArticleOption
- type ServerStorage
- type StatsGetter
- type TaggedResourcesGetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArticleGetter ¶
type ArticleSearchParams ¶
type ArticleSearchParams struct { DateStart time.Time `form:"date_start" time_format:"2006-01-02T15:04:05Z07:00"` DateEnd time.Time `form:"date_end" time_format:"2006-01-02T15:04:05Z07:00"` Filter string `form:"filter"` Limit uint64 `form:"limit" binding:"gte=0"` Offset uint64 `form:"offset" binding:"gte=0"` Tags []string `form:"tags[]"` Resources []string `form:"-"` }
func NewArticleSearchParams ¶
func NewArticleSearchParams() (*ArticleSearchParams, error)
type GetArticleOption ¶
type GetArticleOption func(*ArticleSearchParams)
func WithDateEnd ¶
func WithDateEnd(dateEnd time.Time) GetArticleOption
func WithDateStart ¶
func WithDateStart(dateStart time.Time) GetArticleOption
func WithFilter ¶
func WithFilter(filter string) GetArticleOption
func WithLimit ¶
func WithLimit(limit uint64) GetArticleOption
func WithOffset ¶
func WithOffset(offset uint64) GetArticleOption
func WithResourceNames ¶
func WithResourceNames(names []string) GetArticleOption
type ServerStorage ¶
type ServerStorage interface { DbPinger ArticleGetter StatsGetter }
type StatsGetter ¶
type StatsGetter interface {
GetArticleStats(context.Context) ([]feed.ArticleStats, error)
}
type TaggedResourcesGetter ¶
Click to show internal directories.
Click to hide internal directories.