package
0.0.0-20151124190824-3b700e20e376
Repository: https://github.com/endophage/gotuf.git
Documentation: pkg.go.dev
# Functions
CanonicalRole does a reverse lookup to get the canonical role name from the (possibly overridden) role name.
DefaultExpires gets the default expiry time for the given role.
NewDelegations initializes an empty Delegations object.
NewFileMeta generates a FileMeta object from the reader, using the hash algorithms provided.
NewPrivateKey instantiates a new TUFKey with the private key component populated.
NewPublicKey instantiates a new TUFKey where the private bytes are guaranteed to be nil.
NewRole creates a new Role object from the given parameters.
NewRoot initializes a new SignedRoot with a set of keys, roles, and the consistent flag.
NewSnapshot initilizes a SignedSnapshot with a given top level root and targets objects.
NewTargets intiializes a new empty SignedTargets object.
NewTimestamp initializes a timestamp with an existing snapshot.
PublicKeyFromPrivate returns a new TUFKey based on a private key, with the private key bytes guaranteed to be nil.
RoleName returns the (possibly overridden) role name for the provided canonical role name.
RootFromSigned fully unpacks a Signed object into a SignedRoot.
SetDefaultExpiryTimes allows one to change the default expiries.
SetTUFTypes allows one to override some or all of the default type names in TUF.
SetValidRoles is a utility function to override some or all of the roles.
SnapshotFromSigned fully unpacks a Signed object into a SignedSnapshot.
TargetsFromSigned fully unpacks a Signed object into a SignedTargets.
TimestampFromSigned parsed a Signed object into a fully unpacked SignedTimestamp.
ValidRole only determines the name is semantically correct.
ValidTUFType checks if the given type is valid for the role.
# Constants
Canonical base role names.
Canonical base role names.
Canonical base role names.
Canonical base role names.
Key types.
Signature types.
Key types.
Key types.
Signature types.
Signature types.
Key types.
Signature types.
Signature types.
Key types.
# Variables
TUFTypes is the set of metadata types.
ValidRoles holds an overrideable mapping of canonical role names to any custom roles names a user wants to make use of.
# Structs
Delegations holds a tier of targets delegations.
FileMeta contains the size and hashes for a metadata or target file.
KeyPair holds the public and private key bytes.
Role is a more verbose role as they appear in targets delegations.
Root is the Signed component of a root.json.
RootRole is a cut down role as it appears in the root.json.
Signature is a signature on a piece of metadata.
Signed is the high level, partially deserialized metadata object used to verify signatures before fully unpacking, or to add signatures before fully packing.
SignedCommon contains the fields common to the Signed component of all TUF metadata files.
SignedMeta is used in server validation where we only need signatures and common fields.
SignedRoot is a fully unpacked root.json.
SignedSnapshot is a fully unpacked snapshot.json.
SignedTargets is a fully unpacked targets.json, or target delegation json file.
SignedTimestamp is a fully unpacked timestamp.json.
Snapshot is the Signed component of a snapshot.json.
Targets is the Signed components of a targets.json or delegation json file.
Timestamp is the Signed component of a timestamp.json.
TUFKey is the structure used for both public and private keys in TUF.
# Interfaces
Key is the minimal interface for a public key.
PrivateKey adds the ability to access the private key.
PublicKey is the necessary interface for public keys.
# Type aliases
Files is the map of paths to file meta container in targets and delegations metadata files.
Hashes is the map of hash type to digest created for each metadata and target file.
KeyAlgorithm for types of keys.
SigAlgorithm for types of signatures.