scenarios

package
v0.0.0-...-e995d3a Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

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.

  1. Create a table that can hold movie data.
  2. Put, get, and update a single movie in the table.
  3. Write movie data to the table from a sample JSON file.
  4. Query for movies that were released in a given year.
  5. Scan for movies that were released in a range of years.
  6. Delete a movie from the table.
  7. 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

func RunPartiQLBatchScenario(sdkConfig aws.Config, tableName string)

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

func RunPartiQLSingleScenario(sdkConfig aws.Config, tableName string)

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.

Jump to

Keyboard shortcuts

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