Documentation ¶
Index ¶
- Constants
- Variables
- func BasicQuery(ctx context.Context, host string, port uint16, options ...options.Query) (*response.BasicQuery, error)
- func FullQuery(ctx context.Context, host string, port uint16, options ...options.Query) (*response.FullQuery, error)
- func LookupSRV(protocol, host string) (*net.SRV, error)
- func ParseAddress(address string, defaultPort uint16) (string, uint16, error)
- func SendVote(ctx context.Context, host string, port uint16, opts options.Vote) error
- func Status(ctx context.Context, host string, port uint16, options ...options.JavaStatus) (*response.JavaStatus, error)
- func StatusBedrock(ctx context.Context, host string, port uint16, ...) (*response.BedrockStatus, error)
- func StatusLegacy(ctx context.Context, host string, port uint16, ...) (*response.JavaStatusLegacy, error)
- func StatusRaw(ctx context.Context, host string, port uint16, options ...options.JavaStatus) (map[string]interface{}, error)
Constants ¶
View Source
const ( DefaultJavaPort = 25565 DefaultBedrockPort = 19132 )
Variables ¶
View Source
var ( // ErrPublicKeyRequired means that the server is using Votifier 1 but the PublicKey option is missing ErrPublicKeyRequired = errors.New("vote: PublicKey is a required option but the value is empty") // ErrInvalidPublicKey means the public key provided cannot be parsed ErrInvalidPublicKey = errors.New("vote: invalid public key value") // ErrPublicKeyRequired means that the server is using Votifier 2 but the Token option is missing ErrTokenRequired = errors.New("vote: Token is a required option but the value is empty") )
View Source
var ( // ErrVarIntTooBig means the varint received from the server is too big ErrVarIntTooBig = errors.New("varint: varint is too big") )
Functions ¶
func BasicQuery ¶
func BasicQuery(ctx context.Context, host string, port uint16, options ...options.Query) (*response.BasicQuery, error)
BasicQuery runs a query on the server and returns basic information
func FullQuery ¶
func FullQuery(ctx context.Context, host string, port uint16, options ...options.Query) (*response.FullQuery, error)
FullQuery runs a query on the server and returns the full information
func ParseAddress ¶
ParseAddress parses the host and port out of an address string
func Status ¶
func Status(ctx context.Context, host string, port uint16, options ...options.JavaStatus) (*response.JavaStatus, error)
Status retrieves the status of any 1.7+ Minecraft server
func StatusBedrock ¶
func StatusBedrock(ctx context.Context, host string, port uint16, options ...options.BedrockStatus) (*response.BedrockStatus, error)
StatusBedrock retrieves the status of a Bedrock Minecraft server
func StatusLegacy ¶
func StatusLegacy(ctx context.Context, host string, port uint16, options ...options.JavaStatusLegacy) (*response.JavaStatusLegacy, error)
StatusLegacy retrieves the status of any Java Edition Minecraft server, but with reduced properties compared to Status()
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.