Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface {
Get(key interface{}) (interface{}, bool)
SetWithTTL(key, value interface{}, cost int64, ttl time.Duration) bool
Del(key interface{})
}
Cache represents caching functionality. Concrete implementation is expected to be thread-safe, and clean up items when ttl is expired.
type KeyManager ¶
type KeyManager = arieskms.KeyManager
KeyManager is an alias for arieskms.KeyManager.
type Provider ¶
type Provider struct {
Cache Cache
}
Provider provides cache support for sensitive data like unencrypted keys from KeyManager, and Shamir secret shares.
func (*Provider) WrapKMS ¶
func (p *Provider) WrapKMS(kms KeyManager, cacheTTL time.Duration) (KeyManager, error)
WrapKMS adds caching support to the underlying KeyManager.
Click to show internal directories.
Click to hide internal directories.