database

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0

Index

Constants

View Source
const (
	RulesTableName = "StrikerRules"
)
View Source
const (
	SimulationTableName = "StrikerSimulation"
)
View Source
const (
	StrategyTableName = "StrikerStrategy"
)

Variables

This section is empty.

Functions

func CreateSession

func CreateSession() *session.Session

Initialize a session that the SDK will use to load credentials from the shared credentials file ~/.aws/credentials and region from the shared configuration file ~/.aws/config.

func DeleteItemFromTable

func DeleteItemFromTable(tableName string, key map[string]*dynamodb.AttributeValue) error

func Finish

func Finish()

func InsertItemIntoTable

func InsertItemIntoTable(tableName string, av map[string]*dynamodb.AttributeValue) error

func ScanItemsFromTable

func ScanItemsFromTable(tableName string, values map[string]*dynamodb.AttributeValue, names map[string]*string, filter string) (*dynamodb.ScanOutput, error)

func SelectItemFromTable

func SelectItemFromTable(tableName string, key map[string]*dynamodb.AttributeValue) (*dynamodb.GetItemOutput, error)

func StrategyGet

func StrategyGet(style, strategy string) error

func StrategyInsert

func StrategyInsert(style, strategy string) error

func StrategyScan

func StrategyScan(style, strategy string) (*dynamodb.ScanOutput, error)

func StrategyUpdate

func StrategyUpdate(style, strategy string) error

func UpdateItemInTable

func UpdateItemInTable(tableName string, key map[string]*dynamodb.AttributeValue, updateExpression string, expressionAttributeValues map[string]*dynamodb.AttributeValue, expressionAttributeNames map[string]*string) error

Types

type DBRulesPayload

type DBRulesPayload struct {
	HitSoft17         bool
	Surrender         bool
	DoubleAnyTwoCards bool
	DoubleAfterSplit  bool
	ResplitAces       bool
	HitSplitAces      bool
}

type DBRulesTable

type DBRulesTable struct {
	Style     string
	Epoch     int64
	Timestamp string
	Payload   string
}

func (*DBRulesTable) Delete

func (r *DBRulesTable) Delete() error

func (*DBRulesTable) Insert

func (r *DBRulesTable) Insert() error

func (*DBRulesTable) Select

func (r *DBRulesTable) Select() (*DBRulesPayload, error)

func (*DBRulesTable) Update

func (r *DBRulesTable) Update() error

type DBSimulationTable

type DBSimulationTable struct {
	Style     string
	Guid      string
	Target    string
	Hostname  string
	Status    string
	Epoch     int64
	Timestamp string
	Payload   string
}

func (*DBSimulationTable) SimulationDelete

func (s *DBSimulationTable) SimulationDelete() error

func (*DBSimulationTable) SimulationInsert

func (s *DBSimulationTable) SimulationInsert() error

func (*DBSimulationTable) SimulationUpdate

func (s *DBSimulationTable) SimulationUpdate() error

Jump to

Keyboard shortcuts

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