func GetEmptyTargetsNotaryRepository(trust.ImageRefAndAuth, []string) (client.Repository, error)
GetEmptyTargetsNotaryRepository returns an EmptyTargetsNotaryRepository
func GetLoadedNotaryRepository(trust.ImageRefAndAuth, []string) (client.Repository, error)
GetLoadedNotaryRepository returns a LoadedNotaryRepository
func GetLoadedWithNoSignersNotaryRepository(trust.ImageRefAndAuth, []string) (client.Repository, error)
GetLoadedWithNoSignersNotaryRepository returns a LoadedWithNoSignersNotaryRepository
func GetOfflineNotaryRepository(trust.ImageRefAndAuth, []string) (client.Repository, error)
GetOfflineNotaryRepository returns a OfflineNotaryRepository
func GetUninitializedNotaryRepository(trust.ImageRefAndAuth, []string) (client.Repository, error)
GetUninitializedNotaryRepository returns an UninitializedNotaryRepository
EmptyTargetsNotaryRepository is a mock Notary repository that is initialized but does not have any signed targets
type EmptyTargetsNotaryRepository struct { OfflineNotaryRepository }
func (e EmptyTargetsNotaryRepository) GetAllTargetMetadataByName(name string) ([]client.TargetSignedStruct, error)
GetAllTargetMetadataByName searches the entire delegation role tree to find the specified target by name for all roles, and returns a list of TargetSignedStructs for each time it finds the specified target.
func (e EmptyTargetsNotaryRepository) GetDelegationRoles() ([]data.Role, error)
GetDelegationRoles returns the keys and roles of the repository's delegations
func (e EmptyTargetsNotaryRepository) GetTargetByName(name string, _ ...data.RoleName) (*client.TargetWithRole, error)
GetTargetByName returns a target by the given name.
func (e EmptyTargetsNotaryRepository) Initialize([]string, ...data.RoleName) error
Initialize creates a new repository by using rootKey as the root Key for the TUF repository.
func (e EmptyTargetsNotaryRepository) InitializeWithCertificate([]string, []data.PublicKey, ...data.RoleName) error
InitializeWithCertificate initializes the repository with root keys and their corresponding certificates
func (e EmptyTargetsNotaryRepository) ListRoles() ([]client.RoleWithSignatures, error)
ListRoles returns a list of RoleWithSignatures objects for this repo
func (e EmptyTargetsNotaryRepository) ListTargets(...data.RoleName) ([]*client.TargetWithRole, error)
ListTargets lists all targets for the current repository. The list of roles should be passed in order from highest to lowest priority.
func (e EmptyTargetsNotaryRepository) Publish() error
Publish pushes the local changes in signed material to the remote notary-server Conceptually it performs an operation similar to a `git rebase`
func (e EmptyTargetsNotaryRepository) RotateKey(data.RoleName, bool, []string) error
RotateKey rotates a private key and returns the public component from the remote server
LoadedNotaryRepository is a mock Notary repository that is loaded with targets, delegations, and keys
type LoadedNotaryRepository struct { EmptyTargetsNotaryRepository // contains filtered or unexported fields }
func (l LoadedNotaryRepository) GetAllTargetMetadataByName(name string) ([]client.TargetSignedStruct, error)
GetAllTargetMetadataByName searches the entire delegation role tree to find the specified target by name for all roles, and returns a list of TargetSignedStructs for each time it finds the specified target.
func (l LoadedNotaryRepository) GetCryptoService() signed.CryptoService
GetCryptoService is the getter for the repository's CryptoService
func (l LoadedNotaryRepository) GetDelegationRoles() ([]data.Role, error)
GetDelegationRoles returns the keys and roles of the repository's delegations
func (l LoadedNotaryRepository) GetGUN() data.GUN
GetGUN is a getter for the GUN object from a Repository
func (l LoadedNotaryRepository) GetTargetByName(name string, roles ...data.RoleName) (*client.TargetWithRole, error)
GetTargetByName returns a target by the given name.
func (l LoadedNotaryRepository) ListRoles() ([]client.RoleWithSignatures, error)
ListRoles returns a list of RoleWithSignatures objects for this repo
func (l LoadedNotaryRepository) ListTargets(roles ...data.RoleName) ([]*client.TargetWithRole, error)
ListTargets lists all targets for the current repository. The list of roles should be passed in order from highest to lowest priority.
LoadedWithNoSignersNotaryRepository is a mock Notary repository that is loaded with targets but no delegations it only contains the green target
type LoadedWithNoSignersNotaryRepository struct { LoadedNotaryRepository }
func (l LoadedWithNoSignersNotaryRepository) GetAllTargetMetadataByName(name string) ([]client.TargetSignedStruct, error)
GetAllTargetMetadataByName searches the entire delegation role tree to find the specified target by name for all roles, and returns a list of TargetSignedStructs for each time it finds the specified target.
func (l LoadedWithNoSignersNotaryRepository) GetDelegationRoles() ([]data.Role, error)
GetDelegationRoles returns the keys and roles of the repository's delegations
func (l LoadedWithNoSignersNotaryRepository) GetTargetByName(name string, _ ...data.RoleName) (*client.TargetWithRole, error)
GetTargetByName returns a target by the given name.
func (l LoadedWithNoSignersNotaryRepository) ListTargets(roles ...data.RoleName) ([]*client.TargetWithRole, error)
ListTargets lists all targets for the current repository. The list of roles should be passed in order from highest to lowest priority.
OfflineNotaryRepository is a mock Notary repository that is offline
type OfflineNotaryRepository struct{}
func (o OfflineNotaryRepository) AddDelegation(data.RoleName, []data.PublicKey, []string) error
AddDelegation creates changelist entries to add provided delegation public keys and paths.
func (o OfflineNotaryRepository) AddDelegationPaths(data.RoleName, []string) error
AddDelegationPaths creates a changelist entry to add provided paths to an existing delegation.
func (o OfflineNotaryRepository) AddDelegationRoleAndKeys(data.RoleName, []data.PublicKey) error
AddDelegationRoleAndKeys creates a changelist entry to add provided delegation public keys.
func (o OfflineNotaryRepository) AddTarget(*client.Target, ...data.RoleName) error
AddTarget creates new changelist entries to add a target to the given roles in the repository when the changelist gets applied at publish time.
func (o OfflineNotaryRepository) ClearDelegationPaths(data.RoleName) error
ClearDelegationPaths creates a changelist entry to remove all paths from an existing delegation.
func (o OfflineNotaryRepository) GetAllTargetMetadataByName(string) ([]client.TargetSignedStruct, error)
GetAllTargetMetadataByName searches the entire delegation role tree to find the specified target by name for all roles, and returns a list of TargetSignedStructs for each time it finds the specified target.
func (o OfflineNotaryRepository) GetChangelist() (changelist.Changelist, error)
GetChangelist returns the list of the repository's unpublished changes
func (o OfflineNotaryRepository) GetCryptoService() signed.CryptoService
GetCryptoService is the getter for the repository's CryptoService
func (o OfflineNotaryRepository) GetDelegationRoles() ([]data.Role, error)
GetDelegationRoles returns the keys and roles of the repository's delegations
func (o OfflineNotaryRepository) GetGUN() data.GUN
GetGUN is a getter for the GUN object from a Repository
func (o OfflineNotaryRepository) GetTargetByName(string, ...data.RoleName) (*client.TargetWithRole, error)
GetTargetByName returns a target by the given name.
func (o OfflineNotaryRepository) Initialize([]string, ...data.RoleName) error
Initialize creates a new repository by using rootKey as the root Key for the TUF repository.
func (o OfflineNotaryRepository) InitializeWithCertificate([]string, []data.PublicKey, ...data.RoleName) error
InitializeWithCertificate initializes the repository with root keys and their corresponding certificates
func (o OfflineNotaryRepository) ListRoles() ([]client.RoleWithSignatures, error)
ListRoles returns a list of RoleWithSignatures objects for this repo
func (o OfflineNotaryRepository) ListTargets(...data.RoleName) ([]*client.TargetWithRole, error)
ListTargets lists all targets for the current repository. The list of roles should be passed in order from highest to lowest priority.
func (o OfflineNotaryRepository) Publish() error
Publish pushes the local changes in signed material to the remote notary-server Conceptually it performs an operation similar to a `git rebase`
func (o OfflineNotaryRepository) RemoveDelegationKeys(data.RoleName, []string) error
RemoveDelegationKeys creates a changelist entry to remove provided keys from an existing delegation.
func (o OfflineNotaryRepository) RemoveDelegationKeysAndPaths(data.RoleName, []string, []string) error
RemoveDelegationKeysAndPaths creates changelist entries to remove provided delegation key IDs and paths.
func (o OfflineNotaryRepository) RemoveDelegationPaths(data.RoleName, []string) error
RemoveDelegationPaths creates a changelist entry to remove provided paths from an existing delegation.
func (o OfflineNotaryRepository) RemoveDelegationRole(data.RoleName) error
RemoveDelegationRole creates a changelist to remove all paths and keys from a role, and delete the role in its entirety.
func (o OfflineNotaryRepository) RemoveTarget(string, ...data.RoleName) error
RemoveTarget creates new changelist entries to remove a target from the given roles in the repository when the changelist gets applied at publish time.
func (o OfflineNotaryRepository) RotateKey(data.RoleName, bool, []string) error
RotateKey rotates a private key and returns the public component from the remote server
func (o OfflineNotaryRepository) SetLegacyVersions(int)
SetLegacyVersions allows the number of legacy versions of the root to be inspected for old signing keys to be configured.
func (o OfflineNotaryRepository) Witness(...data.RoleName) ([]data.RoleName, error)
Witness creates change objects to witness (i.e. re-sign) the given roles on the next publish. One change is created per role
UninitializedNotaryRepository is a mock Notary repository that is uninintialized it builds on top of the OfflineNotaryRepository, instead returning ErrRepositoryNotExist for any online operation
type UninitializedNotaryRepository struct { OfflineNotaryRepository }
func (u UninitializedNotaryRepository) GetAllTargetMetadataByName(string) ([]client.TargetSignedStruct, error)
GetAllTargetMetadataByName searches the entire delegation role tree to find the specified target by name for all roles, and returns a list of TargetSignedStructs for each time it finds the specified target.
func (u UninitializedNotaryRepository) GetDelegationRoles() ([]data.Role, error)
GetDelegationRoles returns the keys and roles of the repository's delegations
func (u UninitializedNotaryRepository) GetTargetByName(string, ...data.RoleName) (*client.TargetWithRole, error)
GetTargetByName returns a target by the given name.
func (u UninitializedNotaryRepository) Initialize([]string, ...data.RoleName) error
Initialize creates a new repository by using rootKey as the root Key for the TUF repository.
func (u UninitializedNotaryRepository) InitializeWithCertificate([]string, []data.PublicKey, ...data.RoleName) error
InitializeWithCertificate initializes the repository with root keys and their corresponding certificates
func (u UninitializedNotaryRepository) ListRoles() ([]client.RoleWithSignatures, error)
ListRoles returns a list of RoleWithSignatures objects for this repo
func (u UninitializedNotaryRepository) ListTargets(...data.RoleName) ([]*client.TargetWithRole, error)
ListTargets lists all targets for the current repository. The list of roles should be passed in order from highest to lowest priority.
func (u UninitializedNotaryRepository) Publish() error
Publish pushes the local changes in signed material to the remote notary-server Conceptually it performs an operation similar to a `git rebase`
func (u UninitializedNotaryRepository) RotateKey(data.RoleName, bool, []string) error
RotateKey rotates a private key and returns the public component from the remote server