Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrKeyNotFound = errors.New("key not found")
Functions ¶
func Duplicates ¶
func Duplicates(err error) []*openpgp.PrimaryKey
func IsNotFound ¶
Types ¶
type InsertError ¶
type InsertError struct { Duplicates []*openpgp.PrimaryKey Errors []error }
func (InsertError) Error ¶
func (err InsertError) Error() string
type Inserter ¶
type Inserter interface { // Insert inserts new public keys if they are not already stored. If they // are, then nothing is changed. Insert([]*openpgp.PrimaryKey) (int, error) }
Inserter defines the storage API for inserting key material.
type KeyAdded ¶
type KeyAdded struct {
Digest string
}
func (KeyAdded) InsertDigests ¶
func (KeyAdded) RemoveDigests ¶
type KeyNotChanged ¶
type KeyNotChanged struct{}
func (KeyNotChanged) InsertDigests ¶
func (knc KeyNotChanged) InsertDigests() []string
func (KeyNotChanged) RemoveDigests ¶
func (knc KeyNotChanged) RemoveDigests() []string
func (KeyNotChanged) String ¶
func (knc KeyNotChanged) String() string
type KeyReplaced ¶
func (KeyReplaced) InsertDigests ¶
func (kr KeyReplaced) InsertDigests() []string
func (KeyReplaced) RemoveDigests ¶
func (kr KeyReplaced) RemoveDigests() []string
func (KeyReplaced) String ¶
func (kr KeyReplaced) String() string
type Notifier ¶
type Notifier interface { // Subscribe registers a key change callback function. Subscribe(func(KeyChange) error) // Notify invokes all registered callbacks with a key change notification. Notify(change KeyChange) error // RenotifyAll() invokes all registered callbacks with KeyAdded notifications // for each key in the Storage. RenotifyAll() error }
type Queryer ¶
type Queryer interface { // MatchMD5 returns the matching RFingerprint IDs for the given public key MD5 hashes. // The MD5 is calculated using the "SKS method". MatchMD5([]string) ([]string, error) // MatchID returns the matching RFingerprint IDs for the given public key IDs. // Key IDs may be short (last 4 bytes), long (last 10 bytes) or full (20 byte) // hexadecimal key IDs. Resolve([]string) ([]string, error) // MatchKeyword returns the matching RFingerprint IDs for the given keyword search. // The keyword search is storage dependant and results may vary among // different implementations. MatchKeyword([]string) ([]string, error) // ModifiedSince returns matching RFingerprint IDs for keyrings modified // since the given time. ModifiedSince(time.Time) ([]string, error) // FetchKeys returns the public key material matching the given RFingerprint slice. FetchKeys([]string) ([]*openpgp.PrimaryKey, error) // FetchKeyrings returns the keyring records matching the given RFingerprint slice. FetchKeyrings([]string) ([]*Keyring, error) }
Queryer defines the storage API for search and retrieval of public key material.
type Storage ¶
Storage defines the API that is needed to implement a complete storage backend for an HKP service.
type Updater ¶
type Updater interface { Inserter // Update updates the stored PrimaryKey with the given contents, if the current // contents of the key in storage matches the given digest. If it does not // match, the update should be retried again later. Update(pubkey *openpgp.PrimaryKey, priorMD5 string) error }
Updater defines the storage API for writing key material.
Click to show internal directories.
Click to hide internal directories.