swarm

package
v2.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: BSD-3-Clause Imports: 47 Imported by: 0

Documentation

Overview

Package swarm owns Docker Swarm management and its HTTP routes.

Index

Constants

View Source
const (
	KVKeySwarmEnabled = "swarm.enabled"
)

Variables

This section is empty.

Functions

func RegisterSwarm

func RegisterSwarm(api huma.API, swarmSvc *SwarmService, environmentSvc *environment.EnvironmentService, eventSvc *event.EventService, cfg *config.Config)

RegisterSwarm registers the Docker Swarm HTTP operations on the provided Huma API.

It wires a SwarmHandler with the supplied services and publishes the full swarm route set for services, nodes, tasks, stacks, lifecycle operations, configs, and secrets.

api is the Huma API instance that receives the swarm operations. swarmSvc provides the underlying swarm business logic. environmentSvc provides environment and agent-deployment helpers used by node endpoints. eventSvc records audit events for mutating operations when available. cfg provides application configuration needed by deployment-snippet endpoints.

Types

type CreateSwarmConfigInput

type CreateSwarmConfigInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	Body          swarmtypes.ConfigCreateRequest
}

type CreateSwarmConfigOutput

type CreateSwarmConfigOutput struct {
	Body base.ApiResponse[swarmtypes.ConfigSummary]
}

type CreateSwarmSecretInput

type CreateSwarmSecretInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	Body          swarmtypes.SecretCreateRequest
}

type CreateSwarmSecretOutput

type CreateSwarmSecretOutput struct {
	Body base.ApiResponse[swarmtypes.SecretSummary]
}

type CreateSwarmServiceInput

type CreateSwarmServiceInput struct {
	EnvironmentID string                          `path:"id" doc:"Environment ID"`
	Body          swarmtypes.ServiceCreateRequest `doc:"Service creation request"`
}

type CreateSwarmServiceOutput

type CreateSwarmServiceOutput struct {
	Body base.ApiResponse[swarmtypes.ServiceCreateResponse]
}

type DeleteSwarmConfigInput

type DeleteSwarmConfigInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	ConfigID      string `path:"configId" doc:"Config ID"`
}

type DeleteSwarmConfigOutput

type DeleteSwarmConfigOutput struct {
	Body base.ApiResponse[base.MessageResponse]
}

type DeleteSwarmNodeAgentBindingInput

type DeleteSwarmNodeAgentBindingInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	NodeID        string `path:"nodeId" doc:"Node ID"`
}

type DeleteSwarmNodeAgentBindingOutput

type DeleteSwarmNodeAgentBindingOutput struct {
	Body base.ApiResponse[base.MessageResponse]
}

type DeleteSwarmNodeAgentDeploymentInput

type DeleteSwarmNodeAgentDeploymentInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	NodeID        string `path:"nodeId" doc:"Node ID"`
}

type DeleteSwarmNodeAgentDeploymentOutput

type DeleteSwarmNodeAgentDeploymentOutput struct {
	Body base.ApiResponse[base.MessageResponse]
}

type DeleteSwarmNodeInput

type DeleteSwarmNodeInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	NodeID        string `path:"nodeId" doc:"Node ID"`
	Force         bool   `query:"force" default:"false" doc:"Force node removal"`
}

type DeleteSwarmNodeOutput

type DeleteSwarmNodeOutput struct {
	Body base.ApiResponse[base.MessageResponse]
}

type DeleteSwarmSecretInput

type DeleteSwarmSecretInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	SecretID      string `path:"secretId" doc:"Secret ID"`
}

type DeleteSwarmSecretOutput

type DeleteSwarmSecretOutput struct {
	Body base.ApiResponse[base.MessageResponse]
}

type DeleteSwarmServiceInput

type DeleteSwarmServiceInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	ServiceID     string `path:"serviceId" doc:"Service ID"`
}

type DeleteSwarmServiceOutput

type DeleteSwarmServiceOutput struct {
	Body base.ApiResponse[base.MessageResponse]
}

type DeleteSwarmStackInput

type DeleteSwarmStackInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	Name          string `path:"name" doc:"Stack name"`
}

type DeleteSwarmStackOutput

type DeleteSwarmStackOutput struct {
	Body base.ApiResponse[base.MessageResponse]
}

type DemoteSwarmNodeInput

type DemoteSwarmNodeInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	NodeID        string `path:"nodeId" doc:"Node ID"`
}

type DemoteSwarmNodeOutput

type DemoteSwarmNodeOutput struct {
	Body base.ApiResponse[base.MessageResponse]
}

type Dependencies

type Dependencies struct {
	Environment *environment.EnvironmentService
	Event       *event.EventService
	Config      *config.Config
}

type DeploySwarmStackInput

type DeploySwarmStackInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	Body          swarmtypes.StackDeployRequest
}

type DeploySwarmStackOutput

type DeploySwarmStackOutput struct {
	Body base.ApiResponse[swarmtypes.StackDeployResponse]
}

type GetSwarmConfigInput

type GetSwarmConfigInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	ConfigID      string `path:"configId" doc:"Config ID"`
}

type GetSwarmConfigOutput

type GetSwarmConfigOutput struct {
	Body base.ApiResponse[swarmtypes.ConfigSummary]
}

type GetSwarmInfoInput

type GetSwarmInfoInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
}

type GetSwarmInfoOutput

type GetSwarmInfoOutput struct {
	Body base.ApiResponse[swarmtypes.SwarmInfo]
}

type GetSwarmJoinCandidatesInput

type GetSwarmJoinCandidatesInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
}

type GetSwarmJoinCandidatesOutput

type GetSwarmJoinCandidatesOutput struct {
	Body base.ApiResponse[[]swarmtypes.SwarmJoinCandidate]
}

type GetSwarmJoinTokensInput

type GetSwarmJoinTokensInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
}

type GetSwarmJoinTokensOutput

type GetSwarmJoinTokensOutput struct {
	Body base.ApiResponse[swarmtypes.SwarmJoinTokensResponse]
}

type GetSwarmNodeAgentDeploymentInput

type GetSwarmNodeAgentDeploymentInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	NodeID        string `path:"nodeId" doc:"Node ID"`
	Body          struct {
		Rotate bool `json:"rotate,omitempty" doc:"Rotate the environment token before generating snippets"`
	}
}

type GetSwarmNodeAgentDeploymentOutput

type GetSwarmNodeAgentDeploymentOutput struct {
	Body base.ApiResponse[SwarmNodeAgentDeployment]
}

type GetSwarmNodeIdentityInput

type GetSwarmNodeIdentityInput struct{}

type GetSwarmNodeIdentityOutput

type GetSwarmNodeIdentityOutput struct {
	Body base.ApiResponse[SwarmNodeIdentity]
}

type GetSwarmNodeInput

type GetSwarmNodeInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	NodeID        string `path:"nodeId" doc:"Node ID"`
}

type GetSwarmNodeOutput

type GetSwarmNodeOutput struct {
	Body base.ApiResponse[swarmtypes.NodeSummary]
}

type GetSwarmSecretInput

type GetSwarmSecretInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	SecretID      string `path:"secretId" doc:"Secret ID"`
}

type GetSwarmSecretOutput

type GetSwarmSecretOutput struct {
	Body base.ApiResponse[swarmtypes.SecretSummary]
}

type GetSwarmServiceInput

type GetSwarmServiceInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	ServiceID     string `path:"serviceId" doc:"Service ID"`
}

type GetSwarmServiceOutput

type GetSwarmServiceOutput struct {
	Body base.ApiResponse[swarmtypes.ServiceInspect]
}

type GetSwarmStackInput

type GetSwarmStackInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	Name          string `path:"name" doc:"Stack name"`
}

type GetSwarmStackOutput

type GetSwarmStackOutput struct {
	Body base.ApiResponse[swarmtypes.StackInspect]
}

type GetSwarmStackSourceInput

type GetSwarmStackSourceInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	Name          string `path:"name" doc:"Stack name"`
}

type GetSwarmStackSourceOutput

type GetSwarmStackSourceOutput struct {
	Body base.ApiResponse[swarmtypes.StackSource]
}

type GetSwarmStatusInput

type GetSwarmStatusInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
}

type GetSwarmStatusOutput

type GetSwarmStatusOutput struct {
	Body base.ApiResponse[swarmtypes.RuntimeStatus]
}

type GetSwarmUnlockKeyInput

type GetSwarmUnlockKeyInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
}

type GetSwarmUnlockKeyOutput

type GetSwarmUnlockKeyOutput struct {
	Body base.ApiResponse[swarmtypes.SwarmUnlockKeyResponse]
}

type InitSwarmInput

type InitSwarmInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	Body          swarmtypes.SwarmInitRequest
}

type InitSwarmOutput

type InitSwarmOutput struct {
	Body base.ApiResponse[swarmtypes.SwarmInitResponse]
}

type JoinSwarmEnvironmentsInput

type JoinSwarmEnvironmentsInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	Body          swarmtypes.SwarmJoinEnvironmentsRequest
}

type JoinSwarmEnvironmentsOutput

type JoinSwarmEnvironmentsOutput struct {
	Body base.ApiResponse[swarmtypes.SwarmJoinEnvironmentsResponse]
}

type JoinSwarmInput

type JoinSwarmInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	Body          swarmtypes.SwarmJoinRequest
}

type JoinSwarmOutput

type JoinSwarmOutput struct {
	Body base.ApiResponse[base.MessageResponse]
}

type LeaveSwarmInput

type LeaveSwarmInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	Body          swarmtypes.SwarmLeaveRequest
}

type LeaveSwarmOutput

type LeaveSwarmOutput struct {
	Body base.ApiResponse[base.MessageResponse]
}

type ListSwarmConfigsInput

type ListSwarmConfigsInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
}

type ListSwarmConfigsOutput

type ListSwarmConfigsOutput struct {
	Body base.ApiResponse[[]swarmtypes.ConfigSummary]
}

type ListSwarmNodeTasksInput

type ListSwarmNodeTasksInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	NodeID        string `path:"nodeId" doc:"Node ID"`
	Search        string `query:"search" doc:"Search query"`
	Sort          string `query:"sort" doc:"Column to sort by"`
	Order         string `query:"order" default:"asc" doc:"Sort direction (asc or desc)"`
	Start         int    `query:"start" default:"0" doc:"Start index for pagination"`
	Limit         int    `query:"limit" default:"20" doc:"Number of items per page"`
}

type ListSwarmNodeTasksOutput

type ListSwarmNodeTasksOutput struct {
	Body base.Paginated[swarmtypes.TaskSummary]
}

type ListSwarmNodesInput

type ListSwarmNodesInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	Search        string `query:"search" doc:"Search query"`
	Sort          string `query:"sort" doc:"Column to sort by"`
	Order         string `query:"order" default:"asc" doc:"Sort direction (asc or desc)"`
	Start         int    `query:"start" default:"0" doc:"Start index for pagination"`
	Limit         int    `query:"limit" default:"20" doc:"Number of items per page"`
}

type ListSwarmNodesOutput

type ListSwarmNodesOutput struct {
	Body base.Paginated[swarmtypes.NodeSummary]
}

type ListSwarmSecretsInput

type ListSwarmSecretsInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
}

type ListSwarmSecretsOutput

type ListSwarmSecretsOutput struct {
	Body base.ApiResponse[[]swarmtypes.SecretSummary]
}

type ListSwarmServiceTasksInput

type ListSwarmServiceTasksInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	ServiceID     string `path:"serviceId" doc:"Service ID"`
	Search        string `query:"search" doc:"Search query"`
	Sort          string `query:"sort" doc:"Column to sort by"`
	Order         string `query:"order" default:"asc" doc:"Sort direction (asc or desc)"`
	Start         int    `query:"start" default:"0" doc:"Start index for pagination"`
	Limit         int    `query:"limit" default:"20" doc:"Number of items per page"`
}

type ListSwarmServiceTasksOutput

type ListSwarmServiceTasksOutput struct {
	Body base.Paginated[swarmtypes.TaskSummary]
}

type ListSwarmServicesInput

type ListSwarmServicesInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	Search        string `query:"search" doc:"Search query"`
	Sort          string `query:"sort" doc:"Column to sort by"`
	Order         string `query:"order" default:"asc" doc:"Sort direction (asc or desc)"`
	Start         int    `query:"start" default:"0" doc:"Start index for pagination"`
	Limit         int    `query:"limit" default:"20" doc:"Number of items per page"`
}

type ListSwarmServicesOutput

type ListSwarmServicesOutput struct {
	Body base.Paginated[swarmtypes.ServiceSummary]
}

type ListSwarmStackServicesInput

type ListSwarmStackServicesInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	Name          string `path:"name" doc:"Stack name"`
	Search        string `query:"search" doc:"Search query"`
	Sort          string `query:"sort" doc:"Column to sort by"`
	Order         string `query:"order" default:"asc" doc:"Sort direction (asc or desc)"`
	Start         int    `query:"start" default:"0" doc:"Start index for pagination"`
	Limit         int    `query:"limit" default:"20" doc:"Number of items per page"`
}

type ListSwarmStackServicesOutput

type ListSwarmStackServicesOutput struct {
	Body base.Paginated[swarmtypes.ServiceSummary]
}

type ListSwarmStackTasksInput

type ListSwarmStackTasksInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	Name          string `path:"name" doc:"Stack name"`
	Search        string `query:"search" doc:"Search query"`
	Sort          string `query:"sort" doc:"Column to sort by"`
	Order         string `query:"order" default:"asc" doc:"Sort direction (asc or desc)"`
	Start         int    `query:"start" default:"0" doc:"Start index for pagination"`
	Limit         int    `query:"limit" default:"20" doc:"Number of items per page"`
}

type ListSwarmStackTasksOutput

type ListSwarmStackTasksOutput struct {
	Body base.Paginated[swarmtypes.TaskSummary]
}

type ListSwarmStacksInput

type ListSwarmStacksInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	Search        string `query:"search" doc:"Search query"`
	Sort          string `query:"sort" doc:"Column to sort by"`
	Order         string `query:"order" default:"asc" doc:"Sort direction (asc or desc)"`
	Start         int    `query:"start" default:"0" doc:"Start index for pagination"`
	Limit         int    `query:"limit" default:"20" doc:"Number of items per page"`
}

type ListSwarmStacksOutput

type ListSwarmStacksOutput struct {
	Body base.Paginated[swarmtypes.StackSummary]
}

type ListSwarmTasksInput

type ListSwarmTasksInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	Search        string `query:"search" doc:"Search query"`
	Sort          string `query:"sort" doc:"Column to sort by"`
	Order         string `query:"order" default:"asc" doc:"Sort direction (asc or desc)"`
	Start         int    `query:"start" default:"0" doc:"Start index for pagination"`
	Limit         int    `query:"limit" default:"20" doc:"Number of items per page"`
}

type ListSwarmTasksOutput

type ListSwarmTasksOutput struct {
	Body base.Paginated[swarmtypes.TaskSummary]
}

type Module

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

func New

func New(service *SwarmService, deps Dependencies) *Module

func (*Module) RegisterRoutes

func (m *Module) RegisterRoutes(api huma.API)

func (*Module) Service

func (m *Module) Service() *SwarmService

type PromoteSwarmNodeInput

type PromoteSwarmNodeInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	NodeID        string `path:"nodeId" doc:"Node ID"`
}

type PromoteSwarmNodeOutput

type PromoteSwarmNodeOutput struct {
	Body base.ApiResponse[base.MessageResponse]
}

type PutSwarmNodeAgentBindingInput

type PutSwarmNodeAgentBindingInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	NodeID        string `path:"nodeId" doc:"Node ID"`
	Body          swarmtypes.NodeAgentBindingRequest
}

type PutSwarmNodeAgentBindingOutput

type PutSwarmNodeAgentBindingOutput struct {
	Body base.ApiResponse[swarmtypes.NodeSummary]
}

type ReconcileSwarmNodeAgentsInput

type ReconcileSwarmNodeAgentsInput struct {
	Body          swarmtypes.NodeAgentReconcileRequest
	EnvironmentID string `path:"id" doc:"Environment ID"`
}

type ReconcileSwarmNodeAgentsOutput

type ReconcileSwarmNodeAgentsOutput struct {
	Body base.ApiResponse[swarmtypes.NodeAgentReconcileResponse]
}

type RenderSwarmStackConfigInput

type RenderSwarmStackConfigInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	Body          swarmtypes.StackRenderConfigRequest
}

type RenderSwarmStackConfigOutput

type RenderSwarmStackConfigOutput struct {
	Body base.ApiResponse[swarmtypes.StackRenderConfigResponse]
}

type RollbackSwarmServiceInput

type RollbackSwarmServiceInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	ServiceID     string `path:"serviceId" doc:"Service ID"`
}

type RollbackSwarmServiceOutput

type RollbackSwarmServiceOutput struct {
	Body base.ApiResponse[swarmtypes.ServiceUpdateResponse]
}

type RotateSwarmJoinTokensInput

type RotateSwarmJoinTokensInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	Body          swarmtypes.SwarmRotateJoinTokensRequest
}

type RotateSwarmJoinTokensOutput

type RotateSwarmJoinTokensOutput struct {
	Body base.ApiResponse[base.MessageResponse]
}

type ScaleSwarmServiceInput

type ScaleSwarmServiceInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	ServiceID     string `path:"serviceId" doc:"Service ID"`
	Body          swarmtypes.ServiceScaleRequest
}

type ScaleSwarmServiceOutput

type ScaleSwarmServiceOutput struct {
	Body base.ApiResponse[swarmtypes.ServiceUpdateResponse]
}

type SwarmHandler

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

func (*SwarmHandler) CreateConfig

CreateConfig creates a new swarm config.

It requires admin privileges, delegates the creation request to the swarm service, and records an audit event containing the created config ID and name.

ctx carries request-scoped cancellation, auth, and audit context. input identifies the environment and contains the config specification.

Returns the created config summary. Returns an authorization error for non-admin callers or mapped HTTP errors when validation or creation fails.

