keys

package
v0.0.0-...-03904d5 Latest Latest
Warning

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

Go to latest
Published: May 11, 2015 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrWrongType        = errors.New("tuf: invalid key type")
	ErrExists           = errors.New("tuf: key already in db")
	ErrWrongID          = errors.New("tuf: key id mismatch")
	ErrInvalidKey       = errors.New("tuf: invalid key")
	ErrInvalidRole      = errors.New("tuf: invalid role")
	ErrInvalidKeyID     = errors.New("tuf: invalid key id")
	ErrInvalidThreshold = errors.New("tuf: invalid role threshold")
)

Functions

func ValidRole

func ValidRole(name string) bool

Types

type DB

type DB struct {
	// contains filtered or unexported fields
}

func NewDB

func NewDB() *DB

func (*DB) AddKey

func (db *DB) AddKey(k *PublicKey) error

func (*DB) AddRole

func (db *DB) AddRole(name string, r *data.Role) error

func (*DB) GetKey

func (db *DB) GetKey(id string) *PublicKey

func (*DB) GetRole

func (db *DB) GetRole(name string) *data.Role

type PrivateKey

type PrivateKey struct {
	PublicKey
	Private []byte
}

type PublicKey

type PublicKey struct {
	data.Key
	ID string
}

func NewPublicKey

func NewPublicKey(keyType string, public []byte) *PublicKey

Jump to

Keyboard shortcuts

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