Documentation
¶
Index ¶
- Variables
- type BucketReplicationConfig
- type CreateTableBucketOptions
- type CreateTableOptions
- type Handler
- func (h *Handler) ChaosOperations() []string
- func (h *Handler) ChaosRegions() []string
- func (h *Handler) ChaosServiceName() string
- func (h *Handler) ExtractOperation(c *echo.Context) string
- func (h *Handler) ExtractResource(c *echo.Context) string
- func (h *Handler) GetSupportedOperations() []string
- func (h *Handler) Handler() echo.HandlerFunc
- func (h *Handler) MatchPriority() int
- func (h *Handler) Name() string
- func (h *Handler) Reset()
- func (h *Handler) Restore(ctx context.Context, data []byte) error
- func (h *Handler) RouteMatcher() service.Matcher
- func (h *Handler) Snapshot(ctx context.Context) []byte
- type InMemoryBackend
- func (b *InMemoryBackend) AccountID() string
- func (b *InMemoryBackend) CreateNamespace(tableBucketARN string, namespace []string) (*Namespace, error)
- func (b *InMemoryBackend) CreateTable(tableBucketARN string, namespace []string, name, format string, ...) (*Table, error)
- func (b *InMemoryBackend) CreateTableBucket(name string, opts CreateTableBucketOptions) (*TableBucket, error)
- func (b *InMemoryBackend) DeleteNamespace(tableBucketARN string, namespace []string) error
- func (b *InMemoryBackend) DeleteTable(tableBucketARN string, namespace []string, name string) error
- func (b *InMemoryBackend) DeleteTableBucket(bucketARN string) error
- func (b *InMemoryBackend) DeleteTableBucketEncryption(bucketARN string) error
- func (b *InMemoryBackend) DeleteTableBucketMetricsConfiguration(bucketARN string) error
- func (b *InMemoryBackend) DeleteTableBucketPolicy(bucketARN string) error
- func (b *InMemoryBackend) DeleteTableBucketReplication(bucketARN string) error
- func (b *InMemoryBackend) DeleteTablePolicy(tableBucketARN string, namespace []string, name string) error
- func (b *InMemoryBackend) DeleteTableReplication(tableArn string) error
- func (b *InMemoryBackend) GetNamespace(tableBucketARN string, namespace []string) (*Namespace, error)
- func (b *InMemoryBackend) GetTable(tableBucketARN string, namespace []string, name string) (*Table, error)
- func (b *InMemoryBackend) GetTableBucket(bucketARN string) (*TableBucket, error)
- func (b *InMemoryBackend) GetTableBucketMaintenanceConfiguration(bucketARN string) (map[string]any, error)
- func (b *InMemoryBackend) GetTableBucketMetricsConfiguration(bucketARN string) (string, bool, error)
- func (b *InMemoryBackend) GetTableBucketPolicy(bucketARN string) (string, error)
- func (b *InMemoryBackend) GetTableBucketReplication(bucketARN string) (*BucketReplicationConfig, error)
- func (b *InMemoryBackend) GetTableByARN(tableArn string) (*Table, error)
- func (b *InMemoryBackend) GetTableEncryption(tableBucketARN string, namespace []string, name string) (map[string]any, error)
- func (b *InMemoryBackend) GetTableMaintenanceConfiguration(tableBucketARN string, namespace []string, name string) (map[string]any, string, error)
- func (b *InMemoryBackend) GetTablePolicy(tableBucketARN string, namespace []string, name string) (string, error)
- func (b *InMemoryBackend) GetTableRecordExpirationConfiguration(tableArn string) (*TableRecordExpiryConfig, error)
- func (b *InMemoryBackend) GetTableReplicationConfig(tableArn string) (map[string]any, error)
- func (b *InMemoryBackend) GetTableStorageClass(bucketARN string, namespace []string, name string) (string, error)
- func (b *InMemoryBackend) ListNamespaces(tableBucketARN string, p ListNamespacesParams) (page.Page[*Namespace], error)
- func (b *InMemoryBackend) ListTableBuckets(p ListTableBucketsParams) (page.Page[*TableBucket], error)
- func (b *InMemoryBackend) ListTables(tableBucketARN, namespace string, p ListTablesParams) (page.Page[*Table], error)
- func (b *InMemoryBackend) ListTagsForResource(resourceArn string) (map[string]string, error)
- func (b *InMemoryBackend) PutTableBucketEncryption(bucketARN string, config map[string]any) error
- func (b *InMemoryBackend) PutTableBucketMaintenanceConfiguration(bucketARN, maintenanceType string, value map[string]any) error
- func (b *InMemoryBackend) PutTableBucketMetricsConfiguration(bucketARN string) error
- func (b *InMemoryBackend) PutTableBucketPolicy(bucketARN, policy string) error
- func (b *InMemoryBackend) PutTableBucketReplication(bucketARN string, cfg *BucketReplicationConfig) error
- func (b *InMemoryBackend) PutTableBucketStorageClass(bucketARN, storageClass string) error
- func (b *InMemoryBackend) PutTableMaintenanceConfiguration(tableBucketARN string, namespace []string, name, maintenanceType string, ...) error
- func (b *InMemoryBackend) PutTablePolicy(tableBucketARN string, namespace []string, name, policy string) error
- func (b *InMemoryBackend) PutTableRecordExpirationConfiguration(tableArn string, cfg *TableRecordExpiryConfig) error
- func (b *InMemoryBackend) PutTableReplication(tableArn string) error
- func (b *InMemoryBackend) Region() string
- func (b *InMemoryBackend) RenameTable(tableBucketARN string, namespace []string, ...) error
- func (b *InMemoryBackend) Reset()
- func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
- func (b *InMemoryBackend) SetTableReplicationConfig(tableArn string, config map[string]any) error
- func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
- func (b *InMemoryBackend) TableARN(bucketName, namespaceName, tableName string) string
- func (b *InMemoryBackend) TableBucketARN(name string) string
- func (b *InMemoryBackend) TagResource(resourceArn string, newTags map[string]string) error
- func (b *InMemoryBackend) UntagResource(resourceArn string, tagKeys []string) error
- func (b *InMemoryBackend) UpdateTableMetadataLocation(tableBucketARN string, namespace []string, ...) (*Table, error)
- func (b *InMemoryBackend) ValidateTableExists(tableArn string) error
- type ListNamespacesParams
- type ListTableBucketsParams
- type ListTablesParams
- type Namespace
- type Provider
- type ReplicationDestination
- type StorageBackend
- type Table
- type TableBucket
- type TableRecordExpiryConfig
Constants ¶
This section is empty.
Variables ¶
var ( // ErrTableBucketNotFound is returned when a TableBucket does not exist. ErrTableBucketNotFound = awserr.New("NotFoundException", awserr.ErrNotFound) // ErrTableBucketAlreadyExists is returned when a TableBucket already exists. ErrTableBucketAlreadyExists = awserr.New("ConflictException", awserr.ErrConflict) // ErrNamespaceNotFound is returned when a Namespace does not exist. ErrNamespaceNotFound = awserr.New("NotFoundException", awserr.ErrNotFound) // ErrNamespaceAlreadyExists is returned when a Namespace already exists. ErrNamespaceAlreadyExists = awserr.New("ConflictException", awserr.ErrConflict) // ErrTableNotFound is returned when a Table does not exist. ErrTableNotFound = awserr.New("NotFoundException", awserr.ErrNotFound) // ErrTableAlreadyExists is returned when a Table already exists. ErrTableAlreadyExists = awserr.New("ConflictException", awserr.ErrConflict) // ErrTableVersionConflict is returned when an optimistic-lock token is stale. ErrTableVersionConflict = awserr.New("ConflictException", awserr.ErrConflict) // ErrInvalidTableMetadataLocation is returned when an Iceberg metadata URI is invalid. ErrInvalidTableMetadataLocation = awserr.New("BadRequestException", awserr.ErrInvalidParameter) // ErrNilAppContext is returned when a nil AppContext is passed to Init. ErrNilAppContext = awserr.New("InvalidParameter", awserr.ErrInvalidParameter) // ErrInvalidContinuationToken is returned when a list operation's // continuation token is malformed. ErrInvalidContinuationToken = awserr.New("BadRequestException", awserr.ErrInvalidParameter) )
Functions ¶
This section is empty.
Types ¶
type BucketReplicationConfig ¶
type BucketReplicationConfig struct {
// TableBucketARN is the store.Table primary-key qualifier for the
// bucketReplication table (see store_setup.go). BucketReplicationConfig
// carries no identity of its own -- it was previously keyed externally
// by the map key alone -- so this field was added to give the live
// store.Table a key to derive. It is tagged json:"-" because it is
// never part of the S3 Tables wire API (handleGetTableBucketReplication
// builds its own response map from Destinations only); persistence.go's
// arnDTO wrapper carries the ARN explicitly for Snapshot/Restore since a
// plain json.Marshal of this type drops any json:"-" field.
TableBucketARN string `json:"-"`
Destinations []ReplicationDestination `json:"destinations"`
}
BucketReplicationConfig holds replication configuration for a table bucket.
type CreateTableBucketOptions ¶
type CreateTableBucketOptions struct {
Encryption map[string]any
Tags map[string]string
StorageClass string
}
CreateTableBucketOptions holds the optional settings a caller may supply at CreateTableBucket time (encryptionConfiguration, storageClassConfiguration, tags on the wire request) in addition to the required name.
type CreateTableOptions ¶
type CreateTableOptions struct {
Encryption map[string]any
Tags map[string]string
StorageClass string
}
CreateTableOptions holds the optional settings a caller may supply at CreateTable time (encryptionConfiguration, storageClassConfiguration, tags on the wire request) in addition to the required name/format.
type Handler ¶
type Handler struct {
Backend *InMemoryBackend
AccountID string
Region string
}
Handler is the HTTP handler for the AWS S3 Tables API.
func NewHandler ¶
func NewHandler(backend *InMemoryBackend) *Handler
NewHandler creates a new S3 Tables handler.
func (*Handler) ChaosOperations ¶
ChaosOperations returns all operations that can be fault-injected.
func (*Handler) ChaosRegions ¶
ChaosRegions returns all regions this handler handles.
func (*Handler) ChaosServiceName ¶
ChaosServiceName returns the lowercase AWS service name for fault rule matching.
func (*Handler) ExtractOperation ¶
ExtractOperation extracts the operation name from the request.
func (*Handler) ExtractResource ¶
ExtractResource extracts the primary resource identifier from the request.
func (*Handler) GetSupportedOperations ¶
GetSupportedOperations returns the list of supported S3 Tables operations.
func (*Handler) Handler ¶
func (h *Handler) Handler() echo.HandlerFunc
Handler returns the Echo handler function for S3 Tables requests.
func (*Handler) MatchPriority ¶
MatchPriority returns the routing priority.
func (*Handler) RouteMatcher ¶
RouteMatcher returns a function that matches S3 Tables API requests.
func (*Handler) Snapshot ¶
Snapshot implements persistence.Persistable by delegating to the backend. Handler previously had no Snapshot/Restore of its own even though InMemoryBackend did -- dead wiring: cli.go's generic setupPersistence (which type-asserts the registered service.Registerable, i.e. the Handler, for a Snapshot/Restore pair) never picked S3 Tables up at all, so nothing was ever actually persisted despite the backend supporting it. This delegation (matching the cleanrooms/codecommit pattern) is what wires S3 Tables into persistence for the first time.
type InMemoryBackend ¶
type InMemoryBackend struct {
// contains filtered or unexported fields
}
InMemoryBackend is an in-memory store for S3 Tables resources.
func NewInMemoryBackend ¶
func NewInMemoryBackend(accountID, region string) *InMemoryBackend
NewInMemoryBackend creates a new in-memory S3 Tables backend.
func (*InMemoryBackend) AccountID ¶
func (b *InMemoryBackend) AccountID() string
AccountID returns the account ID for this backend.
func (*InMemoryBackend) CreateNamespace ¶
func (b *InMemoryBackend) CreateNamespace( tableBucketARN string, namespace []string, ) (*Namespace, error)
CreateNamespace creates a new namespace within a table bucket.
func (*InMemoryBackend) CreateTable ¶
func (b *InMemoryBackend) CreateTable( tableBucketARN string, namespace []string, name, format string, opts CreateTableOptions, ) (*Table, error)
CreateTable creates a new table within a namespace.
func (*InMemoryBackend) CreateTableBucket ¶
func (b *InMemoryBackend) CreateTableBucket( name string, opts CreateTableBucketOptions, ) (*TableBucket, error)
CreateTableBucket creates a new TableBucket.
func (*InMemoryBackend) DeleteNamespace ¶
func (b *InMemoryBackend) DeleteNamespace(tableBucketARN string, namespace []string) error
DeleteNamespace deletes a namespace from a table bucket.
func (*InMemoryBackend) DeleteTable ¶
func (b *InMemoryBackend) DeleteTable( tableBucketARN string, namespace []string, name string, ) error
DeleteTable deletes a table by bucket ARN, namespace, and name.
func (*InMemoryBackend) DeleteTableBucket ¶
func (b *InMemoryBackend) DeleteTableBucket(bucketARN string) error
DeleteTableBucket deletes a TableBucket by ARN, cascading to namespaces and tables.
func (*InMemoryBackend) DeleteTableBucketEncryption ¶
func (b *InMemoryBackend) DeleteTableBucketEncryption(bucketARN string) error
DeleteTableBucketEncryption clears the encryption configuration for a bucket, reverting GetTableBucketEncryption to the AWS default (no configuration set).
func (*InMemoryBackend) DeleteTableBucketMetricsConfiguration ¶
func (b *InMemoryBackend) DeleteTableBucketMetricsConfiguration(bucketARN string) error
DeleteTableBucketMetricsConfiguration clears the metrics configuration for a bucket, reverting GetTableBucketMetricsConfiguration to the unconfigured state.
func (*InMemoryBackend) DeleteTableBucketPolicy ¶
func (b *InMemoryBackend) DeleteTableBucketPolicy(bucketARN string) error
DeleteTableBucketPolicy removes the resource policy from a bucket.
func (*InMemoryBackend) DeleteTableBucketReplication ¶
func (b *InMemoryBackend) DeleteTableBucketReplication(bucketARN string) error
DeleteTableBucketReplication removes the replication config for a table bucket.
func (*InMemoryBackend) DeleteTablePolicy ¶
func (b *InMemoryBackend) DeleteTablePolicy( tableBucketARN string, namespace []string, name string, ) error
DeleteTablePolicy removes the resource policy from a table.
func (*InMemoryBackend) DeleteTableReplication ¶
func (b *InMemoryBackend) DeleteTableReplication(tableArn string) error
DeleteTableReplication removes replication for a table.
func (*InMemoryBackend) GetNamespace ¶
func (b *InMemoryBackend) GetNamespace( tableBucketARN string, namespace []string, ) (*Namespace, error)
GetNamespace returns a namespace by bucket ARN and namespace name.
func (*InMemoryBackend) GetTable ¶
func (b *InMemoryBackend) GetTable( tableBucketARN string, namespace []string, name string, ) (*Table, error)
GetTable returns a table by bucket ARN, namespace, and name.
func (*InMemoryBackend) GetTableBucket ¶
func (b *InMemoryBackend) GetTableBucket(bucketARN string) (*TableBucket, error)
GetTableBucket returns a TableBucket by ARN.
func (*InMemoryBackend) GetTableBucketMaintenanceConfiguration ¶
func (b *InMemoryBackend) GetTableBucketMaintenanceConfiguration( bucketARN string, ) (map[string]any, error)
GetTableBucketMaintenanceConfiguration returns the maintenance config for a bucket.
func (*InMemoryBackend) GetTableBucketMetricsConfiguration ¶
func (b *InMemoryBackend) GetTableBucketMetricsConfiguration( bucketARN string, ) (string, bool, error)
GetTableBucketMetricsConfiguration returns the metrics configuration ID for a bucket. The second return value is false when no metrics configuration has ever been put for the bucket.
func (*InMemoryBackend) GetTableBucketPolicy ¶
func (b *InMemoryBackend) GetTableBucketPolicy(bucketARN string) (string, error)
GetTableBucketPolicy returns the resource policy for a bucket.
func (*InMemoryBackend) GetTableBucketReplication ¶
func (b *InMemoryBackend) GetTableBucketReplication( bucketARN string, ) (*BucketReplicationConfig, error)
GetTableBucketReplication returns the replication config for a table bucket.
func (*InMemoryBackend) GetTableByARN ¶
func (b *InMemoryBackend) GetTableByARN(tableArn string) (*Table, error)
GetTableByARN returns a table by its ARN directly, without needing the caller to know its bucket/namespace/name. Real GetTable accepts either tableArn alone or the tableBucketARN+namespace+name triple (see GetTableInput's optional TableArn field) -- this backs the former.
func (*InMemoryBackend) GetTableEncryption ¶
func (b *InMemoryBackend) GetTableEncryption( tableBucketARN string, namespace []string, name string, ) (map[string]any, error)
GetTableEncryption returns the effective encryption configuration for a table: the table's own override if CreateTable set one, else the owning bucket's configuration, else the AWS default (SSE-S3/AES256). There is no PutTableEncryption operation for individual tables in the real API, so GetTableEncryption never returns NotFound the way GetTableBucketEncryption can -- every table has an effective encryption configuration.
func (*InMemoryBackend) GetTableMaintenanceConfiguration ¶
func (b *InMemoryBackend) GetTableMaintenanceConfiguration( tableBucketARN string, namespace []string, name string, ) (map[string]any, string, error)
GetTableMaintenanceConfiguration returns the maintenance config for a table.
func (*InMemoryBackend) GetTablePolicy ¶
func (b *InMemoryBackend) GetTablePolicy( tableBucketARN string, namespace []string, name string, ) (string, error)
GetTablePolicy returns the resource policy for a table.
func (*InMemoryBackend) GetTableRecordExpirationConfiguration ¶
func (b *InMemoryBackend) GetTableRecordExpirationConfiguration( tableArn string, ) (*TableRecordExpiryConfig, error)
GetTableRecordExpirationConfiguration returns record expiry config for a table, defaulting to DISABLED.
func (*InMemoryBackend) GetTableReplicationConfig ¶
func (b *InMemoryBackend) GetTableReplicationConfig(tableArn string) (map[string]any, error)
GetTableReplicationConfig returns the replication config for a table.
func (*InMemoryBackend) GetTableStorageClass ¶
func (b *InMemoryBackend) GetTableStorageClass( bucketARN string, namespace []string, name string, ) (string, error)
GetTableStorageClass returns the storage class for a table.
func (*InMemoryBackend) ListNamespaces ¶
func (b *InMemoryBackend) ListNamespaces( tableBucketARN string, p ListNamespacesParams, ) (page.Page[*Namespace], error)
ListNamespaces returns all namespaces in a table bucket sorted by name.
func (*InMemoryBackend) ListTableBuckets ¶
func (b *InMemoryBackend) ListTableBuckets( p ListTableBucketsParams, ) (page.Page[*TableBucket], error)
ListTableBuckets returns all TableBuckets sorted by name.
func (*InMemoryBackend) ListTables ¶
func (b *InMemoryBackend) ListTables( tableBucketARN, namespace string, p ListTablesParams, ) (page.Page[*Table], error)
ListTables returns all tables in a table bucket, optionally filtered by namespace.
func (*InMemoryBackend) ListTagsForResource ¶
func (b *InMemoryBackend) ListTagsForResource(resourceArn string) (map[string]string, error)
ListTagsForResource returns all tags for a resource.
func (*InMemoryBackend) PutTableBucketEncryption ¶
func (b *InMemoryBackend) PutTableBucketEncryption(bucketARN string, config map[string]any) error
PutTableBucketEncryption sets encryption config for a bucket.
func (*InMemoryBackend) PutTableBucketMaintenanceConfiguration ¶
func (b *InMemoryBackend) PutTableBucketMaintenanceConfiguration( bucketARN, maintenanceType string, value map[string]any, ) error
PutTableBucketMaintenanceConfiguration sets maintenance config for a bucket.
func (*InMemoryBackend) PutTableBucketMetricsConfiguration ¶
func (b *InMemoryBackend) PutTableBucketMetricsConfiguration(bucketARN string) error
PutTableBucketMetricsConfiguration enables metrics for a bucket, assigning it a unique metrics configuration ID.
func (*InMemoryBackend) PutTableBucketPolicy ¶
func (b *InMemoryBackend) PutTableBucketPolicy(bucketARN, policy string) error
PutTableBucketPolicy sets the resource policy for a bucket.
func (*InMemoryBackend) PutTableBucketReplication ¶
func (b *InMemoryBackend) PutTableBucketReplication( bucketARN string, cfg *BucketReplicationConfig, ) error
PutTableBucketReplication sets replication config for a table bucket.
func (*InMemoryBackend) PutTableBucketStorageClass ¶
func (b *InMemoryBackend) PutTableBucketStorageClass(bucketARN, storageClass string) error
PutTableBucketStorageClass sets storage class for a bucket.
func (*InMemoryBackend) PutTableMaintenanceConfiguration ¶
func (b *InMemoryBackend) PutTableMaintenanceConfiguration( tableBucketARN string, namespace []string, name, maintenanceType string, value map[string]any, ) error
PutTableMaintenanceConfiguration sets maintenance config for a table.
func (*InMemoryBackend) PutTablePolicy ¶
func (b *InMemoryBackend) PutTablePolicy( tableBucketARN string, namespace []string, name, policy string, ) error
PutTablePolicy sets the resource policy for a table.
func (*InMemoryBackend) PutTableRecordExpirationConfiguration ¶
func (b *InMemoryBackend) PutTableRecordExpirationConfiguration( tableArn string, cfg *TableRecordExpiryConfig, ) error
PutTableRecordExpirationConfiguration sets record expiration config for a table.
func (*InMemoryBackend) PutTableReplication ¶
func (b *InMemoryBackend) PutTableReplication(tableArn string) error
PutTableReplication marks a table as having replication enabled (legacy boolean form).
func (*InMemoryBackend) Region ¶
func (b *InMemoryBackend) Region() string
Region returns the AWS region this backend is configured for.
func (*InMemoryBackend) RenameTable ¶
func (b *InMemoryBackend) RenameTable( tableBucketARN string, namespace []string, name, newNamespace, newName, versionToken string, ) error
RenameTable renames a table or moves it to a different namespace.
func (*InMemoryBackend) Restore ¶
func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
Restore loads backend state from a JSON snapshot.
func (*InMemoryBackend) SetTableReplicationConfig ¶
func (b *InMemoryBackend) SetTableReplicationConfig(tableArn string, config map[string]any) error
SetTableReplicationConfig sets the replication config (map form) for a table.
func (*InMemoryBackend) Snapshot ¶
func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
Snapshot serialises the backend state to JSON.
func (*InMemoryBackend) TableARN ¶
func (b *InMemoryBackend) TableARN(bucketName, namespaceName, tableName string) string
TableARN builds an ARN for a Table.
func (*InMemoryBackend) TableBucketARN ¶
func (b *InMemoryBackend) TableBucketARN(name string) string
TableBucketARN builds an ARN for a TableBucket.
func (*InMemoryBackend) TagResource ¶
func (b *InMemoryBackend) TagResource(resourceArn string, newTags map[string]string) error
TagResource adds or updates tags on a resource (bucket or table ARN).
func (*InMemoryBackend) UntagResource ¶
func (b *InMemoryBackend) UntagResource(resourceArn string, tagKeys []string) error
UntagResource removes tags from a resource.
func (*InMemoryBackend) UpdateTableMetadataLocation ¶
func (b *InMemoryBackend) UpdateTableMetadataLocation( tableBucketARN string, namespace []string, name, metadataLocation, versionToken string, ) (*Table, error)
UpdateTableMetadataLocation updates the metadata location of a table.
func (*InMemoryBackend) ValidateTableExists ¶
func (b *InMemoryBackend) ValidateTableExists(tableArn string) error
ValidateTableExists checks that a table ARN exists in the backend.
type ListNamespacesParams ¶
ListNamespacesParams holds the filter and pagination inputs for ListNamespaces, mirroring ListNamespacesInput's prefix/continuationToken/ maxNamespaces fields.
type ListTableBucketsParams ¶
type ListTableBucketsParams struct {
Prefix string
Type string
ContinuationToken string
MaxBuckets int
}
ListTableBucketsParams holds the filter and pagination inputs for ListTableBuckets, mirroring ListTableBucketsInput's prefix/type/ continuationToken/maxBuckets fields.
type ListTablesParams ¶
ListTablesParams holds the filter and pagination inputs for ListTables, mirroring ListTablesInput's prefix/continuationToken/maxTables fields (namespace remains its own positional parameter above since ListTables already took it before this pagination sweep, and existing callers key off that signature).
type Namespace ¶
type Namespace struct {
CreatedAt time.Time `json:"createdAt"`
TableBucketARN string `json:"tableBucketARN"`
OwnerAccountID string `json:"ownerAccountID"`
CreatedBy string `json:"createdBy"`
Policy string `json:"policy"`
NamespaceID string `json:"namespaceID"`
Namespace []string `json:"namespace"`
}
Namespace represents an S3 Tables namespace.
type Provider ¶
type Provider struct{}
Provider implements service.Provider for AWS S3 Tables.
func (*Provider) Init ¶
func (p *Provider) Init(ctx *service.AppContext) (service.Registerable, error)
Init initializes the S3 Tables service backend and handler.
type ReplicationDestination ¶
type ReplicationDestination struct {
DestinationBucketARN string `json:"destinationBucketARN"`
}
ReplicationDestination is a single replication destination.
type StorageBackend ¶
type StorageBackend interface {
// TableBucket operations
TableBucketARN(name string) string
TableARN(bucketName, namespaceName, tableName string) string
Region() string
AccountID() string
CreateTableBucket(name string, opts CreateTableBucketOptions) (*TableBucket, error)
GetTableBucket(bucketARN string) (*TableBucket, error)
DeleteTableBucket(bucketARN string) error
ListTableBuckets(p ListTableBucketsParams) (page.Page[*TableBucket], error)
GetTableBucketMaintenanceConfiguration(bucketARN string) (map[string]any, error)
PutTableBucketMaintenanceConfiguration(bucketARN, maintenanceType string, value map[string]any) error
GetTableBucketPolicy(bucketARN string) (string, error)
PutTableBucketPolicy(bucketARN, policy string) error
DeleteTableBucketPolicy(bucketARN string) error
DeleteTableBucketEncryption(bucketARN string) error
// BucketReplication operations
PutTableBucketReplication(bucketARN string, cfg *BucketReplicationConfig) error
GetTableBucketReplication(bucketARN string) (*BucketReplicationConfig, error)
DeleteTableBucketReplication(bucketARN string) error
// TableReplication operations
PutTableReplication(tableArn string) error
DeleteTableReplication(tableArn string) error
// TableRecordExpiry operations
PutTableRecordExpirationConfiguration(tableArn string, cfg *TableRecordExpiryConfig) error
GetTableRecordExpirationConfiguration(tableArn string) (*TableRecordExpiryConfig, error)
// Namespace operations
CreateNamespace(tableBucketARN string, namespace []string) (*Namespace, error)
GetNamespace(tableBucketARN string, namespace []string) (*Namespace, error)
DeleteNamespace(tableBucketARN string, namespace []string) error
ListNamespaces(tableBucketARN string, p ListNamespacesParams) (page.Page[*Namespace], error)
// Table operations
CreateTable(tableBucketARN string, namespace []string, name, format string, opts CreateTableOptions) (*Table, error)
GetTable(tableBucketARN string, namespace []string, name string) (*Table, error)
GetTableByARN(tableArn string) (*Table, error)
GetTableEncryption(tableBucketARN string, namespace []string, name string) (map[string]any, error)
DeleteTable(tableBucketARN string, namespace []string, name string) error
ListTables(tableBucketARN, namespace string, p ListTablesParams) (page.Page[*Table], error)
RenameTable(tableBucketARN string, namespace []string, name, newNamespace, newName, versionToken string) error
UpdateTableMetadataLocation(
tableBucketARN string,
namespace []string,
name, metadataLocation, versionToken string,
) (*Table, error)
GetTableMaintenanceConfiguration(
tableBucketARN string,
namespace []string,
name string,
) (map[string]any, string, error)
PutTableMaintenanceConfiguration(
tableBucketARN string,
namespace []string,
name, maintenanceType string,
value map[string]any,
) error
GetTablePolicy(tableBucketARN string, namespace []string, name string) (string, error)
PutTablePolicy(tableBucketARN string, namespace []string, name, policy string) error
DeleteTablePolicy(tableBucketARN string, namespace []string, name string) error
// Lifecycle
Reset()
Snapshot(ctx context.Context) []byte
Restore(ctx context.Context, data []byte) error
}
StorageBackend defines the interface for S3 Tables backend implementations. All mutating methods must be safe for concurrent use.
type Table ¶
type Table struct {
CreatedAt time.Time `json:"createdAt"`
ModifiedAt time.Time `json:"modifiedAt"`
MaintenanceConfiguration map[string]any `json:"maintenanceConfiguration"`
// Encryption is the table-level encryption override set at CreateTable
// time. When nil, the table has no override and GetTableEncryption
// falls back to the owning bucket's configuration, then to the AWS
// default (SSE-S3/AES256) -- see GetTableEncryption. There is no
// separate PutTableEncryption SDK operation; this can only be set at
// creation.
Encryption map[string]any `json:"encryption"`
TableBucketARN string `json:"tableBucketARN"`
Format string `json:"format"`
VersionToken string `json:"versionToken"`
MetadataLocation string `json:"metadataLocation"`
WarehouseLocation string `json:"warehouseLocation"`
ARN string `json:"arn"`
OwnerAccountID string `json:"ownerAccountID"`
Policy string `json:"policy"`
Name string `json:"name"`
StorageClass string `json:"storageClass"`
Namespace []string `json:"namespace"`
}
Table represents an S3 Tables table.
type TableBucket ¶
type TableBucket struct {
CreatedAt time.Time `json:"createdAt"`
MaintenanceConfiguration map[string]any `json:"maintenanceConfiguration"`
Encryption map[string]any `json:"encryption"`
ARN string `json:"arn"`
Name string `json:"name"`
OwnerAccountID string `json:"ownerAccountID"`
Policy string `json:"policy"`
StorageClass string `json:"storageClass"`
// MetricsConfigurationID is the unique identifier AWS assigns to a table
// bucket's metrics configuration once PutTableBucketMetricsConfiguration
// has been called. It is cleared by DeleteTableBucketMetricsConfiguration.
MetricsConfigurationID string `json:"metricsConfigurationID,omitempty"`
MetricsEnabled bool `json:"metricsEnabled"`
}
TableBucket represents an S3 Tables table bucket.
type TableRecordExpiryConfig ¶
type TableRecordExpiryConfig struct {
Status string `json:"status"`
// TableARN is the store.Table primary-key qualifier for the
// tableRecordExpiry table (see store_setup.go) -- see
// BucketReplicationConfig.TableBucketARN's doc comment for why this
// field exists and is tagged json:"-".
TableARN string `json:"-"`
}
TableRecordExpiryConfig holds record expiration configuration for a table.