func (*SwarmHandler) CreateSecret

CreateSecret creates a new swarm secret.

It requires admin privileges, delegates the creation request to the swarm service, and records an audit event containing the created secret ID and name.

ctx carries request-scoped cancellation, auth, and audit context. input identifies the environment and contains the secret specification.

Returns the created secret summary. Returns an authorization error for non-admin callers or mapped HTTP errors when validation or creation fails.

func (*SwarmHandler) CreateService

CreateService creates a new swarm service in the target environment.

It requires admin privileges, forwards the create request to the swarm service, and records an audit event after a successful mutation.

ctx carries request-scoped cancellation, auth, and audit context. input contains the environment ID and the requested service specification.

Returns a successful response containing the created service ID and any Docker warnings. Returns an authorization error for non-admin callers or mapped HTTP errors when validation or creation fails.

func (*SwarmHandler) DeleteConfig

DeleteConfig removes a swarm config.

It requires admin privileges, delegates removal to the swarm service, maps missing configs to `404 Not Found`, and records an audit event on success.

ctx carries request-scoped cancellation, auth, and audit context. input identifies the config to remove.

Returns a confirmation response when the config is removed. Returns an authorization error for non-admin callers, `404 Not Found` when the config does not exist, or another mapped HTTP error when removal fails.

func (*SwarmHandler) DeleteNode

DeleteNode removes a swarm node from the cluster.

It requires admin privileges, supports forced removal when requested, and records the deletion parameters in the audit event metadata.

ctx carries request-scoped cancellation, auth, and audit context. input identifies the node to remove and indicates whether removal should be forced.

Returns a confirmation response when the node is removed. Returns an authorization error for non-admin callers or a mapped HTTP error when the node cannot be removed.

func (*SwarmHandler) DeleteNodeAgentBinding

DeleteNodeAgentBinding detaches the visible environment currently bound to a node.

func (*SwarmHandler) DeleteNodeAgentDeployment

DeleteNodeAgentDeployment removes a dedicated hidden node-agent registration.

func (*SwarmHandler) DeleteSecret

DeleteSecret removes a swarm secret.

It requires admin privileges, delegates removal to the swarm service, maps missing secrets to `404 Not Found`, and records an audit event on success.

ctx carries request-scoped cancellation, auth, and audit context. input identifies the secret to remove.

Returns a confirmation response when the secret is removed. Returns an authorization error for non-admin callers, `404 Not Found` when the secret does not exist, or another mapped HTTP error when removal fails.

func (*SwarmHandler) DeleteService

DeleteService removes a swarm service.

It requires admin privileges, asks the swarm service to remove the service, translates missing-service conditions to `404 Not Found`, and records an audit event after removal.

ctx carries request-scoped cancellation, auth, and audit context. input identifies the environment and service to remove.

Returns a successful response with a confirmation message. Returns an authorization error for non-admin callers, `404 Not Found` when the service does not exist, or another mapped HTTP error when removal fails.

func (*SwarmHandler) DeleteStack

DeleteStack removes a swarm stack and its managed resources.

It requires admin privileges, delegates the removal to the swarm service, maps missing stacks to `404 Not Found`, and records an audit event after deletion completes.

ctx carries request-scoped cancellation, auth, and audit context. input identifies the environment and stack name to remove.

Returns a confirmation response when the stack is removed. Returns an authorization error for non-admin callers, `404 Not Found` when the stack does not exist, or another mapped HTTP error when removal fails.

func (*SwarmHandler) DemoteNode

DemoteNode demotes a swarm manager to worker.

It requires admin privileges, performs the demotion through the swarm service, and records an audit event after the role change completes.

ctx carries request-scoped cancellation, auth, and audit context. input identifies the node to demote.

Returns a confirmation response when the demotion succeeds. Returns an authorization error for non-admin callers or a mapped HTTP error when the demotion fails.

func (*SwarmHandler) DeployStack

DeployStack deploys or updates a swarm stack.

It requires admin privileges, submits the stack deployment request to the swarm service, and records an audit event keyed by the stack name after the deployment succeeds.

ctx carries request-scoped cancellation, auth, and audit context. input identifies the target environment and provides the stack deployment request body.

Returns the deployment response reported by the swarm service. Returns an authorization error for non-admin callers or mapped HTTP errors when rendering, validation, or deployment fails.

func (*SwarmHandler) GetConfig

GetConfig returns details for a single swarm config.

It delegates to the swarm service and maps missing configs to `404 Not Found`.

ctx carries request-scoped cancellation and auth context. input identifies the environment and swarm config to inspect.

Returns the config summary when the config exists. Returns `404 Not Found` when the config does not exist or another mapped HTTP error when inspection fails.

func (*SwarmHandler) GetJoinCandidates

GetJoinCandidates lists enabled visible environments the caller can join.

func (*SwarmHandler) GetJoinTokens

GetJoinTokens returns the current swarm worker and manager join tokens.

It delegates to the swarm service and wraps the returned tokens in the standard API response shape.

ctx carries request-scoped cancellation and auth context. input identifies the environment whose join tokens should be returned.

Returns the current worker and manager join tokens. Returns a mapped HTTP error when token lookup fails.

func (*SwarmHandler) GetNode

GetNode returns detailed information for a single swarm node.

It loads the node through the swarm service and translates not-found conditions into the HTTP error returned by the API.

ctx carries request-scoped cancellation and auth context. input identifies the environment and swarm node to inspect.

Returns a successful response containing the node summary. Returns `404 Not Found` when the node does not exist or another mapped HTTP error when the inspection fails.

func (*SwarmHandler) GetNodeAgentDeployment

GetNodeAgentDeployment returns deployment snippets for attaching an Arcane Remote Environment to a swarm node.

It ensures a visible node-bound Remote Environment exists for new deployments, reuses legacy hidden registrations when present, optionally rotates the environment token, generates the appropriate deployment snippets, and refreshes the node summary so the response includes the latest agent status.

ctx carries request-scoped cancellation, auth, and audit context. input identifies the environment and node and optionally requests token rotation.

