# README
TeamSpeak 3

go-ts3 is a Go client for the TeamSpeak 3 ServerQuery Protocol.
Features
- ServerQuery Support.
Installation
go get -u github.com/honeybbq/go-ts3
Examples
Using go-ts3 is simple just create a client, login and then send commands e.g.
package main
import (
"log"
"github.com/honeybbq/go-ts3"
)
func main() {
c, err := ts3.NewClient("192.168.1.102:10011")
if err != nil {
log.Fatal(err)
}
defer c.Close()
if err := c.Login(user, pass); err != nil {
log.Fatal(err)
}
if v, err := c.Version(); err != nil {
log.Fatal(err)
} else {
log.Println("server is running:", v)
}
}
License
go-ts3 is available under the BSD 2-Clause License.
# Functions
Buffer sets the initial buffer used to parse responses from the server and the maximum size of buffer that may be allocated.
ConnectHeader sets the header expected on connect.
Decode returns a decoded version of str.
DecodeResponse decodes a response into a struct.
KeepAlive sets the keepAlive interval.
NewArg returns a new Arg with key val.
NewArgGroup returns a new ArgGroup.
NewArgSet returns a new ArgSet.
NewClient returns a new TeamSpeak 3 client connected to addr.
NewCmd creates a new Cmd.
NewError returns a new Error parsed from TeamSpeak 3 server response.
NewInvalidResponseError returns a new InvalidResponseError from lines.
NotificationBuffer sets the notification buffer size.
ScanLines is a split function for a bytes.Scanner that returns each line of text, stripped of any trailing end-of-line marker.
SSH tells the client to use SSH instead of insecure legacy TCP.
Timeout sets read / write / dial timeout for a TeamSpeak 3 Client.
# Constants
ChannelEvents registers the following events: `cliententerview`, `clientleftview`, `channeldescriptionchanged`, `channelpasswordchanged` `channelmoved`, `channeledited`, `channelcreated`, `channeldeleted`, `clientmoved`.
ClientAway can be passed to ClientList to retrieve client away information.
ClientBadges can be passed to ClientList to retrieve client badge information.
ClientCountry can be passed to ClientList to retrieve client country information.
Properties that can be changed with ClientUpdate.
ClientGroups can be passed to ClientList to retrieve client groups information.
ClientIcon can be passed to ClientList to retrieve client icon information.
Properties that can be changed with ClientUpdate.
ClientInfo can be passed to ClientList to retrieve client information.
ClientIP can be passed to ClientList to retrieve client IP information.
Properties that can be changed with ClientUpdate.
Properties that can be changed with ClientUpdate.
ClientListFull can be passed to ClientList to get all extended client information.
Properties that can be changed with ClientUpdate.
ClientTimes can be passed to ClientList to retrieve client time information.
ClientUID can be passed to ClientList to retrieve client UID information.
ClientVoice can be passed to ClientList to retrieve client voice information.
DefaultConnectHeader send by server on connect.
DefaultPort is the default TeamSpeak 3 ServerQuery port.
DefaultSSHPort is the default TeamSpeak 3 ServerQuery SSH port.
ExtendedServerList can be passed to List to get extended server information.
MaxParseTokenSize is the maximum buffer size used to parse the server responses.
ServerEvents registers the following events: `cliententerview`, `clientleftview`, `serveredited`.
TextChannelEvents registers the `textmessage` event with `targetmode = 2`.
TextPrivateEvents registers the `textmessage` event with `targetmode = 1`.
TextServerEvents registers the `textmessage` event with `targetmode = 3`.
TokenUsedEvents registers the `tokenused` event.
# Variables
DefaultKeepAlive is the default interval in which keepalive data is sent.
DefaultNotifyBufSize is the default notification buffer size.
DefaultTimeout is the default read / write / dial timeout for Clients.
ErrInvalidConnectHeader is returned by NewClient if the server doesn't respond with the required connection header.
ErrNilOption is returned by NewClient if an option is nil.
ErrNotConnected is returned by Exec and ExecCmd if the client is not connected.
ErrTimeout is returned by Exec and ExecCmd if no response is received within the specified timeout duration.
# Structs
Arg represents a TeamSpeak 3 ServerQuery command argument.
ArgGroup represents a group of TeamSpeak 3 ServerQuery command arguments.
ArgSet represents a set of TeamSpeak 3 ServerQuery command arguments.
Channel represents a TeamSpeak 3 channel in a virtual server.
Client is a TeamSpeak 3 ServerQuery client.
Cmd represents a TeamSpeak 3 ServerQuery command.
ConnectionInfo represents an answer of the whoami command.
CreatedServer is the details returned by a server create.
DBClient represents a client identity on a virtual server.
Error represents a error returned from the TeamSpeak 3 server.
Group represents a virtual server group.
Instance represents basic information for a TeamSpeak 3 instance.
InvalidResponseError is the error returned when the response data was invalid.
Notification contains the information of a notify event.
OnlineClient represents a client online on a virtual server.
OnlineClientExt represents all ClientList extensions.
OnlineClientGroups represents all ClientList extensions when the ClientGroups parameter is passed.
OnlineClientInfo represents all ClientList extensions when the ClientInfo parameter is passed.
OnlineClientTimes represents all ClientList extensions when the ClientTimes parameter is passed.
OnlineClientVoice represents all ClientList extensions when the ClientVoice parameter is passed.
PrivilegeKey represents a server privilege key.
Server represents a TeamSpeak 3 virtual server.
ServerConnectionInfo represents the connection info for a TeamSpeak 3 instance.
ServerMethods groups server methods.
No description provided by the author
Version represents version information.
# Interfaces
CmdArg is implemented by types which can be used as a command argument.
Connection is a connection to a TeamSpeak 3 server.
# Type aliases
NotifyCategory is an event category.