Documentation
¶
Overview ¶
Package tabletheory provides a type-safe ORM for Amazon DynamoDB in Go.
Import path:
import "github.com/theory-cloud/tabletheory"
Implementation lives in `internal/theorydb` so the repo root stays minimal.
Index ¶
- Variables
- func AtVersion(version int64) core.TransactCondition
- func Condition(field, operator string, value any) core.TransactCondition
- func ConditionExpression(expression string, values map[string]any) core.TransactCondition
- func ConditionVersion(version int64) core.TransactCondition
- func DefaultBatchGetOptions() *core.BatchGetOptions
- func EnableXRayTracing() bool
- func GetLambdaMemoryMB() int
- func GetPartnerFromContext(ctx context.Context) string
- func GetRemainingTimeMillis(ctx context.Context) int64
- func IfExists() core.TransactCondition
- func IfNotExists() core.TransactCondition
- func IsLambdaEnvironment() bool
- func New(config session.Config) (core.ExtendedDB, error)
- func NewBasic(config session.Config) (core.DB, error)
- func NewKeyPair(partitionKey any, sortKey ...any) core.KeyPair
- func PartnerContext(ctx context.Context, partnerID string) context.Context
- func UnmarshalItem(item map[string]types.AttributeValue, dest interface{}) error
- func UnmarshalItems(items []map[string]types.AttributeValue, dest interface{}) error
- func UnmarshalStreamImage(streamImage map[string]events.DynamoDBAttributeValue, dest interface{}) error
- type AccountConfig
- type AutoMigrateOption
- type BatchGetOptions
- type ColdStartMetrics
- type Config
- type DB
- type KeyPair
- type LambdaDB
- type LambdaMemoryStats
- type MultiAccountDB
Constants ¶
This section is empty.
Variables ¶
View Source
var ( WithBackupTable = schema.WithBackupTable WithDataCopy = schema.WithDataCopy WithTargetModel = schema.WithTargetModel WithTransform = schema.WithTransform WithBatchSize = schema.WithBatchSize )
Re-export AutoMigrate options for convenience.
Functions ¶
func AtVersion ¶
func AtVersion(version int64) core.TransactCondition
func ConditionExpression ¶
func ConditionExpression(expression string, values map[string]any) core.TransactCondition
func ConditionVersion ¶
func ConditionVersion(version int64) core.TransactCondition
func DefaultBatchGetOptions ¶
func DefaultBatchGetOptions() *core.BatchGetOptions
func EnableXRayTracing ¶
func EnableXRayTracing() bool
func GetLambdaMemoryMB ¶
func GetLambdaMemoryMB() int
func GetPartnerFromContext ¶
func GetRemainingTimeMillis ¶
func IfExists ¶
func IfExists() core.TransactCondition
func IfNotExists ¶
func IfNotExists() core.TransactCondition
func IsLambdaEnvironment ¶
func IsLambdaEnvironment() bool
func UnmarshalItem ¶
func UnmarshalItem(item map[string]types.AttributeValue, dest interface{}) error
func UnmarshalItems ¶
func UnmarshalItems(items []map[string]types.AttributeValue, dest interface{}) error
func UnmarshalStreamImage ¶
func UnmarshalStreamImage(streamImage map[string]events.DynamoDBAttributeValue, dest interface{}) error
Types ¶
type AccountConfig ¶
type AccountConfig = internaltheorydb.AccountConfig
type AutoMigrateOption ¶
type AutoMigrateOption = schema.AutoMigrateOption
type BatchGetOptions ¶
type BatchGetOptions = core.BatchGetOptions
type ColdStartMetrics ¶
type ColdStartMetrics = internaltheorydb.ColdStartMetrics
func BenchmarkColdStart ¶
func BenchmarkColdStart(models ...any) ColdStartMetrics
type DB ¶
type DB = internaltheorydb.DB
type LambdaDB ¶
type LambdaDB = internaltheorydb.LambdaDB
func LambdaInit ¶
func NewLambdaOptimized ¶
type LambdaMemoryStats ¶
type LambdaMemoryStats = internaltheorydb.LambdaMemoryStats
type MultiAccountDB ¶
type MultiAccountDB = internaltheorydb.MultiAccountDB
func NewMultiAccount ¶
func NewMultiAccount(accounts map[string]AccountConfig) (*MultiAccountDB, error)
Directories
¶
| Path | Synopsis |
|---|---|
|
Package examples demonstrates TableTheory's embedded struct support
|
Package examples demonstrates TableTheory's embedded struct support |
|
cdk-multilang/lambdas/go
command
|
|
|
encryption
command
|
|
|
initialization
command
Package main demonstrates proper TableTheory initialization patterns to avoid nil pointer dereference errors
|
Package main demonstrates proper TableTheory initialization patterns to avoid nil pointer dereference errors |
|
lambda
command
|
|
|
optimization
command
|
|
|
payment/lambda/process
command
|
|
|
payment/lambda/query
command
|
|
|
payment/lambda/reconcile
command
|
|
|
internal
|
|
|
theorydb
lambda.go
|
lambda.go |
|
pkg
|
|
|
consistency
Package consistency provides utilities for handling eventual consistency in DynamoDB
|
Package consistency provides utilities for handling eventual consistency in DynamoDB |
|
core
Package core defines the core interfaces and types for TableTheory
|
Package core defines the core interfaces and types for TableTheory |
|
errors
Package errors defines error types and utilities for TableTheory
|
Package errors defines error types and utilities for TableTheory |
|
interfaces
Package interfaces provides abstractions for AWS SDK operations to enable mocking
|
Package interfaces provides abstractions for AWS SDK operations to enable mocking |
|
lease
Package lease provides a small, correctness-first DynamoDB lease/lock helper.
|
Package lease provides a small, correctness-first DynamoDB lease/lock helper. |
|
marshal
Package marshal provides optimized marshaling for DynamoDB
|
Package marshal provides optimized marshaling for DynamoDB |
|
mocks
Package mocks provides mock implementations for TableTheory interfaces and AWS SDK operations
|
Package mocks provides mock implementations for TableTheory interfaces and AWS SDK operations |
|
model
Package model provides model registration and metadata management for TableTheory
|
Package model provides model registration and metadata management for TableTheory |
|
query
Package query provides aggregate functionality for DynamoDB queries
|
Package query provides aggregate functionality for DynamoDB queries |
|
session
Package session provides AWS session management and DynamoDB client configuration
|
Package session provides AWS session management and DynamoDB client configuration |
|
testing
Package testing provides utilities for testing applications that use TableTheory.
|
Package testing provides utilities for testing applications that use TableTheory. |
|
transaction
Package transaction provides atomic transaction support for TableTheory
|
Package transaction provides atomic transaction support for TableTheory |
|
types
Package types provides type conversion between Go types and DynamoDB AttributeValues
|
Package types provides type conversion between Go types and DynamoDB AttributeValues |
|
scripts
|
|
|
internal/dms_first_workflow
command
|
|
|
internal/expression_hardening
command
|
|
|
internal/public_api_contracts
command
|
|
|
internal/validation_parity
command
|
|
Click to show internal directories.
Click to hide internal directories.