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) AddPrivateKey(role string, key *sign.PrivateKey) error
- func (r *Repo) AddPrivateKeyWithExpires(keyRole string, key *sign.PrivateKey, expires time.Time) error
- 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) RootVersion() (int, error)
- func (r *Repo) SetSnapshotVersion(v int) error
- func (r *Repo) SetTargetsVersion(v int) error
- func (r *Repo) SetTimestampVersion(v int) error
- func (r *Repo) Sign(name string) error
- func (r *Repo) Snapshot(t CompressionType) error
- func (r *Repo) SnapshotVersion() (int, error)
- func (r *Repo) SnapshotWithExpires(t CompressionType, expires time.Time) error
- func (r *Repo) Targets() (data.TargetFiles, error)
- func (r *Repo) TargetsVersion() (int, error)
- func (r *Repo) Timestamp() error
- func (r *Repo) TimestampVersion() (int, 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(bool, map[string]int, map[string]data.Hashes) error GetSigningKeys(string) ([]sign.Signer, error) SavePrivateKey(string, *sign.PrivateKey) 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 NewRepoIndent ¶
func (*Repo) AddPrivateKey ¶
func (r *Repo) AddPrivateKey(role string, key *sign.PrivateKey) error
func (*Repo) AddPrivateKeyWithExpires ¶
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) RootVersion ¶
func (*Repo) SetSnapshotVersion ¶
func (*Repo) SetTargetsVersion ¶
func (*Repo) SetTimestampVersion ¶
func (*Repo) Snapshot ¶
func (r *Repo) Snapshot(t CompressionType) error
func (*Repo) SnapshotVersion ¶
func (*Repo) SnapshotWithExpires ¶
func (r *Repo) SnapshotWithExpires(t CompressionType, expires time.Time) error
func (*Repo) TargetsVersion ¶
func (*Repo) TimestampVersion ¶
Directories ¶
Path | Synopsis |
---|---|
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.