store

package
v0.0.0-...-1ff77d6 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseClient

type DatabaseClient struct {
	Client DynamoClienter // Interface
}

Database client that communicates with DynamoDB via interface

func NewDatabaseClient

func NewDatabaseClient() (*DatabaseClient, error)

Create a new DatabaseClient that has a DynamoDB client

func (*DatabaseClient) UpdateUserStats

func (d *DatabaseClient) UpdateUserStats(ctx context.Context, userId, swipee int, swipeDir string) error

Update a user's stats. If userId doesn't exist, then a new entry is created

type DynamoClienter

type DynamoClienter interface {
	UpdateItem(ctx context.Context, params *dynamodb.UpdateItemInput, optFns ...func(*dynamodb.Options)) (*dynamodb.UpdateItemOutput, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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