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

Documentation

Overview

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

Index

Constants

View Source
const (
	MAX_PAGESIZE = 100
)

Variables

This section is empty.

Functions

This section is empty.

Types

type UserOutput

type UserOutput struct {
	Username string `dynamodbav:"username" json:"username"`
	Disabled bool   `dynamodbav:"disabled" json:"disabled"`
	Region   string `dynamodbav:"user_region" json:"region"`
	Title    string `dynamodbav:"title" json:"title"`
	IconUrl  string `dynamodbav:"iconurl" json:"iconurl"`
	Elo      int    `dynamodbav:"elo" json:"elo"`
}

func FetchByElo

func FetchByElo(dynamoClient *dynamodb.Client, ctx context.Context, tableName string, pageSize int32, region, elo string) ([]UserOutput, error)

func FetchByPage

func FetchByPage(dynamoClient *dynamodb.Client, ctx context.Context, tableName string, pageSize int32, lastPageKey, region string) ([]UserOutput, string, error)

func FetchByUsername

func FetchByUsername(dynamoClient *dynamodb.Client, ctx context.Context, tableName string, username string) ([]UserOutput, error)

Jump to

Keyboard shortcuts

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