Returns deployment snippets, the backing environment ID, and the refreshed agent status. Returns an authorization error for non-admin callers, `401 Unauthorized` when the current user cannot be resolved, `404 Not Found` when the node does not exist, or `500 Internal Server Error` when environment provisioning or snippet generation fails.

func (*SwarmHandler) GetNodeIdentity

GetNodeIdentity returns the swarm identity of the node serving the current request.

It is used by edge agents and local nodes to report their swarm node ID, hostname, role, engine version, and swarm participation state.

ctx carries request-scoped cancellation and auth context. The input value is unused because the endpoint has no parameters.

Returns the local swarm node identity when it can be determined. Returns `500 Internal Server Error` when the swarm service is unavailable or identity discovery fails.

func (*SwarmHandler) GetSecret

GetSecret returns details for a single swarm secret.

It delegates to the swarm service and maps missing secrets to `404 Not Found`.

ctx carries request-scoped cancellation and auth context. input identifies the environment and secret to inspect.

Returns the secret summary when the secret exists. Returns `404 Not Found` when the secret does not exist or another mapped HTTP error when inspection fails.

func (*SwarmHandler) GetService

GetService returns detailed information for a single swarm service.

It loads the service by ID through the swarm service and converts lookup failures into the HTTP errors expected by the API.

ctx carries request-scoped cancellation and auth context. input identifies the environment and the swarm service to inspect.

Returns a successful response containing the service inspection payload. Returns `404 Not Found` when the service does not exist and other mapped HTTP errors when the inspection fails.

func (*SwarmHandler) GetStack

GetStack returns detailed information for a specific swarm stack.

It looks up the stack by name through the swarm service and maps missing stacks to `404 Not Found`.

ctx carries request-scoped cancellation and auth context. input identifies the environment and stack name to inspect.

Returns the stack inspection payload when the stack exists. Returns `404 Not Found` when the stack does not exist or another mapped HTTP error when inspection fails.

func (*SwarmHandler) GetStackSource

GetStackSource returns the stored source content for a swarm stack.

It requires admin privileges because stack source content can include sensitive configuration, and it maps missing stack sources to `404 Not Found`.

ctx carries request-scoped cancellation and auth context. input identifies the environment and stack whose saved source should be loaded.

Returns the stored compose and environment source for the stack. Returns an authorization error for non-admin callers, `404 Not Found` when no saved source exists, or another mapped HTTP error when loading fails.

func (*SwarmHandler) GetSwarmInfo

func (h *SwarmHandler) GetSwarmInfo(ctx context.Context, input *GetSwarmInfoInput) (*GetSwarmInfoOutput, error)

GetSwarmInfo returns the current swarm cluster metadata for an environment.

It delegates to the swarm service to inspect the local swarm state and maps service-layer failures to the API's HTTP error model.

ctx carries request-scoped cancellation and auth context. input identifies the environment whose swarm metadata should be returned.

Returns the current swarm information when swarm mode is available. Returns a mapped HTTP error when swarm inspection fails.

func (*SwarmHandler) GetSwarmStatus

func (h *SwarmHandler) GetSwarmStatus(ctx context.Context, input *GetSwarmStatusInput) (*GetSwarmStatusOutput, error)

GetSwarmStatus returns the current swarm cluster metadata for an environment.

It delegates to the swarm service to inspect the local swarm state and maps service-layer failures to the API's HTTP error model.

ctx carries request-scoped cancellation and auth context. input identifies the environment whose swarm metadata should be returned.

Returns the current swarm information when swarm mode is available. Returns a mapped HTTP error when swarm inspection fails.

func (*SwarmHandler) GetUnlockKey

GetUnlockKey returns the current swarm manager unlock key.

It delegates to the swarm service and exposes the unlock key in the standard API response envelope.

ctx carries request-scoped cancellation and auth context. input identifies the environment whose unlock key should be returned.

Returns the current manager unlock key. Returns a mapped HTTP error when the unlock key cannot be retrieved.

func (*SwarmHandler) InitSwarm

func (h *SwarmHandler) InitSwarm(ctx context.Context, input *InitSwarmInput) (*InitSwarmOutput, error)

InitSwarm initializes swarm mode on the target engine.

It requires admin privileges, delegates the initialization request to the swarm service, and records an audit event that includes the created node ID.

ctx carries request-scoped cancellation, auth, and audit context. input identifies the environment and contains the swarm initialization request body.

Returns the initialized swarm node ID and any other initialization details. Returns an authorization error for non-admin callers or mapped HTTP errors when initialization fails.

func (*SwarmHandler) JoinEnvironments

JoinEnvironments performs Easy Join without returning manager join tokens.

func (*SwarmHandler) JoinSwarm

func (h *SwarmHandler) JoinSwarm(ctx context.Context, input *JoinSwarmInput) (*JoinSwarmOutput, error)

JoinSwarm joins the target engine to an existing swarm cluster.

It requires admin privileges, forwards the join request to the swarm service, and records the remote manager addresses in the audit metadata.

ctx carries request-scoped cancellation, auth, and audit context. input identifies the environment and contains the join request body.

Returns a confirmation response when the engine joins successfully. Returns an authorization error for non-admin callers or mapped HTTP errors when the join operation fails.

func (*SwarmHandler) LeaveSwarm

func (h *SwarmHandler) LeaveSwarm(ctx context.Context, input *LeaveSwarmInput) (*LeaveSwarmOutput, error)

LeaveSwarm removes the target engine from its current swarm cluster.

It requires admin privileges, forwards the leave request to the swarm service, and records whether forced removal was requested.

ctx carries request-scoped cancellation, auth, and audit context. input identifies the environment and contains the leave request body.

Returns a confirmation response when the engine leaves successfully. Returns an authorization error for non-admin callers or mapped HTTP errors when the leave operation fails.

func (*SwarmHandler) ListConfigs

ListConfigs lists swarm configs in the current environment.

It delegates to the swarm service and normalizes nil config slices to empty arrays in the response body.

ctx carries request-scoped cancellation and auth context. input identifies the environment whose configs should be listed.

Returns the current swarm configs. Returns a mapped HTTP error when config enumeration fails.

func (*SwarmHandler) ListNodeTasks

ListNodeTasks lists tasks currently associated with a swarm node.

