Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateMockKeyHandle ¶
CreateMockKeyHandle is a utility function that returns a mock key (for tests only. ie: not registered in Tink)
Types ¶
type KeyManager ¶
type KeyManager struct { CreateKeyID string CreateKeyValue *keyset.Handle CreateKeyErr error GetKeyValue *keyset.Handle GetKeyErr error RotateKeyID string RotateKeyValue *keyset.Handle RotateKeyErr error }
KeyManager mocks a local Key Management Service
func (*KeyManager) Create ¶
func (k *KeyManager) Create(kt kmsservice.KeyType) (string, interface{}, error)
Create a new mock ey/keyset/key handle for the type kt
func (*KeyManager) Get ¶
func (k *KeyManager) Get(keyID string) (interface{}, error)
Get a mock key handle for the given keyID
func (*KeyManager) Rotate ¶
func (k *KeyManager) Rotate(kt kmsservice.KeyType, keyID string) (string, interface{}, error)
Rotate returns a mocked rotated keyset handle and its ID
Click to show internal directories.
Click to hide internal directories.