Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Archive ¶
type Archive struct { ShouldExtract bool `bson:"should_extract" json:"should_extract" yaml:"should_extract"` Format ArchiveFormat `bson:"format" json:"format" yaml:"format"` TargetPath string `bson:"target_path" json:"target_path" yaml:"target_path"` }
Archive encapsulates options related to management of archive files.
type ArchiveFormat ¶
type ArchiveFormat string
ArchiveFormat represents an archive file type.
const ( // ArchiveAuto is an ArchiveFormat that does not force any particular type of // archive format. ArchiveAuto ArchiveFormat = "auto" // ArchiveTarGz is an ArchiveFormat for gzipped tar archives. ArchiveTarGz ArchiveFormat = "targz" // ArchiveZip is an ArchiveFormat for Zip archives. ArchiveZip ArchiveFormat = "zip" )
func (ArchiveFormat) Validate ¶
func (f ArchiveFormat) Validate() error
Validate checks that the ArchiveFormat is a recognized format.
type Download ¶
type Download struct { URL string `json:"url" bson:"url"` Path string `json:"path" bson:"path"` ArchiveOpts Archive `json:"archive_opts" bson:"archive_opts"` HTTPClient *http.Client `json:"-" bson:"-"` }
Download represents the options to download a file to a given path and optionally extract its contents.
Click to show internal directories.
Click to hide internal directories.