Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keystore ¶
type Keystore interface { WriteKeyPair(context.Context, keypair.Key) (uint, error) LoadPrivateKey(context.Context, string) (*ecdsa.PrivateKey, error) }
Keystore defines how keypairs should be stored and accessed from a storage backend.
func NewPostgresKeytore ¶
type PostgresKeystore ¶
type PostgresKeystore struct {
// contains filtered or unexported fields
}
func (*PostgresKeystore) LoadPrivateKey ¶
func (ks *PostgresKeystore) LoadPrivateKey(ctx context.Context, publicKey string) (*ecdsa.PrivateKey, error)
LoadPrivateKey loads a private key as a crypto primitive for direct use. An id is used to search for the private key.
func (*PostgresKeystore) WriteKeyPair ¶
WriteKeyPair inserts a keypair into the db and returns the linked id.
Click to show internal directories.
Click to hide internal directories.