Documentation ¶
Index ¶
- func GetEmptyTargetsNotaryRepository(trust.ImageRefAndAuth, []string) (client.Repository, error)
- func GetLoadedNotaryRepository(trust.ImageRefAndAuth, []string) (client.Repository, error)
- func GetLoadedWithNoSignersNotaryRepository(trust.ImageRefAndAuth, []string) (client.Repository, error)
- func GetOfflineNotaryRepository(trust.ImageRefAndAuth, []string) (client.Repository, error)
- func GetUninitializedNotaryRepository(trust.ImageRefAndAuth, []string) (client.Repository, error)
- type EmptyTargetsNotaryRepository
- func (e EmptyTargetsNotaryRepository) GetAllTargetMetadataByName(name string) ([]client.TargetSignedStruct, error)
- func (e EmptyTargetsNotaryRepository) GetDelegationRoles() ([]data.Role, error)
- func (e EmptyTargetsNotaryRepository) GetTargetByName(name string, _ ...data.RoleName) (*client.TargetWithRole, error)
- func (e EmptyTargetsNotaryRepository) Initialize([]string, ...data.RoleName) error
- func (e EmptyTargetsNotaryRepository) InitializeWithCertificate([]string, []data.PublicKey, ...data.RoleName) error
- func (e EmptyTargetsNotaryRepository) ListRoles() ([]client.RoleWithSignatures, error)
- func (e EmptyTargetsNotaryRepository) ListTargets(...data.RoleName) ([]*client.TargetWithRole, error)
- func (e EmptyTargetsNotaryRepository) Publish() error
- func (e EmptyTargetsNotaryRepository) RotateKey(data.RoleName, bool, []string) error
- type LoadedNotaryRepository
- func (l LoadedNotaryRepository) GetAllTargetMetadataByName(name string) ([]client.TargetSignedStruct, error)
- func (l LoadedNotaryRepository) GetCryptoService() signed.CryptoService
- func (l LoadedNotaryRepository) GetDelegationRoles() ([]data.Role, error)
- func (l LoadedNotaryRepository) GetGUN() data.GUN
- func (l LoadedNotaryRepository) GetTargetByName(name string, roles ...data.RoleName) (*client.TargetWithRole, error)
- func (l LoadedNotaryRepository) ListRoles() ([]client.RoleWithSignatures, error)
- func (l LoadedNotaryRepository) ListTargets(roles ...data.RoleName) ([]*client.TargetWithRole, error)
- type LoadedWithNoSignersNotaryRepository
- func (l LoadedWithNoSignersNotaryRepository) GetAllTargetMetadataByName(name string) ([]client.TargetSignedStruct, error)
- func (l LoadedWithNoSignersNotaryRepository) GetDelegationRoles() ([]data.Role, error)
- func (l LoadedWithNoSignersNotaryRepository) GetTargetByName(name string, _ ...data.RoleName) (*client.TargetWithRole, error)
- func (l LoadedWithNoSignersNotaryRepository) ListTargets(roles ...data.RoleName) ([]*client.TargetWithRole, error)
- type OfflineNotaryRepository
- func (o OfflineNotaryRepository) AddDelegation(data.RoleName, []data.PublicKey, []string) error
- func (o OfflineNotaryRepository) AddDelegationPaths(data.RoleName, []string) error
- func (o OfflineNotaryRepository) AddDelegationRoleAndKeys(data.RoleName, []data.PublicKey) error
- func (o OfflineNotaryRepository) AddTarget(*client.Target, ...data.RoleName) error
- func (o OfflineNotaryRepository) ClearDelegationPaths(data.RoleName) error
- func (o OfflineNotaryRepository) GetAllTargetMetadataByName(string) ([]client.TargetSignedStruct, error)
- func (o OfflineNotaryRepository) GetChangelist() (changelist.Changelist, error)
- func (o OfflineNotaryRepository) GetCryptoService() signed.CryptoService
- func (o OfflineNotaryRepository) GetDelegationRoles() ([]data.Role, error)
- func (o OfflineNotaryRepository) GetGUN() data.GUN
- func (o OfflineNotaryRepository) GetTargetByName(string, ...data.RoleName) (*client.TargetWithRole, error)
- func (o OfflineNotaryRepository) Initialize([]string, ...data.RoleName) error
- func (o OfflineNotaryRepository) InitializeWithCertificate([]string, []data.PublicKey, ...data.RoleName) error
- func (o OfflineNotaryRepository) ListRoles() ([]client.RoleWithSignatures, error)
- func (o OfflineNotaryRepository) ListTargets(...data.RoleName) ([]*client.TargetWithRole, error)
- func (o OfflineNotaryRepository) Publish() error
- func (o OfflineNotaryRepository) RemoveDelegationKeys(data.RoleName, []string) error
- func (o OfflineNotaryRepository) RemoveDelegationKeysAndPaths(data.RoleName, []string, []string) error
- func (o OfflineNotaryRepository) RemoveDelegationPaths(data.RoleName, []string) error
- func (o OfflineNotaryRepository) RemoveDelegationRole(data.RoleName) error
- func (o OfflineNotaryRepository) RemoveTarget(string, ...data.RoleName) error
- func (o OfflineNotaryRepository) RotateKey(data.RoleName, bool, []string) error
- func (o OfflineNotaryRepository) SetLegacyVersions(int)
- func (o OfflineNotaryRepository) Witness(...data.RoleName) ([]data.RoleName, error)
- type UninitializedNotaryRepository
- func (u UninitializedNotaryRepository) GetAllTargetMetadataByName(string) ([]client.TargetSignedStruct, error)
- func (u UninitializedNotaryRepository) GetDelegationRoles() ([]data.Role, error)
- func (u UninitializedNotaryRepository) GetTargetByName(string, ...data.RoleName) (*client.TargetWithRole, error)
- func (u UninitializedNotaryRepository) Initialize([]string, ...data.RoleName) error
- func (u UninitializedNotaryRepository) InitializeWithCertificate([]string, []data.PublicKey, ...data.RoleName) error
- func (u UninitializedNotaryRepository) ListRoles() ([]client.RoleWithSignatures, error)
- func (u UninitializedNotaryRepository) ListTargets(...data.RoleName) ([]*client.TargetWithRole, error)
- func (u UninitializedNotaryRepository) Publish() error
- func (u UninitializedNotaryRepository) RotateKey(data.RoleName, bool, []string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEmptyTargetsNotaryRepository ¶
func GetEmptyTargetsNotaryRepository(trust.ImageRefAndAuth, []string) (client.Repository, error)
GetEmptyTargetsNotaryRepository returns an EmptyTargetsNotaryRepository
func GetLoadedNotaryRepository ¶
func GetLoadedNotaryRepository(trust.ImageRefAndAuth, []string) (client.Repository, error)
GetLoadedNotaryRepository returns a LoadedNotaryRepository
func GetLoadedWithNoSignersNotaryRepository ¶
func GetLoadedWithNoSignersNotaryRepository(trust.ImageRefAndAuth, []string) (client.Repository, error)
GetLoadedWithNoSignersNotaryRepository returns a LoadedWithNoSignersNotaryRepository
func GetOfflineNotaryRepository ¶
func GetOfflineNotaryRepository(trust.ImageRefAndAuth, []string) (client.Repository, error)
GetOfflineNotaryRepository returns a OfflineNotaryRepository
func GetUninitializedNotaryRepository ¶
func GetUninitializedNotaryRepository(trust.ImageRefAndAuth, []string) (client.Repository, error)
GetUninitializedNotaryRepository returns an UninitializedNotaryRepository
Types ¶
type EmptyTargetsNotaryRepository ¶
type EmptyTargetsNotaryRepository struct {
OfflineNotaryRepository
}
EmptyTargetsNotaryRepository is a mock Notary repository that is initialized but does not have any signed targets
func (EmptyTargetsNotaryRepository) GetAllTargetMetadataByName ¶
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 (EmptyTargetsNotaryRepository) GetDelegationRoles ¶
func (e EmptyTargetsNotaryRepository) GetDelegationRoles() ([]data.Role, error)
GetDelegationRoles returns the keys and roles of the repository's delegations
func (EmptyTargetsNotaryRepository) GetTargetByName ¶
func (e EmptyTargetsNotaryRepository) GetTargetByName(name string, _ ...data.RoleName) (*client.TargetWithRole, error)
GetTargetByName returns a target by the given name.
func (EmptyTargetsNotaryRepository) Initialize ¶
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 (EmptyTargetsNotaryRepository) InitializeWithCertificate ¶
func (e EmptyTargetsNotaryRepository) InitializeWithCertificate([]string, []data.PublicKey, ...data.RoleName) error
InitializeWithCertificate initializes the repository with root keys and their corresponding certificates
func (EmptyTargetsNotaryRepository) ListRoles ¶
func (e EmptyTargetsNotaryRepository) ListRoles() ([]client.RoleWithSignatures, error)
ListRoles returns a list of RoleWithSignatures objects for this repo
func (EmptyTargetsNotaryRepository) ListTargets ¶
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 (EmptyTargetsNotaryRepository) Publish ¶
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`
type LoadedNotaryRepository ¶
type LoadedNotaryRepository struct { EmptyTargetsNotaryRepository // contains filtered or unexported fields }
LoadedNotaryRepository is a mock Notary repository that is loaded with targets, delegations, and keys
func (LoadedNotaryRepository) GetAllTargetMetadataByName ¶
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 (LoadedNotaryRepository) GetCryptoService ¶
func (l LoadedNotaryRepository) GetCryptoService() signed.CryptoService
GetCryptoService is the getter for the repository's CryptoService
func (LoadedNotaryRepository) GetDelegationRoles ¶
func (l LoadedNotaryRepository) GetDelegationRoles() ([]data.Role, error)
GetDelegationRoles returns the keys and roles of the repository's delegations
func (LoadedNotaryRepository) GetGUN ¶
func (l LoadedNotaryRepository) GetGUN() data.GUN
GetGUN is a getter for the GUN object from a Repository
func (LoadedNotaryRepository) GetTargetByName ¶
func (l LoadedNotaryRepository) GetTargetByName(name string, roles ...data.RoleName) (*client.TargetWithRole, error)
GetTargetByName returns a target by the given name.
func (LoadedNotaryRepository) ListRoles ¶
func (l LoadedNotaryRepository) ListRoles() ([]client.RoleWithSignatures, error)
ListRoles returns a list of RoleWithSignatures objects for this repo
func (LoadedNotaryRepository) ListTargets ¶
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.
type LoadedWithNoSignersNotaryRepository ¶
type LoadedWithNoSignersNotaryRepository struct {
LoadedNotaryRepository
}
LoadedWithNoSignersNotaryRepository is a mock Notary repository that is loaded with targets but no delegations it only contains the green target
func (LoadedWithNoSignersNotaryRepository) GetAllTargetMetadataByName ¶
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 (LoadedWithNoSignersNotaryRepository) GetDelegationRoles ¶
func (l LoadedWithNoSignersNotaryRepository) GetDelegationRoles() ([]data.Role, error)
GetDelegationRoles returns the keys and roles of the repository's delegations
func (LoadedWithNoSignersNotaryRepository) GetTargetByName ¶
func (l LoadedWithNoSignersNotaryRepository) GetTargetByName(name string, _ ...data.RoleName) (*client.TargetWithRole, error)
GetTargetByName returns a target by the given name.
func (LoadedWithNoSignersNotaryRepository) ListTargets ¶
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.
type OfflineNotaryRepository ¶
type OfflineNotaryRepository struct{}
OfflineNotaryRepository is a mock Notary repository that is offline
func (OfflineNotaryRepository) AddDelegation ¶
AddDelegation creates changelist entries to add provided delegation public keys and paths.
func (OfflineNotaryRepository) AddDelegationPaths ¶
func (o OfflineNotaryRepository) AddDelegationPaths(data.RoleName, []string) error
AddDelegationPaths creates a changelist entry to add provided paths to an existing delegation.
func (OfflineNotaryRepository) AddDelegationRoleAndKeys ¶
AddDelegationRoleAndKeys creates a changelist entry to add provided delegation public keys.
func (OfflineNotaryRepository) AddTarget ¶
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 (OfflineNotaryRepository) ClearDelegationPaths ¶
func (o OfflineNotaryRepository) ClearDelegationPaths(data.RoleName) error
ClearDelegationPaths creates a changelist entry to remove all paths from an existing delegation.
func (OfflineNotaryRepository) GetAllTargetMetadataByName ¶
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 (OfflineNotaryRepository) GetChangelist ¶
func (o OfflineNotaryRepository) GetChangelist() (changelist.Changelist, error)
GetChangelist returns the list of the repository's unpublished changes
func (OfflineNotaryRepository) GetCryptoService ¶
func (o OfflineNotaryRepository) GetCryptoService() signed.CryptoService
GetCryptoService is the getter for the repository's CryptoService
func (OfflineNotaryRepository) GetDelegationRoles ¶
func (o OfflineNotaryRepository) GetDelegationRoles() ([]data.Role, error)
GetDelegationRoles returns the keys and roles of the repository's delegations
func (OfflineNotaryRepository) GetGUN ¶
func (o OfflineNotaryRepository) GetGUN() data.GUN
GetGUN is a getter for the GUN object from a Repository
func (OfflineNotaryRepository) GetTargetByName ¶
func (o OfflineNotaryRepository) GetTargetByName(string, ...data.RoleName) (*client.TargetWithRole, error)
GetTargetByName returns a target by the given name.
func (OfflineNotaryRepository) Initialize ¶
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 (OfflineNotaryRepository) InitializeWithCertificate ¶
func (o OfflineNotaryRepository) InitializeWithCertificate([]string, []data.PublicKey, ...data.RoleName) error
InitializeWithCertificate initializes the repository with root keys and their corresponding certificates
func (OfflineNotaryRepository) ListRoles ¶
func (o OfflineNotaryRepository) ListRoles() ([]client.RoleWithSignatures, error)
ListRoles returns a list of RoleWithSignatures objects for this repo
func (OfflineNotaryRepository) ListTargets ¶
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 (OfflineNotaryRepository) Publish ¶
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 (OfflineNotaryRepository) RemoveDelegationKeys ¶
func (o OfflineNotaryRepository) RemoveDelegationKeys(data.RoleName, []string) error
RemoveDelegationKeys creates a changelist entry to remove provided keys from an existing delegation.
func (OfflineNotaryRepository) RemoveDelegationKeysAndPaths ¶
func (o OfflineNotaryRepository) RemoveDelegationKeysAndPaths(data.RoleName, []string, []string) error
RemoveDelegationKeysAndPaths creates changelist entries to remove provided delegation key IDs and paths.
func (OfflineNotaryRepository) RemoveDelegationPaths ¶
func (o OfflineNotaryRepository) RemoveDelegationPaths(data.RoleName, []string) error
RemoveDelegationPaths creates a changelist entry to remove provided paths from an existing delegation.
func (OfflineNotaryRepository) RemoveDelegationRole ¶
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 (OfflineNotaryRepository) RemoveTarget ¶
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 (OfflineNotaryRepository) RotateKey ¶
RotateKey rotates a private key and returns the public component from the remote server
func (OfflineNotaryRepository) SetLegacyVersions ¶
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.
type UninitializedNotaryRepository ¶
type UninitializedNotaryRepository struct {
OfflineNotaryRepository
}
UninitializedNotaryRepository is a mock Notary repository that is uninintialized it builds on top of the OfflineNotaryRepository, instead returning ErrRepositoryNotExist for any online operation
func (UninitializedNotaryRepository) GetAllTargetMetadataByName ¶
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 (UninitializedNotaryRepository) GetDelegationRoles ¶
func (u UninitializedNotaryRepository) GetDelegationRoles() ([]data.Role, error)
GetDelegationRoles returns the keys and roles of the repository's delegations
func (UninitializedNotaryRepository) GetTargetByName ¶
func (u UninitializedNotaryRepository) GetTargetByName(string, ...data.RoleName) (*client.TargetWithRole, error)
GetTargetByName returns a target by the given name.
func (UninitializedNotaryRepository) Initialize ¶
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 (UninitializedNotaryRepository) InitializeWithCertificate ¶
func (u UninitializedNotaryRepository) InitializeWithCertificate([]string, []data.PublicKey, ...data.RoleName) error
InitializeWithCertificate initializes the repository with root keys and their corresponding certificates
func (UninitializedNotaryRepository) ListRoles ¶
func (u UninitializedNotaryRepository) ListRoles() ([]client.RoleWithSignatures, error)
ListRoles returns a list of RoleWithSignatures objects for this repo
func (UninitializedNotaryRepository) ListTargets ¶
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 (UninitializedNotaryRepository) Publish ¶
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`