remotefile

package
v0.0.0-...-6410feb Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SImageDesc

type SImageDesc struct {
	Name   string `json:"name"`
	Format string `json:"format"`
	Id     string `json:"id"`
	Chksum string `json:"chksum"`
	Path   string `json:"path"`
	SizeMb int64  `json:"size"`

	AccessAt time.Time `json:"access_at"`
}

type SRemoteFile

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

func NewRemoteFile

func NewRemoteFile(
	ctx context.Context, url, localPath string, compress bool,
	PreChksum string, timeout int, extraHeaders map[string]string,
	tmpPath string, downloadUrl string,
) *SRemoteFile

func (*SRemoteFile) Fetch

func (r *SRemoteFile) Fetch(callback func(progress, progressMbps float64, totalSizeMb int64)) error

func (*SRemoteFile) FillAttributes

func (r *SRemoteFile) FillAttributes(callback func(progress, progressMbps float64, totalSizeMb int64)) error

func (*SRemoteFile) GetInfo

func (r *SRemoteFile) GetInfo() (*SImageDesc, error)

func (*SRemoteFile) VerifyIntegrity

func (r *SRemoteFile) VerifyIntegrity(callback func(progress, progressMbps float64, totalSizeMb int64)) error

Jump to

Keyboard shortcuts

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