api

package
v0.0.0-...-31a7ca1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package api provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen/v2 version v2.1.0 DO NOT EDIT.

Index

Constants

View Source
const (
	APIKeyAuthScopes = "APIKeyAuth.Scopes"
)

Variables

This section is empty.

Functions

func Handler

func Handler(si ServerInterface) http.Handler

Handler creates http.Handler with routing matching OpenAPI spec.

func HandlerFromMux

func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler

HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.

func HandlerFromMuxWithBaseURL

func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler

func HandlerWithOptions

func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler

HandlerWithOptions creates http.Handler with additional options

Types

type Allowlist

type Allowlist = []PlayerInfo

Allowlist defines model for Allowlist.

type AllowlistRequest

type AllowlistRequest = Allowlist

AllowlistRequest defines model for AllowlistRequest.

type AllowlistResponse

type AllowlistResponse = Allowlist

AllowlistResponse defines model for AllowlistResponse.

type BannedIP

type BannedIP struct {
	Created string `json:"created"`
	Expires string `json:"expires"`
	Ip      string `json:"ip"`
	Reason  string `json:"reason"`
	Source  string `json:"source"`
}

BannedIP defines model for BannedIP.

type BannedIPList

type BannedIPList = []BannedIP

BannedIPList defines model for BannedIPList.

type BannedIPListRequest

type BannedIPListRequest = BannedIPList

BannedIPListRequest defines model for BannedIPListRequest.

type BannedIPListResponse

type BannedIPListResponse = BannedIPList

BannedIPListResponse defines model for BannedIPListResponse.

type BannedIPRequest

type BannedIPRequest = BannedIP

BannedIPRequest defines model for BannedIPRequest.

type BannedPlayer

type BannedPlayer struct {
	Created string             `json:"created"`
	Expires string             `json:"expires"`
	Name    *string            `json:"name,omitempty"`
	Reason  string             `json:"reason"`
	Source  string             `json:"source"`
	Uuid    openapi_types.UUID `json:"uuid"`
}

BannedPlayer defines model for BannedPlayer.

type BannedPlayerList

type BannedPlayerList = []BannedPlayer

BannedPlayerList defines model for BannedPlayerList.

type BannedPlayerListRequest

type BannedPlayerListRequest = BannedPlayerList

BannedPlayerListRequest defines model for BannedPlayerListRequest.

type BannedPlayerListResponse

type BannedPlayerListResponse = BannedPlayerList

BannedPlayerListResponse defines model for BannedPlayerListResponse.

type BannedPlayerRequest

type BannedPlayerRequest = BannedPlayer

BannedPlayerRequest defines model for BannedPlayerRequest.

type ChiServerOptions

type ChiServerOptions struct {
	BaseURL          string
	BaseRouter       chi.Router
	Middlewares      []MiddlewareFunc
	ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type InvalidParamFormatError

type InvalidParamFormatError struct {
	ParamName string
	Err       error
}

func (*InvalidParamFormatError) Error

func (e *InvalidParamFormatError) Error() string

func (*InvalidParamFormatError) Unwrap

func (e *InvalidParamFormatError) Unwrap() error

type Message

type Message = string

Message defines model for Message.

type MessageResponse

type MessageResponse = Message

MessageResponse defines model for MessageResponse.

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type MinecraftServerConfig

type MinecraftServerConfig struct {
	Version string `json:"version,omitempty"`
}

type MinecraftServerInterface

type MinecraftServerInterface interface {
	Allowlist() *Allowlist
	AllowPlayer(p *PlayerInfo) error
	DisallowPlayer(p *PlayerInfo) error

	BannedIPs() *BannedIPList
	BannedPlayers() *BannedPlayerList
	BanIP(ip *BannedIP) error
	BanPlayer(p *BannedPlayer) error
	PardonIP(ip string) error
	PardonPlayer(p *PlayerInfo) error

	CreateAllowlist()
	CreateArgs()
	CreateBannedIPs()
	CreateBannedPlayers()
	CreateConfig()
	CreateProperties()
	CreateOperators()
	CreateVersions()

	Deop(p *PlayerInfo) error
	Op(op *ServerOperator) error
	Ops() *ServerOperatorList

	LoadAllowlist(file io.Reader) error
	LoadArgs(file io.Reader) error
	LoadBannedIPs(file io.Reader) error
	LoadBannedPlayers(file io.Reader) error
	LoadConfig(file io.Reader) error
	LoadConfigs() error
	LoadOperators(file io.Reader) error
	LoadProperties(file io.Reader) error
	LoadVersions(file io.Reader) error

	Args() *ServerArguments
	Config() *MinecraftServerConfig
	Properties() *ServerProperties
	Versions() *[]string

	SaveAllowlist(file io.Writer) error
	SaveArgs(file io.Writer) error
	SaveBannedIPs(file io.Writer) error
	SaveBannedPlayers(file io.Writer) error
	SaveConfig(file io.Writer) error
	SaveOperators(file io.Writer) error
	SaveProperties(file io.Writer) error

	SetAllowlist(a *Allowlist)
	SetArgs(args *ServerArguments)
	SetBannedPlayers(bp *BannedPlayerList)
	SetVersion(version string) error
	SetBannedIPs(bp *BannedIPList)
	SetOperators(ops *ServerOperatorList)
	SetProperties(props *ServerProperties)

	Start() error
	Stop() error
	Restart() error
}

type PlayerInfo

type PlayerInfo struct {
	Name *string             `json:"name,omitempty"`
	Uuid *openapi_types.UUID `json:"uuid,omitempty"`
}

PlayerInfo defines model for PlayerInfo.

type PlayerRequest

type PlayerRequest = PlayerInfo

PlayerRequest defines model for PlayerRequest.

type PostAllowlistAddJSONRequestBody

type PostAllowlistAddJSONRequestBody = PlayerInfo

PostAllowlistAddJSONRequestBody defines body for PostAllowlistAdd for application/json ContentType.

type PostAllowlistRemoveJSONRequestBody

type PostAllowlistRemoveJSONRequestBody = PlayerInfo

PostAllowlistRemoveJSONRequestBody defines body for PostAllowlistRemove for application/json ContentType.

type PostBanIpJSONRequestBody

type PostBanIpJSONRequestBody = BannedIP

PostBanIpJSONRequestBody defines body for PostBanIp for application/json ContentType.

type PostBanJSONRequestBody

type PostBanJSONRequestBody = BannedPlayer

PostBanJSONRequestBody defines body for PostBan for application/json ContentType.

type PostDeopJSONRequestBody

type PostDeopJSONRequestBody = PlayerInfo

PostDeopJSONRequestBody defines body for PostDeop for application/json ContentType.

type PostOpJSONRequestBody

type PostOpJSONRequestBody = ServerOperator

PostOpJSONRequestBody defines body for PostOp for application/json ContentType.

type PostPardonIpJSONBody

type PostPardonIpJSONBody struct {
	Ip string `json:"ip"`
}

PostPardonIpJSONBody defines parameters for PostPardonIp.

type PostPardonIpJSONRequestBody

type PostPardonIpJSONRequestBody PostPardonIpJSONBody

PostPardonIpJSONRequestBody defines body for PostPardonIp for application/json ContentType.

type PostPardonJSONRequestBody

type PostPardonJSONRequestBody = PlayerInfo

PostPardonJSONRequestBody defines body for PostPardon for application/json ContentType.

type PostSetVersionParams

type PostSetVersionParams struct {
	Version *string `form:"version,omitempty" json:"version,omitempty"`
}

PostSetVersionParams defines parameters for PostSetVersion.

type PutAllowlistJSONRequestBody

type PutAllowlistJSONRequestBody = Allowlist

PutAllowlistJSONRequestBody defines body for PutAllowlist for application/json ContentType.

type PutArgsJSONRequestBody

type PutArgsJSONRequestBody = ServerArguments

PutArgsJSONRequestBody defines body for PutArgs for application/json ContentType.

type PutBannedIpsJSONRequestBody

type PutBannedIpsJSONRequestBody = BannedIPList

PutBannedIpsJSONRequestBody defines body for PutBannedIps for application/json ContentType.

type PutBannedPlayersJSONRequestBody

type PutBannedPlayersJSONRequestBody = BannedPlayerList

PutBannedPlayersJSONRequestBody defines body for PutBannedPlayers for application/json ContentType.

type PutOpsJSONRequestBody

type PutOpsJSONRequestBody = ServerOperatorList

PutOpsJSONRequestBody defines body for PutOps for application/json ContentType.

type PutPropertiesJSONRequestBody

type PutPropertiesJSONRequestBody = ServerProperties

PutPropertiesJSONRequestBody defines body for PutProperties for application/json ContentType.

type RequiredHeaderError

type RequiredHeaderError struct {
	ParamName string
	Err       error
}

func (*RequiredHeaderError) Error

func (e *RequiredHeaderError) Error() string

func (*RequiredHeaderError) Unwrap

func (e *RequiredHeaderError) Unwrap() error

type RequiredParamError

type RequiredParamError struct {
	ParamName string
}

func (*RequiredParamError) Error

func (e *RequiredParamError) Error() string

type ServerArguments

type ServerArguments struct {
	BonusChest    *bool   `json:"bonusChest,omitempty"`
	Demo          *bool   `json:"demo,omitempty"`
	EraseCache    *bool   `json:"eraseCache,omitempty"`
	ForceUpgrade  *bool   `json:"forceUpgrade,omitempty"`
	MemoryMaxGB   *int    `json:"memoryMaxGB,omitempty"`
	MemoryStartGB *int    `json:"memoryStartGB,omitempty"`
	Port          *int    `json:"port,omitempty"`
	SafeMode      *bool   `json:"safeMode,omitempty"`
	ServerID      *string `json:"serverID,omitempty"`
	SinglePlayer  *string `json:"singlePlayer,omitempty"`
	Universe      *string `json:"universe,omitempty"`
	World         *string `json:"world,omitempty"`
}

ServerArguments defines model for ServerArguments.

type ServerController

type ServerController struct {
	// contains filtered or unexported fields
}

func (*ServerController) GetAllowlist

func (s *ServerController) GetAllowlist(w http.ResponseWriter, r *http.Request)

GetAllowlist implements ServerInterface.

func (*ServerController) GetAvailableVersions

func (s *ServerController) GetAvailableVersions(w http.ResponseWriter, r *http.Request)

GetAvailableVersions implements ServerInterface.

func (*ServerController) GetBannedIps

func (s *ServerController) GetBannedIps(w http.ResponseWriter, r *http.Request)

GetBannedIps implements ServerInterface.

func (*ServerController) GetBannedPlayers

func (s *ServerController) GetBannedPlayers(w http.ResponseWriter, r *http.Request)

GetBannedPlayers implements ServerInterface.

func (*ServerController) GetOps

func (s *ServerController) GetOps(w http.ResponseWriter, r *http.Request)

GetOps implements ServerInterface.

func (*ServerController) PostAllowlistAdd

func (s *ServerController) PostAllowlistAdd(w http.ResponseWriter, r *http.Request)

PostAllowlistAdd implements ServerInterface.

func (*ServerController) PostAllowlistRemove

func (s *ServerController) PostAllowlistRemove(w http.ResponseWriter, r *http.Request)

PostAllowlistRemove implements ServerInterface.

func (*ServerController) PostBan

func (s *ServerController) PostBan(w http.ResponseWriter, r *http.Request)

PostBan implements ServerInterface.

func (*ServerController) PostBanIp

func (s *ServerController) PostBanIp(w http.ResponseWriter, r *http.Request)

PostBanIp implements ServerInterface.

func (*ServerController) PostDeop

func (s *ServerController) PostDeop(w http.ResponseWriter, r *http.Request)

PostDeop implements ServerInterface.

func (*ServerController) PostOp

func (s *ServerController) PostOp(w http.ResponseWriter, r *http.Request)

PostOp implements ServerInterface.

func (*ServerController) PostPardon

func (s *ServerController) PostPardon(w http.ResponseWriter, r *http.Request)

PostPardon implements ServerInterface.

func (*ServerController) PostPardonIp

func (s *ServerController) PostPardonIp(w http.ResponseWriter, r *http.Request)

PostPardonIp implements ServerInterface.

func (*ServerController) PostRestart

func (s *ServerController) PostRestart(w http.ResponseWriter, r *http.Request)

PostRestart implements ServerInterface.

func (*ServerController) PostSetVersion

func (s *ServerController) PostSetVersion(w http.ResponseWriter, r *http.Request, params PostSetVersionParams)

PostSetVersion implements ServerInterface.

func (*ServerController) PostStart

func (s *ServerController) PostStart(w http.ResponseWriter, r *http.Request)

PostStart implements ServerInterface.

func (*ServerController) PostStop

func (s *ServerController) PostStop(w http.ResponseWriter, r *http.Request)

PostStop implements ServerInterface.

func (*ServerController) PutAllowlist

func (s *ServerController) PutAllowlist(w http.ResponseWriter, r *http.Request)

PutAllowlist implements ServerInterface.

func (*ServerController) PutArgs

func (s *ServerController) PutArgs(w http.ResponseWriter, r *http.Request)

PutArgs implements ServerInterface.

func (*ServerController) PutBannedIps

func (s *ServerController) PutBannedIps(w http.ResponseWriter, r *http.Request)

PutBannedIps implements ServerInterface.

func (*ServerController) PutBannedPlayers

func (s *ServerController) PutBannedPlayers(w http.ResponseWriter, r *http.Request)

PutBannedPlayers implements ServerInterface.

func (*ServerController) PutOps

func (s *ServerController) PutOps(w http.ResponseWriter, r *http.Request)

PutOps implements ServerInterface.

func (*ServerController) PutProperties

func (s *ServerController) PutProperties(w http.ResponseWriter, r *http.Request)

PutProperties implements ServerInterface.

type ServerInterface

type ServerInterface interface {

	// (GET /allowlist)
	GetAllowlist(w http.ResponseWriter, r *http.Request)

	// (PUT /allowlist)
	PutAllowlist(w http.ResponseWriter, r *http.Request)

	// (POST /allowlist/add)
	PostAllowlistAdd(w http.ResponseWriter, r *http.Request)

	// (POST /allowlist/remove)
	PostAllowlistRemove(w http.ResponseWriter, r *http.Request)

	// (PUT /args)
	PutArgs(w http.ResponseWriter, r *http.Request)

	// (GET /available-versions)
	GetAvailableVersions(w http.ResponseWriter, r *http.Request)

	// (POST /ban)
	PostBan(w http.ResponseWriter, r *http.Request)

	// (POST /ban-ip)
	PostBanIp(w http.ResponseWriter, r *http.Request)

	// (GET /banned-ips)
	GetBannedIps(w http.ResponseWriter, r *http.Request)

	// (PUT /banned-ips)
	PutBannedIps(w http.ResponseWriter, r *http.Request)

	// (GET /banned-players)
	GetBannedPlayers(w http.ResponseWriter, r *http.Request)

	// (PUT /banned-players)
	PutBannedPlayers(w http.ResponseWriter, r *http.Request)

	// (POST /deop)
	PostDeop(w http.ResponseWriter, r *http.Request)

	// (POST /op)
	PostOp(w http.ResponseWriter, r *http.Request)

	// (GET /ops)
	GetOps(w http.ResponseWriter, r *http.Request)

	// (PUT /ops)
	PutOps(w http.ResponseWriter, r *http.Request)

	// (POST /pardon)
	PostPardon(w http.ResponseWriter, r *http.Request)

	// (POST /pardon-ip)
	PostPardonIp(w http.ResponseWriter, r *http.Request)

	// (PUT /properties)
	PutProperties(w http.ResponseWriter, r *http.Request)

	// (POST /restart)
	PostRestart(w http.ResponseWriter, r *http.Request)

	// (POST /set-version)
	PostSetVersion(w http.ResponseWriter, r *http.Request, params PostSetVersionParams)

	// (POST /start)
	PostStart(w http.ResponseWriter, r *http.Request)

	// (POST /stop)
	PostStop(w http.ResponseWriter, r *http.Request)
}

ServerInterface represents all server handlers.

func NewServerController

func NewServerController(msi MinecraftServerInterface) ServerInterface

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler            ServerInterface
	HandlerMiddlewares []MiddlewareFunc
	ErrorHandlerFunc   func(w http.ResponseWriter, r *http.Request, err error)
}

