Documentation ¶
Index ¶
- func HashToKey(h hash.Hash) string
- type Index
- type Remote
- type Store
- func (ds Store) Dump(hex bool)
- func (ds Store) ReadIndex(i Index) error
- func (ds Store) ReadStream(key string) (io.ReadCloser, error)
- func (ds Store) ResolveKey(key string) (string, error)
- func (ds Store) WriteACI(r io.Reader) (string, error)
- func (ds Store) WriteIndex(i Index)
- func (ds Store) WriteStream(key string, r io.Reader) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Remote ¶
type Remote struct { ACIURL string SigURL string ETag string // The key in the blob store under which the ACI has been saved. BlobKey string }
func (Remote) Download ¶
Download downloads and verifies the remote ACI. If Keystore is nil signature verification will be skipped. Download returns the signer, an *os.File representing the ACI, and an error if any. err will be nil if the ACI downloads successfully and the ACI is verified.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store encapsulates a content-addressable-storage for storing ACIs on disk.
func (Store) ReadStream ¶
func (ds Store) ReadStream(key string) (io.ReadCloser, error)
func (Store) ResolveKey ¶ added in v0.2.0
ResolveKey resolves a partial key (of format `sha512-0c45e8c0ab2`) to a full key by considering the key a prefix and using the store for resolution. If the key is longer than the full key length, it is first truncated.
func (Store) WriteACI ¶
WriteACI takes an ACI encapsulated in an io.Reader, decompresses it if necessary, and then stores it in the store under a key based on the image ID (i.e. the hash of the uncompressed ACI)