Documentation
¶
Overview ¶
Package api serves the Controller's public REST API, /api/v1. The contract is api/v1/openapi.yaml: requests are validated against it before any handler runs, including which endpoints need a signed-in caller, and the handlers implement the interface generated from it (package apigen).
Index ¶
- Constants
- func DefaultAgentImage(v string) string
- type BackupOps
- type CatalogSync
- type Deps
- type NodeNotifier
- type Server
- func (s *Server) AcknowledgeServerCondition(ctx context.Context, req apigen.AcknowledgeServerConditionRequestObject) (apigen.AcknowledgeServerConditionResponseObject, error)
- func (s *Server) AddTeamMember(ctx context.Context, req apigen.AddTeamMemberRequestObject) (apigen.AddTeamMemberResponseObject, error)
- func (s *Server) ChangePassword(ctx context.Context, req apigen.ChangePasswordRequestObject) (apigen.ChangePasswordResponseObject, error)
- func (s *Server) ChangeServerSoftware(ctx context.Context, req apigen.ChangeServerSoftwareRequestObject) (apigen.ChangeServerSoftwareResponseObject, error)
- func (s *Server) CloneServer(ctx context.Context, req apigen.CloneServerRequestObject) (apigen.CloneServerResponseObject, error)
- func (s *Server) CompleteSetup(ctx context.Context, req apigen.CompleteSetupRequestObject) (apigen.CompleteSetupResponseObject, error)
- func (s *Server) CreateBackupDestination(ctx context.Context, req apigen.CreateBackupDestinationRequestObject) (apigen.CreateBackupDestinationResponseObject, error)
- func (s *Server) CreateMyToken(ctx context.Context, req apigen.CreateMyTokenRequestObject) (apigen.CreateMyTokenResponseObject, error)
- func (s *Server) CreateNetwork(ctx context.Context, req apigen.CreateNetworkRequestObject) (apigen.CreateNetworkResponseObject, error)
- func (s *Server) CreateNode(ctx context.Context, req apigen.CreateNodeRequestObject) (apigen.CreateNodeResponseObject, error)
- func (s *Server) CreateProxy(ctx context.Context, req apigen.CreateProxyRequestObject) (apigen.CreateProxyResponseObject, error)
- func (s *Server) CreateRole(ctx context.Context, req apigen.CreateRoleRequestObject) (apigen.CreateRoleResponseObject, error)
- func (s *Server) CreateRoleAssignment(ctx context.Context, req apigen.CreateRoleAssignmentRequestObject) (apigen.CreateRoleAssignmentResponseObject, error)
- func (s *Server) CreateServer(ctx context.Context, req apigen.CreateServerRequestObject) (apigen.CreateServerResponseObject, error)
- func (s *Server) CreateServerBackup(ctx context.Context, req apigen.CreateServerBackupRequestObject) (apigen.CreateServerBackupResponseObject, error)
- func (s *Server) CreateServerSchedule(ctx context.Context, req apigen.CreateServerScheduleRequestObject) (apigen.CreateServerScheduleResponseObject, error)
- func (s *Server) CreateTeam(ctx context.Context, req apigen.CreateTeamRequestObject) (apigen.CreateTeamResponseObject, error)
- func (s *Server) CreateUser(ctx context.Context, req apigen.CreateUserRequestObject) (apigen.CreateUserResponseObject, error)
- func (s *Server) DeleteBackup(ctx context.Context, req apigen.DeleteBackupRequestObject) (apigen.DeleteBackupResponseObject, error)
- func (s *Server) DeleteBackupDestination(ctx context.Context, req apigen.DeleteBackupDestinationRequestObject) (apigen.DeleteBackupDestinationResponseObject, error)
- func (s *Server) DeleteMySession(ctx context.Context, req apigen.DeleteMySessionRequestObject) (apigen.DeleteMySessionResponseObject, error)
- func (s *Server) DeleteNetworkLogo(ctx context.Context, _ apigen.DeleteNetworkLogoRequestObject) (apigen.DeleteNetworkLogoResponseObject, error)
- func (s *Server) DeleteNode(ctx context.Context, req apigen.DeleteNodeRequestObject) (apigen.DeleteNodeResponseObject, error)
- func (s *Server) DeleteRole(ctx context.Context, req apigen.DeleteRoleRequestObject) (apigen.DeleteRoleResponseObject, error)
- func (s *Server) DeleteRoleAssignment(ctx context.Context, req apigen.DeleteRoleAssignmentRequestObject) (apigen.DeleteRoleAssignmentResponseObject, error)
- func (s *Server) DeleteServer(ctx context.Context, req apigen.DeleteServerRequestObject) (apigen.DeleteServerResponseObject, error)
- func (s *Server) DeleteServerFile(ctx context.Context, req apigen.DeleteServerFileRequestObject) (apigen.DeleteServerFileResponseObject, error)
- func (s *Server) DeleteServerSchedule(ctx context.Context, req apigen.DeleteServerScheduleRequestObject) (apigen.DeleteServerScheduleResponseObject, error)
- func (s *Server) DeleteTeam(ctx context.Context, req apigen.DeleteTeamRequestObject) (apigen.DeleteTeamResponseObject, error)
- func (s *Server) DeleteUser(ctx context.Context, req apigen.DeleteUserRequestObject) (apigen.DeleteUserResponseObject, error)
- func (s *Server) DisableNode(ctx context.Context, req apigen.DisableNodeRequestObject) (apigen.DisableNodeResponseObject, error)
- func (s *Server) DownloadBackup(ctx context.Context, req apigen.DownloadBackupRequestObject) (apigen.DownloadBackupResponseObject, error)
- func (s *Server) DownloadServerFile(ctx context.Context, req apigen.DownloadServerFileRequestObject) (apigen.DownloadServerFileResponseObject, error)
- func (s *Server) EnableNode(ctx context.Context, req apigen.EnableNodeRequestObject) (apigen.EnableNodeResponseObject, error)
- func (s *Server) GetBackup(ctx context.Context, req apigen.GetBackupRequestObject) (apigen.GetBackupResponseObject, error)
- func (s *Server) GetBackupDestination(ctx context.Context, req apigen.GetBackupDestinationRequestObject) (apigen.GetBackupDestinationResponseObject, error)
- func (s *Server) GetCatalogPlugin(ctx context.Context, req apigen.GetCatalogPluginRequestObject) (apigen.GetCatalogPluginResponseObject, error)
- func (s *Server) GetCatalogStatus(ctx context.Context, _ apigen.GetCatalogStatusRequestObject) (apigen.GetCatalogStatusResponseObject, error)
- func (s *Server) GetMe(ctx context.Context, _ apigen.GetMeRequestObject) (apigen.GetMeResponseObject, error)
- func (s *Server) GetMyPermissions(ctx context.Context, _ apigen.GetMyPermissionsRequestObject) (apigen.GetMyPermissionsResponseObject, error)
- func (s *Server) GetNetwork(ctx context.Context, _ apigen.GetNetworkRequestObject) (apigen.GetNetworkResponseObject, error)
- func (s *Server) GetNetworkLogo(ctx context.Context, _ apigen.GetNetworkLogoRequestObject) (apigen.GetNetworkLogoResponseObject, error)
- func (s *Server) GetNode(ctx context.Context, req apigen.GetNodeRequestObject) (apigen.GetNodeResponseObject, error)
- func (s *Server) GetPublicNetwork(ctx context.Context, _ apigen.GetPublicNetworkRequestObject) (apigen.GetPublicNetworkResponseObject, error)
- func (s *Server) GetRole(ctx context.Context, req apigen.GetRoleRequestObject) (apigen.GetRoleResponseObject, error)
- func (s *Server) GetServer(ctx context.Context, req apigen.GetServerRequestObject) (apigen.GetServerResponseObject, error)
- func (s *Server) GetServerConsole(ctx context.Context, req apigen.GetServerConsoleRequestObject) (apigen.GetServerConsoleResponseObject, error)
- func (s *Server) GetServerProperties(ctx context.Context, req apigen.GetServerPropertiesRequestObject) (apigen.GetServerPropertiesResponseObject, error)
- func (s *Server) GetSetup(ctx context.Context, _ apigen.GetSetupRequestObject) (apigen.GetSetupResponseObject, error)
- func (s *Server) GetSystemInfo(ctx context.Context, _ apigen.GetSystemInfoRequestObject) (apigen.GetSystemInfoResponseObject, error)
- func (s *Server) GetTeam(ctx context.Context, req apigen.GetTeamRequestObject) (apigen.GetTeamResponseObject, error)
- func (s *Server) GetUser(ctx context.Context, req apigen.GetUserRequestObject) (apigen.GetUserResponseObject, error)
- func (s *Server) GetUserPermissions(ctx context.Context, req apigen.GetUserPermissionsRequestObject) (apigen.GetUserPermissionsResponseObject, error)
- func (s *Server) Handler() (http.Handler, error)
- func (s *Server) InstallServerPlugin(ctx context.Context, req apigen.InstallServerPluginRequestObject) (apigen.InstallServerPluginResponseObject, error)
- func (s *Server) IssueEnrollmentToken(ctx context.Context, req apigen.IssueEnrollmentTokenRequestObject) (apigen.IssueEnrollmentTokenResponseObject, error)
- func (s *Server) IssuePasswordReset(ctx context.Context, req apigen.IssuePasswordResetRequestObject) (apigen.IssuePasswordResetResponseObject, error)
- func (s *Server) ListArtifacts(ctx context.Context, _ apigen.ListArtifactsRequestObject) (apigen.ListArtifactsResponseObject, error)
- func (s *Server) ListAuditEvents(ctx context.Context, req apigen.ListAuditEventsRequestObject) (apigen.ListAuditEventsResponseObject, error)
- func (s *Server) ListBackupDestinations(ctx context.Context, _ apigen.ListBackupDestinationsRequestObject) (apigen.ListBackupDestinationsResponseObject, error)
- func (s *Server) ListCatalogPlugins(ctx context.Context, req apigen.ListCatalogPluginsRequestObject) (apigen.ListCatalogPluginsResponseObject, error)
- func (s *Server) ListMySessions(ctx context.Context, _ apigen.ListMySessionsRequestObject) (apigen.ListMySessionsResponseObject, error)
- func (s *Server) ListMyTokens(ctx context.Context, _ apigen.ListMyTokensRequestObject) (apigen.ListMyTokensResponseObject, error)
- func (s *Server) ListNodes(ctx context.Context, req apigen.ListNodesRequestObject) (apigen.ListNodesResponseObject, error)
- func (s *Server) ListPermissions(ctx context.Context, _ apigen.ListPermissionsRequestObject) (apigen.ListPermissionsResponseObject, error)
- func (s *Server) ListRoleAssignments(ctx context.Context, req apigen.ListRoleAssignmentsRequestObject) (apigen.ListRoleAssignmentsResponseObject, error)
- func (s *Server) ListRoles(ctx context.Context, _ apigen.ListRolesRequestObject) (apigen.ListRolesResponseObject, error)
- func (s *Server) ListServerBackups(ctx context.Context, req apigen.ListServerBackupsRequestObject) (apigen.ListServerBackupsResponseObject, error)
- func (s *Server) ListServerEvents(ctx context.Context, req apigen.ListServerEventsRequestObject) (apigen.ListServerEventsResponseObject, error)
- func (s *Server) ListServerFiles(ctx context.Context, req apigen.ListServerFilesRequestObject) (apigen.ListServerFilesResponseObject, error)
- func (s *Server) ListServerPlugins(ctx context.Context, req apigen.ListServerPluginsRequestObject) (apigen.ListServerPluginsResponseObject, error)
- func (s *Server) ListServerSchedules(ctx context.Context, req apigen.ListServerSchedulesRequestObject) (apigen.ListServerSchedulesResponseObject, error)
- func (s *Server) ListServers(ctx context.Context, req apigen.ListServersRequestObject) (apigen.ListServersResponseObject, error)
- func (s *Server) ListSoftware(ctx context.Context, _ apigen.ListSoftwareRequestObject) (apigen.ListSoftwareResponseObject, error)
- func (s *Server) ListTeamMembers(ctx context.Context, req apigen.ListTeamMembersRequestObject) (apigen.ListTeamMembersResponseObject, error)
- func (s *Server) ListTeams(ctx context.Context, req apigen.ListTeamsRequestObject) (apigen.ListTeamsResponseObject, error)
- func (s *Server) ListUsers(ctx context.Context, req apigen.ListUsersRequestObject) (apigen.ListUsersResponseObject, error)
- func (s *Server) Login(ctx context.Context, req apigen.LoginRequestObject) (apigen.LoginResponseObject, error)
- func (s *Server) Logout(ctx context.Context, _ apigen.LogoutRequestObject) (apigen.LogoutResponseObject, error)
- func (s *Server) MakeServerDirectory(ctx context.Context, req apigen.MakeServerDirectoryRequestObject) (apigen.MakeServerDirectoryResponseObject, error)
- func (s *Server) MigrateServer(ctx context.Context, req apigen.MigrateServerRequestObject) (apigen.MigrateServerResponseObject, error)
- func (s *Server) MoveServerFile(ctx context.Context, req apigen.MoveServerFileRequestObject) (apigen.MoveServerFileResponseObject, error)
- func (s *Server) PurgeExpiredSessions(ctx context.Context)
- func (s *Server) RedeemPasswordReset(ctx context.Context, req apigen.RedeemPasswordResetRequestObject) (apigen.RedeemPasswordResetResponseObject, error)
- func (s *Server) RemoveServerPlugin(ctx context.Context, req apigen.RemoveServerPluginRequestObject) (apigen.RemoveServerPluginResponseObject, error)
- func (s *Server) RemoveTeamMember(ctx context.Context, req apigen.RemoveTeamMemberRequestObject) (apigen.RemoveTeamMemberResponseObject, error)
- func (s *Server) RestartServer(ctx context.Context, req apigen.RestartServerRequestObject) (apigen.RestartServerResponseObject, error)
- func (s *Server) RestoreServer(ctx context.Context, req apigen.RestoreServerRequestObject) (apigen.RestoreServerResponseObject, error)
- func (s *Server) RevokeMyToken(ctx context.Context, req apigen.RevokeMyTokenRequestObject) (apigen.RevokeMyTokenResponseObject, error)
- func (s *Server) RevokeNode(ctx context.Context, req apigen.RevokeNodeRequestObject) (apigen.RevokeNodeResponseObject, error)
- func (s *Server) RotateNodeCertificate(ctx context.Context, req apigen.RotateNodeCertificateRequestObject) (apigen.RotateNodeCertificateResponseObject, error)
- func (s *Server) SendServerCommand(ctx context.Context, req apigen.SendServerCommandRequestObject) (apigen.SendServerCommandResponseObject, error)
- func (s *Server) SetNetworkLogo(ctx context.Context, req apigen.SetNetworkLogoRequestObject) (apigen.SetNetworkLogoResponseObject, error)
- func (s *Server) StartServer(ctx context.Context, req apigen.StartServerRequestObject) (apigen.StartServerResponseObject, error)
- func (s *Server) StopServer(ctx context.Context, req apigen.StopServerRequestObject) (apigen.StopServerResponseObject, error)
- func (s *Server) UpdateBackupDestination(ctx context.Context, req apigen.UpdateBackupDestinationRequestObject) (apigen.UpdateBackupDestinationResponseObject, error)
- func (s *Server) UpdateNetwork(ctx context.Context, req apigen.UpdateNetworkRequestObject) (apigen.UpdateNetworkResponseObject, error)
- func (s *Server) UpdateNode(ctx context.Context, req apigen.UpdateNodeRequestObject) (apigen.UpdateNodeResponseObject, error)
- func (s *Server) UpdateRole(ctx context.Context, req apigen.UpdateRoleRequestObject) (apigen.UpdateRoleResponseObject, error)
- func (s *Server) UpdateServer(ctx context.Context, req apigen.UpdateServerRequestObject) (apigen.UpdateServerResponseObject, error)
- func (s *Server) UpdateServerPlugin(ctx context.Context, req apigen.UpdateServerPluginRequestObject) (apigen.UpdateServerPluginResponseObject, error)
- func (s *Server) UpdateServerProperties(ctx context.Context, req apigen.UpdateServerPropertiesRequestObject) (apigen.UpdateServerPropertiesResponseObject, error)
- func (s *Server) UpdateServerSchedule(ctx context.Context, req apigen.UpdateServerScheduleRequestObject) (apigen.UpdateServerScheduleResponseObject, error)
- func (s *Server) UpdateTeam(ctx context.Context, req apigen.UpdateTeamRequestObject) (apigen.UpdateTeamResponseObject, error)
- func (s *Server) UpdateUser(ctx context.Context, req apigen.UpdateUserRequestObject) (apigen.UpdateUserResponseObject, error)
- func (s *Server) UploadArtifact(ctx context.Context, req apigen.UploadArtifactRequestObject) (apigen.UploadArtifactResponseObject, error)
- func (s *Server) UploadServerFile(ctx context.Context, req apigen.UploadServerFileRequestObject) (apigen.UploadServerFileResponseObject, error)
- func (s *Server) UploadServerPlugin(ctx context.Context, req apigen.UploadServerPluginRequestObject) (apigen.UploadServerPluginResponseObject, error)
- type ServerOps
- type Workflows
Constants ¶
const BasePath = "/api/v1"
BasePath is where the API is mounted.
const SessionCookie = "__Host-shardkeep_session"
SessionCookie is the session cookie's name. The __Host- prefix makes browsers insist on Secure, Path=/ and no Domain, so no other host can set or read it.
Variables ¶
This section is empty.
Functions ¶
func DefaultAgentImage ¶ added in v1.15.0
DefaultAgentImage is the Agent image matching a Controller version: the release image of the same version, or, for development builds, the newest release.
Types ¶
type BackupOps ¶ added in v1.18.0
type BackupOps interface {
CreateBackup(ctx context.Context, nodeID, serverID, backupID, destinationID uuid.UUID, trigger domain.BackupTrigger) error
DeleteStoredBackup(ctx context.Context, nodeID, destinationID uuid.UUID, key string) error
ReadBackup(ctx context.Context, nodeID, destinationID uuid.UUID, key string, decrypt bool) (io.ReadCloser, error)
// DestinationsChanged sends connected Agents the new destinations.
DestinationsChanged()
}
BackupOps carries out backups through Agents.
type CatalogSync ¶ added in v1.13.0
type CatalogSync interface {
Status() catalogsync.Status
}
CatalogSync reports how catalog syncs went.
type Deps ¶
type Deps struct {
Store *store.Store
Hasher *auth.Hasher
Limiter *auth.LoginLimiter
Logger *slog.Logger
// CAPin is the SHA-256 of the Controller CA's public key, carried in
// enrollment tokens.
CAPin []byte
// Nodes, if set, hears about changes connected Agents must learn of.
Nodes NodeNotifier
// Now returns the current time; nil means time.Now.
Now func() time.Time
// GamePorts is where game ports are assigned from; the zero value means
// domain.DefaultGamePorts.
GamePorts domain.PortRange
Catalog *catalog.Catalog
Artifacts *artifacts.Cache
// Ops carries out console and file operations through Agents.
Ops ServerOps
// CatalogSync reports catalog syncs; nil when the Controller never
// syncs (-offline).
CatalogSync CatalogSync
// AgentImage is the Agent image to enroll new Nodes with; see
// DefaultAgentImage.
AgentImage string
// Backups carries out backups through Agents; Workflows is woken when a
// restore, migration or clone starts. Without them, those endpoints
// answer 503.
Backups BackupOps
Workflows Workflows
// SetupCode guards first-run setup; without it, setup cannot be done
// through the API.
SetupCode *auth.SetupCode
}
Deps are the Server's collaborators.
type NodeNotifier ¶ added in v1.7.0
type NodeNotifier interface {
NodeAdminChanged(nodeID uuid.UUID, state domain.NodeAdminState)
// ServerChanged is called when a server's desired spec changed.
ServerChanged(serverID uuid.UUID)
// NetworkChanged is called when the network's profile, its secret or
// a Node's address changed: the proxy and every Agent follow.
NetworkChanged()
// RotateCertificate asks a Node's Agent to rotate its certificate; it
// fails when the Node is not connected.
RotateCertificate(nodeID uuid.UUID) error
}
NodeNotifier is told about Node changes after they are committed, so it can push them to the Node's live session.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements the API.
func (*Server) AcknowledgeServerCondition ¶ added in v1.5.0
func (s *Server) AcknowledgeServerCondition(ctx context.Context, req apigen.AcknowledgeServerConditionRequestObject) (apigen.AcknowledgeServerConditionResponseObject, error)
AcknowledgeServerCondition records an administrator's acknowledgement of a condition, such as a safety stop.
func (*Server) AddTeamMember ¶ added in v1.4.0
func (s *Server) AddTeamMember(ctx context.Context, req apigen.AddTeamMemberRequestObject) (apigen.AddTeamMemberResponseObject, error)
AddTeamMember adds a user to a team.
func (*Server) ChangePassword ¶
func (s *Server) ChangePassword(ctx context.Context, req apigen.ChangePasswordRequestObject) (apigen.ChangePasswordResponseObject, error)
ChangePassword replaces the caller's password after checking the current one, and ends their other sessions. It needs a session: a stolen API token must not be able to take over the account.
func (*Server) ChangeServerSoftware ¶ added in v1.14.0
func (s *Server) ChangeServerSoftware(ctx context.Context, req apigen.ChangeServerSoftwareRequestObject) (apigen.ChangeServerSoftwareResponseObject, error)
ChangeServerSoftware moves a server to another version or build of its software.
func (*Server) CloneServer ¶ added in v1.18.0
func (s *Server) CloneServer(ctx context.Context, req apigen.CloneServerRequestObject) (apigen.CloneServerResponseObject, error)
CloneServer starts copying parts of a server into another.
func (*Server) CompleteSetup ¶ added in v1.19.0
func (s *Server) CompleteSetup(ctx context.Context, req apigen.CompleteSetupRequestObject) (apigen.CompleteSetupResponseObject, error)
CompleteSetup creates the first administrator and the network, with the setup code from the Controller's machine, and signs in.
func (*Server) CreateBackupDestination ¶ added in v1.18.0
func (s *Server) CreateBackupDestination(ctx context.Context, req apigen.CreateBackupDestinationRequestObject) (apigen.CreateBackupDestinationResponseObject, error)
CreateBackupDestination adds a destination with a new age key pair and returns its private key, once.
func (*Server) CreateMyToken ¶
func (s *Server) CreateMyToken(ctx context.Context, req apigen.CreateMyTokenRequestObject) (apigen.CreateMyTokenResponseObject, error)
CreateMyToken creates an API token and returns its secret, once. It needs a session, so a token can never mint another token, least of all one without its restrictions.
func (*Server) CreateNetwork ¶ added in v1.19.0
func (s *Server) CreateNetwork(ctx context.Context, req apigen.CreateNetworkRequestObject) (apigen.CreateNetworkResponseObject, error)
CreateNetwork sets the network up on a Controller whose first administrator was created on the command line.
func (*Server) CreateNode ¶ added in v1.5.0
func (s *Server) CreateNode(ctx context.Context, req apigen.CreateNodeRequestObject) (apigen.CreateNodeResponseObject, error)
CreateNode adds a Node awaiting enrollment.
func (*Server) CreateProxy ¶ added in v1.19.0
func (s *Server) CreateProxy(ctx context.Context, req apigen.CreateProxyRequestObject) (apigen.CreateProxyResponseObject, error)
CreateProxy creates the network's Velocity proxy, published on the network's port.
func (*Server) CreateRole ¶ added in v1.4.0
func (s *Server) CreateRole(ctx context.Context, req apigen.CreateRoleRequestObject) (apigen.CreateRoleResponseObject, error)
CreateRole adds a custom role.
func (*Server) CreateRoleAssignment ¶ added in v1.4.0
func (s *Server) CreateRoleAssignment(ctx context.Context, req apigen.CreateRoleAssignmentRequestObject) (apigen.CreateRoleAssignmentResponseObject, error)
CreateRoleAssignment gives a role to a user or a team at a scope.
func (*Server) CreateServer ¶ added in v1.5.0
func (s *Server) CreateServer(ctx context.Context, req apigen.CreateServerRequestObject) (apigen.CreateServerResponseObject, error)
CreateServer creates a server owned by a team, in PROVISIONING.
func (*Server) CreateServerBackup ¶ added in v1.18.0
func (s *Server) CreateServerBackup(ctx context.Context, req apigen.CreateServerBackupRequestObject) (apigen.CreateServerBackupResponseObject, error)
CreateServerBackup asks the server's Node for a backup now.
func (*Server) CreateServerSchedule ¶ added in v1.18.0
func (s *Server) CreateServerSchedule(ctx context.Context, req apigen.CreateServerScheduleRequestObject) (apigen.CreateServerScheduleResponseObject, error)
CreateServerSchedule adds a schedule; the server's Agent runs it.
func (*Server) CreateTeam ¶ added in v1.4.0
func (s *Server) CreateTeam(ctx context.Context, req apigen.CreateTeamRequestObject) (apigen.CreateTeamResponseObject, error)
CreateTeam adds a team.
func (*Server) CreateUser ¶ added in v1.4.0
func (s *Server) CreateUser(ctx context.Context, req apigen.CreateUserRequestObject) (apigen.CreateUserResponseObject, error)
CreateUser creates a user with a one-time password, returned once.
func (*Server) DeleteBackup ¶ added in v1.18.0
func (s *Server) DeleteBackup(ctx context.Context, req apigen.DeleteBackupRequestObject) (apigen.DeleteBackupResponseObject, error)
DeleteBackup deletes a stored backup and its record.
func (*Server) DeleteBackupDestination ¶ added in v1.18.0
func (s *Server) DeleteBackupDestination(ctx context.Context, req apigen.DeleteBackupDestinationRequestObject) (apigen.DeleteBackupDestinationResponseObject, error)
DeleteBackupDestination removes a destination nothing uses.
func (*Server) DeleteMySession ¶
func (s *Server) DeleteMySession(ctx context.Context, req apigen.DeleteMySessionRequestObject) (apigen.DeleteMySessionResponseObject, error)
DeleteMySession ends one of the caller's sessions.
func (*Server) DeleteNetworkLogo ¶ added in v1.19.0
func (s *Server) DeleteNetworkLogo(ctx context.Context, _ apigen.DeleteNetworkLogoRequestObject) (apigen.DeleteNetworkLogoResponseObject, error)
DeleteNetworkLogo removes the logo.
func (*Server) DeleteNode ¶ added in v1.5.0
func (s *Server) DeleteNode(ctx context.Context, req apigen.DeleteNodeRequestObject) (apigen.DeleteNodeResponseObject, error)
DeleteNode removes a Node no server is assigned to.
func (*Server) DeleteRole ¶ added in v1.4.0
func (s *Server) DeleteRole(ctx context.Context, req apigen.DeleteRoleRequestObject) (apigen.DeleteRoleResponseObject, error)
DeleteRole deletes a custom role and its assignments.
func (*Server) DeleteRoleAssignment ¶ added in v1.4.0
func (s *Server) DeleteRoleAssignment(ctx context.Context, req apigen.DeleteRoleAssignmentRequestObject) (apigen.DeleteRoleAssignmentResponseObject, error)
DeleteRoleAssignment removes a role assignment.
func (*Server) DeleteServer ¶ added in v1.5.0
func (s *Server) DeleteServer(ctx context.Context, req apigen.DeleteServerRequestObject) (apigen.DeleteServerResponseObject, error)
DeleteServer sets a server's desired state to DELETED.
func (*Server) DeleteServerFile ¶ added in v1.12.0
func (s *Server) DeleteServerFile(ctx context.Context, req apigen.DeleteServerFileRequestObject) (apigen.DeleteServerFileResponseObject, error)
DeleteServerFile deletes a file or directory.
func (*Server) DeleteServerSchedule ¶ added in v1.18.0
func (s *Server) DeleteServerSchedule(ctx context.Context, req apigen.DeleteServerScheduleRequestObject) (apigen.DeleteServerScheduleResponseObject, error)
DeleteServerSchedule removes a schedule; its backups stay.
func (*Server) DeleteTeam ¶ added in v1.4.0
func (s *Server) DeleteTeam(ctx context.Context, req apigen.DeleteTeamRequestObject) (apigen.DeleteTeamResponseObject, error)
DeleteTeam deletes a team that owns no servers.
func (*Server) DeleteUser ¶ added in v1.4.0
func (s *Server) DeleteUser(ctx context.Context, req apigen.DeleteUserRequestObject) (apigen.DeleteUserResponseObject, error)
DeleteUser deletes a user; the audit log keeps their ID.
func (*Server) DisableNode ¶ added in v1.5.0
func (s *Server) DisableNode(ctx context.Context, req apigen.DisableNodeRequestObject) (apigen.DisableNodeResponseObject, error)
DisableNode cordons a Node.
func (*Server) DownloadBackup ¶ added in v1.18.0
func (s *Server) DownloadBackup(ctx context.Context, req apigen.DownloadBackupRequestObject) (apigen.DownloadBackupResponseObject, error)
DownloadBackup streams a backup, decrypted by a Node that can read it.
func (*Server) DownloadServerFile ¶ added in v1.12.0
func (s *Server) DownloadServerFile(ctx context.Context, req apigen.DownloadServerFileRequestObject) (apigen.DownloadServerFileResponseObject, error)
DownloadServerFile returns a file's content.
func (*Server) EnableNode ¶ added in v1.5.0
func (s *Server) EnableNode(ctx context.Context, req apigen.EnableNodeRequestObject) (apigen.EnableNodeResponseObject, error)
EnableNode allows new placements on a Node again.
func (*Server) GetBackup ¶ added in v1.18.0
func (s *Server) GetBackup(ctx context.Context, req apigen.GetBackupRequestObject) (apigen.GetBackupResponseObject, error)
GetBackup returns a backup.
func (*Server) GetBackupDestination ¶ added in v1.18.0
func (s *Server) GetBackupDestination(ctx context.Context, req apigen.GetBackupDestinationRequestObject) (apigen.GetBackupDestinationResponseObject, error)
GetBackupDestination returns a destination without its secrets.
func (*Server) GetCatalogPlugin ¶ added in v1.13.0
func (s *Server) GetCatalogPlugin(ctx context.Context, req apigen.GetCatalogPluginRequestObject) (apigen.GetCatalogPluginResponseObject, error)
GetCatalogPlugin returns a plugin with its versions.
func (*Server) GetCatalogStatus ¶ added in v1.13.0
func (s *Server) GetCatalogStatus(ctx context.Context, _ apigen.GetCatalogStatusRequestObject) (apigen.GetCatalogStatusResponseObject, error)
GetCatalogStatus describes the catalog snapshot in use and the latest sync attempt.
func (*Server) GetMe ¶
func (s *Server) GetMe(ctx context.Context, _ apigen.GetMeRequestObject) (apigen.GetMeResponseObject, error)
GetMe returns the signed-in user.
func (*Server) GetMyPermissions ¶ added in v1.17.0
func (s *Server) GetMyPermissions(ctx context.Context, _ apigen.GetMyPermissionsRequestObject) (apigen.GetMyPermissionsResponseObject, error)
GetMyPermissions returns the caller's effective permissions: for an API token restricted to some permissions, only those.
func (*Server) GetNetwork ¶ added in v1.19.0
func (s *Server) GetNetwork(ctx context.Context, _ apigen.GetNetworkRequestObject) (apigen.GetNetworkResponseObject, error)
GetNetwork returns the network to any signed-in user.
func (*Server) GetNetworkLogo ¶ added in v1.19.0
func (s *Server) GetNetworkLogo(ctx context.Context, _ apigen.GetNetworkLogoRequestObject) (apigen.GetNetworkLogoResponseObject, error)
GetNetworkLogo serves the logo, re-encoded as PNG when it was uploaded.
func (*Server) GetNode ¶ added in v1.5.0
func (s *Server) GetNode(ctx context.Context, req apigen.GetNodeRequestObject) (apigen.GetNodeResponseObject, error)
GetNode returns a Node with its status and conditions.
func (*Server) GetPublicNetwork ¶ added in v1.19.0
func (s *Server) GetPublicNetwork(ctx context.Context, _ apigen.GetPublicNetworkRequestObject) (apigen.GetPublicNetworkResponseObject, error)
GetPublicNetwork returns what the sign-in page shows: the name and logo.
func (*Server) GetRole ¶ added in v1.4.0
func (s *Server) GetRole(ctx context.Context, req apigen.GetRoleRequestObject) (apigen.GetRoleResponseObject, error)
GetRole returns a role.
func (*Server) GetServer ¶ added in v1.5.0
func (s *Server) GetServer(ctx context.Context, req apigen.GetServerRequestObject) (apigen.GetServerResponseObject, error)
GetServer returns a server's desired spec, observed status and convergence.
func (*Server) GetServerConsole ¶ added in v1.12.0
func (s *Server) GetServerConsole(ctx context.Context, req apigen.GetServerConsoleRequestObject) (apigen.GetServerConsoleResponseObject, error)
GetServerConsole follows a server's live console as Server-Sent Events.
func (*Server) GetServerProperties ¶ added in v1.12.0
func (s *Server) GetServerProperties(ctx context.Context, req apigen.GetServerPropertiesRequestObject) (apigen.GetServerPropertiesResponseObject, error)
GetServerProperties returns server.properties as key/value pairs.
func (*Server) GetSetup ¶ added in v1.19.0
func (s *Server) GetSetup(ctx context.Context, _ apigen.GetSetupRequestObject) (apigen.GetSetupResponseObject, error)
GetSetup reports whether first-run setup is needed.
func (*Server) GetSystemInfo ¶ added in v1.15.0
func (s *Server) GetSystemInfo(ctx context.Context, _ apigen.GetSystemInfoRequestObject) (apigen.GetSystemInfoResponseObject, error)
GetSystemInfo describes this Controller.
func (*Server) GetTeam ¶ added in v1.4.0
func (s *Server) GetTeam(ctx context.Context, req apigen.GetTeamRequestObject) (apigen.GetTeamResponseObject, error)
GetTeam returns a team.
func (*Server) GetUser ¶ added in v1.4.0
func (s *Server) GetUser(ctx context.Context, req apigen.GetUserRequestObject) (apigen.GetUserResponseObject, error)
GetUser returns a user.
func (*Server) GetUserPermissions ¶ added in v1.17.0
func (s *Server) GetUserPermissions(ctx context.Context, req apigen.GetUserPermissionsRequestObject) (apigen.GetUserPermissionsResponseObject, error)
GetUserPermissions returns a user's effective permissions, as their sessions have them.
func (*Server) Handler ¶
Handler returns the handler for everything under BasePath. Requests pass, in order, through: cross-origin protection, a body size limit, authentication (resolving the caller, if any), the forced password change, validation against the OpenAPI contract, and the handlers.
func (*Server) InstallServerPlugin ¶ added in v1.14.0
func (s *Server) InstallServerPlugin(ctx context.Context, req apigen.InstallServerPluginRequestObject) (apigen.InstallServerPluginResponseObject, error)
InstallServerPlugin installs a catalog plugin and its dependencies.
func (*Server) IssueEnrollmentToken ¶ added in v1.6.0
func (s *Server) IssueEnrollmentToken(ctx context.Context, req apigen.IssueEnrollmentTokenRequestObject) (apigen.IssueEnrollmentTokenResponseObject, error)
IssueEnrollmentToken creates a one-time token an Agent uses to enroll the Node, and returns it once.
func (*Server) IssuePasswordReset ¶ added in v1.4.0
func (s *Server) IssuePasswordReset(ctx context.Context, req apigen.IssuePasswordResetRequestObject) (apigen.IssuePasswordResetResponseObject, error)
IssuePasswordReset creates a one-time reset link and returns its secret, once.
func (*Server) ListArtifacts ¶ added in v1.11.0
func (s *Server) ListArtifacts(ctx context.Context, _ apigen.ListArtifactsRequestObject) (apigen.ListArtifactsResponseObject, error)
ListArtifacts lists the artifact cache.
func (*Server) ListAuditEvents ¶ added in v1.4.0
func (s *Server) ListAuditEvents(ctx context.Context, req apigen.ListAuditEventsRequestObject) (apigen.ListAuditEventsResponseObject, error)
ListAuditEvents searches the audit log, newest first.
func (*Server) ListBackupDestinations ¶ added in v1.18.0
func (s *Server) ListBackupDestinations(ctx context.Context, _ apigen.ListBackupDestinationsRequestObject) (apigen.ListBackupDestinationsResponseObject, error)
ListBackupDestinations lists destinations, without their secrets, to any signed-in user (to choose one).
func (*Server) ListCatalogPlugins ¶ added in v1.13.0
func (s *Server) ListCatalogPlugins(ctx context.Context, req apigen.ListCatalogPluginsRequestObject) (apigen.ListCatalogPluginsResponseObject, error)
ListCatalogPlugins searches the plugin catalog.
func (*Server) ListMySessions ¶
func (s *Server) ListMySessions(ctx context.Context, _ apigen.ListMySessionsRequestObject) (apigen.ListMySessionsResponseObject, error)
ListMySessions returns the caller's active sessions.
func (*Server) ListMyTokens ¶
func (s *Server) ListMyTokens(ctx context.Context, _ apigen.ListMyTokensRequestObject) (apigen.ListMyTokensResponseObject, error)
ListMyTokens returns the caller's API tokens, without their secrets.
func (*Server) ListNodes ¶ added in v1.5.0
func (s *Server) ListNodes(ctx context.Context, req apigen.ListNodesRequestObject) (apigen.ListNodesResponseObject, error)
ListNodes returns Nodes in creation order.
func (*Server) ListPermissions ¶ added in v1.4.0
func (s *Server) ListPermissions(ctx context.Context, _ apigen.ListPermissionsRequestObject) (apigen.ListPermissionsResponseObject, error)
ListPermissions returns the permission catalog.
func (*Server) ListRoleAssignments ¶ added in v1.4.0
func (s *Server) ListRoleAssignments(ctx context.Context, req apigen.ListRoleAssignmentsRequestObject) (apigen.ListRoleAssignmentsResponseObject, error)
ListRoleAssignments returns role assignments, optionally filtered.
func (*Server) ListRoles ¶ added in v1.4.0
func (s *Server) ListRoles(ctx context.Context, _ apigen.ListRolesRequestObject) (apigen.ListRolesResponseObject, error)
ListRoles returns every role.
func (*Server) ListServerBackups ¶ added in v1.18.0
func (s *Server) ListServerBackups(ctx context.Context, req apigen.ListServerBackupsRequestObject) (apigen.ListServerBackupsResponseObject, error)
ListServerBackups lists a server's backups, newest first.
func (*Server) ListServerEvents ¶ added in v1.5.0
func (s *Server) ListServerEvents(ctx context.Context, req apigen.ListServerEventsRequestObject) (apigen.ListServerEventsResponseObject, error)
ListServerEvents returns a server's history, newest first.
func (*Server) ListServerFiles ¶ added in v1.12.0
func (s *Server) ListServerFiles(ctx context.Context, req apigen.ListServerFilesRequestObject) (apigen.ListServerFilesResponseObject, error)
ListServerFiles lists a directory of a server's files.
func (*Server) ListServerPlugins ¶ added in v1.14.0
func (s *Server) ListServerPlugins(ctx context.Context, req apigen.ListServerPluginsRequestObject) (apigen.ListServerPluginsResponseObject, error)
ListServerPlugins lists a server's plugins.
func (*Server) ListServerSchedules ¶ added in v1.18.0
func (s *Server) ListServerSchedules(ctx context.Context, req apigen.ListServerSchedulesRequestObject) (apigen.ListServerSchedulesResponseObject, error)
ListServerSchedules lists a server's schedules with their next runs.
func (*Server) ListServers ¶ added in v1.5.0
func (s *Server) ListServers(ctx context.Context, req apigen.ListServersRequestObject) (apigen.ListServersResponseObject, error)
ListServers returns the servers the caller may read. A caller who may read none gets an empty list, not an error.
func (*Server) ListSoftware ¶ added in v1.11.0
func (s *Server) ListSoftware(ctx context.Context, _ apigen.ListSoftwareRequestObject) (apigen.ListSoftwareResponseObject, error)
ListSoftware lists the templates and their supported versions, from the catalog snapshot, or from the artifact cache before the first sync.
func (*Server) ListTeamMembers ¶ added in v1.4.0
func (s *Server) ListTeamMembers(ctx context.Context, req apigen.ListTeamMembersRequestObject) (apigen.ListTeamMembersResponseObject, error)
ListTeamMembers returns a team's members.
func (*Server) ListTeams ¶ added in v1.4.0
func (s *Server) ListTeams(ctx context.Context, req apigen.ListTeamsRequestObject) (apigen.ListTeamsResponseObject, error)
ListTeams returns teams in creation order.
func (*Server) ListUsers ¶ added in v1.4.0
func (s *Server) ListUsers(ctx context.Context, req apigen.ListUsersRequestObject) (apigen.ListUsersResponseObject, error)
ListUsers returns users in creation order.
func (*Server) Login ¶
func (s *Server) Login(ctx context.Context, req apigen.LoginRequestObject) (apigen.LoginResponseObject, error)
Login checks a username and password and starts a session. Every failure looks the same to the client: unknown user, wrong password, disabled account or no password set.
func (*Server) Logout ¶
func (s *Server) Logout(ctx context.Context, _ apigen.LogoutRequestObject) (apigen.LogoutResponseObject, error)
Logout ends the caller's session and clears the cookie. With an API token there is no session to end; the cookie is cleared all the same.
func (*Server) MakeServerDirectory ¶ added in v1.12.0
func (s *Server) MakeServerDirectory(ctx context.Context, req apigen.MakeServerDirectoryRequestObject) (apigen.MakeServerDirectoryResponseObject, error)
MakeServerDirectory creates a directory.
func (*Server) MigrateServer ¶ added in v1.18.0
func (s *Server) MigrateServer(ctx context.Context, req apigen.MigrateServerRequestObject) (apigen.MigrateServerResponseObject, error)
MigrateServer starts moving a server to another Node.
func (*Server) MoveServerFile ¶ added in v1.12.0
func (s *Server) MoveServerFile(ctx context.Context, req apigen.MoveServerFileRequestObject) (apigen.MoveServerFileResponseObject, error)
MoveServerFile moves or renames a file or directory.
func (*Server) PurgeExpiredSessions ¶
PurgeExpiredSessions deletes sessions that can no longer be used.
func (*Server) RedeemPasswordReset ¶
func (s *Server) RedeemPasswordReset(ctx context.Context, req apigen.RedeemPasswordResetRequestObject) (apigen.RedeemPasswordResetResponseObject, error)
RedeemPasswordReset sets a new password with a one-time link and ends every session and API token of the user.
func (*Server) RemoveServerPlugin ¶ added in v1.14.0
func (s *Server) RemoveServerPlugin(ctx context.Context, req apigen.RemoveServerPluginRequestObject) (apigen.RemoveServerPluginResponseObject, error)
RemoveServerPlugin removes a plugin from a server.
func (*Server) RemoveTeamMember ¶ added in v1.4.0
func (s *Server) RemoveTeamMember(ctx context.Context, req apigen.RemoveTeamMemberRequestObject) (apigen.RemoveTeamMemberResponseObject, error)
RemoveTeamMember removes a user from a team.
func (*Server) RestartServer ¶ added in v1.12.0
func (s *Server) RestartServer(ctx context.Context, req apigen.RestartServerRequestObject) (apigen.RestartServerResponseObject, error)
RestartServer asks the Agent to restart a running server gracefully.
func (*Server) RestoreServer ¶ added in v1.18.0
func (s *Server) RestoreServer(ctx context.Context, req apigen.RestoreServerRequestObject) (apigen.RestoreServerResponseObject, error)
RestoreServer starts restoring one of a server's backups in place.
func (*Server) RevokeMyToken ¶
func (s *Server) RevokeMyToken(ctx context.Context, req apigen.RevokeMyTokenRequestObject) (apigen.RevokeMyTokenResponseObject, error)
RevokeMyToken revokes one of the caller's API tokens.
func (*Server) RevokeNode ¶ added in v1.5.0
func (s *Server) RevokeNode(ctx context.Context, req apigen.RevokeNodeRequestObject) (apigen.RevokeNodeResponseObject, error)
RevokeNode revokes a Node for good.
func (*Server) RotateNodeCertificate ¶ added in v1.8.0
func (s *Server) RotateNodeCertificate(ctx context.Context, req apigen.RotateNodeCertificateRequestObject) (apigen.RotateNodeCertificateResponseObject, error)
RotateNodeCertificate asks a connected Agent to rotate its certificate.
func (*Server) SendServerCommand ¶ added in v1.12.0
func (s *Server) SendServerCommand(ctx context.Context, req apigen.SendServerCommandRequestObject) (apigen.SendServerCommandResponseObject, error)
SendServerCommand types a command into a server's console.
func (*Server) SetNetworkLogo ¶ added in v1.19.0
func (s *Server) SetNetworkLogo(ctx context.Context, req apigen.SetNetworkLogoRequestObject) (apigen.SetNetworkLogoResponseObject, error)
SetNetworkLogo stores an uploaded PNG or JPEG logo. It is decoded and re-encoded as PNG, at most 256 pixels a side: no metadata or other content survives, and nothing but a bitmap is ever served back.
func (*Server) StartServer ¶ added in v1.5.0
func (s *Server) StartServer(ctx context.Context, req apigen.StartServerRequestObject) (apigen.StartServerResponseObject, error)
StartServer sets a server's desired state to RUNNING.
func (*Server) StopServer ¶ added in v1.5.0
func (s *Server) StopServer(ctx context.Context, req apigen.StopServerRequestObject) (apigen.StopServerResponseObject, error)
StopServer sets a server's desired state to STOPPED.
func (*Server) UpdateBackupDestination ¶ added in v1.18.0
func (s *Server) UpdateBackupDestination(ctx context.Context, req apigen.UpdateBackupDestinationRequestObject) (apigen.UpdateBackupDestinationResponseObject, error)
UpdateBackupDestination changes a destination's settings.
func (*Server) UpdateNetwork ¶ added in v1.19.0
func (s *Server) UpdateNetwork(ctx context.Context, req apigen.UpdateNetworkRequestObject) (apigen.UpdateNetworkResponseObject, error)
UpdateNetwork changes the network's profile and lobby.
func (*Server) UpdateNode ¶ added in v1.19.0
func (s *Server) UpdateNode(ctx context.Context, req apigen.UpdateNodeRequestObject) (apigen.UpdateNodeResponseObject, error)
UpdateNode sets where other Nodes reach a Node.
func (*Server) UpdateRole ¶ added in v1.4.0
func (s *Server) UpdateRole(ctx context.Context, req apigen.UpdateRoleRequestObject) (apigen.UpdateRoleResponseObject, error)
UpdateRole changes a custom role.
func (*Server) UpdateServer ¶ added in v1.12.0
func (s *Server) UpdateServer(ctx context.Context, req apigen.UpdateServerRequestObject) (apigen.UpdateServerResponseObject, error)
UpdateServer changes a server's resources.
func (*Server) UpdateServerPlugin ¶ added in v1.14.0
func (s *Server) UpdateServerPlugin(ctx context.Context, req apigen.UpdateServerPluginRequestObject) (apigen.UpdateServerPluginResponseObject, error)
UpdateServerPlugin moves a catalog plugin to another version.
func (*Server) UpdateServerProperties ¶ added in v1.12.0
func (s *Server) UpdateServerProperties(ctx context.Context, req apigen.UpdateServerPropertiesRequestObject) (apigen.UpdateServerPropertiesResponseObject, error)
UpdateServerProperties changes server.properties, keeping its comments.
func (*Server) UpdateServerSchedule ¶ added in v1.18.0
func (s *Server) UpdateServerSchedule(ctx context.Context, req apigen.UpdateServerScheduleRequestObject) (apigen.UpdateServerScheduleResponseObject, error)
UpdateServerSchedule replaces a schedule.
func (*Server) UpdateTeam ¶ added in v1.4.0
func (s *Server) UpdateTeam(ctx context.Context, req apigen.UpdateTeamRequestObject) (apigen.UpdateTeamResponseObject, error)
UpdateTeam renames a team.
func (*Server) UpdateUser ¶ added in v1.4.0
func (s *Server) UpdateUser(ctx context.Context, req apigen.UpdateUserRequestObject) (apigen.UpdateUserResponseObject, error)
UpdateUser changes a user. The audit event names the changed fields but does not copy personal data such as the email address into the log.
func (*Server) UploadArtifact ¶ added in v1.11.0
func (s *Server) UploadArtifact(ctx context.Context, req apigen.UploadArtifactRequestObject) (apigen.UploadArtifactResponseObject, error)
UploadArtifact stores an administrator's server jar as unverified.
func (*Server) UploadServerFile ¶ added in v1.12.0
func (s *Server) UploadServerFile(ctx context.Context, req apigen.UploadServerFileRequestObject) (apigen.UploadServerFileResponseObject, error)
UploadServerFile creates or replaces a file.
func (*Server) UploadServerPlugin ¶ added in v1.14.0
func (s *Server) UploadServerPlugin(ctx context.Context, req apigen.UploadServerPluginRequestObject) (apigen.UploadServerPluginResponseObject, error)
UploadServerPlugin installs a plugin jar a user supplied.
type ServerOps ¶ added in v1.12.0
type ServerOps interface {
SendCommand(ctx context.Context, nodeID, serverID uuid.UUID, line string) error
ListFiles(ctx context.Context, nodeID, serverID uuid.UUID, path string) ([]domain.FileEntry, bool, error)
MakeDirectory(ctx context.Context, nodeID, serverID uuid.UUID, path string) error
MoveFile(ctx context.Context, nodeID, serverID uuid.UUID, from, to string) error
DeleteFile(ctx context.Context, nodeID, serverID uuid.UUID, path string) error
Console(ctx context.Context, nodeID, serverID uuid.UUID, tail int) (io.ReadCloser, error)
Download(ctx context.Context, nodeID, serverID uuid.UUID, path string) (io.ReadCloser, error)
Upload(ctx context.Context, nodeID, serverID uuid.UUID, path string, content io.Reader) error
ListPluginJars(ctx context.Context, nodeID, serverID uuid.UUID) (domain.PluginJars, error)
}
ServerOps carries out operations on a server through its Node's Agent.
Source Files
¶
- audit.go
- auth_handlers.go
- authn.go
- authz.go
- backups_handlers.go
- catalog_handlers.go
- manage_handlers.go
- me_handlers.go
- network_handlers.go
- nodes_handlers.go
- paging.go
- permissions_handlers.go
- plugins_handlers.go
- problem.go
- server.go
- servers_handlers.go
- software_handlers.go
- system_handlers.go
- teams_roles_handlers.go
- users_handlers.go