It applies search, sort, and pagination inputs and normalizes nil task lists to empty arrays in the API response.

ctx carries request-scoped cancellation and auth context. input identifies the node and provides optional filtering and pagination values.

Returns a paginated list of node task summaries. Returns a mapped HTTP error when the underlying lookup fails.

func (*SwarmHandler) ListNodes

ListNodes lists swarm nodes for an environment and returns a paginated response.

It applies the requested search, sort, and pagination values and guarantees a non-nil node slice in the response body.

ctx carries request-scoped cancellation and auth context. input supplies the environment ID plus optional filtering and pagination values.

Returns a paginated list of node summaries. Returns a mapped HTTP error when node enumeration fails.

func (*SwarmHandler) ListSecrets

ListSecrets lists swarm secrets in the current environment.

It delegates to the swarm service and normalizes nil secret slices to empty arrays in the response body.

ctx carries request-scoped cancellation and auth context. input identifies the environment whose secrets should be listed.

Returns the current swarm secrets. Returns a mapped HTTP error when secret enumeration fails.

func (*SwarmHandler) ListServiceTasks

ListServiceTasks lists tasks belonging to a specific swarm service.

It applies the requested search, sort, and pagination values, delegates the lookup to the swarm service, and normalizes nil task slices to empty arrays.

ctx carries request-scoped cancellation and auth context. input identifies the service and supplies optional filtering and pagination fields.

Returns a paginated list of task summaries for the service. Returns a mapped HTTP error when the swarm task lookup fails.

func (*SwarmHandler) ListServices

ListServices lists swarm services for an environment and returns a paginated response.

It normalizes the search, sort, and pagination fields from input, delegates the lookup to the swarm service, and returns an empty slice instead of nil when no services are found.

ctx carries request-scoped cancellation and auth context. input supplies the environment ID plus optional search, sorting, and pagination values.

Returns a successful response containing service summaries and pagination metadata. Returns an HTTP-shaped error if the swarm service is unavailable or if the underlying swarm lookup fails.

func (*SwarmHandler) ListStackServices

ListStackServices lists services belonging to a swarm stack.

It applies search, sort, and pagination options, ensures the response uses an empty slice instead of nil, and maps missing stacks to `404 Not Found`.

ctx carries request-scoped cancellation and auth context. input identifies the stack and provides optional filtering and pagination fields.

Returns a paginated list of service summaries for the stack. Returns `404 Not Found` when the stack does not exist or another mapped HTTP error when the lookup fails.

func (*SwarmHandler) ListStackTasks

ListStackTasks lists tasks belonging to a swarm stack.

It applies search, sort, and pagination options, ensures the response uses an empty slice instead of nil, and maps missing stacks to `404 Not Found`.

ctx carries request-scoped cancellation and auth context. input identifies the stack and provides optional filtering and pagination fields.

Returns a paginated list of task summaries for the stack. Returns `404 Not Found` when the stack does not exist or another mapped HTTP error when the lookup fails.

func (*SwarmHandler) ListStacks

ListStacks lists swarm stacks for the current environment.

It applies search, sort, and pagination values supplied by the caller and returns an empty stack slice instead of nil when no stacks are present.

ctx carries request-scoped cancellation and auth context. input supplies optional filtering and pagination values.

Returns a paginated list of stack summaries. Returns a mapped HTTP error when stack enumeration fails.

func (*SwarmHandler) ListTasks

ListTasks lists swarm tasks across the current environment.

It applies the requested search, sort, and pagination fields and guarantees an empty task slice when no tasks are returned.

ctx carries request-scoped cancellation and auth context. input supplies optional filtering and pagination values.

Returns a paginated task listing for the environment. Returns a mapped HTTP error when task enumeration fails.

func (*SwarmHandler) PromoteNode

PromoteNode promotes a swarm worker to manager.

It requires admin privileges, performs the promotion through the swarm service, and records an audit event after the role change completes.

ctx carries request-scoped cancellation, auth, and audit context. input identifies the node to promote.

Returns a confirmation response when the promotion succeeds. Returns an authorization error for non-admin callers or a mapped HTTP error when the promotion fails.

func (*SwarmHandler) PutNodeAgentBinding

PutNodeAgentBinding verifies and attaches an existing visible environment.

func (*SwarmHandler) ReconcileNodeAgents

ReconcileNodeAgents verifies and persists unique visible-environment node bindings.

func (*SwarmHandler) RenderStackConfig

RenderStackConfig renders and validates a swarm stack configuration without deploying it.

It delegates to the swarm service to parse the provided compose and environment content and returns the normalized render result.

ctx carries request-scoped cancellation and auth context. input provides the stack render request body.

Returns the rendered compose content together with discovered resource names. Returns a mapped HTTP error when parsing, interpolation, or rendering fails.

func (*SwarmHandler) RollbackService

RollbackService requests a server-side rollback for a swarm service.

It requires admin privileges, delegates the rollback to the swarm service, and records an audit event describing the mutation.

ctx carries request-scoped cancellation, auth, and audit context. input identifies the environment and service to roll back.

Returns a successful response containing any warnings reported by Docker. Returns an authorization error for non-admin callers or mapped HTTP errors when the rollback cannot be performed.

func (*SwarmHandler) RotateJoinTokens

RotateJoinTokens rotates the swarm worker and or manager join tokens.

It requires admin privileges, delegates the rotation request to the swarm service, and records which token classes were rotated.

ctx carries request-scoped cancellation, auth, and audit context. input identifies the environment and contains the requested token-rotation flags.

Returns a confirmation response when rotation succeeds. Returns an authorization error for non-admin callers or mapped HTTP errors when token rotation fails.

func (*SwarmHandler) ScaleService

ScaleService changes the replica count of a swarm service.

It requires admin privileges, forwards the requested replica count to the swarm service, and records the new replica target in the audit metadata.

ctx carries request-scoped cancellation, auth, and audit context. input identifies the service and supplies the desired replica count.

Returns a successful response containing any warnings reported by Docker. Returns an authorization error for non-admin callers or mapped HTTP errors when scaling is invalid or the update fails.

func (*SwarmHandler) UnlockSwarm

