client

package
v0.0.0-...-f7d0ea7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2015 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

type Target

type Target struct {
	Name   string
	Hashes data.Hashes
	Length int64
}

Target represents a simplified version of the data TUF operates on, so external applications don't have to depend on tuf data types.

func NewTarget

func NewTarget(targetName string, targetPath string) (*Target, error)

NewTarget is a helper method that returns a Target

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL