dynamodb

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

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
}

func (*Client) CreateTable

func (client *Client) CreateTable(name string) (string, error)

func (*Client) DeleteItem

func (client *Client) DeleteItem(table string, id int) error

func (*Client) DeleteTable

func (client *Client) DeleteTable(name string) error

func (*Client) GetItem

func (client *Client) GetItem(table string, id int) (string, error)

func (*Client) ListTables

func (client *Client) ListTables(startTable string) (*dynamodb.ListTablesOutput, error)

func (*Client) PutItem

func (client *Client) PutItem(table string, item *Item) error

func (*Client) Scan

func (client *Client) Scan(table string, lastEvaluatedKey int, createdAt string) (*dynamodb.ScanOutput, error)

func (*Client) UpdateItem

func (client *Client) UpdateItem(table string, item *Item) error

type IClient

type IClient interface {
	CreateTable(name string) (string, error)
	PutItem(table string, item *Item) error
	UpdateItem(table string, item *Item) error
	DeleteItem(table string, id int) error
	GetItem(table string, id int) (string, error)
	DeleteTable(name string) error
	ListTables(startTable string) (*dynamodb.ListTablesOutput, error)
	Scan(table string, lastEvaluatedKey int, createdAt string) (*dynamodb.ScanOutput, error)
}

func New

func New(config *config.AWS) (IClient, error)

type Item

type Item struct {
	Id        int    `json:"id"`
	Title     string `json:"title"`
	CreatedAt string `json:"createdAt"`
}

Jump to

Keyboard shortcuts

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