put

package
v0.0.0-...-589c078 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

contains wrappers for database put functions. main purpose is to abstract some boilerplate code away from the handler.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InsertGame

func InsertGame(dynamoClient *dynamodb.Client, ctx context.Context, tableName string, participants map[string]ParticipantInput, expirationTime int) (string, error)

Types

type GameInput

type GameInput struct {
	GameId      string                      `dynamodbav:"gameid"`
	Date        string                      `dynamodbav:"game_date"`
	ExpiresIn   int                         `dynamodbav:"expires_in"`
	Readonly    bool                        `dynamodbav:"readonly"`
	Partcipants map[string]ParticipantInput `dynamodbav:"participants"`
}

type ParticipantInput

type ParticipantInput struct {
	Subject       string `dynamodbav:"subject"`
	Username      string `dynamodbav:"username"`
	Underdog      bool   `dynamodbav:"underdog"`
	Team          int    `dynamodbav:"team"`
	Placement     int    `dynamodbav:"placement"`
	Points        int    `dynamodbav:"points"`
	Elo           int    `dynamodbav:"elo"`
	EloUpdate     int    `dynamodbav:"elo_update"`
	Confirmed     bool   `dynamodbav:"confirmed"`
	ConfirmSecret string `dynamodbav:"confirm_secret"`
}

Jump to

Keyboard shortcuts

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