dynamodb

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package dynamodb provides DynamoDB client implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a struct that provides client related methods.

func (*Client) CreateClient

func (this *Client) CreateClient(ctx context.Context, region, accessKey, secretAccessKey, sessionToken string, loadOptionFunctions ...func(*config.LoadOptions) error) error

CreateClient is create a client.

See dynamodb_test.go for a detailed example.

ex) err := client.CreateClient(context.TODO(), region, accessKey, secretAccessKey, sessionToken)

func (*Client) CreateTable

func (this *Client) CreateTable(request *dynamodb.CreateTableInput, wait bool, waitTimeout uint64, optionFunctions ...func(*dynamodb.Options)) (*dynamodb.CreateTableOutput, error)

CreateTable is create the table.

See dynamodb_test.go for a detailed example.

ex) response, err := client.CreateTable(&aws_dynamodb.CreateTableInput{...}, true, 10)

func (*Client) DeleteItem

func (this *Client) DeleteItem(request *dynamodb.DeleteItemInput, optionFunctions ...func(*dynamodb.Options)) (*dynamodb.DeleteItemOutput, error)

DeleteItem is delete the item.

See dynamodb_test.go for a detailed example.

ex) response, err := client.DeleteItem(&aws_dynamodb.DeleteItemInput{...})

func (*Client) DeleteTable

func (this *Client) DeleteTable(tableName string, wait bool, waitTimeout uint64, optionFunctions ...func(*dynamodb.Options)) (*dynamodb.DeleteTableOutput, error)

DeleteTable is delete the table.

See dynamodb_test.go for a detailed example.

ex) response, err := client.DeleteTable("table_name", true, 10)

func (*Client) DescribeTable

func (this *Client) DescribeTable(tableName string, optionFunctions ...func(*dynamodb.Options)) (*dynamodb.DescribeTableOutput, error)

DescribeTable is get the description of the table.

See dynamodb_test.go for a detailed example.

ex) response, err := client.DescribeTable("table_name")

func (*Client) DescribeTimeToLive

func (this *Client) DescribeTimeToLive(tableName string, optionFunctions ...func(*dynamodb.Options)) (*dynamodb.DescribeTimeToLiveOutput, error)

DescribeTimeToLive is get the TTL information.

See dynamodb_test.go for a detailed example.

ex) response, err := client.DescribeTimeToLive(TABLE_NAME)

func (*Client) GetItem

func (this *Client) GetItem(request *dynamodb.GetItemInput, optionFunctions ...func(*dynamodb.Options)) (*dynamodb.GetItemOutput, error)

GetItem is get the item.

See dynamodb_test.go for a detailed example.

ex) response, err := client.GetItem(&aws_dynamodb.GetItemInput{...})

func (*Client) ListTables

func (this *Client) ListTables(request *dynamodb.ListTablesInput, optionFunctions ...func(*dynamodb.Options)) (*dynamodb.ListTablesOutput, error)

ListTables is get the list of the table.

See dynamodb_test.go for a detailed example.

ex) response, err := client.ListTables(&aws_dynamodb.ListTablesInput{Limit: aws.Int32(10)})

func (*Client) PutItem

func (this *Client) PutItem(request *dynamodb.PutItemInput, optionFunctions ...func(*dynamodb.Options)) (*dynamodb.PutItemOutput, error)

PutItem is put the item.

See dynamodb_test.go for a detailed example.

ex) response, err := client.PutItem(&aws_dynamodb.PutItemInput{...})

func (*Client) Query

func (this *Client) Query(request *dynamodb.QueryInput, optionFunctions ...func(*dynamodb.Options)) (*dynamodb.QueryOutput, error)

Query is get the items based on primary key values.

See dynamodb_test.go for a detailed example.

ex) response, err := client.Query(&aws_dynamodb.QueryInput{...})

func (*Client) QueryPaginatorNextPage

func (this *Client) QueryPaginatorNextPage(request *dynamodb.QueryInput, optionFunctions ...func(*dynamodb.Options)) (*dynamodb.QueryOutput, error)

QueryPaginatorNextPage is fetch the next page using QueryPaginator.

See dynamodb_test.go for a detailed example.

ex) response, err := client.QueryPaginatorNextPage(&aws_dynamodb.QueryInput{...})

func (*Client) Scan

func (this *Client) Scan(request *dynamodb.ScanInput, optionFunctions ...func(*dynamodb.Options)) (*dynamodb.ScanOutput, error)

Scan is get the every items in a table or a secondary index.

See dynamodb_test.go for a detailed example.

ex) response, err := client.Scan(&aws_dynamodb.ScanInput{...})

func (*Client) ScanPaginatorNextPage

func (this *Client) ScanPaginatorNextPage(request *dynamodb.ScanInput, optionFunctions ...func(*dynamodb.Options)) (*dynamodb.ScanOutput, error)

ScanPaginatorNextPage is fetch the next page using ScanPaginator.

See dynamodb_test.go for a detailed example.

ex) response, err := client.ScanPaginatorNextPage(&aws_dynamodb.ScanInput{...})

func (*Client) UpdateItem

func (this *Client) UpdateItem(request *dynamodb.UpdateItemInput, optionFunctions ...func(*dynamodb.Options)) (*dynamodb.UpdateItemOutput, error)

UpdateItem is update the item.

See dynamodb_test.go for a detailed example.

ex) response, err := client.UpdateItem(&aws_dynamodb.UpdateItemInput{...})

func (*Client) UpdateTable

func (this *Client) UpdateTable(request *dynamodb.UpdateTableInput, optionFunctions ...func(*dynamodb.Options)) (*dynamodb.UpdateTableOutput, error)

UpdateTable is update the table.

See dynamodb_test.go for a detailed example.

ex) response, err := client.UpdateTable(&aws_dynamodb.UpdateTableInput{...})

func (*Client) UpdateTimeToLive

func (this *Client) UpdateTimeToLive(tableName, attributeName string, enabled bool, optionFunctions ...func(*dynamodb.Options)) (*dynamodb.UpdateTimeToLiveOutput, error)

UpdateTimeToLive is update the TTL information.

See dynamodb_test.go for a detailed example.

ex) response, err := client.UpdateTimeToLive(TABLE_NAME, TTL_NAME, true)

Jump to

Keyboard shortcuts

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