minecraft

package
v0.27.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2022 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_minecraft_proto protoreflect.FileDescriptor

Functions

func NewMinecraftEndpoints

func NewMinecraftEndpoints() []*api.Endpoint

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL