Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrIDAlreadyExists = errors.New("record with the ID already exists")
ErrIDAlreadyExists is returned if an ID conflict occurs.
View Source
var ErrInvalidCipherKey = errors.New("invalid cipher key")
ErrInvalidCipherKey is returned if the given password for decryption is invalid and can't be used.
View Source
var ErrReachedMaxRetries = errors.New("reached maximum number of retries")
ErrReachedMaxRetries is returned if the maximum number of retries of transactions is reached.
View Source
var ErrRecordNotFound = errors.New("record not found")
ErrRecordNotFound is returned if the searched record can't be found.
Functions ¶
This section is empty.
Types ¶
type KeyPair ¶
type KeyPair struct { Cert *x509.Certificate PK *rsa.PrivateKey }
KeyPair represents a key pair combination of a certificate and a private key.
type Service ¶
type Service interface { Store(ctx context.Context, id string, password []byte, kp *KeyPair) error Get(ctx context.Context, id string, password []byte) (*KeyPair, error) Delete(ctx context.Context, id string) error ChangePassword(ctx context.Context, id string, oldPassword, newPassword []byte) error ChangeID(ctx context.Context, oldID, newID string) error }
Service represents a keystore abstraction for a KeyPair management.
func NewRedisService ¶ added in v0.3.0
func NewRedisService(rdb *redis.Client) Service
Click to show internal directories.
Click to hide internal directories.