controllers

package
v0.0.0-...-9141f0b Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ts3Client

type Ts3Client struct {
	Config     *configs.Config
	Logger     *slog.Logger
	HttpClient *http.Client
}

func NewTs3Client

func NewTs3Client(config *configs.Config, logger *slog.Logger) *Ts3Client

func (*Ts3Client) ClientListWithTimes

func (t *Ts3Client) ClientListWithTimes(ctx context.Context) Ts3ClientListResponseWithTimes

func (*Ts3Client) MoveClient

func (t *Ts3Client) MoveClient(ctx context.Context, clid int, cid int) bool

func (*Ts3Client) SendGM

func (t *Ts3Client) SendGM(ctx context.Context, message string) bool

type Ts3ClientListResponseWithTimes

type Ts3ClientListResponseWithTimes struct {
	Body []struct {
		Cid                 string `json:"cid"`
		Clid                string `json:"clid"`
		ClientCreated       string `json:"client_created"`
		ClientDatabaseId    string `json:"client_database_id"`
		ClientIdleTime      string `json:"client_idle_time"`
		ClientLastconnected string `json:"client_lastconnected"`
		ClientNickname      string `json:"client_nickname"`
		ClientType          string `json:"client_type"`
	} `json:"body"`
	Ts3ResponseStatus
}

type Ts3ResponseStatus

type Ts3ResponseStatus struct {
	Status struct {
		Code    int    `json:"code"`
		Message string `json:"message"`
	} `json:"status"`
}

Jump to

Keyboard shortcuts

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