modulepackage
1.2.3
Repository: https://github.com/southclaws/go-samp-query.git
Documentation: pkg.go.dev
# README
go-samp-query
Implements the SA:MP query mechanism for getting data about a running server.
See GoDoc for full documentation
Examples
Most of the time, you'll only need one function:
server, err := GetServerInfo(ctx, "192.168.1.1", true)
if err != nil {
// handle
}
The attemptDecode
parameter determines whether or not the library should
attempt to guess the encoding of the text fields such as hostname etc.
If you want to get specific data about a server, you can create a query and selectively query for data:
query, err := NewLegacyQuery(host)
if err != nil {
// handle
}
defer query.Close()
rules, err := query.GetRules(ctx)
if err != nil {
return
}
# Packages
No description provided by the author
# Functions
GetServerInfo wraps a set of queries and returns a new Server object with the available fields populated.
NewQuery creates a new query handler for a server.
# Type aliases
QueryType represents a query method from the SA:MP set: i, r, c, d, x, p.