Documentation ¶
Index ¶
- Variables
- func Decrypt(ciphertext, nonce string) (plaintext string, err error)
- func Encrypt(plaintext, nonce string) (string, error)
- func GetSecret() string
- type Record
- func (r *Record) Clone() Record
- func (r *Record) CopyTo(dst *Record)
- func (r *Record) GetPrivateKey() (ed25519.PrivateKey, error)
- func (r *Record) GetPublicKey() (ed25519.PublicKey, error)
- func (r *Record) IsAvailable() bool
- func (r *Record) IsDeprecated() bool
- func (r *Record) IsReserved() bool
- func (r *Record) IsRevoked() bool
- func (r *Record) Validate() error
- type State
- type Store
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type Record ¶
func (*Record) GetPrivateKey ¶
func (r *Record) GetPrivateKey() (ed25519.PrivateKey, error)
func (*Record) IsAvailable ¶
func (*Record) IsDeprecated ¶
func (*Record) IsReserved ¶
type Store ¶
type Store interface { // Count returns the total count of keys. Count(ctx context.Context) (uint64, error) // CountByState returns the total count of keys by state CountByState(ctx context.Context, state State) (uint64, error) // Save creates or updates the record in the store. Save(ctx context.Context, record *Record) error // Get finds the record for a given public key. Get(ctx context.Context, pubkey string) (*Record, error) // GetAllByState returns all records for a given state. // // Returns ErrKeyNotFound if no records are found. GetAllByState(ctx context.Context, state State, cursor query.Cursor, limit uint64, direction query.Ordering) ([]*Record, error) }
Click to show internal directories.
Click to hide internal directories.