package snapshot
import "github.com/theupdateframework/notary/server/snapshot"
Index ¶
- func GetOrCreateSnapshot(gun, checksum string, store storage.MetaStore, cryptoService signed.CryptoService) ( *time.Time, []byte, error)
- func GetOrCreateSnapshotKey(gun string, store storage.KeyStore, crypto signed.CryptoService, createAlgorithm string) (data.PublicKey, error)
- func NewSnapshotUpdate(prev *data.SignedSnapshot, repo *tuf.Repo) (*storage.MetaUpdate, error)
Functions ¶
func GetOrCreateSnapshot ¶
func GetOrCreateSnapshot(gun, checksum string, store storage.MetaStore, cryptoService signed.CryptoService) ( *time.Time, []byte, error)
GetOrCreateSnapshot either returns the existing latest snapshot, or uses whatever the most recent snapshot is to generate the next one, only updating the expiry time and version. Note that this function does not write generated snapshots to the underlying data store, and will either return the latest snapshot time or nil as the time modified
func GetOrCreateSnapshotKey ¶
func GetOrCreateSnapshotKey(gun string, store storage.KeyStore, crypto signed.CryptoService, createAlgorithm string) (data.PublicKey, error)
GetOrCreateSnapshotKey either creates a new snapshot key, or returns the existing one. Only the PublicKey is returned. The private part is held by the CryptoService.
func NewSnapshotUpdate ¶
func NewSnapshotUpdate(prev *data.SignedSnapshot, repo *tuf.Repo) (*storage.MetaUpdate, error)
NewSnapshotUpdate produces a new snapshot and returns it as a metadata update, given the previous snapshot and the TUF repo.
Source Files ¶
- Version
- v0.3.0-RC1
- Published
- Apr 19, 2016
- Platform
- linux/amd64
- Imports
- 7 packages
- Last checked
- 13 hours ago –
Tools for package owners.