Documentation
¶
Index ¶
- func DeriveVersionDir(dirOut string, source Source) string
- func Fetch(source Source, options Options, trace TraceSink) error
- func Lock(source Source, dirVersion string, options Options, trace TraceSink) error
- func SHA256Verifier(expected string) func(string) error
- func Sync(source Source, options Options, trace TraceSink) error
- type Asset
- type FileRecord
- type HashProgressFunc
- type Manifest
- type ManifestFileRecord
- type Options
- type Scope
- type Source
- type TraceEvent
- type TraceSink
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeriveVersionDir ¶
func SHA256Verifier ¶
Types ¶
type Asset ¶
type Asset struct {
Name string
Path string
URL string
RecoverDownloadError func(string, error) (bool, error) `toml:"-"`
VerifyDownloadedFile func(string) error `toml:"-"`
HashForLock func(string, HashProgressFunc) (string, int64, error) `toml:"-"`
ReuseVerifiedExisting bool `toml:"-"`
ExpectedBytes int64 `toml:"-"`
}
type FileRecord ¶
type HashProgressFunc ¶
type HashProgressFunc = httpx.DownloadProgressFunc
type Manifest ¶
type Manifest struct {
Database string `toml:"database"`
Asset string `toml:"asset"`
Source string `toml:"source,omitempty"`
Version string `toml:"version"`
VersionToken string `toml:"version_token"`
DownloadedAt string `toml:"downloaded_at"`
Scope Scope `toml:"scope,omitempty"`
Files []ManifestFileRecord `toml:"files"`
}
type ManifestFileRecord ¶
type TraceEvent ¶
type TraceSink ¶
type TraceSink interface {
EmitStaticAssetTrace(event TraceEvent)
}
Click to show internal directories.
Click to hide internal directories.