dynamodbtruncator

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2021 License: MIT Imports: 7 Imported by: 0

README

dynamodbtruncator (Truncate table for DynamoDB)

Test Status MIT License Go Report Card

dynamodbtruncator truncate tables for DynamoDB.

Usage

$ dynamodbtruncator [options]
Options
--profile string
	The name of the profile from which the session can be obtained (default `default`)

--table string
	Trucated tables. Multiple tables can be specified separated by commas.
	e.g. table or table1,table2,table3
Example
$ dynamodbtruncator --table hoge-table --profile my-profile

Installation

  • From source code
# go get
$ go get github.com/d-tsuji/dynamodbtruncator/cmd/dynamodbtruncator

Documentation

Overview

Package dynamodbtruncator truncates the DynamoDB tables.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

DB is a DynamoDB client.

func New

func New(p client.ConfigProvider, cfgs ...*aws.Config) *DB

New generates the DB from the AWS configuration.

func (*DB) Table

func (db *DB) Table(name string) Table

Table generates the Table from the table name name.

func (*DB) Tables

func (db *DB) Tables(name string) Tables

Tables generates Tables from comma-separated table names.

type Table

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

Table handles the DynamoDB table specified by name.

func (Table) Truncate

func (t Table) Truncate(ctx context.Context) error

Truncate will truncate a specific table.

type Tables

type Tables []Table

Tables handles multiple tables.

func (Tables) TruncateAll

func (ts Tables) TruncateAll(ctx context.Context) error

TruncateAll truncates multiple tables in parallel.

Directories

Path Synopsis
cmd
Package testonly holds test-specific code for dynamodbtruncator.
Package testonly holds test-specific code for dynamodbtruncator.

Jump to

Keyboard shortcuts

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