Documentation
¶
Overview ¶
Package session provides AWS session management and DynamoDB client configuration
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
CredentialsProvider aws.CredentialsProvider
Region string
Endpoint string
// KMSKeyARN is required when using dynamorm:"encrypted" fields.
// DynamORM does not manage KMS keys; callers must provide a valid key ARN.
KMSKeyARN string
KMSClient KMSClient `json:"-" yaml:"-"`
EncryptionRand io.Reader `json:"-" yaml:"-"`
Now func() time.Time `json:"-" yaml:"-"`
AWSConfigOptions []func(*config.LoadOptions) error
DynamoDBOptions []func(*dynamodb.Options)
MaxRetries int
DefaultRCU int64
DefaultWCU int64
AutoMigrate bool
EnableMetrics bool
}
Config holds the configuration for DynamORM
type KMSClient ¶ added in v1.2.0
type KMSClient interface {
GenerateDataKey(ctx context.Context, params *kms.GenerateDataKeyInput, optFns ...func(*kms.Options)) (*kms.GenerateDataKeyOutput, error)
Decrypt(ctx context.Context, params *kms.DecryptInput, optFns ...func(*kms.Options)) (*kms.DecryptOutput, error)
}
KMSClient is the minimal AWS KMS surface DynamORM needs for attribute encryption. Providing this enables deterministic tests without real AWS KMS calls.
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session manages the AWS session and DynamoDB client
func NewSession ¶
NewSession creates a new session with the given configuration
Click to show internal directories.
Click to hide internal directories.