sshquery

package
v0.1.0-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SSHQuery

type SSHQuery struct {
	Host     string
	Port     int
	Username string
	Password string
	// contains filtered or unexported fields
}

SSHQuery uses ssh to connect to teamspeak

func NewSSHQuery

func NewSSHQuery(host string, port int, username, password string) (*SSHQuery, error)

NewSSHQuery opens a new ssh connection to the host and starts a session for communicating with teamspeak

func (*SSHQuery) Close

func (sq *SSHQuery) Close()

Close the ssh connection to teamspeak

func (*SSHQuery) Connected

func (sq *SSHQuery) Connected() (bool, error)

Connected sends the version command and returns the recieved error, if any

func (*SSHQuery) Do

func (sq *SSHQuery) Do(request libts.Request, value interface{}) error

Do tries to unmarshal the response from teamspeak to value

func (*SSHQuery) DoRaw

func (sq *SSHQuery) DoRaw(request libts.Request) ([]byte, error)

DoRaw returns the raw response from teamspeak

func (*SSHQuery) Notification

func (sq *SSHQuery) Notification() <-chan []byte

Notification returns an io.Reader for arriving events

func (*SSHQuery) Use

func (sq *SSHQuery) Use(sid int) error

Use selects a virtual server for the client

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL