Documentation ¶
Index ¶
- Constants
- func GetSKSKey(fingerPrint string) (string, error)
- func MakePGPManager(log slog.Instance, keyBackend interfaces.StorageBackend, ...) interfaces.PGPManager
- func MakeSecretsManager(log slog.Instance, dbHandler DatabaseHandler) interfaces.SecretsManager
- func PKSAdd(ctx context.Context, pubKey string) string
- func PKSGetKey(ctx context.Context, fingerPrint string) (string, error)
- func PKSSearch(ctx context.Context, value string, pageStart, pageEnd int) ([]models.GPGKey, error)
- func PKSSearchByEmail(ctx context.Context, email string, pageStart, pageEnd int) ([]models.GPGKey, error)
- func PKSSearchByFingerPrint(ctx context.Context, fingerPrint string, pageStart, pageEnd int) ([]models.GPGKey, error)
- func PKSSearchByName(ctx context.Context, name string, pageStart, pageEnd int) ([]models.GPGKey, error)
- func PutSKSKey(publicKey string) (bool, error)
- type DatabaseHandler
- type KeyRingManager
- func (krm *KeyRingManager) AddKey(ctx context.Context, key *openpgp.Entity, nonErasable bool)
- func (krm *KeyRingManager) ContainsKey(ctx context.Context, fp string) bool
- func (krm *KeyRingManager) DeleteKey(ctx context.Context, fp string) error
- func (krm *KeyRingManager) GetCachedKeys(ctx context.Context) []models.KeyInfo
- func (krm *KeyRingManager) GetFingerPrints(ctx context.Context) []string
- func (krm *KeyRingManager) GetKey(ctx context.Context, fp string) *openpgp.Entity
Constants ¶
View Source
const MinKeyBits = 2048 // Should be safe until we have decent Quantum Computers
Variables ¶
This section is empty.
Functions ¶
func MakePGPManager ¶
func MakePGPManager(log slog.Instance, keyBackend interfaces.StorageBackend, krm interfaces.KeyRingManager) interfaces.PGPManager
MakePGPManager creates a new PGPManager with the specified keyBackend, log and KeyRingManager
func MakeSecretsManager ¶
func MakeSecretsManager(log slog.Instance, dbHandler DatabaseHandler) interfaces.SecretsManager
MakeSecretsManager creates an instance of the backend secrets manager
func PKSSearchByEmail ¶
func PKSSearchByFingerPrint ¶
func PKSSearchByName ¶
Types ¶
type DatabaseHandler ¶ added in v1.4.0
type DatabaseHandler interface { AddGPGKey(key models.GPGKey) (string, bool, error) FindGPGKeyByEmail(email string, pageStart, pageEnd int) ([]models.GPGKey, error) FindGPGKeyByFingerPrint(fingerPrint string, pageStart, pageEnd int) ([]models.GPGKey, error) FindGPGKeyByValue(value string, pageStart, pageEnd int) ([]models.GPGKey, error) FindGPGKeyByName(name string, pageStart, pageEnd int) ([]models.GPGKey, error) FetchGPGKeyByFingerprint(fingerprint string) (*models.GPGKey, error) }
type KeyRingManager ¶
func MakeKeyRingManager ¶
func MakeKeyRingManager(log slog.Instance, dbHandler DatabaseHandler) *KeyRingManager
MakeKeyRingManager creates a new instance of KeyRingManager
func (*KeyRingManager) ContainsKey ¶
func (krm *KeyRingManager) ContainsKey(ctx context.Context, fp string) bool
func (*KeyRingManager) DeleteKey ¶
func (krm *KeyRingManager) DeleteKey(ctx context.Context, fp string) error
func (*KeyRingManager) GetCachedKeys ¶
func (krm *KeyRingManager) GetCachedKeys(ctx context.Context) []models.KeyInfo
func (*KeyRingManager) GetFingerPrints ¶
func (krm *KeyRingManager) GetFingerPrints(ctx context.Context) []string
Click to show internal directories.
Click to hide internal directories.