session

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2026 License: Apache-2.0 Imports: 8 Imported by: 6

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
	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

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns the default configuration

type Session

type Session struct {
	// contains filtered or unexported fields
}

Session manages the AWS session and DynamoDB client

func NewSession

func NewSession(cfg *Config) (*Session, error)

NewSession creates a new session with the given configuration

func (*Session) AWSConfig

func (s *Session) AWSConfig() aws.Config

AWSConfig returns the AWS configuration

func (*Session) Client

func (s *Session) Client() (*dynamodb.Client, error)

Client returns the DynamoDB client

func (*Session) Config

func (s *Session) Config() *Config

Config returns the session configuration

func (*Session) WithContext

func (s *Session) WithContext(ctx context.Context) *Session

WithContext returns a new session with the given context

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL