Documentation
¶
Index ¶
- func SortInfo(info []*Info)
- type Cache
- type FeedList
- type Info
- type Webpage
- func (wp *Webpage) CreatePool()
- func (wp *Webpage) Feed(ctx context.Context, urlStr string) error
- func (wp *Webpage) FeedFlickr(ctx context.Context, flickrId string) error
- func (wp *Webpage) GetErrorInPool() error
- func (wp *Webpage) GetInfoInPool() []*Info
- func (wp *Webpage) Logger() *zap.Logger
- func (wp *Webpage) Lookup(ctx context.Context, urlStr string, saveFlag bool) (*Info, error)
- func (wp *Webpage) SaveCache() error
- func (wp *Webpage) SaveInfoToCache() []*Info
- func (wp *Webpage) StopPool()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cache ¶ added in v0.6.0
type Cache struct {
// contains filtered or unexported fields
}
Cache is cache data for Web page informations.
type FeedList ¶ added in v0.9.0
type FeedList []string
FeedList is list of feed URLs.
func NewFeedList ¶ added in v0.9.0
NewFeedList function returns new instance of FeedList.
type Info ¶
type Info struct {
URL string `json:"url,omitempty"`
Canonical string `json:"canonical,omitempty"`
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
ImageURL string `json:"image_url,omitempty"`
Published *time.Time `json:"published,omitempty"`
}
func (*Info) MakeMessage ¶ added in v0.7.0
type Webpage ¶ added in v0.8.0
type Webpage struct {
// contains filtered or unexported fields
}
Webpage is configuration for bookmark
func New ¶ added in v0.7.0
func New(cacheDir string, logger *log.ZapEventLogger) (*Webpage, error)
New functions creates new Config instance.
func (*Webpage) CreatePool ¶ added in v0.9.4
func (wp *Webpage) CreatePool()
CreatePool creates pool and starts goroutine,
func (*Webpage) FeedFlickr ¶ added in v0.8.0
Feed fetches feed URL and gets webpage informations.
func (*Webpage) GetErrorInPool ¶ added in v0.9.4
func (*Webpage) GetInfoInPool ¶ added in v0.9.4
func (*Webpage) SaveInfoToCache ¶ added in v0.9.8
Source Files
¶
Click to show internal directories.
Click to hide internal directories.