ServerInterfaceWrapper converts contexts to parameters.

func (*ServerInterfaceWrapper) GetAllowlist

func (siw *ServerInterfaceWrapper) GetAllowlist(w http.ResponseWriter, r *http.Request)

GetAllowlist operation middleware

func (*ServerInterfaceWrapper) GetAvailableVersions

func (siw *ServerInterfaceWrapper) GetAvailableVersions(w http.ResponseWriter, r *http.Request)

GetAvailableVersions operation middleware

func (*ServerInterfaceWrapper) GetBannedIps

func (siw *ServerInterfaceWrapper) GetBannedIps(w http.ResponseWriter, r *http.Request)

GetBannedIps operation middleware

func (*ServerInterfaceWrapper) GetBannedPlayers

func (siw *ServerInterfaceWrapper) GetBannedPlayers(w http.ResponseWriter, r *http.Request)

GetBannedPlayers operation middleware

func (*ServerInterfaceWrapper) GetOps

GetOps operation middleware

func (*ServerInterfaceWrapper) PostAllowlistAdd

func (siw *ServerInterfaceWrapper) PostAllowlistAdd(w http.ResponseWriter, r *http.Request)

PostAllowlistAdd operation middleware

func (*ServerInterfaceWrapper) PostAllowlistRemove

