Documentation ¶
Overview ¶
Package server is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterMruVServerServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterMruVServerServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MruVServerServiceClient) error
- func RegisterMruVServerServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterMruVServerServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MruVServerServiceServer) error
- func RegisterMruVServerServiceServer(s *grpc.Server, srv MruVServerServiceServer)
- type GetRegisteredServersRequest
- func (*GetRegisteredServersRequest) Descriptor() ([]byte, []int)deprecated
- func (*GetRegisteredServersRequest) ProtoMessage()
- func (x *GetRegisteredServersRequest) ProtoReflect() protoreflect.Message
- func (x *GetRegisteredServersRequest) Reset()
- func (x *GetRegisteredServersRequest) String() string
- func (m *GetRegisteredServersRequest) Validate() error
- type GetRegisteredServersRequestValidationError
- func (e GetRegisteredServersRequestValidationError) Cause() error
- func (e GetRegisteredServersRequestValidationError) Error() string
- func (e GetRegisteredServersRequestValidationError) ErrorName() string
- func (e GetRegisteredServersRequestValidationError) Field() string
- func (e GetRegisteredServersRequestValidationError) Key() bool
- func (e GetRegisteredServersRequestValidationError) Reason() string
- type GetRegisteredServersResponse
- func (*GetRegisteredServersResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetRegisteredServersResponse) GetServers() []*ServerInfo
- func (*GetRegisteredServersResponse) ProtoMessage()
- func (x *GetRegisteredServersResponse) ProtoReflect() protoreflect.Message
- func (x *GetRegisteredServersResponse) Reset()
- func (x *GetRegisteredServersResponse) String() string
- func (m *GetRegisteredServersResponse) Validate() error
- type GetRegisteredServersResponseValidationError
- func (e GetRegisteredServersResponseValidationError) Cause() error
- func (e GetRegisteredServersResponseValidationError) Error() string
- func (e GetRegisteredServersResponseValidationError) ErrorName() string
- func (e GetRegisteredServersResponseValidationError) Field() string
- func (e GetRegisteredServersResponseValidationError) Key() bool
- func (e GetRegisteredServersResponseValidationError) Reason() string
- type MruVServerServiceClient
- type MruVServerServiceServer
- type MruVServerService_ServerEventsStreamClient
- type MruVServerService_ServerEventsStreamServer
- type ServerEvent
- func (*ServerEvent) Descriptor() ([]byte, []int)deprecated
- func (x *ServerEvent) GetType() ServerEvent_ServerEventType
- func (*ServerEvent) ProtoMessage()
- func (x *ServerEvent) ProtoReflect() protoreflect.Message
- func (x *ServerEvent) Reset()
- func (x *ServerEvent) String() string
- func (m *ServerEvent) Validate() error
- type ServerEventValidationError
- func (e ServerEventValidationError) Cause() error
- func (e ServerEventValidationError) Error() string
- func (e ServerEventValidationError) ErrorName() string
- func (e ServerEventValidationError) Field() string
- func (e ServerEventValidationError) Key() bool
- func (e ServerEventValidationError) Reason() string
- type ServerEvent_ServerEventType
- func (ServerEvent_ServerEventType) Descriptor() protoreflect.EnumDescriptor
- func (x ServerEvent_ServerEventType) Enum() *ServerEvent_ServerEventType
- func (ServerEvent_ServerEventType) EnumDescriptor() ([]byte, []int)deprecated
- func (x ServerEvent_ServerEventType) Number() protoreflect.EnumNumber
- func (x ServerEvent_ServerEventType) String() string
- func (ServerEvent_ServerEventType) Type() protoreflect.EnumType
- type ServerEventsStreamRequest
- func (*ServerEventsStreamRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ServerEventsStreamRequest) GetId() uint32
- func (*ServerEventsStreamRequest) ProtoMessage()
- func (x *ServerEventsStreamRequest) ProtoReflect() protoreflect.Message
- func (x *ServerEventsStreamRequest) Reset()
- func (x *ServerEventsStreamRequest) String() string
- func (m *ServerEventsStreamRequest) Validate() error
- type ServerEventsStreamRequestValidationError
- func (e ServerEventsStreamRequestValidationError) Cause() error
- func (e ServerEventsStreamRequestValidationError) Error() string
- func (e ServerEventsStreamRequestValidationError) ErrorName() string
- func (e ServerEventsStreamRequestValidationError) Field() string
- func (e ServerEventsStreamRequestValidationError) Key() bool
- func (e ServerEventsStreamRequestValidationError) Reason() string
- type ServerID
- type ServerIDValidationError
- type ServerInfo
- func (*ServerInfo) Descriptor() ([]byte, []int)deprecated
- func (x *ServerInfo) GetHost() string
- func (x *ServerInfo) GetId() uint32
- func (x *ServerInfo) GetName() string
- func (x *ServerInfo) GetPlatform() string
- func (x *ServerInfo) GetPlayers() uint32
- func (x *ServerInfo) GetPort() string
- func (x *ServerInfo) GetStatus() ServerStatus
- func (*ServerInfo) ProtoMessage()
- func (x *ServerInfo) ProtoReflect() protoreflect.Message
- func (x *ServerInfo) Reset()
- func (x *ServerInfo) String() string
- func (m *ServerInfo) Validate() error
- type ServerInfoValidationError
- type ServerStatus
- func (ServerStatus) Descriptor() protoreflect.EnumDescriptor
- func (x ServerStatus) Enum() *ServerStatus
- func (ServerStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x ServerStatus) Number() protoreflect.EnumNumber
- func (x ServerStatus) String() string
- func (ServerStatus) Type() protoreflect.EnumType
- type UnimplementedMruVServerServiceServer
- func (*UnimplementedMruVServerServiceServer) GetRegisteredServers(context.Context, *GetRegisteredServersRequest) (*GetRegisteredServersResponse, error)
- func (*UnimplementedMruVServerServiceServer) GetServerInfo(context.Context, *ServerID) (*ServerInfo, error)
- func (*UnimplementedMruVServerServiceServer) RegisterServer(context.Context, *ServerInfo) (*ServerID, error)
- func (*UnimplementedMruVServerServiceServer) ServerEventsStream(*ServerEventsStreamRequest, MruVServerService_ServerEventsStreamServer) error
- func (*UnimplementedMruVServerServiceServer) UpdateServerStatus(context.Context, *UpdateServerStatusRequest) (*UpdateServerStatusResponse, error)
- type UpdateServerStatusRequest
- func (*UpdateServerStatusRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateServerStatusRequest) GetId() uint32
- func (x *UpdateServerStatusRequest) GetPlayers() uint32
- func (x *UpdateServerStatusRequest) GetStatus() ServerStatus
- func (*UpdateServerStatusRequest) ProtoMessage()
- func (x *UpdateServerStatusRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateServerStatusRequest) Reset()
- func (x *UpdateServerStatusRequest) String() string
- func (m *UpdateServerStatusRequest) Validate() error
- type UpdateServerStatusRequestValidationError
- func (e UpdateServerStatusRequestValidationError) Cause() error
- func (e UpdateServerStatusRequestValidationError) Error() string
- func (e UpdateServerStatusRequestValidationError) ErrorName() string
- func (e UpdateServerStatusRequestValidationError) Field() string
- func (e UpdateServerStatusRequestValidationError) Key() bool
- func (e UpdateServerStatusRequestValidationError) Reason() string
- type UpdateServerStatusResponse
- func (*UpdateServerStatusResponse) Descriptor() ([]byte, []int)deprecated
- func (*UpdateServerStatusResponse) ProtoMessage()
- func (x *UpdateServerStatusResponse) ProtoReflect() protoreflect.Message
- func (x *UpdateServerStatusResponse) Reset()
- func (x *UpdateServerStatusResponse) String() string
- func (m *UpdateServerStatusResponse) Validate() error
- type UpdateServerStatusResponseValidationError
- func (e UpdateServerStatusResponseValidationError) Cause() error
- func (e UpdateServerStatusResponseValidationError) Error() string
- func (e UpdateServerStatusResponseValidationError) ErrorName() string
- func (e UpdateServerStatusResponseValidationError) Field() string
- func (e UpdateServerStatusResponseValidationError) Key() bool
- func (e UpdateServerStatusResponseValidationError) Reason() string
Constants ¶
This section is empty.
Variables ¶
var ( ServerEvent_ServerEventType_name = map[int32]string{ 0: "UNKNOWN", 1: "REGISTERED", 2: "SERVER_DOWN", 3: "SERVER_UP", 4: "PLAYERS_CHANGED", } ServerEvent_ServerEventType_value = map[string]int32{ "UNKNOWN": 0, "REGISTERED": 1, "SERVER_DOWN": 2, "SERVER_UP": 3, "PLAYERS_CHANGED": 4, } )
Enum value maps for ServerEvent_ServerEventType.
var ( ServerStatus_name = map[int32]string{ 0: "UNKNOWN", 1: "ON", 2: "OFF", } ServerStatus_value = map[string]int32{ "UNKNOWN": 0, "ON": 1, "OFF": 2, } )
Enum value maps for ServerStatus.
var File_server_server_model_proto protoreflect.FileDescriptor
var File_server_server_proto protoreflect.FileDescriptor
Functions ¶
func RegisterMruVServerServiceHandler ¶
func RegisterMruVServerServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterMruVServerServiceHandler registers the http handlers for service MruVServerService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterMruVServerServiceHandlerClient ¶
func RegisterMruVServerServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MruVServerServiceClient) error
RegisterMruVServerServiceHandlerClient registers the http handlers for service MruVServerService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MruVServerServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MruVServerServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MruVServerServiceClient" to call the correct interceptors.
func RegisterMruVServerServiceHandlerFromEndpoint ¶
func RegisterMruVServerServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterMruVServerServiceHandlerFromEndpoint is same as RegisterMruVServerServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterMruVServerServiceHandlerServer ¶
func RegisterMruVServerServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MruVServerServiceServer) error
RegisterMruVServerServiceHandlerServer registers the http handlers for service MruVServerService to "mux". UnaryRPC :call MruVServerServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMruVServerServiceHandlerFromEndpoint instead.
func RegisterMruVServerServiceServer ¶
func RegisterMruVServerServiceServer(s *grpc.Server, srv MruVServerServiceServer)
Types ¶
type GetRegisteredServersRequest ¶
type GetRegisteredServersRequest struct {
// contains filtered or unexported fields
}
Request message for `MruVServerService.GetRegisteredServers`.
func (*GetRegisteredServersRequest) Descriptor
deprecated
func (*GetRegisteredServersRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRegisteredServersRequest.ProtoReflect.Descriptor instead.
func (*GetRegisteredServersRequest) ProtoMessage ¶
func (*GetRegisteredServersRequest) ProtoMessage()
func (*GetRegisteredServersRequest) ProtoReflect ¶ added in v0.8.4
func (x *GetRegisteredServersRequest) ProtoReflect() protoreflect.Message
func (*GetRegisteredServersRequest) Reset ¶
func (x *GetRegisteredServersRequest) Reset()
func (*GetRegisteredServersRequest) String ¶
func (x *GetRegisteredServersRequest) String() string
func (*GetRegisteredServersRequest) Validate ¶
func (m *GetRegisteredServersRequest) Validate() error
Validate checks the field values on GetRegisteredServersRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type GetRegisteredServersRequestValidationError ¶
type GetRegisteredServersRequestValidationError struct {
// contains filtered or unexported fields
}
GetRegisteredServersRequestValidationError is the validation error returned by GetRegisteredServersRequest.Validate if the designated constraints aren't met.
func (GetRegisteredServersRequestValidationError) Cause ¶
func (e GetRegisteredServersRequestValidationError) Cause() error
Cause function returns cause value.
func (GetRegisteredServersRequestValidationError) Error ¶
func (e GetRegisteredServersRequestValidationError) Error() string
Error satisfies the builtin error interface
func (GetRegisteredServersRequestValidationError) ErrorName ¶
func (e GetRegisteredServersRequestValidationError) ErrorName() string
ErrorName returns error name.
func (GetRegisteredServersRequestValidationError) Field ¶
func (e GetRegisteredServersRequestValidationError) Field() string
Field function returns field value.
func (GetRegisteredServersRequestValidationError) Key ¶
func (e GetRegisteredServersRequestValidationError) Key() bool
Key function returns key value.
func (GetRegisteredServersRequestValidationError) Reason ¶
func (e GetRegisteredServersRequestValidationError) Reason() string
Reason function returns reason value.
type GetRegisteredServersResponse ¶
type GetRegisteredServersResponse struct { Servers []*ServerInfo `protobuf:"bytes,1,rep,name=servers,proto3" json:"servers,omitempty"` // contains filtered or unexported fields }
Response message for `MruVServerService.GetRegisteredServers`.
func (*GetRegisteredServersResponse) Descriptor
deprecated
func (*GetRegisteredServersResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetRegisteredServersResponse.ProtoReflect.Descriptor instead.
func (*GetRegisteredServersResponse) GetServers ¶
func (x *GetRegisteredServersResponse) GetServers() []*ServerInfo
func (*GetRegisteredServersResponse) ProtoMessage ¶
func (*GetRegisteredServersResponse) ProtoMessage()
func (*GetRegisteredServersResponse) ProtoReflect ¶ added in v0.8.4
func (x *GetRegisteredServersResponse) ProtoReflect() protoreflect.Message
func (*GetRegisteredServersResponse) Reset ¶
func (x *GetRegisteredServersResponse) Reset()
func (*GetRegisteredServersResponse) String ¶
func (x *GetRegisteredServersResponse) String() string
func (*GetRegisteredServersResponse) Validate ¶
func (m *GetRegisteredServersResponse) Validate() error
Validate checks the field values on GetRegisteredServersResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type GetRegisteredServersResponseValidationError ¶
type GetRegisteredServersResponseValidationError struct {
// contains filtered or unexported fields
}
GetRegisteredServersResponseValidationError is the validation error returned by GetRegisteredServersResponse.Validate if the designated constraints aren't met.
func (GetRegisteredServersResponseValidationError) Cause ¶
func (e GetRegisteredServersResponseValidationError) Cause() error
Cause function returns cause value.
func (GetRegisteredServersResponseValidationError) Error ¶
func (e GetRegisteredServersResponseValidationError) Error() string
Error satisfies the builtin error interface
func (GetRegisteredServersResponseValidationError) ErrorName ¶
func (e GetRegisteredServersResponseValidationError) ErrorName() string
ErrorName returns error name.
func (GetRegisteredServersResponseValidationError) Field ¶
func (e GetRegisteredServersResponseValidationError) Field() string
Field function returns field value.
func (GetRegisteredServersResponseValidationError) Key ¶
func (e GetRegisteredServersResponseValidationError) Key() bool
Key function returns key value.
func (GetRegisteredServersResponseValidationError) Reason ¶
func (e GetRegisteredServersResponseValidationError) Reason() string
Reason function returns reason value.
type MruVServerServiceClient ¶
type MruVServerServiceClient interface { // Register instance of server for further managing. RegisterServer(ctx context.Context, in *ServerInfo, opts ...grpc.CallOption) (*ServerID, error) // Get all registered servers. GetRegisteredServers(ctx context.Context, in *GetRegisteredServersRequest, opts ...grpc.CallOption) (*GetRegisteredServersResponse, error) // Get game server status. GetServerInfo(ctx context.Context, in *ServerID, opts ...grpc.CallOption) (*ServerInfo, error) // Update game server status. UpdateServerStatus(ctx context.Context, in *UpdateServerStatusRequest, opts ...grpc.CallOption) (*UpdateServerStatusResponse, error) // Stream of server events. Events are streamed back in real-time for chosen server. //TODO: Change name to: SubscribeServerEvents ServerEventsStream(ctx context.Context, in *ServerEventsStreamRequest, opts ...grpc.CallOption) (MruVServerService_ServerEventsStreamClient, error) }
MruVServerServiceClient is the client API for MruVServerService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMruVServerServiceClient ¶
func NewMruVServerServiceClient(cc grpc.ClientConnInterface) MruVServerServiceClient
type MruVServerServiceServer ¶
type MruVServerServiceServer interface { // Register instance of server for further managing. RegisterServer(context.Context, *ServerInfo) (*ServerID, error) // Get all registered servers. GetRegisteredServers(context.Context, *GetRegisteredServersRequest) (*GetRegisteredServersResponse, error) // Get game server status. GetServerInfo(context.Context, *ServerID) (*ServerInfo, error) // Update game server status. UpdateServerStatus(context.Context, *UpdateServerStatusRequest) (*UpdateServerStatusResponse, error) // Stream of server events. Events are streamed back in real-time for chosen server. //TODO: Change name to: SubscribeServerEvents ServerEventsStream(*ServerEventsStreamRequest, MruVServerService_ServerEventsStreamServer) error }
MruVServerServiceServer is the server API for MruVServerService service.
type MruVServerService_ServerEventsStreamClient ¶
type MruVServerService_ServerEventsStreamClient interface { Recv() (*ServerEvent, error) grpc.ClientStream }
type MruVServerService_ServerEventsStreamServer ¶
type MruVServerService_ServerEventsStreamServer interface { Send(*ServerEvent) error grpc.ServerStream }
type ServerEvent ¶
type ServerEvent struct { // Type of a server event. Type ServerEvent_ServerEventType `protobuf:"varint,1,opt,name=type,proto3,enum=mruv.server.ServerEvent_ServerEventType" json:"type,omitempty"` // contains filtered or unexported fields }
Server event. Response message for `MruVServerService.ServerEventsStream`.
func (*ServerEvent) Descriptor
deprecated
func (*ServerEvent) Descriptor() ([]byte, []int)
Deprecated: Use ServerEvent.ProtoReflect.Descriptor instead.
func (*ServerEvent) GetType ¶
func (x *ServerEvent) GetType() ServerEvent_ServerEventType
func (*ServerEvent) ProtoMessage ¶
func (*ServerEvent) ProtoMessage()
func (*ServerEvent) ProtoReflect ¶ added in v0.8.4
func (x *ServerEvent) ProtoReflect() protoreflect.Message
func (*ServerEvent) Reset ¶
func (x *ServerEvent) Reset()
func (*ServerEvent) String ¶
func (x *ServerEvent) String() string
func (*ServerEvent) Validate ¶
func (m *ServerEvent) Validate() error
Validate checks the field values on ServerEvent with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type ServerEventValidationError ¶
type ServerEventValidationError struct {
// contains filtered or unexported fields
}
ServerEventValidationError is the validation error returned by ServerEvent.Validate if the designated constraints aren't met.
func (ServerEventValidationError) Cause ¶
func (e ServerEventValidationError) Cause() error
Cause function returns cause value.
func (ServerEventValidationError) Error ¶
func (e ServerEventValidationError) Error() string
Error satisfies the builtin error interface
func (ServerEventValidationError) ErrorName ¶
func (e ServerEventValidationError) ErrorName() string
ErrorName returns error name.
func (ServerEventValidationError) Field ¶
func (e ServerEventValidationError) Field() string
Field function returns field value.
func (ServerEventValidationError) Key ¶
func (e ServerEventValidationError) Key() bool
Key function returns key value.
func (ServerEventValidationError) Reason ¶
func (e ServerEventValidationError) Reason() string
Reason function returns reason value.
type ServerEvent_ServerEventType ¶
type ServerEvent_ServerEventType int32
Types of server events.
const ( ServerEvent_UNKNOWN ServerEvent_ServerEventType = 0 ServerEvent_REGISTERED ServerEvent_ServerEventType = 1 ServerEvent_SERVER_DOWN ServerEvent_ServerEventType = 2 ServerEvent_SERVER_UP ServerEvent_ServerEventType = 3 ServerEvent_PLAYERS_CHANGED ServerEvent_ServerEventType = 4 )
func (ServerEvent_ServerEventType) Descriptor ¶ added in v0.8.4
func (ServerEvent_ServerEventType) Descriptor() protoreflect.EnumDescriptor
func (ServerEvent_ServerEventType) Enum ¶ added in v0.8.4
func (x ServerEvent_ServerEventType) Enum() *ServerEvent_ServerEventType
func (ServerEvent_ServerEventType) EnumDescriptor
deprecated
func (ServerEvent_ServerEventType) EnumDescriptor() ([]byte, []int)
Deprecated: Use ServerEvent_ServerEventType.Descriptor instead.
func (ServerEvent_ServerEventType) Number ¶ added in v0.8.4
func (x ServerEvent_ServerEventType) Number() protoreflect.EnumNumber
func (ServerEvent_ServerEventType) String ¶
func (x ServerEvent_ServerEventType) String() string
func (ServerEvent_ServerEventType) Type ¶ added in v0.8.4
func (ServerEvent_ServerEventType) Type() protoreflect.EnumType
type ServerEventsStreamRequest ¶
type ServerEventsStreamRequest struct { // The ID of the server from which we want to receive events. Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
Request message for `MruVServerService.ServerEventsStream`.
func (*ServerEventsStreamRequest) Descriptor
deprecated
func (*ServerEventsStreamRequest) Descriptor() ([]byte, []int)
Deprecated: Use ServerEventsStreamRequest.ProtoReflect.Descriptor instead.
func (*ServerEventsStreamRequest) GetId ¶
func (x *ServerEventsStreamRequest) GetId() uint32
func (*ServerEventsStreamRequest) ProtoMessage ¶
func (*ServerEventsStreamRequest) ProtoMessage()
func (*ServerEventsStreamRequest) ProtoReflect ¶ added in v0.8.4
func (x *ServerEventsStreamRequest) ProtoReflect() protoreflect.Message
func (*ServerEventsStreamRequest) Reset ¶
func (x *ServerEventsStreamRequest) Reset()
func (*ServerEventsStreamRequest) String ¶
func (x *ServerEventsStreamRequest) String() string
func (*ServerEventsStreamRequest) Validate ¶
func (m *ServerEventsStreamRequest) Validate() error
Validate checks the field values on ServerEventsStreamRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type ServerEventsStreamRequestValidationError ¶
type ServerEventsStreamRequestValidationError struct {
// contains filtered or unexported fields
}
ServerEventsStreamRequestValidationError is the validation error returned by ServerEventsStreamRequest.Validate if the designated constraints aren't met.
func (ServerEventsStreamRequestValidationError) Cause ¶
func (e ServerEventsStreamRequestValidationError) Cause() error
Cause function returns cause value.
func (ServerEventsStreamRequestValidationError) Error ¶
func (e ServerEventsStreamRequestValidationError) Error() string
Error satisfies the builtin error interface
func (ServerEventsStreamRequestValidationError) ErrorName ¶
func (e ServerEventsStreamRequestValidationError) ErrorName() string
ErrorName returns error name.
func (ServerEventsStreamRequestValidationError) Field ¶
func (e ServerEventsStreamRequestValidationError) Field() string
Field function returns field value.
func (ServerEventsStreamRequestValidationError) Key ¶
func (e ServerEventsStreamRequestValidationError) Key() bool
Key function returns key value.
func (ServerEventsStreamRequestValidationError) Reason ¶
func (e ServerEventsStreamRequestValidationError) Reason() string
Reason function returns reason value.
type ServerID ¶
type ServerID struct { Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*ServerID) Descriptor
deprecated
func (*ServerID) ProtoMessage ¶
func (*ServerID) ProtoMessage()
func (*ServerID) ProtoReflect ¶ added in v0.8.4
func (x *ServerID) ProtoReflect() protoreflect.Message
type ServerIDValidationError ¶
type ServerIDValidationError struct {
// contains filtered or unexported fields
}
ServerIDValidationError is the validation error returned by ServerID.Validate if the designated constraints aren't met.
func (ServerIDValidationError) Cause ¶
func (e ServerIDValidationError) Cause() error
Cause function returns cause value.
func (ServerIDValidationError) Error ¶
func (e ServerIDValidationError) Error() string
Error satisfies the builtin error interface
func (ServerIDValidationError) ErrorName ¶
func (e ServerIDValidationError) ErrorName() string
ErrorName returns error name.
func (ServerIDValidationError) Field ¶
func (e ServerIDValidationError) Field() string
Field function returns field value.
func (ServerIDValidationError) Key ¶
func (e ServerIDValidationError) Key() bool
Key function returns key value.
func (ServerIDValidationError) Reason ¶
func (e ServerIDValidationError) Reason() string
Reason function returns reason value.
type ServerInfo ¶
type ServerInfo struct { // Id of the server. Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // Short name of the server. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // Host (ip) of the server. Host string `protobuf:"bytes,3,opt,name=host,proto3" json:"host,omitempty"` // Port of the server. Port string `protobuf:"bytes,4,opt,name=port,proto3" json:"port,omitempty"` // Platform of the server. Platform string `protobuf:"bytes,5,opt,name=platform,proto3" json:"platform,omitempty"` // Status of the server. Status ServerStatus `protobuf:"varint,6,opt,name=status,proto3,enum=mruv.server.ServerStatus" json:"status,omitempty"` // How many players are playing on the server. Players uint32 `protobuf:"varint,7,opt,name=players,proto3" json:"players,omitempty"` // contains filtered or unexported fields }
Data that describe server.
func (*ServerInfo) Descriptor
deprecated
func (*ServerInfo) Descriptor() ([]byte, []int)
Deprecated: Use ServerInfo.ProtoReflect.Descriptor instead.
func (*ServerInfo) GetHost ¶
func (x *ServerInfo) GetHost() string
func (*ServerInfo) GetId ¶
func (x *ServerInfo) GetId() uint32
func (*ServerInfo) GetName ¶
func (x *ServerInfo) GetName() string
func (*ServerInfo) GetPlatform ¶
func (x *ServerInfo) GetPlatform() string
func (*ServerInfo) GetPlayers ¶
func (x *ServerInfo) GetPlayers() uint32
func (*ServerInfo) GetPort ¶
func (x *ServerInfo) GetPort() string
func (*ServerInfo) GetStatus ¶
func (x *ServerInfo) GetStatus() ServerStatus
func (*ServerInfo) ProtoMessage ¶
func (*ServerInfo) ProtoMessage()
func (*ServerInfo) ProtoReflect ¶ added in v0.8.4
func (x *ServerInfo) ProtoReflect() protoreflect.Message
func (*ServerInfo) Reset ¶
func (x *ServerInfo) Reset()
func (*ServerInfo) String ¶
func (x *ServerInfo) String() string
func (*ServerInfo) Validate ¶
func (m *ServerInfo) Validate() error
Validate checks the field values on ServerInfo with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type ServerInfoValidationError ¶
type ServerInfoValidationError struct {
// contains filtered or unexported fields
}
ServerInfoValidationError is the validation error returned by ServerInfo.Validate if the designated constraints aren't met.
func (ServerInfoValidationError) Cause ¶
func (e ServerInfoValidationError) Cause() error
Cause function returns cause value.
func (ServerInfoValidationError) Error ¶
func (e ServerInfoValidationError) Error() string
Error satisfies the builtin error interface
func (ServerInfoValidationError) ErrorName ¶
func (e ServerInfoValidationError) ErrorName() string
ErrorName returns error name.
func (ServerInfoValidationError) Field ¶
func (e ServerInfoValidationError) Field() string
Field function returns field value.
func (ServerInfoValidationError) Key ¶
func (e ServerInfoValidationError) Key() bool
Key function returns key value.
func (ServerInfoValidationError) Reason ¶
func (e ServerInfoValidationError) Reason() string
Reason function returns reason value.
type ServerStatus ¶
type ServerStatus int32
const ( ServerStatus_UNKNOWN ServerStatus = 0 ServerStatus_ON ServerStatus = 1 ServerStatus_OFF ServerStatus = 2 )
func (ServerStatus) Descriptor ¶ added in v0.8.4
func (ServerStatus) Descriptor() protoreflect.EnumDescriptor
func (ServerStatus) Enum ¶ added in v0.8.4
func (x ServerStatus) Enum() *ServerStatus
func (ServerStatus) EnumDescriptor
deprecated
func (ServerStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use ServerStatus.Descriptor instead.
func (ServerStatus) Number ¶ added in v0.8.4
func (x ServerStatus) Number() protoreflect.EnumNumber
func (ServerStatus) String ¶
func (x ServerStatus) String() string
func (ServerStatus) Type ¶ added in v0.8.4
func (ServerStatus) Type() protoreflect.EnumType
type UnimplementedMruVServerServiceServer ¶
type UnimplementedMruVServerServiceServer struct { }
UnimplementedMruVServerServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedMruVServerServiceServer) GetRegisteredServers ¶
func (*UnimplementedMruVServerServiceServer) GetRegisteredServers(context.Context, *GetRegisteredServersRequest) (*GetRegisteredServersResponse, error)
func (*UnimplementedMruVServerServiceServer) GetServerInfo ¶
func (*UnimplementedMruVServerServiceServer) GetServerInfo(context.Context, *ServerID) (*ServerInfo, error)
func (*UnimplementedMruVServerServiceServer) RegisterServer ¶
func (*UnimplementedMruVServerServiceServer) RegisterServer(context.Context, *ServerInfo) (*ServerID, error)
func (*UnimplementedMruVServerServiceServer) ServerEventsStream ¶
func (*UnimplementedMruVServerServiceServer) ServerEventsStream(*ServerEventsStreamRequest, MruVServerService_ServerEventsStreamServer) error
func (*UnimplementedMruVServerServiceServer) UpdateServerStatus ¶
func (*UnimplementedMruVServerServiceServer) UpdateServerStatus(context.Context, *UpdateServerStatusRequest) (*UpdateServerStatusResponse, error)
type UpdateServerStatusRequest ¶
type UpdateServerStatusRequest struct { // Id of the server. Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // Status of the server. Status ServerStatus `protobuf:"varint,2,opt,name=status,proto3,enum=mruv.server.ServerStatus" json:"status,omitempty"` // How many players are registered on that server. Players uint32 `protobuf:"varint,3,opt,name=players,proto3" json:"players,omitempty"` // contains filtered or unexported fields }
Request message for `MruVServerService.UpdateServerStatus`.
func (*UpdateServerStatusRequest) Descriptor
deprecated
func (*UpdateServerStatusRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateServerStatusRequest.ProtoReflect.Descriptor instead.
func (*UpdateServerStatusRequest) GetId ¶
func (x *UpdateServerStatusRequest) GetId() uint32
func (*UpdateServerStatusRequest) GetPlayers ¶
func (x *UpdateServerStatusRequest) GetPlayers() uint32
func (*UpdateServerStatusRequest) GetStatus ¶
func (x *UpdateServerStatusRequest) GetStatus() ServerStatus
func (*UpdateServerStatusRequest) ProtoMessage ¶
func (*UpdateServerStatusRequest) ProtoMessage()
func (*UpdateServerStatusRequest) ProtoReflect ¶ added in v0.8.4
func (x *UpdateServerStatusRequest) ProtoReflect() protoreflect.Message
func (*UpdateServerStatusRequest) Reset ¶
func (x *UpdateServerStatusRequest) Reset()
func (*UpdateServerStatusRequest) String ¶
func (x *UpdateServerStatusRequest) String() string
func (*UpdateServerStatusRequest) Validate ¶
func (m *UpdateServerStatusRequest) Validate() error
Validate checks the field values on UpdateServerStatusRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type UpdateServerStatusRequestValidationError ¶
type UpdateServerStatusRequestValidationError struct {
// contains filtered or unexported fields
}
UpdateServerStatusRequestValidationError is the validation error returned by UpdateServerStatusRequest.Validate if the designated constraints aren't met.
func (UpdateServerStatusRequestValidationError) Cause ¶
func (e UpdateServerStatusRequestValidationError) Cause() error
Cause function returns cause value.
func (UpdateServerStatusRequestValidationError) Error ¶
func (e UpdateServerStatusRequestValidationError) Error() string
Error satisfies the builtin error interface
func (UpdateServerStatusRequestValidationError) ErrorName ¶
func (e UpdateServerStatusRequestValidationError) ErrorName() string
ErrorName returns error name.
func (UpdateServerStatusRequestValidationError) Field ¶
func (e UpdateServerStatusRequestValidationError) Field() string
Field function returns field value.
func (UpdateServerStatusRequestValidationError) Key ¶
func (e UpdateServerStatusRequestValidationError) Key() bool
Key function returns key value.
func (UpdateServerStatusRequestValidationError) Reason ¶
func (e UpdateServerStatusRequestValidationError) Reason() string
Reason function returns reason value.
type UpdateServerStatusResponse ¶
type UpdateServerStatusResponse struct {
// contains filtered or unexported fields
}
Response message for `MruVServerService.UpdateServerStatus`.
func (*UpdateServerStatusResponse) Descriptor
deprecated
func (*UpdateServerStatusResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateServerStatusResponse.ProtoReflect.Descriptor instead.
func (*UpdateServerStatusResponse) ProtoMessage ¶
func (*UpdateServerStatusResponse) ProtoMessage()
func (*UpdateServerStatusResponse) ProtoReflect ¶ added in v0.8.4
func (x *UpdateServerStatusResponse) ProtoReflect() protoreflect.Message
func (*UpdateServerStatusResponse) Reset ¶
func (x *UpdateServerStatusResponse) Reset()
func (*UpdateServerStatusResponse) String ¶
func (x *UpdateServerStatusResponse) String() string
func (*UpdateServerStatusResponse) Validate ¶
func (m *UpdateServerStatusResponse) Validate() error
Validate checks the field values on UpdateServerStatusResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type UpdateServerStatusResponseValidationError ¶
type UpdateServerStatusResponseValidationError struct {
// contains filtered or unexported fields
}
UpdateServerStatusResponseValidationError is the validation error returned by UpdateServerStatusResponse.Validate if the designated constraints aren't met.
func (UpdateServerStatusResponseValidationError) Cause ¶
func (e UpdateServerStatusResponseValidationError) Cause() error
Cause function returns cause value.
func (UpdateServerStatusResponseValidationError) Error ¶
func (e UpdateServerStatusResponseValidationError) Error() string
Error satisfies the builtin error interface
func (UpdateServerStatusResponseValidationError) ErrorName ¶
func (e UpdateServerStatusResponseValidationError) ErrorName() string
ErrorName returns error name.
func (UpdateServerStatusResponseValidationError) Field ¶
func (e UpdateServerStatusResponseValidationError) Field() string
Field function returns field value.
func (UpdateServerStatusResponseValidationError) Key ¶
func (e UpdateServerStatusResponseValidationError) Key() bool
Key function returns key value.
func (UpdateServerStatusResponseValidationError) Reason ¶
func (e UpdateServerStatusResponseValidationError) Reason() string
Reason function returns reason value.