query

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: 5 Imported by: 0

Documentation

Overview

contains wrappers for fetch query functions. each query is abstracted in its own function as they utilize different dynamodb tools (indexes, etc.)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GameOutput

type GameOutput struct {
	GameId       string                       `dynamodbav:"gameid" json:"gameid"`
	Date         string                       `dynamodbav:"game_date" json:"date"`
	Readonly     bool                         `dynamodbav:"readonly" json:"readonly"`
	ExpiresIn    int                          `dynamodbav:"expires_in" json:"expires_in"`
	Participants map[string]ParticipantOutput `dynamodbav:"participants" json:"participants"`
}

func FetchByDate

func FetchByDate(dynamoClient *dynamodb.Client, ctx context.Context, tableName string, date string) ([]GameOutput, error)

func FetchByGameId

func FetchByGameId(dynamoClient *dynamodb.Client, ctx context.Context, tableName string, gameid string) ([]GameOutput, error)

type ParticipantOutput

type ParticipantOutput struct {
	Username  string `dynamodbav:"username" json:"username"`
	Underdog  bool   `dynamodbav:"underdog" json:"underdog"`
	Team      int    `dynamodbav:"team" json:"team"`
	Placement int    `dynamodbav:"placement" json:"placement"`
	Points    int    `dynamodbav:"points" json:"points"`
	Elo       int    `dynamodbav:"elo" json:"elo"`
	EloUpdate int    `dynamodbav:"elo_update" json:"elo_update"`
	Confirmed bool   `dynamodbav:"confirmed" json:"confirmed"`
}

Jump to

Keyboard shortcuts

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