web

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolP

func BoolP(b bool) *bool

func IntP

func IntP(i int) *int

func StringP

func StringP(s string) *string

Types

type ConfigAndValidity

type ConfigAndValidity struct {
	IsValid bool          `json:"isValid"`
	Config  PendingConfig `json:"config"`
}

type CreateConfigReq

type CreateConfigReq struct {
	ConfigShareId *string `json:"configShareId"`
}

type CreateWorldDownloadURLRequest

type CreateWorldDownloadURLRequest struct {
	WorldID string `json:"worldId"`
}

type CreateWorldDownloadURLResponse

type CreateWorldDownloadURLResponse struct {
	URL string `json:"url"`
}

type CreateWorldLinkReq

type CreateWorldLinkReq struct {
	ID string `json:"id"`
}

type CreateWorldUploadLinkReq

type CreateWorldUploadLinkReq struct {
	WorldName string `json:"worldName"`
	MimeType  string `json:"mimeType"`
}

type CreateWorldUploadURLRequest

type CreateWorldUploadURLRequest struct {
	WorldName string `json:"worldName"`
}

type CreateWorldUploadURLResponse

type CreateWorldUploadURLResponse struct {
	URL     string `json:"url"`
	WorldID string `json:"worldId"`
}

type DelegatedURL

type DelegatedURL struct {
	URL string `json:"url"`
}

type DeleteWorldReq added in v0.3.0

type DeleteWorldReq struct {
	ID string `json:"id"`
}

type ErrorResponse

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

type GenericResponse

type GenericResponse struct {
	Success   bool             `json:"success"`
	ErrorCode entity.ErrorCode `json:"errorCode"`
	Data      json.RawMessage  `json:"data"`
}

type GetLatestWorldIDResponse

type GetLatestWorldIDResponse struct {
	WorldID string `json:"worldId"`
}

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 = 1
	PageLoading     PageCode = 2
	PageRunning     PageCode = 3
	PageManualSetup PageCode = 4
)

type PasswordCredential

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

type PendingConfig

type PendingConfig struct {
	MachineType        *string            `json:"machineType,omitempty"`
	ServerVersion      *string            `json:"serverVersion,omitempty"`
	GuessVersion       *bool              `json:"guessServerVersion,omitempty"`
	WorldSource        *string            `json:"worldSource,omitempty"`
	WorldName          *string            `json:"worldName,omitempty"`
	BackupGen          *string            `json:"backupGen,omitempty"`
	LevelType          *string            `json:"levelType,omitempty"`
	Seed               *string            `json:"seed,omitempty"`
	Motd               *string            `json:"motd,omitempty"`
	ServerPropOverride *map[string]string `json:"serverPropOverride,omitempty"`
	InactiveTimeout    *int               `json:"inactiveTimeout,omitempty"`
}

type SessionData

type SessionData struct {
	LoggedIn    bool   `json:"loggedIn"`
	AccessToken string `json:"accessToken"`
}

type SessionState

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

type SnapshotConfiguration

type SnapshotConfiguration struct {
	Slot int `json:"slot"`
}

type StandardMessage

type StandardMessage struct {
	EventCode entity.EventCode `json:"eventCode"`
	PageCode  PageCode         `json:"pageCode"`
	Extra     struct {
		Progress int    `json:"progress"`
		TextData string `json:"textData"`
	} `json:"extra"`
}

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"`
	IPAddress       *string `json:"ipAddr"`
}

type UpdatePassword

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

type World

type World struct {
	WorldName   string            `json:"worldName"`
	Generations []WorldGeneration `json:"generations"`
}

type WorldGeneration

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

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