Documentation ¶
Index ¶
- func LoadLocalMetadata(path string, metadata *manifiesta.Metadata) error
- func MergeMetadata(local, remote manifiesta.Metadata) manifiesta.Metadata
- func SaveLocalMetadata(path string, metadata manifiesta.Metadata) error
- func VerifyManifest(manifest manifiesta.Manifest) error
- type Downloader
- type HttpError
- type ManifestClient
- type Progresser
- type SourceReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadLocalMetadata ¶ added in v0.0.4
func LoadLocalMetadata(path string, metadata *manifiesta.Metadata) error
func MergeMetadata ¶ added in v0.0.4
func MergeMetadata(local, remote manifiesta.Metadata) manifiesta.Metadata
MergeMetadata preserves key fields that should not be updated remotely.
func SaveLocalMetadata ¶ added in v0.0.4
func SaveLocalMetadata(path string, metadata manifiesta.Metadata) error
func VerifyManifest ¶
func VerifyManifest(manifest manifiesta.Manifest) error
checks for absolute pathing
Types ¶
type Downloader ¶ added in v0.0.4
type Downloader struct { Manifest manifiesta.Manifest Progresser Progresser Logger *log.Logger }
func NewDownloader ¶ added in v0.0.4
func NewDownloader(manifest manifiesta.Manifest, progresser Progresser) *Downloader
func (*Downloader) CheckAndUpdate ¶ added in v0.0.4
func (d *Downloader) CheckAndUpdate() error
CheckAndUpdate checks and updates every file on the manifest
func (*Downloader) CheckAndUpdateFile ¶ added in v0.0.4
func (d *Downloader) CheckAndUpdateFile(file manifiesta.File) error
CheckAndUpdateFile checks and updates a single file on the manifest
func (*Downloader) CheckFile ¶ added in v0.0.4
func (d *Downloader) CheckFile(file manifiesta.File) (bool, error)
CheckFile checks a local path to see it exists and matches the given sha256 hash
type ManifestClient ¶
type ManifestClient struct {
// contains filtered or unexported fields
}
func NewManifestClient ¶
func NewManifestClient(url string) *ManifestClient
func (*ManifestClient) GetManifest ¶
func (c *ManifestClient) GetManifest(name string, manifest *manifiesta.Manifest) (bool, error)
func (*ManifestClient) GetMetadata ¶ added in v0.0.4
func (c *ManifestClient) GetMetadata(name string, metadata *manifiesta.Metadata) (bool, error)
type Progresser ¶ added in v0.0.4
Progresser is an interface to update progress
type SourceReader ¶ added in v0.0.4
type SourceReader struct {
// contains filtered or unexported fields
}
func NewSourceReader ¶ added in v0.0.4
func NewSourceReader(source manifiesta.Source) (*SourceReader, error)
func (*SourceReader) Close ¶ added in v0.0.4
func (r *SourceReader) Close() error
Click to show internal directories.
Click to hide internal directories.