keystore

package
v0.1.2-alpha Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

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) error
	LoadPrivateKey(context.Context, string) (*ecdsa.PrivateKey, error)
}

func NewPostgresKeytore

func NewPostgresKeytore(o Opts) (Keystore, error)

type Opts

type Opts struct {
	PostgresPool *pgxpool.Pool
	Logg         logf.Logger
}

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)

func (*PostgresKeystore) WriteKeyPair

func (ks *PostgresKeystore) WriteKeyPair(ctx context.Context, keypair keypair.Key) error

Jump to

Keyboard shortcuts

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