dynamodbtruncator

package module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2021 License: MIT Imports: 8 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
  • From binary
# binary
$ curl -sfL https://raw.githubusercontent.com/d-tsuji/dynamodbtruncator/master/install.sh | sudo sh -s -- -b /usr/local/bin

Documentation

Overview

Package dynamodbtruncator truncates the DynamoDB tables.

Index

Constants

View Source
const Version = "0.1.2"

Version is the version to be displayed in the command line help message.

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