Documentation
¶
Index ¶
- Variables
- func BasicQuery(host string, port uint16, options ...QueryOptions) (*basicQueryResponse, error)
- func FullQuery(host string, port uint16, options ...QueryOptions) (*fullQueryResponse, error)
- func NewRCON() *rcon
- func ParseAddress(address string, defaultPort uint16) (string, uint16, error)
- func SendVote(host string, port uint16, options VoteOptions) error
- func Status(host string, port uint16, options ...JavaStatusOptions) (*javaStatusResponse, error)
- func StatusBedrock(host string, port uint16, options ...BedrockStatusOptions) (*bedrockStatusResponse, error)
- func StatusLegacy(host string, port uint16, options ...JavaStatusLegacyOptions) (*javaStatusLegacyResponse, error)
- type BedrockStatusOptions
- type JavaStatusLegacyOptions
- type JavaStatusOptions
- type QueryOptions
- type RCONOptions
- type VoteOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUnexpectedResponse means the server sent an unexpected response to the client ErrUnexpectedResponse = errors.New("received an unexpected response from the server") // ErrVarIntTooBig means the server sent a varint which was beyond the protocol size of a varint ErrVarIntTooBig = errors.New("size of VarInt exceeds maximum data size") // ErrNotConnected means the client attempted to send data but there was no connection to the server ErrNotConnected = errors.New("client attempted to send data but connection is non-existent") // ErrAlreadyLoggedIn means the RCON client was already logged in after a second login attempt was made ErrAlreadyLoggedIn = errors.New("RCON client is already logged in after a second login attempt was made") // ErrInvalidPassword means the password used in the RCON loggin was incorrect ErrInvalidPassword = errors.New("incorrect RCON password") // ErrNotLoggedIn means the client attempted to execute a command before a login was successful ErrNotLoggedIn = errors.New("RCON client attempted to send message before successful login") // ErrDecodeUTF16OddLength means a UTF-16 was attempted to be decoded from a byte array that was an odd length ErrDecodeUTF16OddLength = errors.New("attempted to decode UTF-16 byte array with an odd length") )
Functions ¶
func BasicQuery ¶
func BasicQuery(host string, port uint16, options ...QueryOptions) (*basicQueryResponse, error)
BasicQuery runs a query on the server and returns basic information
func FullQuery ¶
func FullQuery(host string, port uint16, options ...QueryOptions) (*fullQueryResponse, 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 SendVote ¶
func SendVote(host string, port uint16, options VoteOptions) error
SendVote sends a Votifier vote to the specified Minecraft server
func Status ¶
func Status(host string, port uint16, options ...JavaStatusOptions) (*javaStatusResponse, error)
Status retrieves the status of any Minecraft server
func StatusBedrock ¶
func StatusBedrock(host string, port uint16, options ...BedrockStatusOptions) (*bedrockStatusResponse, error)
StatusBedrock retrieves the status of a Bedrock Minecraft server
func StatusLegacy ¶
func StatusLegacy(host string, port uint16, options ...JavaStatusLegacyOptions) (*javaStatusLegacyResponse, error)
Types ¶
type BedrockStatusOptions ¶
type JavaStatusLegacyOptions ¶
type JavaStatusOptions ¶
type QueryOptions ¶
type RCONOptions ¶
Click to show internal directories.
Click to hide internal directories.