Documentation ¶
Index ¶
- func NewDuration(d time.Duration) *time.Duration
- func RunDownloader(downloaderType DownloaderType, outputPath string, options *Option) error
- func ToPng(imageBytes []byte) ([]byte, error)
- type Comic
- type ComicDownloader
- type DilbertComic
- type DilbertComicClient
- type DilbertDownloader
- type DownloaderContext
- type DownloaderType
- type EpdDisplayer
- type Option
- type XkcdDownloader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunDownloader ¶
func RunDownloader(downloaderType DownloaderType, outputPath string, options *Option) error
Types ¶
type ComicDownloader ¶
type DilbertComic ¶
type DilbertComicClient ¶
func NewDilbertComicCilent ¶
func NewDilbertComicCilent(baseUrl string) (*DilbertComicClient, error)
func (*DilbertComicClient) ComicForDate ¶
func (c *DilbertComicClient) ComicForDate(t time.Time) (*DilbertComic, error)
type DilbertDownloader ¶
type DilbertDownloader struct { }
func (*DilbertDownloader) DownloadComic ¶
func (d *DilbertDownloader) DownloadComic(t time.Time) (*Comic, error)
type DownloaderContext ¶
type DownloaderContext struct { Type DownloaderType LastDownload *time.Time // contains filtered or unexported fields }
type DownloaderType ¶
type DownloaderType string
const ( DownloaderTypeUnknown DownloaderType = "unknown" DownloaderTypeXkcd DownloaderType = "xkcd" DownloaderTypeDilbert DownloaderType = "dilbert" )
type EpdDisplayer ¶
type EpdDisplayer struct {
// contains filtered or unexported fields
}
func NewEpdDisplayer ¶
func NewEpdDisplayer() *EpdDisplayer
func (*EpdDisplayer) Update ¶
func (d *EpdDisplayer) Update() error
func (*EpdDisplayer) WriteImage ¶
func (d *EpdDisplayer) WriteImage(img image.Image) error
func (*EpdDisplayer) WriteText ¶
func (d *EpdDisplayer) WriteText(text string) error
type XkcdDownloader ¶
type XkcdDownloader struct { }
func (*XkcdDownloader) DownloadComic ¶
func (x *XkcdDownloader) DownloadComic(t time.Time) (*Comic, error)
Click to show internal directories.
Click to hide internal directories.