func (siw *ServerInterfaceWrapper) PostAllowlistRemove(w http.ResponseWriter, r *http.Request)

PostAllowlistRemove operation middleware

func (*ServerInterfaceWrapper) PostBan

PostBan operation middleware

func (*ServerInterfaceWrapper) PostBanIp

func (siw *ServerInterfaceWrapper) PostBanIp(w http.ResponseWriter, r *http.Request)

PostBanIp operation middleware

func (*ServerInterfaceWrapper) PostDeop

func (siw *ServerInterfaceWrapper) PostDeop(w http.ResponseWriter, r *http.Request)

PostDeop operation middleware

func (*ServerInterfaceWrapper) PostOp

PostOp operation middleware

func (*ServerInterfaceWrapper) PostPardon

func (siw *ServerInterfaceWrapper) PostPardon(w http.ResponseWriter, r *http.Request)

PostPardon operation middleware

func (*ServerInterfaceWrapper) PostPardonIp

func (siw *ServerInterfaceWrapper) PostPardonIp(w http.ResponseWriter, r *http.Request)

PostPardonIp operation middleware

func (*ServerInterfaceWrapper) PostRestart

func (siw *ServerInterfaceWrapper) PostRestart(w http.ResponseWriter, r *http.Request)

PostRestart operation middleware

