Documentation ¶
Index ¶
- Variables
- func IsLatestSnapshot(err error) bool
- func IsNotFound(err error) bool
- type Client
- func (c Client) DownloadTarget(dst io.Writer, path string, meta *data.FileMeta) error
- func (c Client) GetTargetsFile(role string, keyIDs []string, snapshotMeta data.Files, consistent bool, ...) (*data.Signed, error)
- func (c Client) RoleTargetsPath(role string, hashSha256 string, consistent bool) (string, error)
- func (c Client) TargetMeta(path string) (*data.FileMeta, error)
- func (c *Client) Update() error
- type ErrCorruptedCache
- type ErrDecodeFailed
- type ErrDownloadFailed
- type ErrInvalidURL
- type ErrLatestSnapshot
- type ErrMetaTooLarge
- type ErrMissingRemoteMetadata
- type ErrNotFound
- type ErrUnknownTarget
- type ErrWrongSize
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoRootKeys = errors.New("tuf: no root keys found in local meta store") ErrInsufficientKeys = errors.New("tuf: insufficient keys to meet threshold") )
Functions ¶
func IsLatestSnapshot ¶
func IsNotFound ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(local *tuf.TufRepo, remote store.RemoteStore, keysDB *keys.KeyDB, cache store.MetadataStore) *Client
func (Client) DownloadTarget ¶
func (Client) GetTargetsFile ¶
func (Client) RoleTargetsPath ¶
RoleTargetsPath generates the appropriate filename for the targets file, based on whether the repo is marked as consistent.
func (Client) TargetMeta ¶
TargetMeta ensures the repo is up to date, downloading the minimum necessary metadata files
type ErrCorruptedCache ¶
type ErrCorruptedCache struct {
// contains filtered or unexported fields
}
func (ErrCorruptedCache) Error ¶
func (e ErrCorruptedCache) Error() string
type ErrDecodeFailed ¶
func (ErrDecodeFailed) Error ¶
func (e ErrDecodeFailed) Error() string
type ErrDownloadFailed ¶
func (ErrDownloadFailed) Error ¶
func (e ErrDownloadFailed) Error() string
type ErrInvalidURL ¶
type ErrInvalidURL struct {
URL string
}
func (ErrInvalidURL) Error ¶
func (e ErrInvalidURL) Error() string
type ErrLatestSnapshot ¶
type ErrLatestSnapshot struct {
Version int
}
func (ErrLatestSnapshot) Error ¶
func (e ErrLatestSnapshot) Error() string
type ErrMetaTooLarge ¶
func (ErrMetaTooLarge) Error ¶
func (e ErrMetaTooLarge) Error() string
type ErrMissingRemoteMetadata ¶
type ErrMissingRemoteMetadata struct {
Name string
}
func (ErrMissingRemoteMetadata) Error ¶
func (e ErrMissingRemoteMetadata) Error() string
type ErrNotFound ¶
type ErrNotFound struct {
File string
}
func (ErrNotFound) Error ¶
func (e ErrNotFound) Error() string
type ErrUnknownTarget ¶
type ErrUnknownTarget struct {
Name string
}
func (ErrUnknownTarget) Error ¶
func (e ErrUnknownTarget) Error() string
type ErrWrongSize ¶
func (ErrWrongSize) Error ¶
func (e ErrWrongSize) Error() string
Click to show internal directories.
Click to hide internal directories.