Documentation
¶
Index ¶
- Variables
- type Action
- func (*Action) Descriptor() ([]byte, []int)deprecated
- func (x *Action) GetChatMessage() string
- func (x *Action) GetPassword() string
- func (x *Action) GetPlayerId() int32
- func (x *Action) GetType() Action_ActionType
- func (x *Action) GetUsername() string
- func (x *Action) GetX() int32
- func (x *Action) GetY() int32
- func (*Action) ProtoMessage()
- func (x *Action) ProtoReflect() protoreflect.Message
- func (x *Action) Reset()
- func (x *Action) String() string
- type ActionBatch
- func (*ActionBatch) Descriptor() ([]byte, []int)deprecated
- func (x *ActionBatch) GetActions() []*Action
- func (x *ActionBatch) GetPlayerId() int32
- func (x *ActionBatch) GetProtocolVersion() int32
- func (x *ActionBatch) GetTick() int64
- func (*ActionBatch) ProtoMessage()
- func (x *ActionBatch) ProtoReflect() protoreflect.Message
- func (x *ActionBatch) Reset()
- func (x *ActionBatch) String() string
- type Action_ActionType
- func (Action_ActionType) Descriptor() protoreflect.EnumDescriptor
- func (x Action_ActionType) Enum() *Action_ActionType
- func (Action_ActionType) EnumDescriptor() ([]byte, []int)deprecated
- func (x Action_ActionType) Number() protoreflect.EnumNumber
- func (x Action_ActionType) String() string
- func (Action_ActionType) Type() protoreflect.EnumType
- type ChatMessage
- func (*ChatMessage) Descriptor() ([]byte, []int)deprecated
- func (x *ChatMessage) GetContent() string
- func (x *ChatMessage) GetPlayerId() int32
- func (x *ChatMessage) GetTimestamp() int64
- func (x *ChatMessage) GetUsername() string
- func (*ChatMessage) ProtoMessage()
- func (x *ChatMessage) ProtoReflect() protoreflect.Message
- func (x *ChatMessage) Reset()
- func (x *ChatMessage) String() string
- type PlayerState
- func (*PlayerState) Descriptor() ([]byte, []int)deprecated
- func (x *PlayerState) GetPlayerId() int32
- func (x *PlayerState) GetUsername() string
- func (x *PlayerState) GetX() int32
- func (x *PlayerState) GetY() int32
- func (*PlayerState) ProtoMessage()
- func (x *PlayerState) ProtoReflect() protoreflect.Message
- func (x *PlayerState) Reset()
- func (x *PlayerState) String() string
- type ServerMessage
- func (*ServerMessage) Descriptor() ([]byte, []int)deprecated
- func (x *ServerMessage) GetAuthSuccess() bool
- func (x *ServerMessage) GetChatMessages() []*ChatMessage
- func (x *ServerMessage) GetCurrentTick() int64
- func (x *ServerMessage) GetErrorMessage() string
- func (x *ServerMessage) GetPlayerId() int32
- func (x *ServerMessage) GetPlayers() []*PlayerState
- func (x *ServerMessage) GetProtocolVersion() int32
- func (*ServerMessage) ProtoMessage()
- func (x *ServerMessage) ProtoReflect() protoreflect.Message
- func (x *ServerMessage) Reset()
- func (x *ServerMessage) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Action_ActionType_name = map[int32]string{ 0: "MOVE", 1: "CHAT", 2: "DISCONNECT", 3: "LOGIN", 4: "REGISTER", } Action_ActionType_value = map[string]int32{ "MOVE": 0, "CHAT": 1, "DISCONNECT": 2, "LOGIN": 3, "REGISTER": 4, } )
Enum value maps for Action_ActionType.
View Source
var File_actions_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct { Type Action_ActionType `protobuf:"varint,1,opt,name=type,proto3,enum=actions.Action_ActionType" json:"type,omitempty"` X int32 `protobuf:"varint,2,opt,name=x,proto3" json:"x,omitempty"` Y int32 `protobuf:"varint,3,opt,name=y,proto3" json:"y,omitempty"` PlayerId int32 `protobuf:"varint,4,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"` ChatMessage string `protobuf:"bytes,5,opt,name=chat_message,json=chatMessage,proto3" json:"chat_message,omitempty"` Username string `protobuf:"bytes,6,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,7,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*Action) Descriptor
deprecated
func (*Action) GetChatMessage ¶
func (*Action) GetPassword ¶
func (*Action) GetPlayerId ¶
func (*Action) GetType ¶
func (x *Action) GetType() Action_ActionType
func (*Action) GetUsername ¶
func (*Action) ProtoMessage ¶
func (*Action) ProtoMessage()
func (*Action) ProtoReflect ¶
func (x *Action) ProtoReflect() protoreflect.Message
type ActionBatch ¶
type ActionBatch struct { PlayerId int32 `protobuf:"varint,1,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"` Actions []*Action `protobuf:"bytes,2,rep,name=actions,proto3" json:"actions,omitempty"` Tick int64 `protobuf:"varint,3,opt,name=tick,proto3" json:"tick,omitempty"` ProtocolVersion int32 `protobuf:"varint,4,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version,omitempty"` // contains filtered or unexported fields }
func (*ActionBatch) Descriptor
deprecated
func (*ActionBatch) Descriptor() ([]byte, []int)
Deprecated: Use ActionBatch.ProtoReflect.Descriptor instead.
func (*ActionBatch) GetActions ¶
func (x *ActionBatch) GetActions() []*Action
func (*ActionBatch) GetPlayerId ¶
func (x *ActionBatch) GetPlayerId() int32
func (*ActionBatch) GetProtocolVersion ¶
func (x *ActionBatch) GetProtocolVersion() int32
func (*ActionBatch) GetTick ¶
func (x *ActionBatch) GetTick() int64
func (*ActionBatch) ProtoMessage ¶
func (*ActionBatch) ProtoMessage()
func (*ActionBatch) ProtoReflect ¶
func (x *ActionBatch) ProtoReflect() protoreflect.Message
func (*ActionBatch) Reset ¶
func (x *ActionBatch) Reset()
func (*ActionBatch) String ¶
func (x *ActionBatch) String() string
type Action_ActionType ¶
type Action_ActionType int32
const ( Action_MOVE Action_ActionType = 0 Action_CHAT Action_ActionType = 1 Action_DISCONNECT Action_ActionType = 2 Action_LOGIN Action_ActionType = 3 Action_REGISTER Action_ActionType = 4 )
func (Action_ActionType) Descriptor ¶
func (Action_ActionType) Descriptor() protoreflect.EnumDescriptor
func (Action_ActionType) Enum ¶
func (x Action_ActionType) Enum() *Action_ActionType
func (Action_ActionType) EnumDescriptor
deprecated
func (Action_ActionType) EnumDescriptor() ([]byte, []int)
Deprecated: Use Action_ActionType.Descriptor instead.
func (Action_ActionType) Number ¶
func (x Action_ActionType) Number() protoreflect.EnumNumber
func (Action_ActionType) String ¶
func (x Action_ActionType) String() string
func (Action_ActionType) Type ¶
func (Action_ActionType) Type() protoreflect.EnumType
type ChatMessage ¶
type ChatMessage struct { PlayerId int32 `protobuf:"varint,1,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"` Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // contains filtered or unexported fields }
func (*ChatMessage) Descriptor
deprecated
func (*ChatMessage) Descriptor() ([]byte, []int)
Deprecated: Use ChatMessage.ProtoReflect.Descriptor instead.
func (*ChatMessage) GetContent ¶
func (x *ChatMessage) GetContent() string
func (*ChatMessage) GetPlayerId ¶
func (x *ChatMessage) GetPlayerId() int32
func (*ChatMessage) GetTimestamp ¶
func (x *ChatMessage) GetTimestamp() int64
func (*ChatMessage) GetUsername ¶
func (x *ChatMessage) GetUsername() string
func (*ChatMessage) ProtoMessage ¶
func (*ChatMessage) ProtoMessage()
func (*ChatMessage) ProtoReflect ¶
func (x *ChatMessage) ProtoReflect() protoreflect.Message
func (*ChatMessage) Reset ¶
func (x *ChatMessage) Reset()
func (*ChatMessage) String ¶
func (x *ChatMessage) String() string
type PlayerState ¶
type PlayerState struct { PlayerId int32 `protobuf:"varint,1,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"` X int32 `protobuf:"varint,2,opt,name=x,proto3" json:"x,omitempty"` Y int32 `protobuf:"varint,3,opt,name=y,proto3" json:"y,omitempty"` Username string `protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"` // contains filtered or unexported fields }
func (*PlayerState) Descriptor
deprecated
func (*PlayerState) Descriptor() ([]byte, []int)
Deprecated: Use PlayerState.ProtoReflect.Descriptor instead.
func (*PlayerState) GetPlayerId ¶
func (x *PlayerState) GetPlayerId() int32
func (*PlayerState) GetUsername ¶
func (x *PlayerState) GetUsername() string
func (*PlayerState) GetX ¶
func (x *PlayerState) GetX() int32
func (*PlayerState) GetY ¶
func (x *PlayerState) GetY() int32
func (*PlayerState) ProtoMessage ¶
func (*PlayerState) ProtoMessage()
func (*PlayerState) ProtoReflect ¶
func (x *PlayerState) ProtoReflect() protoreflect.Message
func (*PlayerState) Reset ¶
func (x *PlayerState) Reset()
func (*PlayerState) String ¶
func (x *PlayerState) String() string
type ServerMessage ¶
type ServerMessage struct { PlayerId int32 `protobuf:"varint,1,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"` Players []*PlayerState `protobuf:"bytes,2,rep,name=players,proto3" json:"players,omitempty"` CurrentTick int64 `protobuf:"varint,3,opt,name=current_tick,json=currentTick,proto3" json:"current_tick,omitempty"` ChatMessages []*ChatMessage `protobuf:"bytes,4,rep,name=chat_messages,json=chatMessages,proto3" json:"chat_messages,omitempty"` AuthSuccess bool `protobuf:"varint,5,opt,name=auth_success,json=authSuccess,proto3" json:"auth_success,omitempty"` ErrorMessage string `protobuf:"bytes,6,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` ProtocolVersion int32 `protobuf:"varint,7,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version,omitempty"` // contains filtered or unexported fields }
func (*ServerMessage) Descriptor
deprecated
func (*ServerMessage) Descriptor() ([]byte, []int)
Deprecated: Use ServerMessage.ProtoReflect.Descriptor instead.
func (*ServerMessage) GetAuthSuccess ¶
func (x *ServerMessage) GetAuthSuccess() bool
func (*ServerMessage) GetChatMessages ¶
func (x *ServerMessage) GetChatMessages() []*ChatMessage
func (*ServerMessage) GetCurrentTick ¶
func (x *ServerMessage) GetCurrentTick() int64
func (*ServerMessage) GetErrorMessage ¶
func (x *ServerMessage) GetErrorMessage() string
func (*ServerMessage) GetPlayerId ¶
func (x *ServerMessage) GetPlayerId() int32
func (*ServerMessage) GetPlayers ¶
func (x *ServerMessage) GetPlayers() []*PlayerState
func (*ServerMessage) GetProtocolVersion ¶
func (x *ServerMessage) GetProtocolVersion() int32
func (*ServerMessage) ProtoMessage ¶
func (*ServerMessage) ProtoMessage()
func (*ServerMessage) ProtoReflect ¶
func (x *ServerMessage) ProtoReflect() protoreflect.Message
func (*ServerMessage) Reset ¶
func (x *ServerMessage) Reset()
func (*ServerMessage) String ¶
func (x *ServerMessage) String() string
Click to show internal directories.
Click to hide internal directories.