Versions in this module Expand all Collapse all v0 v0.0.3 Jul 10, 2023 v0.0.2 Jul 10, 2023 Changes in this version + var ForbiddenError = errors.New("forbidden (blocked by CloudFlare)") + var ServerAlreadyStartedError = errors.New("server already started") + var ServerAlreadyStoppedError = errors.New("server already stopped") + var UnauthenticatedError = errors.New("unauthenticated (invalid account)") + type Api struct + Options *Options + func New(options *Options) *Api + func (api *Api) ConfirmServer(ctx context.Context, delay time.Duration) error + func (api *Api) ConnectWebSocket() (*Websocket, error) + func (api *Api) GetCookies() []*http.Cookie + func (api *Api) GetServerInfo() (ServerInfo, error) + func (api *Api) StartServer() error + func (api *Api) StopServer() error + type BackupProgress struct + Action string + Auto bool + Done bool + Id string + Progress int + type Data struct + Content string + ContentBytes []byte + func (d *Data) MarshalJSON() ([]byte, error) + func (d *Data) UnmarshalJSON(data []byte) error + type Heap struct + Usage int + type Options struct + Cookies []*http.Cookie + InsecureSkipVerify bool + Proxy *url.URL + type Queue struct + Count int + Jointime int + Minutes int + Number int + Percentage float32 + Position int + Status string + Time string + type QueueReduction struct + MaxTime int + Number int + Total int + type ServerInfo struct + Address string + Brand string + Countdown int + DNS struct{ ... } + DynIP string + HeadStarts int + Host string + IP string + Icon string + Id string + IsBedrock bool + IsDeprecated bool + LastChanged int + MOTD string + MaxPlayers int + Message struct{ ... } + Name string + PlayerList []string + Players int + Port int + Problems int + Queue Queue + RAM int + Software string + SoftwareId string + SoftwareType string + Status ServerStatus + StatusLabel string + StatusLabelClass string + StatusLabelFormatted string + Version string + type ServerStatus int + const Loading + const Offline + const Online + const Preparing + const Saving + const Starting + const Stopping + type Tick struct + AverageTickTime float32 + type Websocket struct + Message chan WebsocketMessage + func (w *Websocket) Close() error + func (w *Websocket) IsConnected() bool + func (w *Websocket) Send(message WebsocketMessage) error + func (w *Websocket) SendHeartBeat() error + func (w *Websocket) SendHearthBeats(ctx context.Context, duration ...time.Duration) + func (w *Websocket) StartConsoleLogStream() error + func (w *Websocket) StartHeapInfoStream() error + func (w *Websocket) StartTickStream() error + func (w *Websocket) StopConsoleLogStream() error + func (w *Websocket) StopHeapInfoStream() error + func (w *Websocket) StopTickStream() error + type WebsocketMessage struct + Console string + Data Data + Message string + MessageBytes []byte + Stream string + Type string