Documentation ¶
Index ¶
- type Card
- type ClientViolationEvent
- type CurrentPlayerEvent
- type CurrentPlayersEvent
- type InPlayEvent
- type InboundEvent
- type InboundEventType
- type InboundPayload
- type NewHandEvent
- type OutboundEvent
- type OutboundEventType
- type OutboundPayload
- type PlayCardEvent
- type PlayerCard
- type PointsEvent
- type Suit
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientViolationEvent ¶
type ClientViolationEvent struct {
Message string `json:"message"`
}
func (ClientViolationEvent) IsOutboundEvent ¶
func (ClientViolationEvent) IsOutboundEvent()
type CurrentPlayerEvent ¶
func (CurrentPlayerEvent) IsOutboundEvent ¶
func (CurrentPlayerEvent) IsOutboundEvent()
type CurrentPlayersEvent ¶
type CurrentPlayersEvent struct { PlayerIDs []uuid.UUID `json:"players"` GameReady bool `json:"gameReady"` }
func (CurrentPlayersEvent) IsOutboundEvent ¶
func (CurrentPlayersEvent) IsOutboundEvent()
type InPlayEvent ¶
type InPlayEvent struct {
InPlay []PlayerCard `json:"inPlay"`
}
func (InPlayEvent) IsOutboundEvent ¶
func (InPlayEvent) IsOutboundEvent()
type InboundEvent ¶
type InboundEvent interface {
IsInboundEvent()
}
type InboundEventType ¶
type InboundEventType string
const (
InboundPlayCard InboundEventType = "playCard"
)
type InboundPayload ¶
type InboundPayload struct { Type InboundEventType `json:"type"` Data InboundEvent `json:"data"` }
func (*InboundPayload) UnmarshalJSON ¶
func (i *InboundPayload) UnmarshalJSON(bytes []byte) (err error)
type NewHandEvent ¶
type NewHandEvent struct {
Hand []Card `json:"hand"`
}
func (NewHandEvent) IsOutboundEvent ¶
func (NewHandEvent) IsOutboundEvent()
type OutboundEvent ¶
type OutboundEvent interface {
IsOutboundEvent()
}
type OutboundEventType ¶
type OutboundEventType string
const ( OutboundClientViolation OutboundEventType = "clientViolation" OutboundNewHand OutboundEventType = "newHand" OutboundCurrentPlayer OutboundEventType = "currentPlayer" OutboundInPlay OutboundEventType = "inPlay" OutboundCurrentPlayers OutboundEventType = "currentPlayers" OutboundPoints OutboundEventType = "points" )
type OutboundPayload ¶
type OutboundPayload struct { Type OutboundEventType `json:"type"` Data OutboundEvent `json:"data"` }
func (*OutboundPayload) UnmarshalJSON ¶
func (o *OutboundPayload) UnmarshalJSON(bytes []byte) (err error)
type PlayCardEvent ¶
type PlayCardEvent struct {
Card Card `json:"card"`
}
func (PlayCardEvent) IsInboundEvent ¶
func (PlayCardEvent) IsInboundEvent()
type PlayerCard ¶
type PointsEvent ¶
func (PointsEvent) IsOutboundEvent ¶
func (PointsEvent) IsOutboundEvent()
Click to show internal directories.
Click to hide internal directories.