Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunMovieScenario ¶
func RunMovieScenario( sdkConfig aws.Config, questioner demotools.IQuestioner, tableName string, movieSampler actions.IMovieSampler)
RunMovieScenario is an interactive example that shows you how to use the AWS SDK for Go to create and use an Amazon DynamoDB table that stores data about movies.
- Create a table that can hold movie data.
- Put, get, and update a single movie in the table.
- Write movie data to the table from a sample JSON file.
- Query for movies that were released in a given year.
- Scan for movies that were released in a range of years.
- Delete a movie from the table.
- Delete the table.
This example creates a DynamoDB service client from the specified sdkConfig so that you can replace it with a mocked or stubbed config for unit testing.
It uses a questioner from the `demotools` package to get input during the example. This package can be found in the ..\..\demotools folder of this repo.
The specified movie sampler is used to get sample data from a URL that is loaded into the named table.
func RunPartiQLBatchScenario ¶
RunPartiQLBatchScenario shows you how to use the AWS SDK for Go to run batches of PartiQL statements to query a table that stores data about movies.
- Use batches of PartiQL statements to add, get, update, and delete data for individual movies.
This example creates an Amazon DynamoDB service client from the specified sdkConfig so that you can replace it with a mocked or stubbed config for unit testing.
This example creates and deletes a DynamoDB table to use during the scenario.
func RunPartiQLSingleScenario ¶
RunPartiQLSingleScenario shows you how to use the AWS SDK for Go to use PartiQL to query a table that stores data about movies.
* Use PartiQL statements to add, get, update, and delete data for individual movies.
This example creates an Amazon DynamoDB service client from the specified sdkConfig so that you can replace it with a mocked or stubbed config for unit testing.
This example creates and deletes a DynamoDB table to use during the scenario.
Types ¶
This section is empty.