func (*ServerInterfaceWrapper) PostSetVersion

func (siw *ServerInterfaceWrapper) PostSetVersion(w http.ResponseWriter, r *http.Request)

PostSetVersion operation middleware

func (*ServerInterfaceWrapper) PostStart

func (siw *ServerInterfaceWrapper) PostStart(w http.ResponseWriter, r *http.Request)

PostStart operation middleware

func (*ServerInterfaceWrapper) PostStop

func (siw *ServerInterfaceWrapper) PostStop(w http.ResponseWriter, r *http.Request)

PostStop operation middleware

func (*ServerInterfaceWrapper) PutAllowlist

func (siw *ServerInterfaceWrapper) PutAllowlist(w http.ResponseWriter, r *http.Request)

PutAllowlist operation middleware

func (*ServerInterfaceWrapper) PutArgs

PutArgs operation middleware

func (*ServerInterfaceWrapper) PutBannedIps

func (siw *ServerInterfaceWrapper) PutBannedIps(w http.ResponseWriter, r *http.Request)

PutBannedIps operation middleware

func (*ServerInterfaceWrapper) PutBannedPlayers

func (siw *ServerInterfaceWrapper) PutBannedPlayers(w http.ResponseWriter, r *http.Request)

PutBannedPlayers operation middleware

