Documentation
¶
Index ¶
- Variables
- type Client
- type Color
- type Connected
- type CreateGame
- type CreateGameResponse
- func (*CreateGameResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateGameResponse) GetColor() Color
- func (x *CreateGameResponse) GetError() string
- func (x *CreateGameResponse) GetGameId() int64
- func (*CreateGameResponse) ProtoMessage()
- func (x *CreateGameResponse) ProtoReflect() protoreflect.Message
- func (x *CreateGameResponse) Reset()
- func (x *CreateGameResponse) String() string
- type Game
- type GameEnded
- type GameMove
- func (*GameMove) Descriptor() ([]byte, []int)deprecated
- func (x *GameMove) GetGameId() int64
- func (x *GameMove) GetPass() bool
- func (x *GameMove) GetX() uint32
- func (x *GameMove) GetY() uint32
- func (*GameMove) ProtoMessage()
- func (x *GameMove) ProtoReflect() protoreflect.Message
- func (x *GameMove) Reset()
- func (x *GameMove) String() string
- type GameStart
- type Heartbeat
- type JoinGame
- type JoinGameResponse
- func (*JoinGameResponse) Descriptor() ([]byte, []int)deprecated
- func (x *JoinGameResponse) GetColor() Color
- func (x *JoinGameResponse) GetError() string
- func (*JoinGameResponse) ProtoMessage()
- func (x *JoinGameResponse) ProtoReflect() protoreflect.Message
- func (x *JoinGameResponse) Reset()
- func (x *JoinGameResponse) String() string
- type LeaveGame
- type MessageHandler
- type PlayMove
- type PlayMoveResponse
- func (*PlayMoveResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PlayMoveResponse) GetError() string
- func (x *PlayMoveResponse) GetSuccess() bool
- func (*PlayMoveResponse) ProtoMessage()
- func (x *PlayMoveResponse) ProtoReflect() protoreflect.Message
- func (x *PlayMoveResponse) Reset()
- func (x *PlayMoveResponse) String() string
- type Server
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Color_name = map[int32]string{ 0: "RANDOM", 1: "BLACK", 2: "WHITE", } Color_value = map[string]int32{ "RANDOM": 0, "BLACK": 1, "WHITE": 2, } )
Enum value maps for Color.
View Source
var File_reversi_server_reversi_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Color ¶
type Color int32
func (Color) Descriptor ¶
func (Color) Descriptor() protoreflect.EnumDescriptor
func (Color) EnumDescriptor
deprecated
func (Color) Number ¶
func (x Color) Number() protoreflect.EnumNumber
func (Color) Type ¶
func (Color) Type() protoreflect.EnumType
type Connected ¶
type Connected struct { PlayerId int64 `protobuf:"varint,1,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"` // contains filtered or unexported fields }
func (*Connected) Descriptor
deprecated
func (*Connected) GetPlayerId ¶
func (*Connected) ProtoMessage ¶
func (*Connected) ProtoMessage()
func (*Connected) ProtoReflect ¶
func (x *Connected) ProtoReflect() protoreflect.Message
type CreateGame ¶
type CreateGame struct { PlayerName string `protobuf:"bytes,1,opt,name=player_name,json=playerName,proto3" json:"player_name,omitempty"` Color Color `protobuf:"varint,2,opt,name=color,proto3,enum=reversi.Color" json:"color,omitempty"` // contains filtered or unexported fields }
func (*CreateGame) Descriptor
deprecated
func (*CreateGame) Descriptor() ([]byte, []int)
Deprecated: Use CreateGame.ProtoReflect.Descriptor instead.
func (*CreateGame) GetColor ¶
func (x *CreateGame) GetColor() Color
func (*CreateGame) GetPlayerName ¶
func (x *CreateGame) GetPlayerName() string
func (*CreateGame) ProtoMessage ¶
func (*CreateGame) ProtoMessage()
func (*CreateGame) ProtoReflect ¶
func (x *CreateGame) ProtoReflect() protoreflect.Message
func (*CreateGame) Reset ¶
func (x *CreateGame) Reset()
func (*CreateGame) String ¶
func (x *CreateGame) String() string
type CreateGameResponse ¶
type CreateGameResponse struct { GameId int64 `protobuf:"varint,1,opt,name=game_id,json=gameId,proto3" json:"game_id,omitempty"` Color Color `protobuf:"varint,2,opt,name=color,proto3,enum=reversi.Color" json:"color,omitempty"` Error *string `protobuf:"bytes,3,opt,name=error,proto3,oneof" json:"error,omitempty"` // contains filtered or unexported fields }
func (*CreateGameResponse) Descriptor
deprecated
func (*CreateGameResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateGameResponse.ProtoReflect.Descriptor instead.
func (*CreateGameResponse) GetColor ¶
func (x *CreateGameResponse) GetColor() Color
func (*CreateGameResponse) GetError ¶
func (x *CreateGameResponse) GetError() string
func (*CreateGameResponse) GetGameId ¶
func (x *CreateGameResponse) GetGameId() int64
func (*CreateGameResponse) ProtoMessage ¶
func (*CreateGameResponse) ProtoMessage()
func (*CreateGameResponse) ProtoReflect ¶
func (x *CreateGameResponse) ProtoReflect() protoreflect.Message
func (*CreateGameResponse) Reset ¶
func (x *CreateGameResponse) Reset()
func (*CreateGameResponse) String ¶
func (x *CreateGameResponse) String() string
type Game ¶
type Game struct { Id snowflake.Snowflake Started bool Turn Color // contains filtered or unexported fields }
func (*Game) RemovePlayer ¶
type GameEnded ¶
type GameEnded struct { Winner *Color `protobuf:"varint,1,opt,name=winner,proto3,enum=reversi.Color,oneof" json:"winner,omitempty"` SpecialReason *string `protobuf:"bytes,2,opt,name=special_reason,json=specialReason,proto3,oneof" json:"special_reason,omitempty"` // contains filtered or unexported fields }
func (*GameEnded) Descriptor
deprecated
func (*GameEnded) GetSpecialReason ¶
func (*GameEnded) ProtoMessage ¶
func (*GameEnded) ProtoMessage()
func (*GameEnded) ProtoReflect ¶
func (x *GameEnded) ProtoReflect() protoreflect.Message
type GameMove ¶
type GameMove struct { GameId int64 `protobuf:"varint,1,opt,name=game_id,json=gameId,proto3" json:"game_id,omitempty"` X uint32 `protobuf:"varint,2,opt,name=x,proto3" json:"x,omitempty"` Y uint32 `protobuf:"varint,3,opt,name=y,proto3" json:"y,omitempty"` Pass bool `protobuf:"varint,4,opt,name=pass,proto3" json:"pass,omitempty"` // contains filtered or unexported fields }
func (*GameMove) Descriptor
deprecated
func (*GameMove) ProtoMessage ¶
func (*GameMove) ProtoMessage()
func (*GameMove) ProtoReflect ¶
func (x *GameMove) ProtoReflect() protoreflect.Message
type GameStart ¶
type GameStart struct {
// contains filtered or unexported fields
}
func (*GameStart) Descriptor
deprecated
func (*GameStart) ProtoMessage ¶
func (*GameStart) ProtoMessage()
func (*GameStart) ProtoReflect ¶
func (x *GameStart) ProtoReflect() protoreflect.Message
type Heartbeat ¶
type Heartbeat struct {
// contains filtered or unexported fields
}
func (*Heartbeat) Descriptor
deprecated
func (*Heartbeat) ProtoMessage ¶
func (*Heartbeat) ProtoMessage()
func (*Heartbeat) ProtoReflect ¶
func (x *Heartbeat) ProtoReflect() protoreflect.Message
type JoinGame ¶
type JoinGame struct { PlayerName string `protobuf:"bytes,1,opt,name=player_name,json=playerName,proto3" json:"player_name,omitempty"` GameId int64 `protobuf:"varint,2,opt,name=game_id,json=gameId,proto3" json:"game_id,omitempty"` // contains filtered or unexported fields }
func (*JoinGame) Descriptor
deprecated
func (*JoinGame) GetPlayerName ¶
func (*JoinGame) ProtoMessage ¶
func (*JoinGame) ProtoMessage()
func (*JoinGame) ProtoReflect ¶
func (x *JoinGame) ProtoReflect() protoreflect.Message
type JoinGameResponse ¶
type JoinGameResponse struct { Color Color `protobuf:"varint,1,opt,name=color,proto3,enum=reversi.Color" json:"color,omitempty"` Error *string `protobuf:"bytes,2,opt,name=error,proto3,oneof" json:"error,omitempty"` // contains filtered or unexported fields }
func (*JoinGameResponse) Descriptor
deprecated
func (*JoinGameResponse) Descriptor() ([]byte, []int)
Deprecated: Use JoinGameResponse.ProtoReflect.Descriptor instead.
func (*JoinGameResponse) GetColor ¶
func (x *JoinGameResponse) GetColor() Color
func (*JoinGameResponse) GetError ¶
func (x *JoinGameResponse) GetError() string
func (*JoinGameResponse) ProtoMessage ¶
func (*JoinGameResponse) ProtoMessage()
func (*JoinGameResponse) ProtoReflect ¶
func (x *JoinGameResponse) ProtoReflect() protoreflect.Message
func (*JoinGameResponse) Reset ¶
func (x *JoinGameResponse) Reset()
func (*JoinGameResponse) String ¶
func (x *JoinGameResponse) String() string
type LeaveGame ¶
type LeaveGame struct { GameId int64 `protobuf:"varint,1,opt,name=game_id,json=gameId,proto3" json:"game_id,omitempty"` // contains filtered or unexported fields }
func (*LeaveGame) Descriptor
deprecated
func (*LeaveGame) ProtoMessage ¶
func (*LeaveGame) ProtoMessage()
func (*LeaveGame) ProtoReflect ¶
func (x *LeaveGame) ProtoReflect() protoreflect.Message
type PlayMove ¶
type PlayMove struct { X uint32 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` Y uint32 `protobuf:"varint,2,opt,name=y,proto3" json:"y,omitempty"` // contains filtered or unexported fields }
func (*PlayMove) Descriptor
deprecated
func (*PlayMove) ProtoMessage ¶
func (*PlayMove) ProtoMessage()
func (*PlayMove) ProtoReflect ¶
func (x *PlayMove) ProtoReflect() protoreflect.Message
type PlayMoveResponse ¶
type PlayMoveResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Error *string `protobuf:"bytes,2,opt,name=error,proto3,oneof" json:"error,omitempty"` // contains filtered or unexported fields }
func (*PlayMoveResponse) Descriptor
deprecated
func (*PlayMoveResponse) Descriptor() ([]byte, []int)
Deprecated: Use PlayMoveResponse.ProtoReflect.Descriptor instead.
func (*PlayMoveResponse) GetError ¶
func (x *PlayMoveResponse) GetError() string
func (*PlayMoveResponse) GetSuccess ¶
func (x *PlayMoveResponse) GetSuccess() bool
func (*PlayMoveResponse) ProtoMessage ¶
func (*PlayMoveResponse) ProtoMessage()
func (*PlayMoveResponse) ProtoReflect ¶
func (x *PlayMoveResponse) ProtoReflect() protoreflect.Message
func (*PlayMoveResponse) Reset ¶
func (x *PlayMoveResponse) Reset()
func (*PlayMoveResponse) String ¶
func (x *PlayMoveResponse) String() string
Click to show internal directories.
Click to hide internal directories.