Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNoNewAssets = errors.New("no new assets")
Functions ¶
This section is empty.
Types ¶
type AssetListMode ¶
type AssetListMode int
AssetListMode specifies whether to retrive full asset list or diff only.
const ( FullAssets AssetListMode = iota DiffAssets )
Enum values for AssetListMode.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client communicating with WF API.
func NewClient ¶
func NewClient(config *ClientConfig) (*Client, error)
NewClient creates a new client with the supplied configuration. If the configuration is nil, use `DefaultClientConfig()`.
func (*Client) FetchAssetsFromAPI ¶
FetchAssetsFromAPI fetches metadata from API then download and extract the assets archives.
type ClientConfig ¶
type ClientConfig struct { Version string Mode AssetListMode Workdir string Concurrency int }
ClientConfig is the configuration for the client.
func DefaultClientConfig ¶
func DefaultClientConfig() *ClientConfig
DefaultClientConfig generates a default configuration.
type Extractor ¶
type Extractor struct {
// contains filtered or unexported fields
}
Extractor parses and extracts WF assets.
func NewExtractor ¶
func NewExtractor(config *ExtractorConfig) (*Extractor, error)
NewExtractor creates a new extractor with the supplied configuration. If the configuration is nil, use `DefaultExtractorConfig()`.
func (*Extractor) ExtractAssets ¶
ExtractAssets extracts assets from downloaded files.
type ExtractorConfig ¶
type ExtractorConfig struct { SrcPath string DestPath string Concurrency int Indent int FlattenCSV bool }
ExtractorConfig is the configuration for the extractor.
func DefaultExtractorConfig ¶
func DefaultExtractorConfig() *ExtractorConfig
DefaultExtractorConfig generates a default configuration.