dynamodbstore

package
v0.0.0-...-964326b Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateLocalClient

func CreateLocalClient() *dynamodb.Client

func CreateTableIfNotExists

func CreateTableIfNotExists(d *dynamodb.Client, tableName string)

Types

type DynamoDBStore

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

func Open

func Open(addr string, tablename string) *DynamoDBStore

func (*DynamoDBStore) GetBattle

func (s *DynamoDBStore) GetBattle(code habit.BattleCode) (*habit.Battle, error)

func (*DynamoDBStore) GetHabit

func (s *DynamoDBStore) GetHabit(username habit.Username, habitID habit.HabitID) (*habit.Habit, error)

func (*DynamoDBStore) ListBattlesByUser

func (s *DynamoDBStore) ListBattlesByUser(username habit.Username) ([]*habit.Battle, error)

func (*DynamoDBStore) ListHabits

func (s *DynamoDBStore) ListHabits(username habit.Username) ([]*habit.Habit, error)

func (*DynamoDBStore) UpdateBattle

func (s *DynamoDBStore) UpdateBattle(b *habit.Battle) error

func (*DynamoDBStore) UpdateBattleStubs

func (s *DynamoDBStore) UpdateBattleStubs(b habit.Battle, h habit.Habit) error

func (*DynamoDBStore) UpdateHabit

func (s *DynamoDBStore) UpdateHabit(h *habit.Habit) error

type Record

type Record struct {
	SK string
	PK string
}

Jump to

Keyboard shortcuts

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