func (h *SwarmHandler) UnlockSwarm(ctx context.Context, input *UnlockSwarmInput) (*UnlockSwarmOutput, error)

UnlockSwarm unlocks a swarm manager using the supplied unlock key.

It requires admin privileges, delegates the unlock request to the swarm service, and emits an audit event after success.

ctx carries request-scoped cancellation, auth, and audit context. input identifies the environment and contains the unlock request body.

Returns a confirmation response when the manager is unlocked. Returns an authorization error for non-admin callers or mapped HTTP errors when the unlock operation fails.

func (*SwarmHandler) UpdateNode

UpdateNode updates mutable settings on a swarm node.

It requires admin privileges, forwards the requested node changes to the swarm service, and records an audit event when the mutation succeeds.

ctx carries request-scoped cancellation, auth, and audit context. input identifies the node to update and contains the requested changes.

Returns a confirmation response when the update succeeds. Returns an authorization error for non-admin callers or a mapped HTTP error when the node update fails.

func (*SwarmHandler) UpdateService

UpdateService updates an existing swarm service.

It requires admin privileges, submits the requested versioned update to the swarm service, and emits an audit event when the update succeeds.

ctx carries request-scoped cancellation, auth, and audit context. input identifies the service to update and provides the replacement specification and options.

Returns a successful response containing any Docker warnings. Returns an authorization error for non-admin callers or mapped HTTP errors when the update request is invalid or the underlying update fails.

func (*SwarmHandler) UpdateStackSource

UpdateStackSource persists the saved compose and env source for a swarm stack and redeploys the stack so the edit takes effect on running services.

It requires admin privileges because stack source content can include sensitive configuration. The stack name comes from the route, and the body contains the replacement source files to save.

func (*SwarmHandler) UpdateSwarmSpec

func (h *SwarmHandler) UpdateSwarmSpec(ctx context.Context, input *UpdateSwarmSpecInput) (*UpdateSwarmSpecOutput, error)

UpdateSwarmSpec updates the swarm cluster specification.

It requires admin privileges, forwards the request to the swarm service, and records an audit event after the spec change succeeds.

ctx carries request-scoped cancellation, auth, and audit context. input identifies the environment and contains the replacement swarm spec.

Returns a confirmation response when the spec update succeeds. Returns an authorization error for non-admin callers or mapped HTTP errors when the spec update fails.

type SwarmNodeAgentDeployment

type SwarmNodeAgentDeployment struct {
	environment.DeploymentSnippet

	EnvironmentID string                     `json:"environmentId"`
	Agent         swarmtypes.NodeAgentStatus `json:"agent"`
}

type SwarmNodeIdentity

type SwarmNodeIdentity struct {
	SwarmNodeID   string `json:"swarmNodeId"`
	Hostname      string `json:"hostname"`
	Role          string `json:"role"`
	EngineVersion string `json:"engineVersion"`
	SwarmActive   bool   `json:"swarmActive"`
}

type SwarmService

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

SwarmService provides Docker Swarm related operations.

func NewSwarmService

func NewSwarmService(
	dockerService *docker.DockerClientService,
	settingsService *settings.SettingsService,
	kvService *kv.KVService,
	registryService *registry.ContainerRegistryService,
	environmentService *environment.EnvironmentService,
) *SwarmService

func (*SwarmService) BindNodeAgent

func (s *SwarmService) BindNodeAgent(ctx context.Context, parentEnvironmentID, nodeID string, request swarmtypes.NodeAgentBindingRequest) (*environment.Environment, error)

BindNodeAgent verifies that a visible environment currently reports the requested node identity before persisting the binding.

func (*SwarmService) CreateConfig

func (*SwarmService) CreateSecret

func (*SwarmService) DemoteNode

func (s *SwarmService) DemoteNode(ctx context.Context, nodeID string) error

func (*SwarmService) DeployStack

func (*SwarmService) GetConfig

func (s *SwarmService) GetConfig(ctx context.Context, configID string) (*swarmtypes.ConfigSummary, error)

func (*SwarmService) GetLocalNodeIdentity

func (s *SwarmService) GetLocalNodeIdentity(ctx context.Context) (*SwarmNodeIdentity, error)

func (*SwarmService) GetNode

func (s *SwarmService) GetNode(ctx context.Context, environmentID, nodeID string) (*swarmtypes.NodeSummary, error)

func (*SwarmService) GetSecret

func (s *SwarmService) GetSecret(ctx context.Context, secretID string) (*swarmtypes.SecretSummary, error)

func (*SwarmService) GetService

func (s *SwarmService) GetService(ctx context.Context, serviceID string) (*swarmtypes.ServiceInspect, error)

func (*SwarmService) GetStack

func (s *SwarmService) GetStack(ctx context.Context, environmentID, stackName string) (*swarmtypes.StackInspect, error)

func (*SwarmService) GetStackSource

func (s *SwarmService) GetStackSource(ctx context.Context, environmentID, stackName string) (*swarmtypes.StackSource, error)

func (*SwarmService) GetSwarmInfo

func (s *SwarmService) GetSwarmInfo(ctx context.Context) (*swarmtypes.SwarmInfo, error)

func (*SwarmService) GetSwarmJoinTokens

func (s *SwarmService) GetSwarmJoinTokens(ctx context.Context) (*swarmtypes.SwarmJoinTokensResponse, error)

func (*SwarmService) GetSwarmUnlockKey

func (s *SwarmService) GetSwarmUnlockKey(ctx context.Context) (*swarmtypes.SwarmUnlockKeyResponse, error)

func (*SwarmService) InitSwarm

func (*SwarmService) IsEnabled

func (s *SwarmService) IsEnabled(ctx context.Context) (bool, error)

func (*SwarmService) JoinEnvironments

func (s *SwarmService) JoinEnvironments(ctx context.Context, managerEnvironmentID string, request swarmtypes.SwarmJoinEnvironmentsRequest) (*swarmtypes.SwarmJoinEnvironmentsResponse, error)

JoinEnvironments joins visible remote environments to the selected swarm manager and returns an independent result for every target.

func (*SwarmService) JoinSwarm

func (*SwarmService) LeaveSwarm

func (*SwarmService) ListConfigs

