getter

package
v0.5.61 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2024 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Getter

type Getter interface {
	Get(uri, dst string) error
	SetForce(force bool)
}

Getter is an interface which defines interations for downloading remote folders

type GetterImpl

type GetterImpl struct {
	// contains filtered or unexported fields
}

GetterImpl is a concrete implementation of the Getter interface

func NewGetter

func NewGetter(force bool) *GetterImpl

NewGetter creates a new Getter

func (*GetterImpl) Get

func (g *GetterImpl) Get(uri, dst string) error

Get attempts to retrieve a folder from a remote location and stores it at the destination.

If force was set to true when creating a Getter then the destination folder will automatically be overwritten.

Returns error on failure

func (*GetterImpl) SetForce

func (g *GetterImpl) SetForce(force bool)

SetForce sets the force flag causing all downloads to overwrite the destination

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL