table

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package table manages all of the Dynamo calls (query, scan, get, write, etc).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	GetGeneralSettings() (*models.GeneralSettings, error)
	UpdateGeneralSettings(*models.GeneralSettings) (*models.GeneralSettings, error)
}

API defines the interface for the table which can be used for mocking.

type DynamoItem

type DynamoItem = map[string]*dynamodb.AttributeValue

DynamoItem is a type alias for the item format expected by the Dynamo SDK.

type OrganizationsTable

type OrganizationsTable struct {
	Name *string
	// contains filtered or unexported fields
}

OrganizationsTable encapsulates a connection to the Dynamo table.

func New

func New(tableName string, sess *session.Session) *OrganizationsTable

New creates a new Dynamo client which talks to the given table name.

func (*OrganizationsTable) GetGeneralSettings added in v1.5.0

func (table *OrganizationsTable) GetGeneralSettings() (*models.GeneralSettings, error)

func (*OrganizationsTable) UpdateGeneralSettings added in v1.5.0

func (table *OrganizationsTable) UpdateGeneralSettings(settings *models.GeneralSettings) (*models.GeneralSettings, error)

Update updates account details and returns the updated item

Jump to

Keyboard shortcuts

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