{"modulePath":"github.com/cspotcode/docker-cli","version":"v20.10.0-rc1+incompatible","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package notary\n\n## Functions\n\n```go\nfunc GetEmptyTargetsNotaryRepository(imgRefAndAuth trust.ImageRefAndAuth, actions []string) (client.Repository, error)\n```\nGetEmptyTargetsNotaryRepository returns an EmptyTargetsNotaryRepository\n\n```go\nfunc GetLoadedNotaryRepository(imgRefAndAuth trust.ImageRefAndAuth, actions []string) (client.Repository, error)\n```\nGetLoadedNotaryRepository returns a LoadedNotaryRepository\n\n```go\nfunc GetLoadedWithNoSignersNotaryRepository(imgRefAndAuth trust.ImageRefAndAuth, actions []string) (client.Repository, error)\n```\nGetLoadedWithNoSignersNotaryRepository returns a LoadedWithNoSignersNotaryRepository\n\n```go\nfunc GetOfflineNotaryRepository(imgRefAndAuth trust.ImageRefAndAuth, actions []string) (client.Repository, error)\n```\nGetOfflineNotaryRepository returns a OfflineNotaryRepository\n\n```go\nfunc GetUninitializedNotaryRepository(imgRefAndAuth trust.ImageRefAndAuth, actions []string) (client.Repository, error)\n```\nGetUninitializedNotaryRepository returns an UninitializedNotaryRepository\n\n## Types\n\n```go\ntype EmptyTargetsNotaryRepository struct {\n\tOfflineNotaryRepository\n}\n```\nEmptyTargetsNotaryRepository is a mock Notary repository that is initialized but does not have any signed targets\n\n```go\nfunc (e EmptyTargetsNotaryRepository) GetAllTargetMetadataByName(name string) ([]client.TargetSignedStruct, error)\n```\nGetAllTargetMetadataByName 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.\n\n```go\nfunc (e EmptyTargetsNotaryRepository) GetDelegationRoles() ([]data.Role, error)\n```\nGetDelegationRoles returns the keys and roles of the repository's delegations\n\n```go\nfunc (e EmptyTargetsNotaryRepository) GetTargetByName(name string, roles ...data.RoleName) (*client.TargetWithRole, error)\n```\nGetTargetByName returns a target by the given name.\n\n```go\nfunc (e EmptyTargetsNotaryRepository) Initialize(rootKeyIDs []string, serverManagedRoles ...data.RoleName) error\n```\nInitialize creates a new repository by using rootKey as the root Key for the TUF repository.\n\n```go\nfunc (e EmptyTargetsNotaryRepository) InitializeWithCertificate(rootKeyIDs []string, rootCerts []data.PublicKey, serverManagedRoles ...data.RoleName) error\n```\nInitializeWithCertificate initializes the repository with root keys and their corresponding certificates\n\n```go\nfunc (e EmptyTargetsNotaryRepository) ListRoles() ([]client.RoleWithSignatures, error)\n```\nListRoles returns a list of RoleWithSignatures objects for this repo\n\n```go\nfunc (e EmptyTargetsNotaryRepository) ListTargets(roles ...data.RoleName) ([]*client.TargetWithRole, error)\n```\nListTargets lists all targets for the current repository. The list of roles should be passed in order from highest to lowest priority.\n\n```go\nfunc (e EmptyTargetsNotaryRepository) Publish() error\n```\nPublish pushes the local changes in signed material to the remote notary-server Conceptually it performs an operation similar to a \\`git rebase\\`\n\n```go\nfunc (e EmptyTargetsNotaryRepository) RotateKey(role data.RoleName, serverManagesKey bool, keyList []string) error\n```\nRotateKey rotates a private key and returns the public component from the remote server\n\n```go\ntype LoadedNotaryRepository struct {\n\tEmptyTargetsNotaryRepository\n\t// contains filtered or unexported fields\n}\n```\nLoadedNotaryRepository is a mock Notary repository that is loaded with targets, delegations, and keys\n\n```go\nfunc (l LoadedNotaryRepository) GetAllTargetMetadataByName(name string) ([]client.TargetSignedStruct, error)\n```\nGetAllTargetMetadataByName 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.\n\n```go\nfunc (l LoadedNotaryRepository) GetCryptoService() signed.CryptoService\n```\nGetCryptoService is the getter for the repository's CryptoService\n\n```go\nfunc (l LoadedNotaryRepository) GetDelegationRoles() ([]data.Role, error)\n```\nGetDelegationRoles returns the keys and roles of the repository's delegations\n\n```go\nfunc (l LoadedNotaryRepository) GetGUN() data.GUN\n```\nGetGUN is a getter for the GUN object from a Repository\n\n```go\nfunc (l LoadedNotaryRepository) GetTargetByName(name string, roles ...data.RoleName) (*client.TargetWithRole, error)\n```\nGetTargetByName returns a target by the given name.\n\n```go\nfunc (l LoadedNotaryRepository) ListRoles() ([]client.RoleWithSignatures, error)\n```\nListRoles returns a list of RoleWithSignatures objects for this repo\n\n```go\nfunc (l LoadedNotaryRepository) ListTargets(roles ...data.RoleName) ([]*client.TargetWithRole, error)\n```\nListTargets lists all targets for the current repository. The list of roles should be passed in order from highest to lowest priority.\n\n```go\ntype LoadedWithNoSignersNotaryRepository struct {\n\tLoadedNotaryRepository\n}\n```\nLoadedWithNoSignersNotaryRepository is a mock Notary repository that is loaded with targets but no delegations it only contains the green target\n\n```go\nfunc (l LoadedWithNoSignersNotaryRepository) GetAllTargetMetadataByName(name string) ([]client.TargetSignedStruct, error)\n```\nGetAllTargetMetadataByName 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.\n\n```go\nfunc (l LoadedWithNoSignersNotaryRepository) GetDelegationRoles() ([]data.Role, error)\n```\nGetDelegationRoles returns the keys and roles of the repository's delegations\n\n```go\nfunc (l LoadedWithNoSignersNotaryRepository) GetTargetByName(name string, roles ...data.RoleName) (*client.TargetWithRole, error)\n```\nGetTargetByName returns a target by the given name.\n\n```go\nfunc (l LoadedWithNoSignersNotaryRepository) ListTargets(roles ...data.RoleName) ([]*client.TargetWithRole, error)\n```\nListTargets lists all targets for the current repository. The list of roles should be passed in order from highest to lowest priority.\n\n```go\ntype OfflineNotaryRepository struct{}\n```\nOfflineNotaryRepository is a mock Notary repository that is offline\n\n```go\nfunc (o OfflineNotaryRepository) AddDelegation(name data.RoleName, delegationKeys []data.PublicKey, paths []string) error\n```\nAddDelegation creates changelist entries to add provided delegation public keys and paths.\n\n```go\nfunc (o OfflineNotaryRepository) AddDelegationPaths(name data.RoleName, paths []string) error\n```\nAddDelegationPaths creates a changelist entry to add provided paths to an existing delegation.\n\n```go\nfunc (o OfflineNotaryRepository) AddDelegationRoleAndKeys(name data.RoleName, delegationKeys []data.PublicKey) error\n```\nAddDelegationRoleAndKeys creates a changelist entry to add provided delegation public keys.\n\n```go\nfunc (o OfflineNotaryRepository) AddTarget(target *client.Target, roles ...data.RoleName) error\n```\nAddTarget creates new changelist entries to add a target to the given roles in the repository when the changelist gets applied at publish time.\n\n```go\nfunc (o OfflineNotaryRepository) ClearDelegationPaths(name data.RoleName) error\n```\nClearDelegationPaths creates a changelist entry to remove all paths from an existing delegation.\n\n```go\nfunc (o OfflineNotaryRepository) GetAllTargetMetadataByName(name string) ([]client.TargetSignedStruct, error)\n```\nGetAllTargetMetadataByName 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.\n\n```go\nfunc (o OfflineNotaryRepository) GetChangelist() (changelist.Changelist, error)\n```\nGetChangelist returns the list of the repository's unpublished changes\n\n```go\nfunc (o OfflineNotaryRepository) GetCryptoService() signed.CryptoService\n```\nGetCryptoService is the getter for the repository's CryptoService\n\n```go\nfunc (o OfflineNotaryRepository) GetDelegationRoles() ([]data.Role, error)\n```\nGetDelegationRoles returns the keys and roles of the repository's delegations\n\n```go\nfunc (o OfflineNotaryRepository) GetGUN() data.GUN\n```\nGetGUN is a getter for the GUN object from a Repository\n\n```go\nfunc (o OfflineNotaryRepository) GetTargetByName(name string, roles ...data.RoleName) (*client.TargetWithRole, error)\n```\nGetTargetByName returns a target by the given name.\n\n```go\nfunc (o OfflineNotaryRepository) Initialize(rootKeyIDs []string, serverManagedRoles ...data.RoleName) error\n```\nInitialize creates a new repository by using rootKey as the root Key for the TUF repository.\n\n```go\nfunc (o OfflineNotaryRepository) InitializeWithCertificate(rootKeyIDs []string, rootCerts []data.PublicKey, serverManagedRoles ...data.RoleName) error\n```\nInitializeWithCertificate initializes the repository with root keys and their corresponding certificates\n\n```go\nfunc (o OfflineNotaryRepository) ListRoles() ([]client.RoleWithSignatures, error)\n```\nListRoles returns a list of RoleWithSignatures objects for this repo\n\n```go\nfunc (o OfflineNotaryRepository) ListTargets(roles ...data.RoleName) ([]*client.TargetWithRole, error)\n```\nListTargets lists all targets for the current repository. The list of roles should be passed in order from highest to lowest priority.\n\n```go\nfunc (o OfflineNotaryRepository) Publish() error\n```\nPublish pushes the local changes in signed material to the remote notary-server Conceptually it performs an operation similar to a \\`git rebase\\`\n\n```go\nfunc (o OfflineNotaryRepository) RemoveDelegationKeys(name data.RoleName, keyIDs []string) error\n```\nRemoveDelegationKeys creates a changelist entry to remove provided keys from an existing delegation.\n\n```go\nfunc (o OfflineNotaryRepository) RemoveDelegationKeysAndPaths(name data.RoleName, keyIDs, paths []string) error\n```\nRemoveDelegationKeysAndPaths creates changelist entries to remove provided delegation key IDs and paths.\n\n```go\nfunc (o OfflineNotaryRepository) RemoveDelegationPaths(name data.RoleName, paths []string) error\n```\nRemoveDelegationPaths creates a changelist entry to remove provided paths from an existing delegation.\n\n```go\nfunc (o OfflineNotaryRepository) RemoveDelegationRole(name data.RoleName) error\n```\nRemoveDelegationRole creates a changelist to remove all paths and keys from a role, and delete the role in its entirety.\n\n```go\nfunc (o OfflineNotaryRepository) RemoveTarget(targetName string, roles ...data.RoleName) error\n```\nRemoveTarget creates new changelist entries to remove a target from the given roles in the repository when the changelist gets applied at publish time.\n\n```go\nfunc (o OfflineNotaryRepository) RotateKey(role data.RoleName, serverManagesKey bool, keyList []string) error\n```\nRotateKey rotates a private key and returns the public component from the remote server\n\n```go\nfunc (o OfflineNotaryRepository) SetLegacyVersions(version int)\n```\nSetLegacyVersions allows the number of legacy versions of the root to be inspected for old signing keys to be configured.\n\n```go\nfunc (o OfflineNotaryRepository) Witness(roles ...data.RoleName) ([]data.RoleName, error)\n```\nWitness creates change objects to witness (i.e. re-sign) the given roles on the next publish. One change is created per role\n\n```go\ntype UninitializedNotaryRepository struct {\n\tOfflineNotaryRepository\n}\n```\nUninitializedNotaryRepository is a mock Notary repository that is uninintialized it builds on top of the OfflineNotaryRepository, instead returning ErrRepositoryNotExist for any online operation\n\n```go\nfunc (u UninitializedNotaryRepository) GetAllTargetMetadataByName(name string) ([]client.TargetSignedStruct, error)\n```\nGetAllTargetMetadataByName 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.\n\n```go\nfunc (u UninitializedNotaryRepository) GetDelegationRoles() ([]data.Role, error)\n```\nGetDelegationRoles returns the keys and roles of the repository's delegations\n\n```go\nfunc (u UninitializedNotaryRepository) GetTargetByName(name string, roles ...data.RoleName) (*client.TargetWithRole, error)\n```\nGetTargetByName returns a target by the given name.\n\n```go\nfunc (u UninitializedNotaryRepository) Initialize(rootKeyIDs []string, serverManagedRoles ...data.RoleName) error\n```\nInitialize creates a new repository by using rootKey as the root Key for the TUF repository.\n\n```go\nfunc (u UninitializedNotaryRepository) InitializeWithCertificate(rootKeyIDs []string, rootCerts []data.PublicKey, serverManagedRoles ...data.RoleName) error\n```\nInitializeWithCertificate initializes the repository with root keys and their corresponding certificates\n\n```go\nfunc (u UninitializedNotaryRepository) ListRoles() ([]client.RoleWithSignatures, error)\n```\nListRoles returns a list of RoleWithSignatures objects for this repo\n\n```go\nfunc (u UninitializedNotaryRepository) ListTargets(roles ...data.RoleName) ([]*client.TargetWithRole, error)\n```\nListTargets lists all targets for the current repository. The list of roles should be passed in order from highest to lowest priority.\n\n```go\nfunc (u UninitializedNotaryRepository) Publish() error\n```\nPublish pushes the local changes in signed material to the remote notary-server Conceptually it performs an operation similar to a \\`git rebase\\`\n\n```go\nfunc (u UninitializedNotaryRepository) RotateKey(role data.RoleName, serverManagesKey bool, keyList []string) error\n```\nRotateKey rotates a private key and returns the public component from the remote server\n\n","path":"github.com/cspotcode/docker-cli/internal/test/notary","name":"notary","synopsis":"","isRedistributable":true}
