Documentation
¶
Index ¶
- type Client
- func (c *Client) Bulk(ctx context.Context, entries *[]feed.Entry) error
- func (c *Client) FindByUrl(ctx context.Context, url string) (*feed.Entry, error)
- func (c *Client) Insert(ctx context.Context, entry *feed.Entry) (*int64, error)
- func (c *Client) Update(ctx context.Context, entry *feed.Entry) error
- type DBEntry
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Index string // contains filtered or unexported fields }
type DBEntry ¶
type DBEntry struct { Language string `json:"language"` Title string `json:"title"` Url string `json:"url"` Updated int64 `json:"updated"` Published int64 `json:"published"` Summary string `json:"summary"` Content string `json:"content"` Author string `json:"author"` Number string `json:"number"` ResourceID int `json:"resource_id"` }
func NewDBEntry ¶
type Response ¶
type Response struct { Took int `json:"took"` TimedOut bool `json:"timed_out"` Hits struct { Total int `json:"total"` TotalRelation string `json:"total_relation"` Hits []struct { Id string `json:"_id"` Score int `json:"_score"` Source struct { Title string `json:"title"` Summary string `json:"summary"` Content string `json:"content"` Published int `json:"published"` Updated int `json:"updated"` Language string `json:"language"` Url string `json:"url"` Author string `json:"author"` Number string `json:"number"` ResourceID int `json:"resource_id"` } `json:"_source"` } `json:"hits"` } `json:"hits"` }
Click to show internal directories.
Click to hide internal directories.