Documentation ¶
Index ¶
- func Init()
- func Restore(filepath string) bool
- type Link
- func (l *Link) Delete() bool
- func (l *Link) FindDuplicates() *SearchResult
- func (l *Link) GetID() string
- func (l *Link) Save() bool
- func (l *Link) SetExcerpt(excerpt string)
- func (l *Link) SetImageURL(imageURL string)
- func (l *Link) SetSharedAt(date *time.Time)
- func (l *Link) SetSharedBy(userID, userName string)
- func (l *Link) SetSharedOn(channelID, channelName string)
- func (l *Link) SetTitle(title string)
- type SearchResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Link ¶
type Link struct { ID string `json:"id"` URL string `json:"url"` Title string `json:"title"` Author string `json:"author"` Excerpt string `json:"excerpt"` DatePublished *time.Time `json:"published_at,omitempty"` ImageURL string `json:"image_url"` Content string `json:"content"` ID string `json:"id"` Name string `json:"name"` } `json:"shared_by"` ID string `json:"id"` Name string `json:"name"` } `json:"shared_on"` }
func (*Link) FindDuplicates ¶
func (l *Link) FindDuplicates() *SearchResult
FindDuplicates checks if this link is already posted?
func (*Link) SetExcerpt ¶
func (*Link) SetImageURL ¶
func (*Link) SetSharedAt ¶
func (*Link) SetSharedBy ¶
func (*Link) SetSharedOn ¶
type SearchResult ¶
type SearchResult struct {
// contains filtered or unexported fields
}
func Search ¶
func Search(params url.Values) (*SearchResult, error)
Search allows to get multiple links from Elastic Search, that match the query
func (*SearchResult) GetCursor ¶
func (r *SearchResult) GetCursor() map[string]interface{}
func (*SearchResult) GetLinks ¶
func (r *SearchResult) GetLinks() []*Link
func (*SearchResult) GetTotal ¶
func (r *SearchResult) GetTotal() int
Click to show internal directories.
Click to hide internal directories.