models

package
v0.0.0-...-4a31f9d Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingBoardID      = errors.New("Missing BoardID")
	ErrNoRecord            = errors.New("models: no matching record found")
	ErrInvalidCredentials  = errors.New("models: invalid credentials")
	ErrDuplicateScreenName = errors.New("models: duplicate screen name")
)

Functions

This section is empty.

Types

type About

type About struct {
	AuthenticatedUserID int
	ScreenName          string
}

type Battle

type Battle struct {
	ID                    int
	AuthenticatedPlayerID int
	Title                 string
	Player1ID             int
	Player1ScreenName     string
	Player1BoardID        int
	Player1Accepted       bool
	Player2ID             int
	Player2ScreenName     string
	Player2BoardID        int
	Player2Accepted       bool
	ChallengerBoardName   sql.NullString
	ChallengeDate         time.Time
	Turn                  sql.NullInt64
}

type Board

type Board struct {
	ID       int
	Title    string
	PlayerID int
	BattleID sql.NullInt64
	Created  time.Time
}

type Login

type Login struct {
	ID         int
	ScreenName string
	IsActive   sql.NullString
	LastLogin  time.Time
}

type Player

type Player struct {
	ID             int
	EmailAddress   string
	HashedPassword string
	ScreenName     string
	LoggedIn       sql.NullString
	InBattle       sql.NullString
	Created        sql.NullString
	LastLogin      sql.NullString
}

type Position

type Position struct {
	ID         int
	PlayerID   int
	BattleID   sql.NullInt64
	PositionID int
	ShipType   sql.NullString
	CoordX     int
	CoordY     string
	PinColor   string
}

type Ship

type Ship struct {
	ID     int
	Length int
	Title  string
}

type Signup

type Signup struct {
	ID         int
	ScreenName string
	IsActive   sql.NullString
	LastLogin  time.Time
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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