hexzsql

package
v0.0.0-...-3e36cfb Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PostgresStore

type PostgresStore struct {
	// contains filtered or unexported fields
}

func NewPostgresStore

func NewPostgresStore(ctx context.Context, database_url string) (*PostgresStore, error)

func (*PostgresStore) Close

func (s *PostgresStore) Close() error

func (*PostgresStore) InsertHistory

func (s *PostgresStore) InsertHistory(ctx context.Context, entryType string, gameId string, gs *pb.GameState) error

func (*PostgresStore) InsertStats

func (s *PostgresStore) InsertStats(ctx context.Context, stats *hexz.WASMStatsRequest) error

func (*PostgresStore) LoadGame

func (s *PostgresStore) LoadGame(ctx context.Context, gameId string) (*pb.GameState, error)

func (*PostgresStore) NextGameState

func (s *PostgresStore) NextGameState(ctx context.Context, gameId string) (*pb.GameState, error)

func (*PostgresStore) PreviousGameState

func (s *PostgresStore) PreviousGameState(ctx context.Context, gameId string) (*pb.GameState, error)

func (*PostgresStore) StoreGame

func (s *PostgresStore) StoreGame(ctx context.Context, hostId string, gs *pb.GameState) error

Jump to

Keyboard shortcuts

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