func (*ServerInterfaceWrapper) PutOps

PutOps operation middleware

func (*ServerInterfaceWrapper) PutProperties

func (siw *ServerInterfaceWrapper) PutProperties(w http.ResponseWriter, r *http.Request)

PutProperties operation middleware

type ServerOperator

type ServerOperator struct {
	BypassesPlayerLimit bool               `json:"bypassesPlayerLimit"`
	Level               int                `json:"level"`
	Name                string             `json:"name"`
	Uuid                openapi_types.UUID `json:"uuid"`
}

ServerOperator defines model for ServerOperator.

type ServerOperatorList

type ServerOperatorList = []ServerOperator

ServerOperatorList defines model for ServerOperatorList.

type ServerOperatorListRequest

type ServerOperatorListRequest = ServerOperatorList

ServerOperatorListRequest defines model for ServerOperatorListRequest.

type ServerOperatorListResponse

type ServerOperatorListResponse = ServerOperatorList

ServerOperatorListResponse defines model for ServerOperatorListResponse.

type ServerOperatorRequest

type ServerOperatorRequest = ServerOperator

ServerOperatorRequest defines model for ServerOperatorRequest.

type ServerProperties

type ServerProperties struct {
	MOTD                           *string                     `json:"MOTD,omitempty"`
	PVP                            *bool                       `json:"PVP,omitempty"`
	RCONPassword                   *string                     `json:"RCONPassword,omitempty"`
	RCONPort                       *int                        `json:"RCONPort,omitempty"`
	AcceptTransfers                *bool                       `json:"acceptTransfers,omitempty"`
	AllowFlight                    *bool                       `json:"allowFlight,omitempty"`
	AllowNether                    *bool                       `json:"allowNether,omitempty"`
	BroadcastConsoleToOps          *bool                       `json:"broadcastConsoleToOps,omitempty"`
	BroadcastRCONToOps             *bool                       `json:"broadcastRCONToOps,omitempty"`
	Difficulty                     *ServerPropertiesDifficulty `json:"difficulty,omitempty"`
	EnableCommandBlock             *bool                       `json:"enableCommandBlock,omitempty"`
	EnableJMXMonitoring            *bool                       `json:"enableJMXMonitoring,omitempty"`
	EnableQuery                    *bool                       `json:"enableQuery,omitempty"`
	EnableRCON                     *bool                       `json:"enableRCON,omitempty"`
	EnableStatus                   *bool                       `json:"enableStatus,omitempty"`
	EnforceSecureProfile           *bool                       `json:"enforceSecureProfile,omitempty"`
	EnforceWhitelist               *bool                       `json:"enforceWhitelist,omitempty"`
	EntityBroadcastRangePercentage *int                        `json:"entityBroadcastRangePercentage,omitempty"`
	ForceGamemode                  *bool                       `json:"forceGamemode,omitempty"`
	FunctionPermissionLevel        *int                        `json:"functionPermissionLevel,omitempty"`
	Gamemode                       *ServerPropertiesGamemode   `json:"gamemode,omitempty"`
	GenerateStructures             *bool                       `json:"generateStructures,omitempty"`
	GeneratorSettings              *string                     `json:"generatorSettings,omitempty"`
	Hardcore                       *bool                       `json:"hardcore,omitempty"`
	HideOnlinePlayers              *bool                       `json:"hideOnlinePlayers,omitempty"`
	InitialDisabledPacks           *string                     `json:"initialDisabledPacks,omitempty"`
	InitialEnabledPacks            *string                     `json:"initialEnabledPacks,omitempty"`
	LevelName                      *string                     `json:"levelName,omitempty"`
	LevelSeed                      *string                     `json:"levelSeed,omitempty"`
	LevelType                      *string                     `json:"levelType,omitempty"`
	LogIPs                         *bool                       `json:"logIPs,omitempty"`
	MaxChainedNeighborUpdates      *int                        `json:"maxChainedNeighborUpdates,omitempty"`
	MaxPlayers                     *int                        `json:"maxPlayers,omitempty"`
	MaxTickTime                    *int                        `json:"maxTickTime,omitempty"`
	MaxWorldSize                   *int                        `json:"maxWorldSize,omitempty"`
	NetworkCompressionThreshold    *int                        `json:"networkCompressionThreshold,omitempty"`
	OnlineMode                     *bool                       `json:"onlineMode,omitempty"`
	OpPermissionLevel              *int                        `json:"opPermissionLevel,omitempty"`
	PlayerIdleTimeout              *int                        `json:"playerIdleTimeout,omitempty"`
	PreventProxyConnections        *bool                       `json:"preventProxyConnections,omitempty"`
	PreviewsChat                   *bool                       `json:"previewsChat,omitempty"`
	QueryPort                      *int                        `json:"queryPort,omitempty"`
	RateLimit                      *int                        `json:"rateLimit,omitempty"`
	RegionFileCompression          *string                     `json:"regionFileCompression,omitempty"`
	RequireResourcePack            *bool                       `json:"requireResourcePack,omitempty"`
	ResourcePack                   *string                     `json:"resourcePack,omitempty"`
	ResourcePackID                 *string                     `json:"resourcePackID,omitempty"`
	ResourcePackPrompt             *string                     `json:"resourcePackPrompt,omitempty"`
	ResourcePackSHA1               *string                     `json:"resourcePackSHA1,omitempty"`
	ServerIP                       *string                     `json:"serverIP,omitempty"`
	ServerPort                     *int                        `json:"serverPort,omitempty"`
	SimulationDistance             *int                        `json:"simulationDistance,omitempty"`
	SnooperEnabled                 *bool                       `json:"snooperEnabled,omitempty"`
	SpawnAnimals                   *bool                       `json:"spawnAnimals,omitempty"`
	SpawnMonsters                  *bool                       `json:"spawnMonsters,omitempty"`
	SpawnNPCs                      *bool                       `json:"spawnNPCs,omitempty"`
	SpawnProtection                *int                        `json:"spawnProtection,omitempty"`
	SyncChunkWrites                *bool                       `json:"syncChunkWrites,omitempty"`
	TextFilteringConfig            *string                     `json:"textFilteringConfig,omitempty"`
	UseNativeTransport             *bool                       `json:"useNativeTransport,omitempty"`
	ViewDistance                   *int                        `json:"viewDistance,omitempty"`
	Whitelist                      *bool                       `json:"whitelist,omitempty"`
}

