Documentation ¶
Overview ¶
Package client provides utilities for handling client-side PGP keys.
Index ¶
- type Key
- type KeyProvider
- func (provider *KeyProvider) DeleteKey(context, email string) error
- func (provider *KeyProvider) GenerateKey(context, email, clientNameWithVersion string) (*Key, error)
- func (provider *KeyProvider) ReadValidKey(context, email string) (*Key, error)
- func (provider *KeyProvider) WriteKey(c *Key) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Key ¶
Key represents an OpenPGP client key pair associated with a context and an identity. It is stored on the filesystem.
type KeyProvider ¶
type KeyProvider struct {
// contains filtered or unexported fields
}
KeyProvider handles loading/saving client keys.
func NewKeyProvider ¶
func NewKeyProvider(dataFileDirectory string) *KeyProvider
NewKeyProvider creates a new KeyProvider.
func (*KeyProvider) DeleteKey ¶
func (provider *KeyProvider) DeleteKey(context, email string) error
DeleteKey deletes the key pair from disk.
func (*KeyProvider) GenerateKey ¶
func (provider *KeyProvider) GenerateKey(context, email, clientNameWithVersion string) (*Key, error)
GenerateKey generates a new PGP key pair.
func (*KeyProvider) ReadValidKey ¶
func (provider *KeyProvider) ReadValidKey(context, email string) (*Key, error)
ReadValidKey reads a PGP key from the filesystem.
If the key is missing or invalid (e.g., expired, revoked), an error will be returned.
Click to show internal directories.
Click to hide internal directories.