Documentation
¶
Index ¶
- Variables
- func NewMinecraftEndpoints() []*api.Endpoint
- func RegisterMinecraftHandler(s server.Server, hdlr MinecraftHandler, opts ...server.HandlerOption) error
- type MinecraftHandler
- type MinecraftService
- type PingRequest
- type PingResponse
- func (*PingResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PingResponse) GetFavicon() string
- func (x *PingResponse) GetLatency() uint32
- func (x *PingResponse) GetMaxPlayers() int32
- func (x *PingResponse) GetMotd() string
- func (x *PingResponse) GetPlayers() int32
- func (x *PingResponse) GetProtocol() int32
- func (x *PingResponse) GetSample() []*PlayerSample
- func (x *PingResponse) GetVersion() string
- func (*PingResponse) ProtoMessage()
- func (x *PingResponse) ProtoReflect() protoreflect.Message
- func (x *PingResponse) Reset()
- func (x *PingResponse) String() string
- type PlayerSample
- func (*PlayerSample) Descriptor() ([]byte, []int)deprecated
- func (x *PlayerSample) GetName() string
- func (x *PlayerSample) GetUuid() string
- func (*PlayerSample) ProtoMessage()
- func (x *PlayerSample) ProtoReflect() protoreflect.Message
- func (x *PlayerSample) Reset()
- func (x *PlayerSample) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_proto_minecraft_proto protoreflect.FileDescriptor
Functions ¶
func NewMinecraftEndpoints ¶
func RegisterMinecraftHandler ¶
func RegisterMinecraftHandler(s server.Server, hdlr MinecraftHandler, opts ...server.HandlerOption) error
Types ¶
type MinecraftHandler ¶
type MinecraftHandler interface {
Ping(context.Context, *PingRequest, *PingResponse) error
}
type MinecraftService ¶
type MinecraftService interface {
Ping(ctx context.Context, in *PingRequest, opts ...client.CallOption) (*PingResponse, error)
}
func NewMinecraftService ¶
func NewMinecraftService(name string, c client.Client) MinecraftService
type PingRequest ¶
type PingRequest struct { // address of the server Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // contains filtered or unexported fields }
Ping a minecraft server
func (*PingRequest) Descriptor
deprecated
func (*PingRequest) Descriptor() ([]byte, []int)
Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.
func (*PingRequest) GetAddress ¶
func (x *PingRequest) GetAddress() string
func (*PingRequest) ProtoMessage ¶
func (*PingRequest) ProtoMessage()
func (*PingRequest) ProtoReflect ¶
func (x *PingRequest) ProtoReflect() protoreflect.Message
func (*PingRequest) Reset ¶
func (x *PingRequest) Reset()
func (*PingRequest) String ¶
func (x *PingRequest) String() string
type PingResponse ¶
type PingResponse struct { // Latency (ms) between us and the server (EU) Latency uint32 `protobuf:"varint,1,opt,name=latency,proto3" json:"latency,omitempty"` // Number of players online Players int32 `protobuf:"varint,2,opt,name=players,proto3" json:"players,omitempty"` // Max players ever MaxPlayers int32 `protobuf:"varint,3,opt,name=max_players,json=maxPlayers,proto3" json:"max_players,omitempty"` // Protocol number of the server Protocol int32 `protobuf:"varint,4,opt,name=protocol,proto3" json:"protocol,omitempty"` // Favicon in base64 Favicon string `protobuf:"bytes,5,opt,name=favicon,proto3" json:"favicon,omitempty"` // Message of the day Motd string `protobuf:"bytes,6,opt,name=motd,proto3" json:"motd,omitempty"` // Version of the server Version string `protobuf:"bytes,7,opt,name=version,proto3" json:"version,omitempty"` // List of connected players Sample []*PlayerSample `protobuf:"bytes,8,rep,name=sample,proto3" json:"sample,omitempty"` // contains filtered or unexported fields }
func (*PingResponse) Descriptor
deprecated
func (*PingResponse) Descriptor() ([]byte, []int)
Deprecated: Use PingResponse.ProtoReflect.Descriptor instead.
func (*PingResponse) GetFavicon ¶
func (x *PingResponse) GetFavicon() string
func (*PingResponse) GetLatency ¶
func (x *PingResponse) GetLatency() uint32
func (*PingResponse) GetMaxPlayers ¶
func (x *PingResponse) GetMaxPlayers() int32
func (*PingResponse) GetMotd ¶
func (x *PingResponse) GetMotd() string
func (*PingResponse) GetPlayers ¶
func (x *PingResponse) GetPlayers() int32
func (*PingResponse) GetProtocol ¶
func (x *PingResponse) GetProtocol() int32
func (*PingResponse) GetSample ¶
func (x *PingResponse) GetSample() []*PlayerSample
func (*PingResponse) GetVersion ¶
func (x *PingResponse) GetVersion() string
func (*PingResponse) ProtoMessage ¶
func (*PingResponse) ProtoMessage()
func (*PingResponse) ProtoReflect ¶
func (x *PingResponse) ProtoReflect() protoreflect.Message
func (*PingResponse) Reset ¶
func (x *PingResponse) Reset()
func (*PingResponse) String ¶
func (x *PingResponse) String() string
type PlayerSample ¶
type PlayerSample struct { // unique id of player Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // name of the player Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*PlayerSample) Descriptor
deprecated
func (*PlayerSample) Descriptor() ([]byte, []int)
Deprecated: Use PlayerSample.ProtoReflect.Descriptor instead.
func (*PlayerSample) GetName ¶
func (x *PlayerSample) GetName() string
func (*PlayerSample) GetUuid ¶
func (x *PlayerSample) GetUuid() string
func (*PlayerSample) ProtoMessage ¶
func (*PlayerSample) ProtoMessage()
func (*PlayerSample) ProtoReflect ¶
func (x *PlayerSample) ProtoReflect() protoreflect.Message
func (*PlayerSample) Reset ¶
func (x *PlayerSample) Reset()
func (*PlayerSample) String ¶
func (x *PlayerSample) String() string
Click to show internal directories.
Click to hide internal directories.