ServerProperties defines model for ServerProperties.

type ServerPropertiesDifficulty

type ServerPropertiesDifficulty string

ServerPropertiesDifficulty defines model for ServerProperties.Difficulty.

const (
	Easy     ServerPropertiesDifficulty = "easy"
	Hard     ServerPropertiesDifficulty = "hard"
	Medium   ServerPropertiesDifficulty = "medium"
	Peaceful ServerPropertiesDifficulty = "peaceful"
)

Defines values for ServerPropertiesDifficulty.

type ServerPropertiesGamemode

type ServerPropertiesGamemode string

ServerPropertiesGamemode defines model for ServerProperties.Gamemode.

const (
	Adventure ServerPropertiesGamemode = "adventure"
	Creative  ServerPropertiesGamemode = "creative"
	Hardcore  ServerPropertiesGamemode = "hardcore"
	Spectator ServerPropertiesGamemode = "spectator"
	Survival  ServerPropertiesGamemode = "survival"
)

Defines values for ServerPropertiesGamemode.

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) Error

type UnescapedCookieParamError

type UnescapedCookieParamError struct {
	ParamName string
	Err       error
}

func (*UnescapedCookieParamError) Error

func (e *UnescapedCookieParamError) Error() string

func (*UnescapedCookieParamError) Unwrap

func (e *UnescapedCookieParamError) Unwrap() error

type Unimplemented

type Unimplemented struct{}

func (Unimplemented) GetAllowlist

func (_ Unimplemented) GetAllowlist(w http.ResponseWriter, r *http.Request)

(GET /allowlist)

