Documentation ¶
Index ¶
- type Ability
- type AbilityModel
- type ComplexPlayer
- type ComplexRole
- type Game
- type GameModel
- func (gm *GameModel) DeleteGame(gID string) error
- func (gm *GameModel) GetAll() ([]Game, error)
- func (gm *GameModel) GetByGameID(gID string) (*Game, error)
- func (gm *GameModel) GetByID(id int) (*Game, error)
- func (gm *GameModel) InsertGame(gameID string, playerCount int) (*Game, error)
- func (gm *GameModel) Update(game *Game) error
- func (gm *GameModel) UpdatePlayerCount(gID string, playerCount int) error
- type Item
- type ItemModel
- type Models
- type Passive
- type PassiveModel
- type Player
- type PlayerModel
- func (m *PlayerModel) Create(player *Player) error
- func (m *PlayerModel) Delete(id int) error
- func (m *PlayerModel) GetByGameID(gameID string) ([]*Player, error)
- func (m *PlayerModel) GetByGameIDAndName(gameID string, name string) (*Player, error)
- func (m *PlayerModel) GetByID(id int) (*Player, error)
- func (m *PlayerModel) GetByName(name string) (*Player, error)
- func (m *PlayerModel) GetComplexByGameID(gameID string) ([]*ComplexPlayer, error)
- func (m *PlayerModel) GetRole(roleID int) (*Role, error)
- func (m *PlayerModel) Update(player *Player) error
- type Role
- type RoleModel
- func (rm *RoleModel) Get(id int) (*Role, error)
- func (rm *RoleModel) GetAll() ([]*Role, error)
- func (rm *RoleModel) GetAllByAbilityID(id int) ([]*Role, error)
- func (rm *RoleModel) GetAllByPassiveID(id int) ([]*Role, error)
- func (rm *RoleModel) GetByName(name string) (*Role, error)
- func (rm *RoleModel) GetComplex(id int) (*ComplexRole, error)
- func (rm *RoleModel) GetComplexByName(name string) (*ComplexRole, error)
- func (rm *RoleModel) GetRandomRole() (*Role, error)
- type Status
- type StatusModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AbilityModel ¶
func (*AbilityModel) GetAll ¶
func (am *AbilityModel) GetAll() ([]*Ability, error)
func (*AbilityModel) GetRandomByRarity ¶
func (am *AbilityModel) GetRandomByRarity(rarity string) (*Ability, error)
type ComplexPlayer ¶
ComplexPlayer is a player with a role
type ComplexRole ¶
type Models ¶
type Models struct { Games GameModel Players PlayerModel Roles RoleModel Abilities AbilityModel Passives PassiveModel Items ItemModel Statuses StatusModel }
type PassiveModel ¶
func (*PassiveModel) GetAll ¶
func (pm *PassiveModel) GetAll() ([]*Passive, error)
type PlayerModel ¶
func (*PlayerModel) Create ¶
func (m *PlayerModel) Create(player *Player) error
func (*PlayerModel) Delete ¶
func (m *PlayerModel) Delete(id int) error
func (*PlayerModel) GetByGameID ¶
func (m *PlayerModel) GetByGameID(gameID string) ([]*Player, error)
func (*PlayerModel) GetByGameIDAndName ¶
func (m *PlayerModel) GetByGameIDAndName(gameID string, name string) (*Player, error)
func (*PlayerModel) GetComplexByGameID ¶
func (m *PlayerModel) GetComplexByGameID(gameID string) ([]*ComplexPlayer, error)
func (*PlayerModel) Update ¶
func (m *PlayerModel) Update(player *Player) error
type Role ¶
type Role struct { ID int `db:"id"` Name string `db:"name"` Alignment string `db:"alignment"` AbilityIDs pq.Int32Array `db:"ability_ids"` PassiveIDs pq.Int32Array `db:"passive_ids"` }
type RoleModel ¶
func (*RoleModel) GetAllByAbilityID ¶
func (*RoleModel) GetAllByPassiveID ¶
func (*RoleModel) GetComplex ¶
func (rm *RoleModel) GetComplex(id int) (*ComplexRole, error)
func (*RoleModel) GetComplexByName ¶
func (rm *RoleModel) GetComplexByName(name string) (*ComplexRole, error)
func (*RoleModel) GetRandomRole ¶
type StatusModel ¶
func (*StatusModel) GetAll ¶
func (m *StatusModel) GetAll() ([]Status, error)
Click to show internal directories.
Click to hide internal directories.