Documentation ¶
Index ¶
- Variables
- func CopyDir(fs afero.Fs, src string, dst string) error
- func CopyFile(fs afero.Fs, src, dst string) error
- func Exists(fs afero.Fs, path string) (bool, error)
- func HashFile(fs afero.Fs, path string, hasher hash.Hash) (string, error)
- func HashReader(reader io.Reader, hasher hash.Hash) (string, error)
- func ValidateByHash(fs afero.Fs, path, hashStr string) (bool, string, error)
- type Getter
- type HashiGoGetter
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNonArchiveSource = fmt.Errorf("non-archive sources are not supported for directory destinations")
)
Functions ¶
func HashReader ¶ added in v0.85.0
Types ¶
type Getter ¶
type Getter interface { // GetFile downloads the give URL into the given path. The URL must reference a single file. GetFile(dst, src string, monitor ...*progress.Manual) error // GetToDir downloads the resource found at the `src` URL into the given `dst` directory. // The directory must already exist, and the remote resource MUST BE AN ARCHIVE (e.g. `.tar.gz`). GetToDir(dst, src string, monitor ...*progress.Manual) error }
type HashiGoGetter ¶
type HashiGoGetter struct {
// contains filtered or unexported fields
}
func NewGetter ¶
func NewGetter(id clio.Identification, httpClient *http.Client) *HashiGoGetter
NewGetter creates and returns a new Getter. Providing an http.Client is optional. If one is provided, it will be used for all HTTP(S) getting; otherwise, go-getter's default getters will be used.
func (HashiGoGetter) GetFile ¶
func (g HashiGoGetter) GetFile(dst, src string, monitors ...*progress.Manual) error
func (HashiGoGetter) GetToDir ¶
func (g HashiGoGetter) GetToDir(dst, src string, monitors ...*progress.Manual) error
Click to show internal directories.
Click to hide internal directories.