func (s *SwarmService) ListConfigs(ctx context.Context) ([]swarmtypes.ConfigSummary, error)

func (*SwarmService) ListNodeTasksPaginated

func (s *SwarmService) ListNodeTasksPaginated(ctx context.Context, nodeID string, params pagination.QueryParams) ([]swarmtypes.TaskSummary, pagination.Response, error)

func (*SwarmService) ListNodesPaginated

func (s *SwarmService) ListNodesPaginated(ctx context.Context, environmentID string, params pagination.QueryParams) ([]swarmtypes.NodeSummary, pagination.Response, error)

func (*SwarmService) ListSecrets

func (s *SwarmService) ListSecrets(ctx context.Context) ([]swarmtypes.SecretSummary, error)

func (*SwarmService) ListServiceTasksPaginated

func (s *SwarmService) ListServiceTasksPaginated(ctx context.Context, serviceID string, params pagination.QueryParams) ([]swarmtypes.TaskSummary, pagination.Response, error)

func (*SwarmService) ListServicesPaginated

func (*SwarmService) ListStackServicesPaginated

func (s *SwarmService) ListStackServicesPaginated(ctx context.Context, stackName string, params pagination.QueryParams) ([]swarmtypes.ServiceSummary, pagination.Response, error)

func (*SwarmService) ListStackTasksPaginated

func (s *SwarmService) ListStackTasksPaginated(ctx context.Context, stackName string, params pagination.QueryParams) ([]swarmtypes.TaskSummary, pagination.Response, error)

func (*SwarmService) ListStacksPaginated

func (s *SwarmService) ListStacksPaginated(ctx context.Context, environmentID string, params pagination.QueryParams) ([]swarmtypes.StackSummary, pagination.Response, error)

func (*SwarmService) ListTasksPaginated

func (*SwarmService) PromoteNode

func (s *SwarmService) PromoteNode(ctx context.Context, nodeID string) error

func (*SwarmService) ReconcileNodeAgents

func (s *SwarmService) ReconcileNodeAgents(ctx context.Context, environmentID string) (*swarmtypes.NodeAgentReconcileResponse, error)

ReconcileNodeAgents verifies visible environment identities and persists only unique node matches. Ambiguous and mismatched identities remain unchanged.

func (*SwarmService) RemoveConfig

func (s *SwarmService) RemoveConfig(ctx context.Context, configID string) error

func (*SwarmService) RemoveNode

func (s *SwarmService) RemoveNode(ctx context.Context, nodeID string, force bool) error

func (*SwarmService) RemoveSecret

func (s *SwarmService) RemoveSecret(ctx context.Context, secretID string) error

func (*SwarmService) RemoveService

func (s *SwarmService) RemoveService(ctx context.Context, serviceID string) error

func (*SwarmService) RemoveStack

func (s *SwarmService) RemoveStack(ctx context.Context, environmentID, stackName string) error

func (*SwarmService) RenderStackConfig

func (*SwarmService) RollbackService

func (s *SwarmService) RollbackService(ctx context.Context, serviceID string) (*swarmtypes.ServiceUpdateResponse, error)

func (*SwarmService) RotateSwarmJoinTokens

func (s *SwarmService) RotateSwarmJoinTokens(ctx context.Context, req swarmtypes.SwarmRotateJoinTokensRequest) error

func (*SwarmService) ScaleService

func (s *SwarmService) ScaleService(ctx context.Context, serviceID string, replicas uint64) (*swarmtypes.ServiceUpdateResponse, error)

func (*SwarmService) StreamServiceLogs

func (s *SwarmService) StreamServiceLogs(ctx context.Context, serviceID string, logsChan chan<- string, follow bool, tail, since string, timestamps bool) error

func (*SwarmService) SyncSwarmEnabledState

func (s *SwarmService) SyncSwarmEnabledState(ctx context.Context) error

func (*SwarmService) UnlockSwarm

func (*SwarmService) UpdateNode

func (s *SwarmService) UpdateNode(ctx context.Context, nodeID string, req swarmtypes.NodeUpdateRequest) error

func (*SwarmService) UpdateService

func (*SwarmService) UpdateStackSource

func (s *SwarmService) UpdateStackSource(ctx context.Context, environmentID, stackName string, req swarmtypes.StackSourceUpdateRequest) (*swarmtypes.StackSource, error)

func (*SwarmService) UpdateSwarmSpec

func (s *SwarmService) UpdateSwarmSpec(ctx context.Context, req swarmtypes.SwarmUpdateRequest) error

type UnlockSwarmInput

type UnlockSwarmInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	Body          swarmtypes.SwarmUnlockRequest
}

type UnlockSwarmOutput

type UnlockSwarmOutput struct {
	Body base.ApiResponse[base.MessageResponse]
}

type UpdateSwarmNodeInput

type UpdateSwarmNodeInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	NodeID        string `path:"nodeId" doc:"Node ID"`
	Body          swarmtypes.NodeUpdateRequest
}

type UpdateSwarmNodeOutput

type UpdateSwarmNodeOutput struct {
	Body base.ApiResponse[base.MessageResponse]
}

type UpdateSwarmServiceInput

type UpdateSwarmServiceInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	ServiceID     string `path:"serviceId" doc:"Service ID"`
	Body          swarmtypes.ServiceUpdateRequest
}

type UpdateSwarmServiceOutput

type UpdateSwarmServiceOutput struct {
	Body base.ApiResponse[swarmtypes.ServiceUpdateResponse]
}

type UpdateSwarmSpecInput

type UpdateSwarmSpecInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	Body          swarmtypes.SwarmUpdateRequest
}

type UpdateSwarmSpecOutput

type UpdateSwarmSpecOutput struct {
	Body base.ApiResponse[base.MessageResponse]
}

type UpdateSwarmStackSourceInput

type UpdateSwarmStackSourceInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	Name          string `path:"name" doc:"Stack name"`
	Body          swarmtypes.StackSourceUpdateRequest
}

type UpdateSwarmStackSourceOutput

type UpdateSwarmStackSourceOutput struct {
	Body base.ApiResponse[swarmtypes.StackSource]
}

Jump to

Keyboard shortcuts

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