Documentation ¶
Index ¶
- Variables
- type CompressionType
- type ErrFileNotFound
- type ErrInsufficientKeys
- type ErrInsufficientSignatures
- type ErrInvalidExpires
- type ErrInvalidRole
- type ErrKeyNotFound
- type ErrMissingMetadata
- type ErrNotEnoughKeys
- type ErrPassphraseRequired
- type LocalStore
- type Repo
- func (r *Repo) AddTarget(path string, custom json.RawMessage) error
- func (r *Repo) AddTargetWithExpires(path string, custom json.RawMessage, expires time.Time) error
- func (r *Repo) AddTargets(paths []string, custom json.RawMessage) error
- func (r *Repo) AddTargetsWithExpires(paths []string, custom json.RawMessage, expires time.Time) error
- func (r *Repo) Clean() error
- func (r *Repo) Commit() error
- func (r *Repo) GenKey(role string) (string, error)
- func (r *Repo) GenKeyWithExpires(keyRole string, expires time.Time) (string, error)
- func (r *Repo) Init(consistentSnapshot bool) error
- func (r *Repo) RemoveTarget(path string) error
- func (r *Repo) RemoveTargetWithExpires(path string, expires time.Time) error
- func (r *Repo) RemoveTargets(paths []string) error
- func (r *Repo) RemoveTargetsWithExpires(paths []string, expires time.Time) error
- func (r *Repo) RevokeKey(role, id string) error
- func (r *Repo) RevokeKeyWithExpires(keyRole, id string, expires time.Time) error
- func (r *Repo) RootKeys() ([]*data.Key, error)
- func (r *Repo) Sign(name string) error
- func (r *Repo) Snapshot(t CompressionType) error
- func (r *Repo) SnapshotWithExpires(t CompressionType, expires time.Time) error
- func (r *Repo) Timestamp() error
- func (r *Repo) TimestampWithExpires(expires time.Time) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInitNotAllowed = errors.New("tuf: repository already initialized") ErrNewRepository = errors.New("tuf: repository not yet committed") )
Functions ¶
This section is empty.
Types ¶
type CompressionType ¶
type CompressionType uint8
const ( CompressionTypeNone CompressionType = iota CompressionTypeGzip )
type ErrFileNotFound ¶
type ErrFileNotFound struct {
Path string
}
func (ErrFileNotFound) Error ¶
func (e ErrFileNotFound) Error() string
type ErrInsufficientKeys ¶
type ErrInsufficientKeys struct {
Name string
}
func (ErrInsufficientKeys) Error ¶
func (e ErrInsufficientKeys) Error() string
type ErrInsufficientSignatures ¶
func (ErrInsufficientSignatures) Error ¶
func (e ErrInsufficientSignatures) Error() string
type ErrInvalidExpires ¶
func (ErrInvalidExpires) Error ¶
func (e ErrInvalidExpires) Error() string
type ErrInvalidRole ¶
type ErrInvalidRole struct {
Role string
}
func (ErrInvalidRole) Error ¶
func (e ErrInvalidRole) Error() string
type ErrKeyNotFound ¶
func (ErrKeyNotFound) Error ¶
func (e ErrKeyNotFound) Error() string
type ErrMissingMetadata ¶
type ErrMissingMetadata struct {
Name string
}
func (ErrMissingMetadata) Error ¶
func (e ErrMissingMetadata) Error() string
type ErrNotEnoughKeys ¶
func (ErrNotEnoughKeys) Error ¶
func (e ErrNotEnoughKeys) Error() string
type ErrPassphraseRequired ¶
type ErrPassphraseRequired struct {
Role string
}
func (ErrPassphraseRequired) Error ¶
func (e ErrPassphraseRequired) Error() string
type LocalStore ¶
type LocalStore interface { GetMeta() (map[string]json.RawMessage, error) SetMeta(string, json.RawMessage) error // WalkStagedTargets calls targetsFn for each staged target file in paths. // // If paths is empty, all staged target files will be walked. WalkStagedTargets(paths []string, targetsFn targetsWalkFunc) error Commit(map[string]json.RawMessage, bool, map[string]data.Hashes) error GetKeys(string) ([]*data.Key, error) SaveKey(string, *data.Key) error Clean() error }
func FileSystemStore ¶
func FileSystemStore(dir string, p util.PassphraseFunc) LocalStore
func MemoryStore ¶
func MemoryStore(meta map[string]json.RawMessage, files map[string][]byte) LocalStore
type Repo ¶
type Repo struct {
// contains filtered or unexported fields
}
func (*Repo) AddTargetWithExpires ¶
func (*Repo) AddTargets ¶
func (r *Repo) AddTargets(paths []string, custom json.RawMessage) error
func (*Repo) AddTargetsWithExpires ¶
func (*Repo) GenKeyWithExpires ¶
func (*Repo) RemoveTarget ¶
func (*Repo) RemoveTargetWithExpires ¶
func (*Repo) RemoveTargets ¶
func (*Repo) RemoveTargetsWithExpires ¶
If paths is empty, all targets will be removed.
func (*Repo) RevokeKeyWithExpires ¶
func (*Repo) Snapshot ¶
func (r *Repo) Snapshot(t CompressionType) error
func (*Repo) SnapshotWithExpires ¶
func (r *Repo) SnapshotWithExpires(t CompressionType, expires time.Time) error
Directories ¶
Path | Synopsis |
---|---|
Godeps
|
|
_workspace/src/github.com/agl/ed25519
Package ed25519 implements the Ed25519 signature algorithm.
|
Package ed25519 implements the Ed25519 signature algorithm. |
_workspace/src/github.com/agl/ed25519/edwards25519
Package edwards25519 implements operations in GF(2**255-19) and on an Edwards curve that is isomorphic to curve25519.
|
Package edwards25519 implements operations in GF(2**255-19) and on an Edwards curve that is isomorphic to curve25519. |
_workspace/src/github.com/boltdb/bolt
Package bolt implements a low-level key/value store in pure Go.
|
Package bolt implements a low-level key/value store in pure Go. |
_workspace/src/github.com/dustin/go-humanize
Package humanize converts boring ugly numbers to human-friendly strings and back.
|
Package humanize converts boring ugly numbers to human-friendly strings and back. |
_workspace/src/github.com/flynn/go-docopt
Package docopt parses command-line arguments based on a help message.
|
Package docopt parses command-line arguments based on a help message. |
_workspace/src/golang.org/x/crypto/nacl/secretbox
Package secretbox encrypts and authenticates small messages.
|
Package secretbox encrypts and authenticates small messages. |
_workspace/src/golang.org/x/crypto/pbkdf2
Package pbkdf2 implements the key derivation function PBKDF2 as defined in RFC 2898 / PKCS #5 v2.0.
|
Package pbkdf2 implements the key derivation function PBKDF2 as defined in RFC 2898 / PKCS #5 v2.0. |
_workspace/src/golang.org/x/crypto/poly1305
Package poly1305 implements Poly1305 one-time message authentication code as specified in http://cr.yp.to/mac/poly1305-20050329.pdf.
|
Package poly1305 implements Poly1305 one-time message authentication code as specified in http://cr.yp.to/mac/poly1305-20050329.pdf. |
_workspace/src/golang.org/x/crypto/salsa20/salsa
Package salsa provides low-level access to functions in the Salsa family.
|
Package salsa provides low-level access to functions in the Salsa family. |
_workspace/src/golang.org/x/crypto/scrypt
Package scrypt implements the scrypt key derivation function as defined in Colin Percival's paper "Stronger Key Derivation via Sequential Memory-Hard Functions" (http://www.tarsnap.com/scrypt/scrypt.pdf).
|
Package scrypt implements the scrypt key derivation function as defined in Colin Percival's paper "Stronger Key Derivation via Sequential Memory-Hard Functions" (http://www.tarsnap.com/scrypt/scrypt.pdf). |
_workspace/src/gopkg.in/check.v1
Package check is a rich testing extension for Go's testing package.
|
Package check is a rich testing extension for Go's testing package. |
cmd
|
|
Package encrypted provides a simple, secure system for encrypting data symmetrically with a passphrase.
|
Package encrypted provides a simple, secure system for encrypting data symmetrically with a passphrase. |
Click to show internal directories.
Click to hide internal directories.