api

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server handles REST API requests.

func NewServer

func NewServer(c client.Client, versionInfo VersionInfo) *Server

NewServer creates a new API server instance.

func (*Server) ApplyNowServer

ApplyNowServer implements applying pending updates immediately.

func (*Server) CreatePlugin

CreatePlugin implements creating a new plugin.

func (*Server) CreateServer

CreateServer implements creating a new PaperMC server.

func (*Server) DeletePlugin

DeletePlugin implements deleting a plugin.

func (*Server) DeleteServer

DeleteServer implements deleting a server.

func (*Server) GetHealth

GetHealth implements the health check endpoint.

func (*Server) GetPlugin

GetPlugin implements getting a specific plugin.

func (*Server) GetServer

GetServer implements getting a specific server.

func (*Server) GetVersion

GetVersion implements the version endpoint.

func (*Server) Handler

func (s *Server) Handler() http.Handler

Handler returns an HTTP handler for the API server. The handler should be mounted at /api/v1/.

func (*Server) ListNamespaces

ListNamespaces implements listing available namespaces.

func (*Server) ListPlugins

ListPlugins implements listing all plugins.

func (*Server) ListServers

ListServers implements listing all PaperMC servers.

func (*Server) ResolvePlugin

ResolvePlugin implements triggering plugin reconciliation.

func (*Server) ResolveServer

ResolveServer implements triggering server reconciliation.

func (*Server) UpdatePlugin

UpdatePlugin implements updating an existing plugin.

func (*Server) UpdateServer

UpdateServer implements updating an existing server.

type VersionInfo

type VersionInfo struct {
	Version   string
	GitCommit string
	BuildDate string
	GoVersion string
}

VersionInfo contains version information about the operator.

Jump to

Keyboard shortcuts

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