web

package
v0.0.0-...-72177e3 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InfoErrRunnerPrepare entity.InfoCode = iota + 100 // 100
	InfoErrRunnerStop                                 // 101
	InfoErrDNS                                        // 102
)
View Source
const (
	EvStopped      entity.EventCode = iota + 100 // 100
	EvCreateRunner                               // 101
	EvWaitConn                                   // 102
	EvConnLost                                   // 103
	EvStopRunner                                 // 104
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BackupGeneration

type BackupGeneration struct {
	Gen       string `json:"gen"`
	ID        string `json:"id"`
	Timestamp int    `json:"timestamp"`
}

type ErrorCode

type ErrorCode int
const (
	ErrBadRequest       ErrorCode = iota + 1 // 1
	ErrInternal                              // 2
	ErrCredential                            // 3
	ErrServerRunning                         // 4
	ErrServerNotRunning                      // 5
	ErrRemote                                // 6
	ErrInvalidConfig                         // 7
	ErrPasswordRule                          // 8
	ErrDupUserName                           // 9
	ErrRequiresAuth                          // 10
	ErrBackup                                // 11
)

type ErrorResponse

type ErrorResponse struct {
	Success   bool      `json:"success"`
	ErrorCode ErrorCode `json:"errorCode"`
}

type InfoMessage

type InfoMessage struct {
	InfoCode entity.InfoCode `json:"infoCode"`
	IsError  bool            `json:"isError"`
}

type MCVersion

type MCVersion struct {
	Name        string `json:"name"`
	IsStable    bool   `json:"isStable"`
	Channel     string `json:"channel"`
	ReleaseDate string `json:"releaseDate"`
}

type PageCode

type PageCode int
const (
	PageLaunch  PageCode = iota + 1 // 1
	PageLoading                     // 2
	PageRunning                     // 3
)

type PasswordCredential

type PasswordCredential struct {
	UserName string `json:"userName"`
	Password string `json:"password"`
}

type SessionData

type SessionData struct {
	LoggedIn bool   `json:"loggedIn"`
	UserName string `json:"userName"`
}

type SessionState

type SessionState struct {
	NeedsChangePassword bool `json:"needsChangePassword"`
}

type StandardMessage

type StandardMessage struct {
	EventCode entity.EventCode `json:"eventCode"`
	Progress  int              `json:"progress"`
	PageCode  PageCode         `json:"pageCode"`
}

type SuccessfulResponse

type SuccessfulResponse[T any] struct {
	Success bool `json:"success"`
	Data    T    `json:"data"`
}

type SysstatMessage

type SysstatMessage struct {
	CPUUsage float64 `json:"cpuUsage"`
	Time     int64   `json:"time"`
}

type SystemInfo

type SystemInfo struct {
	PremisesVersion string `json:"premisesVersion"`
	HostOS          string `json:"hostOs"`
}

type UpdatePassword

type UpdatePassword struct {
	Password    string `json:"password"`
	NewPassword string `json:"newPassword"`
}

type WorldBackup

type WorldBackup struct {
	WorldName   string             `json:"worldName"`
	Generations []BackupGeneration `json:"generations"`
}

type WorldInfo

type WorldInfo struct {
	Version   string `json:"version"`
	WorldName string `json:"worldName"`
	Seed      string `json:"seed"`
}

Jump to

Keyboard shortcuts

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