Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DynamoClient ¶
type DynamoClient interface { Put(ctx context.Context, input *dynamodb.PutItemInput) (*dynamodb.PutItemOutput, error) Scan(ctx context.Context, input *dynamodb.ScanInput) (*dynamodb.ScanOutput, error) BatchDeleteItems(ctx context.Context, tableName string, keys []map[string]types.AttributeValue) (*dynamodb.BatchWriteItemOutput, error) }
type QueryFuncOpts ¶ added in v0.2.0
func WithAttrs ¶ added in v0.2.0
func WithAttrs(attrs []string) QueryFuncOpts
WithAttrs - provide a list of dynamodb attributes the query will return
func WithFilterExpression ¶ added in v0.2.0
func WithFilterExpression(condition string) QueryFuncOpts
WithFilterExpression - provide a filter condition for the query
func WithFilterNameAttrs ¶ added in v0.2.0
func WithFilterNameAttrs(attrName string) QueryFuncOpts
WithFilterNameAttrs - provide a list of attribute names to filter on
func WithFilterNameValues ¶ added in v0.2.0
func WithFilterNameValues(attrValues string) QueryFuncOpts
WithFilterNameValues - provide a list of attribute values to filter on
func WithLimit ¶ added in v0.2.0
func WithLimit(limit int32) QueryFuncOpts
WithLimit - provide a limit to the query
type QueryOpts ¶ added in v0.2.0
type QueryOpts struct { Limit *int32 FilterExpression *string ProjectedExpressions *string FilterNameAttributes map[string]string FilterNameValues map[string]types.AttributeValue }
func WithQueryOptions ¶ added in v0.2.0
func WithQueryOptions(opts []QueryFuncOpts) *QueryOpts
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func New ¶
func New(client DynamoClient, logger *slog.Logger, emitter emitter.MessagePublisher, dryRun bool) Service
func (Service) Dump ¶ added in v0.0.4
func (s Service) Dump(ctx context.Context, tableName string, path string, opts ...QueryFuncOpts) error
Dump all items from the given table. Optionally specify a list of attributes to extract.
Example:
Dump(ctx, "my-table", "path/to/file.json", []string{"attr1", "attr2"})
Click to show internal directories.
Click to hide internal directories.