Documentation ¶
Index ¶
- Constants
- Variables
- func Decrypt(partitionId string, drr *appencryption.DataRowRecord) ([]byte, error)
- func Encrypt(partitionId string, data []byte) (*appencryption.DataRowRecord, error)
- func NewCryptoPolicy(options *Options) *appencryption.CryptoPolicy
- func NewKMS(opts *Options, crypto appencryption.AEAD) appencryption.KeyManagementService
- func NewMetastore(opts *Options) appencryption.Metastore
- func Setup(options *Options) error
- func Shutdown()
- type Options
- type RegionMap
Constants ¶
View Source
const ( ReplicaReadConsistencyQuery = "SET aurora_replica_read_consistency = ?" ReplicaReadConsistencyValueEventual = "eventual" ReplicaReadConsistencyValueGlobal = "global" ReplicaReadConsistencyValueSession = "session" )
Variables ¶
View Source
var ErrAsherahAlreadyInitialized = errors.New("asherah already initialized")
View Source
var ErrAsherahFailedInitialization = errors.New("asherah failed initialization")
View Source
var ErrAsherahNotInitialized = errors.New("asherah not initialized")
Functions ¶
func Decrypt ¶
func Decrypt(partitionId string, drr *appencryption.DataRowRecord) ([]byte, error)
func Encrypt ¶
func Encrypt(partitionId string, data []byte) (*appencryption.DataRowRecord, error)
func NewCryptoPolicy ¶
func NewCryptoPolicy(options *Options) *appencryption.CryptoPolicy
func NewKMS ¶
func NewKMS(opts *Options, crypto appencryption.AEAD) appencryption.KeyManagementService
func NewMetastore ¶
func NewMetastore(opts *Options) appencryption.Metastore
Types ¶
type Options ¶
type Options struct { ServiceName string `long:"service" required:"yes" description:"The name of this service" env:"ASHERAH_SERVICE_NAME"` ProductID string `long:"product" required:"yes" description:"The name of the product that owns this service" env:"ASHERAH_PRODUCT_NAME"` ExpireAfter time.Duration `long:"expire-after" description:"The amount of time a key is considered valid" env:"ASHERAH_EXPIRE_AFTER"` CheckInterval time.Duration `long:"check-interval" description:"The amount of time before cached keys are considered stale" env:"ASHERAH_CHECK_INTERVAL"` Metastore string `` /* 183-byte string literal not displayed */ ConnectionString string `` /* 137-byte string literal not displayed */ ReplicaReadConsistency string `` /* 187-byte string literal not displayed */ SQLMetastoreDBType string `` /* 202-byte string literal not displayed */ DynamoDBEndpoint string `` /* 175-byte string literal not displayed */ DynamoDBRegion string `` /* 185-byte string literal not displayed */ DynamoDBTableName string `` /* 143-byte string literal not displayed */ SessionCacheMaxSize int `` /* 142-byte string literal not displayed */ SessionCacheDuration time.Duration `` /* 141-byte string literal not displayed */ KMS string `` /* 135-byte string literal not displayed */ RegionMap RegionMap `` /* 165-byte string literal not displayed */ PreferredRegion string `long:"preferred-region" description:"The preferred AWS region (required if --kms=aws)" env:"ASHERAH_PREFERRED_REGION"` EnableRegionSuffix bool `` /* 166-byte string literal not displayed */ EnableSessionCaching bool `long:"enable-session-caching" description:"Enable shared session caching" env:"ASHERAH_ENABLE_SESSION_CACHING"` Verbose bool `short:"v" long:"verbose" description:"Enable verbose logging output" env:"ASHERAH_VERBOSE"` }
Click to show internal directories.
Click to hide internal directories.