Documentation
¶
Index ¶
- type DownloadManifest
- type DownloadedPart
- type Manifest
- func (m *Manifest) DownloadManifestObject(manifest DownloadManifest, fileName string, hash string) ([]byte, error)
- func (m *Manifest) ExtractManifestFilePathFileName(outputFile string, manifestContent []byte) (DownloadManifest, string, string, error)
- func (m *Manifest) ManifestPath(fileName string, hash string) (string, error)
- func (m *Manifest) SetLogger(log logger.LoggerInterface)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DownloadManifest ¶
type DownloadManifest struct {
UUID string `json:"uuid"`
Version string `json:"version"`
Filename string `json:"filename"`
FileHash string `json:"file_hash"`
URL string `json:"url"`
Etag string `json:"etag"`
HashType string `json:"hash_type"`
PartsDir string `json:"parts_dir"`
PrefixParts string `json:"prefix_parts"`
Size int `json:"size"`
NumParts int `json:"num_parts"`
RangeSize int `json:"range_size"`
DownloadedParts []DownloadedPart `json:"downloaded_parts"`
}
Adding a new structure to represent the JSON manifest
type DownloadedPart ¶
type Manifest ¶
type Manifest struct {
PartsDir string
PrefixParts string
TimeStamp int64
Log logger.LoggerInterface
}
func NewManifest ¶
func (*Manifest) DownloadManifestObject ¶
func (*Manifest) ExtractManifestFilePathFileName ¶
func (*Manifest) ManifestPath ¶
func (*Manifest) SetLogger ¶
func (m *Manifest) SetLogger(log logger.LoggerInterface)
Click to show internal directories.
Click to hide internal directories.