Categorygithub.com/letsu/go-ts3
modulepackage
1.0.0
Repository: https://github.com/letsu/go-ts3.git
Documentation: pkg.go.dev

# README

TeamSpeak 3 Go Report Card License GoDoc Build Status

go-ts3 is a Go client for the TeamSpeak 3 ServerQuery Protocol.

Features

Installation

go get -u github.com/multiplay/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/multiplay/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)
	}
}

Documentation

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.
Decode returns a decoded version of str.
DecodeResponse decodes a response into a struct.
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.
ScanLines is a split function for a bytes.Scanner that returns each line of text, stripped of any trailing end-of-line marker.
Timeout sets read / write / dial timeout for a TeamSpeak 3 Client.

# Constants

DefaultPort is the default TeamSpeak 3 ServerQuery port.
ExtendedServerList can be passed to List to get extended server information.
MaxParseTokenSize is the maximum buffer size used to parse the server responses.

# Variables

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.

# 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.
OnlineClient represents a client online on a virtual server.
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.
Version represents version information.

# Interfaces

CmdArg is implemented by types which can be used as a command argument.