scan

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConcreteScanService

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

func (ConcreteScanService) ScanAll

func (c ConcreteScanService) ScanAll(in awsdynamodb.ScanInput, callback func(out *awsdynamodb.ScanOutput) error, stop func(out *awsdynamodb.ScanOutput) (bool, error)) (err error)

type ScanService

type ScanService interface {
	ScanAll(in awsdynamodb.ScanInput, callback func(out *awsdynamodb.ScanOutput) error, stop func(out *awsdynamodb.ScanOutput) (bool, error)) error
}

ScanService provides the functionality to iterate over all entries in DynamoDB given a scan query Each output page is passed to the given scan output function. Afterwards, it is passed to the stop function, which can return True to immediately halt the scan operation. Otherwise, the scan operation will continue through all pages in DynamoDB until it runs out of records to scan.

Returns error or nil. If you need to extract specific records from it, you should put that logic into the callback function. If you need to halt the entire operation and resume from a previous state, save the lastEvaluatedKey in the callback and pass it to the scan input argument.

func GetScanService

func GetScanService(scanner dynamodb.ScanAPI) ScanService

Jump to

Keyboard shortcuts

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