api

package
v0.0.0-...-c26b842 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Api

type Api interface {
}

func NewApi

func NewApi() (Api, error)

type CustomValidator

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

func (*CustomValidator) Validate

func (cv *CustomValidator) Validate(i interface{}) error

type EchoApi

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

type Lobby

type Lobby struct {
	ID                  uuid.UUID              `json:"id"`
	Name                string                 `json:"name"`
	Status              string                 `json:"status"`
	Owner               *Player                `json:"owner"`
	Difficulty          int                    `json:"difficulty"`
	MissionLength       int                    `json:"mission_length"`
	NumberOfCrewMembers int                    `json:"number_of_crew_members" `
	MaxPlayers          int                    `json:"max_players" `
	ExpansionPacks      []string               `json:"expansion_packs" `
	Players             []*Player              `json:"players"`
	Payload             map[string]interface{} `json:"payload"`
}

type LobbyCreate

type LobbyCreate struct {
	ID                  uuid.UUID              `param:"lobbyId" validate:"required"`
	Name                string                 `json:"name" validate:"required"`
	Owner               *Player                `json:"owner" validate:"required"`
	Password            string                 `json:"password"`
	Difficulty          int                    `json:"difficulty" validate:"required"`
	MissionLength       int                    `json:"mission_length" validate:"required"`
	NumberOfCrewMembers int                    `json:"number_of_crew_members" validate:"required"`
	MaxPlayers          int                    `json:"max_players" validate:"required"`
	ExpansionPacks      []string               `json:"expansion_packs"`
	Payload             map[string]interface{} `json:"payload"`
}

type LobbyDelete

type LobbyDelete struct {
	ID uuid.UUID `param:"lobbyId" validate:"required"`
}

type LobbyUpdate

type LobbyUpdate struct {
	ID                  uuid.UUID              `param:"lobbyId" validate:"required"`
	Name                string                 `json:"name" validate:"required"`
	Status              string                 `json:"status" validate:"required"`
	Password            string                 `json:"password"`
	Difficulty          int                    `json:"difficulty" validate:"required"`
	MissionLength       int                    `json:"mission_length" validate:"required"`
	NumberOfCrewMembers int                    `json:"number_of_crew_members" validate:"required"`
	MaxPlayers          int                    `json:"max_players" validate:"required"`
	ExpansionPacks      []string               `json:"expansion_packs"`
	Payload             map[string]interface{} `json:"payload"`
}

type LobbyUpdateStatus

type LobbyUpdateStatus struct {
	ID     uuid.UUID `param:"lobbyId" validate:"required"`
	Status string    `json:"status" validate:"required"`
}

type Player

type Player struct {
	ID        uuid.UUID              `json:"id" validate:"required"`
	Name      string                 `json:"name" validate:"required"`
	Spectator bool                   `json:"spectator"`
	Payload   map[string]interface{} `json:"payload"`
}

type PlayerCreate

type PlayerCreate struct {
	ID        uuid.UUID              `param:"playerId" validate:"required"`
	Name      string                 `json:"name" validate:"required"`
	LobbyId   uuid.UUID              `json:"lobby_id" validate:"required"`
	Password  string                 `json:"password"`
	Spectator bool                   `json:"spectator"`
	Payload   map[string]interface{} `json:"payload"`
}

type PlayerId

type PlayerId struct {
	ID uuid.UUID `param:"playerId" validate:"required"`
}

type PlayerUpdate

type PlayerUpdate struct {
	ID        uuid.UUID              `param:"playerId" validate:"required"`
	Name      string                 `json:"name" validate:"required"`
	Spectator bool                   `json:"spectator"`
	Payload   map[string]interface{} `json:"payload"`
}

type SimplePlayer

type SimplePlayer struct {
	ID        uuid.UUID `json:"id"`
	Name      string    `json:"name"`
	Spectator bool      `json:"spectator"`
	LobbyId   uuid.UUID `json:"lobby_id"`
}

Jump to

Keyboard shortcuts

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