func (Unimplemented) GetAvailableVersions

func (_ Unimplemented) GetAvailableVersions(w http.ResponseWriter, r *http.Request)

(GET /available-versions)

func (Unimplemented) GetBannedIps

func (_ Unimplemented) GetBannedIps(w http.ResponseWriter, r *http.Request)

(GET /banned-ips)

func (Unimplemented) GetBannedPlayers

func (_ Unimplemented) GetBannedPlayers(w http.ResponseWriter, r *http.Request)

(GET /banned-players)

func (Unimplemented) GetOps

func (_ Unimplemented) GetOps(w http.ResponseWriter, r *http.Request)

(GET /ops)

func (Unimplemented) PostAllowlistAdd

func (_ Unimplemented) PostAllowlistAdd(w http.ResponseWriter, r *http.Request)

(POST /allowlist/add)

func (Unimplemented) PostAllowlistRemove

func (_ Unimplemented) PostAllowlistRemove(w http.ResponseWriter, r *http.Request)

(POST /allowlist/remove)

func (Unimplemented) PostBan

func (_ Unimplemented) PostBan(w http.ResponseWriter, r *http.Request)

(POST /ban)

func (Unimplemented) PostBanIp

func (_ Unimplemented) PostBanIp(w http.ResponseWriter, r *http.Request)

(POST /ban-ip)

func (Unimplemented) PostDeop

func (_ Unimplemented) PostDeop(w http.ResponseWriter, r *http.Request)

(POST /deop)

func (Unimplemented) PostOp

func (_ Unimplemented) PostOp(w http.ResponseWriter, r *http.Request)

(POST /op)

func (Unimplemented) PostPardon

func (_ Unimplemented) PostPardon(w http.ResponseWriter, r *http.Request)

(POST /pardon)

func (Unimplemented) PostPardonIp

func (_ Unimplemented) PostPardonIp(w http.ResponseWriter, r *http.Request)

(POST /pardon-ip)

func (Unimplemented) PostRestart

func (_ Unimplemented) PostRestart(w http.ResponseWriter, r *http.Request)

(POST /restart)

func (Unimplemented) PostSetVersion

func (_ Unimplemented) PostSetVersion(w http.ResponseWriter, r *http.Request, params PostSetVersionParams)

(POST /set-version)

func (Unimplemented) PostStart

func (_ Unimplemented) PostStart(w http.ResponseWriter, r *http.Request)

(POST /start)

func (Unimplemented) PostStop

func (_ Unimplemented) PostStop(w http.ResponseWriter, r *http.Request)

(POST /stop)

func (Unimplemented) PutAllowlist

func (_ Unimplemented) PutAllowlist(w http.ResponseWriter, r *http.Request)

(PUT /allowlist)

func (Unimplemented) PutArgs

func (_ Unimplemented) PutArgs(w http.ResponseWriter, r *http.Request)

(PUT /args)

func (Unimplemented) PutBannedIps

func (_ Unimplemented) PutBannedIps(w http.ResponseWriter, r *http.Request)

(PUT /banned-ips)

func (Unimplemented) PutBannedPlayers

func (_ Unimplemented) PutBannedPlayers(w http.ResponseWriter, r *http.Request)

(PUT /banned-players)

func (Unimplemented) PutOps

func (_ Unimplemented) PutOps(w http.ResponseWriter, r *http.Request)

(PUT /ops)

func (Unimplemented) PutProperties

func (_ Unimplemented) PutProperties(w http.ResponseWriter, r *http.Request)

(PUT /properties)

type UnmarshalingParamError

type UnmarshalingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshalingParamError) Error

func (e *UnmarshalingParamError) Error() string

func (*UnmarshalingParamError) Unwrap

func (e *UnmarshalingParamError) Unwrap() error

type UpdateArgsRequest

type UpdateArgsRequest = ServerArguments

UpdateArgsRequest defines model for UpdateArgsRequest.

type UpdatePropertiesRequest

type UpdatePropertiesRequest = ServerProperties

UpdatePropertiesRequest defines model for UpdatePropertiesRequest.

Jump to

Keyboard shortcuts

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