models

package
v0.0.0-...-68149f4 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *sql.DB

Functions

func AddGame

func AddGame(newGame Boardgame) (bool, error)

func ConnectDatabase

func ConnectDatabase() error

func DeleteGame

func DeleteGame(gameId int) (bool, error)

func UpdateGame

func UpdateGame(ourGame Boardgame, id int) (bool, error)

Types

type Boardgame

type Boardgame struct {
	ID          int64  `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

func GetGameById

func GetGameById(id string) (Boardgame, error)

func GetGames

func GetGames(count int) ([]Boardgame, error)

Jump to

Keyboard shortcuts

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