Documentation ¶
Index ¶
- type Client
- func (c Client) DownloadTarget(dst io.Writer, path string, meta *data.FileMeta) error
- func (c Client) RoleTargetsPath(role string, hashSha256 string, consistent bool) (string, error)
- func (c Client) TargetMeta(role, path string, excludeRoles ...string) (*data.FileMeta, string)
- func (c *Client) Update() error
- type ErrChecksumMismatch
- type ErrCorruptedCache
- type ErrMissingMeta
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a usability wrapper around a raw TUF repo
func NewClient ¶
func NewClient(local *tuf.Repo, remote store.RemoteStore, keysDB *keys.KeyDB, cache store.MetadataStore) *Client
NewClient initialized a Client with the given repo, remote source of content, key database, and cache
func (Client) DownloadTarget ¶
DownloadTarget downloads the target to dst from the remote
func (Client) RoleTargetsPath ¶
RoleTargetsPath generates the appropriate HTTP URL for the targets file, based on whether the repo is marked as consistent.
func (Client) TargetMeta ¶
TargetMeta ensures the repo is up to date. It assumes downloadTargets has already downloaded all delegated roles
type ErrChecksumMismatch ¶
type ErrChecksumMismatch struct {
// contains filtered or unexported fields
}
ErrChecksumMismatch - a checksum failed verification
func (ErrChecksumMismatch) Error ¶
func (e ErrChecksumMismatch) Error() string
type ErrCorruptedCache ¶
type ErrCorruptedCache struct {
// contains filtered or unexported fields
}
ErrCorruptedCache - local data is incorrect
func (ErrCorruptedCache) Error ¶
func (e ErrCorruptedCache) Error() string
type ErrMissingMeta ¶
type ErrMissingMeta struct {
// contains filtered or unexported fields
}
ErrMissingMeta - couldn't find the FileMeta object for a role or target
func (ErrMissingMeta) Error ¶
func (e ErrMissingMeta) Error() string
Click to show internal directories.
Click to hide internal directories.