Documentation
¶
Overview ¶
Package swarm owns Docker Swarm management and its HTTP routes.
Index ¶
- Constants
- func RegisterSwarm(api huma.API, swarmSvc *SwarmService, ...)
- type CreateSwarmConfigInput
- type CreateSwarmConfigOutput
- type CreateSwarmSecretInput
- type CreateSwarmSecretOutput
- type CreateSwarmServiceInput
- type CreateSwarmServiceOutput
- type DeleteSwarmConfigInput
- type DeleteSwarmConfigOutput
- type DeleteSwarmNodeAgentBindingInput
- type DeleteSwarmNodeAgentBindingOutput
- type DeleteSwarmNodeAgentDeploymentInput
- type DeleteSwarmNodeAgentDeploymentOutput
- type DeleteSwarmNodeInput
- type DeleteSwarmNodeOutput
- type DeleteSwarmSecretInput
- type DeleteSwarmSecretOutput
- type DeleteSwarmServiceInput
- type DeleteSwarmServiceOutput
- type DeleteSwarmStackInput
- type DeleteSwarmStackOutput
- type DemoteSwarmNodeInput
- type DemoteSwarmNodeOutput
- type Dependencies
- type DeploySwarmStackInput
- type DeploySwarmStackOutput
- type GetSwarmConfigInput
- type GetSwarmConfigOutput
- type GetSwarmInfoInput
- type GetSwarmInfoOutput
- type GetSwarmJoinCandidatesInput
- type GetSwarmJoinCandidatesOutput
- type GetSwarmJoinTokensInput
- type GetSwarmJoinTokensOutput
- type GetSwarmNodeAgentDeploymentInput
- type GetSwarmNodeAgentDeploymentOutput
- type GetSwarmNodeIdentityInput
- type GetSwarmNodeIdentityOutput
- type GetSwarmNodeInput
- type GetSwarmNodeOutput
- type GetSwarmSecretInput
- type GetSwarmSecretOutput
- type GetSwarmServiceInput
- type GetSwarmServiceOutput
- type GetSwarmStackInput
- type GetSwarmStackOutput
- type GetSwarmStackSourceInput
- type GetSwarmStackSourceOutput
- type GetSwarmStatusInput
- type GetSwarmStatusOutput
- type GetSwarmUnlockKeyInput
- type GetSwarmUnlockKeyOutput
- type InitSwarmInput
- type InitSwarmOutput
- type JoinSwarmEnvironmentsInput
- type JoinSwarmEnvironmentsOutput
- type JoinSwarmInput
- type JoinSwarmOutput
- type LeaveSwarmInput
- type LeaveSwarmOutput
- type ListSwarmConfigsInput
- type ListSwarmConfigsOutput
- type ListSwarmNodeTasksInput
- type ListSwarmNodeTasksOutput
- type ListSwarmNodesInput
- type ListSwarmNodesOutput
- type ListSwarmSecretsInput
- type ListSwarmSecretsOutput
- type ListSwarmServiceTasksInput
- type ListSwarmServiceTasksOutput
- type ListSwarmServicesInput
- type ListSwarmServicesOutput
- type ListSwarmStackServicesInput
- type ListSwarmStackServicesOutput
- type ListSwarmStackTasksInput
- type ListSwarmStackTasksOutput
- type ListSwarmStacksInput
- type ListSwarmStacksOutput
- type ListSwarmTasksInput
- type ListSwarmTasksOutput
- type Module
- type PromoteSwarmNodeInput
- type PromoteSwarmNodeOutput
- type PutSwarmNodeAgentBindingInput
- type PutSwarmNodeAgentBindingOutput
- type ReconcileSwarmNodeAgentsInput
- type ReconcileSwarmNodeAgentsOutput
- type RenderSwarmStackConfigInput
- type RenderSwarmStackConfigOutput
- type RollbackSwarmServiceInput
- type RollbackSwarmServiceOutput
- type RotateSwarmJoinTokensInput
- type RotateSwarmJoinTokensOutput
- type ScaleSwarmServiceInput
- type ScaleSwarmServiceOutput
- type SwarmHandler
- func (h *SwarmHandler) CreateConfig(ctx context.Context, input *CreateSwarmConfigInput) (*CreateSwarmConfigOutput, error)
- func (h *SwarmHandler) CreateSecret(ctx context.Context, input *CreateSwarmSecretInput) (*CreateSwarmSecretOutput, error)
- func (h *SwarmHandler) CreateService(ctx context.Context, input *CreateSwarmServiceInput) (*CreateSwarmServiceOutput, error)
- func (h *SwarmHandler) DeleteConfig(ctx context.Context, input *DeleteSwarmConfigInput) (*DeleteSwarmConfigOutput, error)
- func (h *SwarmHandler) DeleteNode(ctx context.Context, input *DeleteSwarmNodeInput) (*DeleteSwarmNodeOutput, error)
- func (h *SwarmHandler) DeleteNodeAgentBinding(ctx context.Context, input *DeleteSwarmNodeAgentBindingInput) (*DeleteSwarmNodeAgentBindingOutput, error)
- func (h *SwarmHandler) DeleteNodeAgentDeployment(ctx context.Context, input *DeleteSwarmNodeAgentDeploymentInput) (*DeleteSwarmNodeAgentDeploymentOutput, error)
- func (h *SwarmHandler) DeleteSecret(ctx context.Context, input *DeleteSwarmSecretInput) (*DeleteSwarmSecretOutput, error)
- func (h *SwarmHandler) DeleteService(ctx context.Context, input *DeleteSwarmServiceInput) (*DeleteSwarmServiceOutput, error)
- func (h *SwarmHandler) DeleteStack(ctx context.Context, input *DeleteSwarmStackInput) (*DeleteSwarmStackOutput, error)
- func (h *SwarmHandler) DemoteNode(ctx context.Context, input *DemoteSwarmNodeInput) (*DemoteSwarmNodeOutput, error)
- func (h *SwarmHandler) DeployStack(ctx context.Context, input *DeploySwarmStackInput) (*DeploySwarmStackOutput, error)
- func (h *SwarmHandler) GetConfig(ctx context.Context, input *GetSwarmConfigInput) (*GetSwarmConfigOutput, error)
- func (h *SwarmHandler) GetJoinCandidates(ctx context.Context, input *GetSwarmJoinCandidatesInput) (*GetSwarmJoinCandidatesOutput, error)
- func (h *SwarmHandler) GetJoinTokens(ctx context.Context, input *GetSwarmJoinTokensInput) (*GetSwarmJoinTokensOutput, error)
- func (h *SwarmHandler) GetNode(ctx context.Context, input *GetSwarmNodeInput) (*GetSwarmNodeOutput, error)
- func (h *SwarmHandler) GetNodeAgentDeployment(ctx context.Context, input *GetSwarmNodeAgentDeploymentInput) (*GetSwarmNodeAgentDeploymentOutput, error)
- func (h *SwarmHandler) GetNodeIdentity(ctx context.Context, _ *GetSwarmNodeIdentityInput) (*GetSwarmNodeIdentityOutput, error)
- func (h *SwarmHandler) GetSecret(ctx context.Context, input *GetSwarmSecretInput) (*GetSwarmSecretOutput, error)
- func (h *SwarmHandler) GetService(ctx context.Context, input *GetSwarmServiceInput) (*GetSwarmServiceOutput, error)
- func (h *SwarmHandler) GetStack(ctx context.Context, input *GetSwarmStackInput) (*GetSwarmStackOutput, error)
- func (h *SwarmHandler) GetStackSource(ctx context.Context, input *GetSwarmStackSourceInput) (*GetSwarmStackSourceOutput, error)
- func (h *SwarmHandler) GetSwarmInfo(ctx context.Context, input *GetSwarmInfoInput) (*GetSwarmInfoOutput, error)
- func (h *SwarmHandler) GetSwarmStatus(ctx context.Context, input *GetSwarmStatusInput) (*GetSwarmStatusOutput, error)
- func (h *SwarmHandler) GetUnlockKey(ctx context.Context, input *GetSwarmUnlockKeyInput) (*GetSwarmUnlockKeyOutput, error)
- func (h *SwarmHandler) InitSwarm(ctx context.Context, input *InitSwarmInput) (*InitSwarmOutput, error)
- func (h *SwarmHandler) JoinEnvironments(ctx context.Context, input *JoinSwarmEnvironmentsInput) (*JoinSwarmEnvironmentsOutput, error)
- func (h *SwarmHandler) JoinSwarm(ctx context.Context, input *JoinSwarmInput) (*JoinSwarmOutput, error)
- func (h *SwarmHandler) LeaveSwarm(ctx context.Context, input *LeaveSwarmInput) (*LeaveSwarmOutput, error)
- func (h *SwarmHandler) ListConfigs(ctx context.Context, input *ListSwarmConfigsInput) (*ListSwarmConfigsOutput, error)
- func (h *SwarmHandler) ListNodeTasks(ctx context.Context, input *ListSwarmNodeTasksInput) (*ListSwarmNodeTasksOutput, error)
- func (h *SwarmHandler) ListNodes(ctx context.Context, input *ListSwarmNodesInput) (*ListSwarmNodesOutput, error)
- func (h *SwarmHandler) ListSecrets(ctx context.Context, input *ListSwarmSecretsInput) (*ListSwarmSecretsOutput, error)
- func (h *SwarmHandler) ListServiceTasks(ctx context.Context, input *ListSwarmServiceTasksInput) (*ListSwarmServiceTasksOutput, error)
- func (h *SwarmHandler) ListServices(ctx context.Context, input *ListSwarmServicesInput) (*ListSwarmServicesOutput, error)
- func (h *SwarmHandler) ListStackServices(ctx context.Context, input *ListSwarmStackServicesInput) (*ListSwarmStackServicesOutput, error)
- func (h *SwarmHandler) ListStackTasks(ctx context.Context, input *ListSwarmStackTasksInput) (*ListSwarmStackTasksOutput, error)
- func (h *SwarmHandler) ListStacks(ctx context.Context, input *ListSwarmStacksInput) (*ListSwarmStacksOutput, error)
- func (h *SwarmHandler) ListTasks(ctx context.Context, input *ListSwarmTasksInput) (*ListSwarmTasksOutput, error)
- func (h *SwarmHandler) PromoteNode(ctx context.Context, input *PromoteSwarmNodeInput) (*PromoteSwarmNodeOutput, error)
- func (h *SwarmHandler) PutNodeAgentBinding(ctx context.Context, input *PutSwarmNodeAgentBindingInput) (*PutSwarmNodeAgentBindingOutput, error)
- func (h *SwarmHandler) ReconcileNodeAgents(ctx context.Context, input *ReconcileSwarmNodeAgentsInput) (*ReconcileSwarmNodeAgentsOutput, error)
- func (h *SwarmHandler) RenderStackConfig(ctx context.Context, input *RenderSwarmStackConfigInput) (*RenderSwarmStackConfigOutput, error)
- func (h *SwarmHandler) RollbackService(ctx context.Context, input *RollbackSwarmServiceInput) (*RollbackSwarmServiceOutput, error)
- func (h *SwarmHandler) RotateJoinTokens(ctx context.Context, input *RotateSwarmJoinTokensInput) (*RotateSwarmJoinTokensOutput, error)
- func (h *SwarmHandler) ScaleService(ctx context.Context, input *ScaleSwarmServiceInput) (*ScaleSwarmServiceOutput, error)
- func (h *SwarmHandler) UnlockSwarm(ctx context.Context, input *UnlockSwarmInput) (*UnlockSwarmOutput, error)
- func (h *SwarmHandler) UpdateNode(ctx context.Context, input *UpdateSwarmNodeInput) (*UpdateSwarmNodeOutput, error)
- func (h *SwarmHandler) UpdateService(ctx context.Context, input *UpdateSwarmServiceInput) (*UpdateSwarmServiceOutput, error)
- func (h *SwarmHandler) UpdateStackSource(ctx context.Context, input *UpdateSwarmStackSourceInput) (*UpdateSwarmStackSourceOutput, error)
- func (h *SwarmHandler) UpdateSwarmSpec(ctx context.Context, input *UpdateSwarmSpecInput) (*UpdateSwarmSpecOutput, error)
- type SwarmNodeAgentDeployment
- type SwarmNodeIdentity
- type SwarmService
- func (s *SwarmService) BindNodeAgent(ctx context.Context, parentEnvironmentID, nodeID string, ...) (*environment.Environment, error)
- func (s *SwarmService) CreateConfig(ctx context.Context, req swarmtypes.ConfigCreateRequest) (*swarmtypes.ConfigSummary, error)
- func (s *SwarmService) CreateSecret(ctx context.Context, req swarmtypes.SecretCreateRequest) (*swarmtypes.SecretSummary, error)
- func (s *SwarmService) CreateService(ctx context.Context, req swarmtypes.ServiceCreateRequest) (*swarmtypes.ServiceCreateResponse, error)
- func (s *SwarmService) DemoteNode(ctx context.Context, nodeID string) error
- func (s *SwarmService) DeployStack(ctx context.Context, environmentID string, req swarmtypes.StackDeployRequest) (*swarmtypes.StackDeployResponse, error)
- func (s *SwarmService) GetConfig(ctx context.Context, configID string) (*swarmtypes.ConfigSummary, error)
- func (s *SwarmService) GetLocalNodeIdentity(ctx context.Context) (*SwarmNodeIdentity, error)
- func (s *SwarmService) GetNode(ctx context.Context, environmentID, nodeID string) (*swarmtypes.NodeSummary, error)
- func (s *SwarmService) GetSecret(ctx context.Context, secretID string) (*swarmtypes.SecretSummary, error)
- func (s *SwarmService) GetService(ctx context.Context, serviceID string) (*swarmtypes.ServiceInspect, error)
- func (s *SwarmService) GetStack(ctx context.Context, environmentID, stackName string) (*swarmtypes.StackInspect, error)
- func (s *SwarmService) GetStackSource(ctx context.Context, environmentID, stackName string) (*swarmtypes.StackSource, error)
- func (s *SwarmService) GetSwarmInfo(ctx context.Context) (*swarmtypes.SwarmInfo, error)
- func (s *SwarmService) GetSwarmJoinTokens(ctx context.Context) (*swarmtypes.SwarmJoinTokensResponse, error)
- func (s *SwarmService) GetSwarmUnlockKey(ctx context.Context) (*swarmtypes.SwarmUnlockKeyResponse, error)
- func (s *SwarmService) InitSwarm(ctx context.Context, req swarmtypes.SwarmInitRequest) (*swarmtypes.SwarmInitResponse, error)
- func (s *SwarmService) IsEnabled(ctx context.Context) (bool, error)
- func (s *SwarmService) JoinEnvironments(ctx context.Context, managerEnvironmentID string, ...) (*swarmtypes.SwarmJoinEnvironmentsResponse, error)
- func (s *SwarmService) JoinSwarm(ctx context.Context, req swarmtypes.SwarmJoinRequest) error
- func (s *SwarmService) LeaveSwarm(ctx context.Context, req swarmtypes.SwarmLeaveRequest) error
- func (s *SwarmService) ListConfigs(ctx context.Context) ([]swarmtypes.ConfigSummary, error)
- func (s *SwarmService) ListNodeTasksPaginated(ctx context.Context, nodeID string, params pagination.QueryParams) ([]swarmtypes.TaskSummary, pagination.Response, error)
- func (s *SwarmService) ListNodesPaginated(ctx context.Context, environmentID string, params pagination.QueryParams) ([]swarmtypes.NodeSummary, pagination.Response, error)
- func (s *SwarmService) ListSecrets(ctx context.Context) ([]swarmtypes.SecretSummary, error)
- func (s *SwarmService) ListServiceTasksPaginated(ctx context.Context, serviceID string, params pagination.QueryParams) ([]swarmtypes.TaskSummary, pagination.Response, error)
- func (s *SwarmService) ListServicesPaginated(ctx context.Context, params pagination.QueryParams) ([]swarmtypes.ServiceSummary, pagination.Response, error)
- func (s *SwarmService) ListStackServicesPaginated(ctx context.Context, stackName string, params pagination.QueryParams) ([]swarmtypes.ServiceSummary, pagination.Response, error)
- func (s *SwarmService) ListStackTasksPaginated(ctx context.Context, stackName string, params pagination.QueryParams) ([]swarmtypes.TaskSummary, pagination.Response, error)
- func (s *SwarmService) ListStacksPaginated(ctx context.Context, environmentID string, params pagination.QueryParams) ([]swarmtypes.StackSummary, pagination.Response, error)
- func (s *SwarmService) ListTasksPaginated(ctx context.Context, params pagination.QueryParams) ([]swarmtypes.TaskSummary, pagination.Response, error)
- func (s *SwarmService) PromoteNode(ctx context.Context, nodeID string) error
- func (s *SwarmService) ReconcileNodeAgents(ctx context.Context, environmentID string) (*swarmtypes.NodeAgentReconcileResponse, error)
- func (s *SwarmService) RemoveConfig(ctx context.Context, configID string) error
- func (s *SwarmService) RemoveNode(ctx context.Context, nodeID string, force bool) error
- func (s *SwarmService) RemoveSecret(ctx context.Context, secretID string) error
- func (s *SwarmService) RemoveService(ctx context.Context, serviceID string) error
- func (s *SwarmService) RemoveStack(ctx context.Context, environmentID, stackName string) error
- func (s *SwarmService) RenderStackConfig(ctx context.Context, environmentID string, ...) (*swarmtypes.StackRenderConfigResponse, error)
- func (s *SwarmService) RollbackService(ctx context.Context, serviceID string) (*swarmtypes.ServiceUpdateResponse, error)
- func (s *SwarmService) RotateSwarmJoinTokens(ctx context.Context, req swarmtypes.SwarmRotateJoinTokensRequest) error
- func (s *SwarmService) ScaleService(ctx context.Context, serviceID string, replicas uint64) (*swarmtypes.ServiceUpdateResponse, error)
- func (s *SwarmService) StreamServiceLogs(ctx context.Context, serviceID string, logsChan chan<- string, follow bool, ...) error
- func (s *SwarmService) SyncSwarmEnabledState(ctx context.Context) error
- func (s *SwarmService) UnlockSwarm(ctx context.Context, req swarmtypes.SwarmUnlockRequest) error
- func (s *SwarmService) UpdateNode(ctx context.Context, nodeID string, req swarmtypes.NodeUpdateRequest) error
- func (s *SwarmService) UpdateService(ctx context.Context, serviceID string, req swarmtypes.ServiceUpdateRequest) (*swarmtypes.ServiceUpdateResponse, error)
- func (s *SwarmService) UpdateStackSource(ctx context.Context, environmentID, stackName string, ...) (*swarmtypes.StackSource, error)
- func (s *SwarmService) UpdateSwarmSpec(ctx context.Context, req swarmtypes.SwarmUpdateRequest) error
- type UnlockSwarmInput
- type UnlockSwarmOutput
- type UpdateSwarmNodeInput
- type UpdateSwarmNodeOutput
- type UpdateSwarmServiceInput
- type UpdateSwarmServiceOutput
- type UpdateSwarmSpecInput
- type UpdateSwarmSpecOutput
- type UpdateSwarmStackSourceInput
- type UpdateSwarmStackSourceOutput
Constants ¶
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 DeleteSwarmConfigOutput ¶
type DeleteSwarmConfigOutput struct {
Body base.ApiResponse[base.MessageResponse]
}
type DeleteSwarmNodeAgentBindingOutput ¶
type DeleteSwarmNodeAgentBindingOutput struct {
Body base.ApiResponse[base.MessageResponse]
}
type DeleteSwarmNodeAgentDeploymentOutput ¶
type DeleteSwarmNodeAgentDeploymentOutput struct {
Body base.ApiResponse[base.MessageResponse]
}
type DeleteSwarmNodeInput ¶
type DeleteSwarmNodeOutput ¶
type DeleteSwarmNodeOutput struct {
Body base.ApiResponse[base.MessageResponse]
}
type DeleteSwarmSecretInput ¶
type DeleteSwarmSecretOutput ¶
type DeleteSwarmSecretOutput struct {
Body base.ApiResponse[base.MessageResponse]
}
type DeleteSwarmServiceInput ¶
type DeleteSwarmServiceOutput ¶
type DeleteSwarmServiceOutput struct {
Body base.ApiResponse[base.MessageResponse]
}
type DeleteSwarmStackInput ¶
type DeleteSwarmStackOutput ¶
type DeleteSwarmStackOutput struct {
Body base.ApiResponse[base.MessageResponse]
}
type DemoteSwarmNodeInput ¶
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 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 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 GetSwarmNodeOutput ¶
type GetSwarmNodeOutput struct {
Body base.ApiResponse[swarmtypes.NodeSummary]
}
type GetSwarmSecretInput ¶
type GetSwarmSecretOutput ¶
type GetSwarmSecretOutput struct {
Body base.ApiResponse[swarmtypes.SecretSummary]
}
type GetSwarmServiceInput ¶
type GetSwarmServiceOutput ¶
type GetSwarmServiceOutput struct {
Body base.ApiResponse[swarmtypes.ServiceInspect]
}
type GetSwarmStackInput ¶
type GetSwarmStackOutput ¶
type GetSwarmStackOutput struct {
Body base.ApiResponse[swarmtypes.StackInspect]
}
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 (*Module) Service ¶
func (m *Module) Service() *SwarmService
type PromoteSwarmNodeInput ¶
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 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 ¶
func (h *SwarmHandler) CreateConfig(ctx context.Context, input *CreateSwarmConfigInput) (*CreateSwarmConfigOutput, error)
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 ¶
func (h *SwarmHandler) CreateSecret(ctx context.Context, input *CreateSwarmSecretInput) (*CreateSwarmSecretOutput, error)
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 ¶
func (h *SwarmHandler) CreateService(ctx context.Context, input *CreateSwarmServiceInput) (*CreateSwarmServiceOutput, error)
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 ¶
func (h *SwarmHandler) DeleteConfig(ctx context.Context, input *DeleteSwarmConfigInput) (*DeleteSwarmConfigOutput, error)
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 ¶
func (h *SwarmHandler) DeleteNode(ctx context.Context, input *DeleteSwarmNodeInput) (*DeleteSwarmNodeOutput, error)
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 ¶
func (h *SwarmHandler) DeleteNodeAgentBinding(ctx context.Context, input *DeleteSwarmNodeAgentBindingInput) (*DeleteSwarmNodeAgentBindingOutput, error)
DeleteNodeAgentBinding detaches the visible environment currently bound to a node.
func (*SwarmHandler) DeleteNodeAgentDeployment ¶
func (h *SwarmHandler) DeleteNodeAgentDeployment(ctx context.Context, input *DeleteSwarmNodeAgentDeploymentInput) (*DeleteSwarmNodeAgentDeploymentOutput, error)
DeleteNodeAgentDeployment removes a dedicated hidden node-agent registration.
func (*SwarmHandler) DeleteSecret ¶
func (h *SwarmHandler) DeleteSecret(ctx context.Context, input *DeleteSwarmSecretInput) (*DeleteSwarmSecretOutput, error)
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 ¶
func (h *SwarmHandler) DeleteService(ctx context.Context, input *DeleteSwarmServiceInput) (*DeleteSwarmServiceOutput, error)
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 ¶
func (h *SwarmHandler) DeleteStack(ctx context.Context, input *DeleteSwarmStackInput) (*DeleteSwarmStackOutput, error)
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 ¶
func (h *SwarmHandler) DemoteNode(ctx context.Context, input *DemoteSwarmNodeInput) (*DemoteSwarmNodeOutput, error)
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 ¶
func (h *SwarmHandler) DeployStack(ctx context.Context, input *DeploySwarmStackInput) (*DeploySwarmStackOutput, error)
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 ¶
func (h *SwarmHandler) GetConfig(ctx context.Context, input *GetSwarmConfigInput) (*GetSwarmConfigOutput, error)
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 ¶
func (h *SwarmHandler) GetJoinCandidates(ctx context.Context, input *GetSwarmJoinCandidatesInput) (*GetSwarmJoinCandidatesOutput, error)
GetJoinCandidates lists enabled visible environments the caller can join.
func (*SwarmHandler) GetJoinTokens ¶
func (h *SwarmHandler) GetJoinTokens(ctx context.Context, input *GetSwarmJoinTokensInput) (*GetSwarmJoinTokensOutput, error)
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 ¶
func (h *SwarmHandler) GetNode(ctx context.Context, input *GetSwarmNodeInput) (*GetSwarmNodeOutput, error)
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 ¶
func (h *SwarmHandler) GetNodeAgentDeployment(ctx context.Context, input *GetSwarmNodeAgentDeploymentInput) (*GetSwarmNodeAgentDeploymentOutput, error)
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 ¶
func (h *SwarmHandler) GetNodeIdentity(ctx context.Context, _ *GetSwarmNodeIdentityInput) (*GetSwarmNodeIdentityOutput, error)
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 ¶
func (h *SwarmHandler) GetSecret(ctx context.Context, input *GetSwarmSecretInput) (*GetSwarmSecretOutput, error)
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 ¶
func (h *SwarmHandler) GetService(ctx context.Context, input *GetSwarmServiceInput) (*GetSwarmServiceOutput, error)
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 ¶
func (h *SwarmHandler) GetStack(ctx context.Context, input *GetSwarmStackInput) (*GetSwarmStackOutput, error)
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 ¶
func (h *SwarmHandler) GetStackSource(ctx context.Context, input *GetSwarmStackSourceInput) (*GetSwarmStackSourceOutput, error)
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 ¶
func (h *SwarmHandler) GetUnlockKey(ctx context.Context, input *GetSwarmUnlockKeyInput) (*GetSwarmUnlockKeyOutput, error)
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 ¶
func (h *SwarmHandler) JoinEnvironments(ctx context.Context, input *JoinSwarmEnvironmentsInput) (*JoinSwarmEnvironmentsOutput, error)
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 ¶
func (h *SwarmHandler) ListConfigs(ctx context.Context, input *ListSwarmConfigsInput) (*ListSwarmConfigsOutput, error)
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 ¶
func (h *SwarmHandler) ListNodeTasks(ctx context.Context, input *ListSwarmNodeTasksInput) (*ListSwarmNodeTasksOutput, error)
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 ¶
func (h *SwarmHandler) ListNodes(ctx context.Context, input *ListSwarmNodesInput) (*ListSwarmNodesOutput, error)
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 ¶
func (h *SwarmHandler) ListSecrets(ctx context.Context, input *ListSwarmSecretsInput) (*ListSwarmSecretsOutput, error)
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 ¶
func (h *SwarmHandler) ListServiceTasks(ctx context.Context, input *ListSwarmServiceTasksInput) (*ListSwarmServiceTasksOutput, error)
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 ¶
func (h *SwarmHandler) ListServices(ctx context.Context, input *ListSwarmServicesInput) (*ListSwarmServicesOutput, error)
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 ¶
func (h *SwarmHandler) ListStackServices(ctx context.Context, input *ListSwarmStackServicesInput) (*ListSwarmStackServicesOutput, error)
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 ¶
func (h *SwarmHandler) ListStackTasks(ctx context.Context, input *ListSwarmStackTasksInput) (*ListSwarmStackTasksOutput, error)
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 ¶
func (h *SwarmHandler) ListStacks(ctx context.Context, input *ListSwarmStacksInput) (*ListSwarmStacksOutput, error)
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 ¶
func (h *SwarmHandler) ListTasks(ctx context.Context, input *ListSwarmTasksInput) (*ListSwarmTasksOutput, error)
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 ¶
func (h *SwarmHandler) PromoteNode(ctx context.Context, input *PromoteSwarmNodeInput) (*PromoteSwarmNodeOutput, error)
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 ¶
func (h *SwarmHandler) PutNodeAgentBinding(ctx context.Context, input *PutSwarmNodeAgentBindingInput) (*PutSwarmNodeAgentBindingOutput, error)
PutNodeAgentBinding verifies and attaches an existing visible environment.
func (*SwarmHandler) ReconcileNodeAgents ¶
func (h *SwarmHandler) ReconcileNodeAgents(ctx context.Context, input *ReconcileSwarmNodeAgentsInput) (*ReconcileSwarmNodeAgentsOutput, error)
ReconcileNodeAgents verifies and persists unique visible-environment node bindings.
func (*SwarmHandler) RenderStackConfig ¶
func (h *SwarmHandler) RenderStackConfig(ctx context.Context, input *RenderSwarmStackConfigInput) (*RenderSwarmStackConfigOutput, error)
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 ¶
func (h *SwarmHandler) RollbackService(ctx context.Context, input *RollbackSwarmServiceInput) (*RollbackSwarmServiceOutput, error)
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 ¶
func (h *SwarmHandler) RotateJoinTokens(ctx context.Context, input *RotateSwarmJoinTokensInput) (*RotateSwarmJoinTokensOutput, error)
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 ¶
func (h *SwarmHandler) ScaleService(ctx context.Context, input *ScaleSwarmServiceInput) (*ScaleSwarmServiceOutput, error)
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 ¶
func (h *SwarmHandler) UpdateNode(ctx context.Context, input *UpdateSwarmNodeInput) (*UpdateSwarmNodeOutput, error)
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 ¶
func (h *SwarmHandler) UpdateService(ctx context.Context, input *UpdateSwarmServiceInput) (*UpdateSwarmServiceOutput, error)
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 ¶
func (h *SwarmHandler) UpdateStackSource(ctx context.Context, input *UpdateSwarmStackSourceInput) (*UpdateSwarmStackSourceOutput, error)
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 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 (s *SwarmService) CreateConfig(ctx context.Context, req swarmtypes.ConfigCreateRequest) (*swarmtypes.ConfigSummary, error)
func (*SwarmService) CreateSecret ¶
func (s *SwarmService) CreateSecret(ctx context.Context, req swarmtypes.SecretCreateRequest) (*swarmtypes.SecretSummary, error)
func (*SwarmService) CreateService ¶
func (s *SwarmService) CreateService(ctx context.Context, req swarmtypes.ServiceCreateRequest) (*swarmtypes.ServiceCreateResponse, error)
func (*SwarmService) DemoteNode ¶
func (s *SwarmService) DemoteNode(ctx context.Context, nodeID string) error
func (*SwarmService) DeployStack ¶
func (s *SwarmService) DeployStack(ctx context.Context, environmentID string, req swarmtypes.StackDeployRequest) (*swarmtypes.StackDeployResponse, error)
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 (s *SwarmService) InitSwarm(ctx context.Context, req swarmtypes.SwarmInitRequest) (*swarmtypes.SwarmInitResponse, error)
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 (s *SwarmService) JoinSwarm(ctx context.Context, req swarmtypes.SwarmJoinRequest) error
func (*SwarmService) LeaveSwarm ¶
func (s *SwarmService) LeaveSwarm(ctx context.Context, req swarmtypes.SwarmLeaveRequest) error
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 (s *SwarmService) ListServicesPaginated(ctx context.Context, params pagination.QueryParams) ([]swarmtypes.ServiceSummary, pagination.Response, error)
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 (s *SwarmService) ListTasksPaginated(ctx context.Context, params pagination.QueryParams) ([]swarmtypes.TaskSummary, pagination.Response, error)
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 (*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 (s *SwarmService) RenderStackConfig(ctx context.Context, environmentID string, req swarmtypes.StackRenderConfigRequest) (*swarmtypes.StackRenderConfigResponse, error)
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 (*SwarmService) SyncSwarmEnabledState ¶
func (s *SwarmService) SyncSwarmEnabledState(ctx context.Context) error
func (*SwarmService) UnlockSwarm ¶
func (s *SwarmService) UnlockSwarm(ctx context.Context, req swarmtypes.SwarmUnlockRequest) error
func (*SwarmService) UpdateNode ¶
func (s *SwarmService) UpdateNode(ctx context.Context, nodeID string, req swarmtypes.NodeUpdateRequest) error
func (*SwarmService) UpdateService ¶
func (s *SwarmService) UpdateService(ctx context.Context, serviceID string, req swarmtypes.ServiceUpdateRequest) (*swarmtypes.ServiceUpdateResponse, error)
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]
}