models

package
v0.0.0-...-7d26021 Latest Latest
Warning

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

Go to latest
Published: May 20, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	Password    string    `json:"password"`
	Codename    string    `json:"codename"`
	Round       int       `json:"round"`
	Turn        int       `json:"turn"`
	Dealer      int       `json:"dealer"`
	Rolled      bool      `json:"rolled"`
	Dice        []int     `json:"dice"`
	AllPlayers  []Player  `json:"players"`
	Draw        deck.Card `json:"draw"`
	AllDiscards deck.Deck `json:"discards"`
	Rematch     []Player  `json:"rematch"`
	Result      string    `json:"result"`
	Template    Template  `json:",omitempty"`
}

type Player

type Player struct {
	Name     string    `json:"name"`
	Email    string    `json:"email"`
	Hand     deck.Deck `json:"hand"`
	HandSize int       `json:"handSize"`
	Score    int       `json:"score"`
}

type Template

type Template struct {
	Link           string `json:",omitempty"`
	AllPlayerNames string `json:",omitempty"`
}

These values are only for use in templates, not for returning to the user

Jump to

Keyboard shortcuts

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