Documentation
¶
Index ¶
- func SortInfo(info []*Info)
- type Cache
- type Info
- type Webpage
- func (wp *Webpage) Feed(ctx context.Context, urlStr string) ([]*Info, error)
- func (wp *Webpage) FeedFlickr(ctx context.Context, flickrId string) ([]*Info, error)
- func (wp *Webpage) Logger() *zap.Logger
- func (wp *Webpage) Lookup(ctx context.Context, urlStr string, saveFlag bool) (*Info, error)
- func (wp *Webpage) SaveCache() error
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 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) FeedFlickr ¶ added in v0.8.0
Feed fetches feed URL and gets webpage informations.
Click to show internal directories.
Click to hide internal directories.