Versions in this module Expand all Collapse all v0 v0.0.1 Jan 7, 2021 Changes in this version + var ErrCanceled = errors.New("download canceled") + func SetHTTPClient(h *grab.Client) + func ValidCompression(c Compression) bool + func ValidFormatSource(f FormatSource) bool + func ValidURI(uri string) bool + func ValidateEntry(e Entry) error + type AccountItem struct + Count int + Resource xlist.Resource + type CancelFunc func() + type Client struct + func NewClient(cfg Config) *Client + func (c *Client) Do(e Entry) (*Response, error) + type Compression int + const Gzip + const None + const Zip + func (c *Compression) UnmarshalJSON(data []byte) error + func (c Compression) MarshalJSON() ([]byte, error) + func (c Compression) String() string + type Config struct + CacheDir string + Logger yalogi.Logger + OutputDir string + type Duration struct + func (d *Duration) UnmarshalJSON(b []byte) (err error) + func (d Duration) MarshalJSON() (b []byte, err error) + type Entry struct + Deprecated bool + Disabled bool + ID string + NoClean bool + NoHash bool + Output string + Removed bool + Sources []Source + Transforms *TransformOpts + Update Duration + func EntryDefsFromFile(path string) ([]Entry, error) + func (e Entry) Copy() (dst Entry) + type EntryStatus struct + Account []AccountItem + Changes int + ErrorMsg string + Errors int + First time.Time + ID string + Last time.Time + LastChange *time.Time + LastError *time.Time + LastUpdate *time.Time + UpdatedOK bool + Updates int + func EntryStatusFromFile(path string) (EntryStatus, error) + type FormatOpts struct + Comma string + Comment string + HasHeader bool + Indexes []int + LazyQuotes bool + type FormatSource int + const CSV + const Flat + const Hosts + const XList + func (f *FormatSource) UnmarshalJSON(data []byte) error + func (f FormatSource) MarshalJSON() ([]byte, error) + func (f FormatSource) String() string + type Manager struct + func NewManager(outputDir, cacheDir, statusDir string, opt ...Option) (*Manager, error) + func (m *Manager) Add(entries []Entry) error + func (m *Manager) Clear() + func (m *Manager) Deprecated() []string + func (m *Manager) NeedsUpdate() []string + func (m *Manager) Removed() []string + func (m *Manager) Update() (CancelFunc, <-chan struct{}, error) + type Option func(*options) + func SetLogger(l yalogi.Logger) Option + type Response struct + Account map[xlist.Resource]int + Done chan struct{} + End time.Time + Hash string + ID string + Output string + Start time.Time + Updated bool + func (r *Response) Cancel() bool + func (r *Response) Err() error + func (r *Response) IsComplete() bool + func (r *Response) Status() State + func (r *Response) Wait() error + type Source struct + Compression Compression + Filename string + Format FormatSource + FormatOpts *FormatOpts + Limit int + Resources []xlist.Resource + URI string + func (s Source) Copy() (dst Source) + type State int + const Cleaning + const Converting + const Deploying + const Downloading + const Finished + const Ready + const Uncompressing + type TransformOpts struct + TLDPlusOne bool