Versions in this module Expand all Collapse all v0 v0.4.1 Jul 10, 2023 v0.4.0 Aug 12, 2022 v0.3.7 May 13, 2022 Changes in this version type Api + Options *Options v0.3.6 May 13, 2022 Changes in this version + var ForbiddenError = errors.New("forbidden (blocked by CloudFlare)") v0.3.5 May 12, 2022 v0.3.4 May 3, 2022 v0.3.3 Apr 19, 2022 v0.3.2 Apr 19, 2022 v0.3.1 Apr 8, 2022 v0.3.0 Apr 5, 2022 Changes in this version type Websocket + func (w *Websocket) IsConnected() bool v0.2.1 Jan 14, 2022 v0.2.0 Jan 14, 2022 v0.1.0 Jan 14, 2022 Changes in this version type Queue + Count int + Jointime int + Minutes int + Percentage int + Position int + Status string + Time string + type QueueReduction struct + MaxTime int + Number int + Total int v0.0.1 Jan 13, 2022 Changes in this version + var InterruptSignal chan os.Signal + var ServerAlreadyStartedError = errors.New("server already started") + var ServerAlreadyStoppedError = errors.New("server already stopped") + var UnauthenticatedError = errors.New("unauthenticated") + type Api struct + func New(options *Options) *Api + func (api *Api) ConfirmServer(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 + 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 struct{ ... } + 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) Send(message WebsocketMessage) error + func (w *Websocket) SendHeartBeat() error + func (w *Websocket) SendHearthBeats(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