Documentation ¶
Index ¶
- Variables
- type ErrExpired
- type ErrRepoNotInitialized
- type NotaryRepository
- func (r *NotaryRepository) AddTarget(target *Target) error
- func (r *NotaryRepository) GetTargetByName(name string) (*Target, error)
- func (r *NotaryRepository) Initialize(uCryptoService *cryptoservice.UnlockedCryptoService) error
- func (r *NotaryRepository) ListTargets() ([]*Target, error)
- func (r *NotaryRepository) Publish() error
- func (r *NotaryRepository) RemoveTarget(targetName string) error
- type Target
Constants ¶
This section is empty.
Variables ¶
var ErrRepositoryNotExist = errors.New("repository does not exist")
ErrRepositoryNotExist gets returned when trying to make an action over a repository / that doesn't exist.
Functions ¶
This section is empty.
Types ¶
type ErrExpired ¶
type ErrExpired struct {
signed.ErrExpired
}
ErrExpired is returned when the metadata for a role has expired
type ErrRepoNotInitialized ¶
type ErrRepoNotInitialized struct{}
ErrRepoNotInitialized is returned when trying to can publish on an uninitialized notary repository
func (*ErrRepoNotInitialized) Error ¶
func (err *ErrRepoNotInitialized) Error() string
ErrRepoNotInitialized is returned when trying to can publish on an uninitialized notary repository
type NotaryRepository ¶
type NotaryRepository struct { KeyStoreManager *keystoremanager.KeyStoreManager // contains filtered or unexported fields }
NotaryRepository stores all the information needed to operate on a notary repository.
func NewNotaryRepository ¶
func NewNotaryRepository(baseDir, gun, baseURL string, rt http.RoundTripper, passphraseRetriever passphrase.Retriever) (*NotaryRepository, error)
NewNotaryRepository is a helper method that returns a new notary repository. It takes the base directory under where all the trust files will be stored (usually ~/.docker/trust/).
func (*NotaryRepository) AddTarget ¶
func (r *NotaryRepository) AddTarget(target *Target) error
AddTarget adds a new target to the repository, forcing a timestamps check from TUF
func (*NotaryRepository) GetTargetByName ¶
func (r *NotaryRepository) GetTargetByName(name string) (*Target, error)
GetTargetByName returns a target given a name
func (*NotaryRepository) Initialize ¶
func (r *NotaryRepository) Initialize(uCryptoService *cryptoservice.UnlockedCryptoService) error
Initialize creates a new repository by using rootKey as the root Key for the TUF repository.
func (*NotaryRepository) ListTargets ¶
func (r *NotaryRepository) ListTargets() ([]*Target, error)
ListTargets lists all targets for the current repository
func (*NotaryRepository) Publish ¶
func (r *NotaryRepository) 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 (*NotaryRepository) RemoveTarget ¶
func (r *NotaryRepository) RemoveTarget(targetName string) error
RemoveTarget creates a new changelist entry to remove a target from the repository when the changelist gets applied at publish time