urldownload

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsURLSupported

func IsURLSupported(rawURL string) (*url.URL, error)

Types

type Source added in v1.0.4

type Source struct {
	URL string
}

func DecodeSpec added in v1.0.4

func DecodeSpec(spec *models.SpecConfig) (Source, error)

func (Source) ToMap added in v1.0.4

func (c Source) ToMap() map[string]interface{}

func (Source) Validate added in v1.0.4

func (c Source) Validate() error

type StorageProvider

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

func NewStorage

func NewStorage() *StorageProvider

func (*StorageProvider) CleanupStorage

func (sp *StorageProvider) CleanupStorage(
	ctx context.Context,
	_ models.InputSource,
	volume storage.StorageVolume,
) error

func (*StorageProvider) GetVolumeSize

func (sp *StorageProvider) GetVolumeSize(context.Context, models.InputSource) (uint64, error)

func (*StorageProvider) HasStorageLocally

func (sp *StorageProvider) HasStorageLocally(context.Context, models.InputSource) (bool, error)

func (*StorageProvider) IsInstalled

func (sp *StorageProvider) IsInstalled(context.Context) (bool, error)

func (*StorageProvider) PrepareStorage

func (sp *StorageProvider) PrepareStorage(
	ctx context.Context,
	storageDirectory string,
	storageSpec models.InputSource) (storage.StorageVolume, error)

PrepareStorage will download the file from the URL

func (*StorageProvider) Upload

Jump to

Keyboard shortcuts

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