Documentation
¶
Index ¶
- Constants
- Variables
- func ApplyEnvironmentRuntimeState(env *environmenttypes.Environment)
- func DefaultSettingsConfig() *models.Settings
- type ApiKeyService
- func (s *ApiKeyService) CreateApiKey(ctx context.Context, userID string, req apikey.CreateApiKey) (*apikey.ApiKeyCreatedDto, error)
- func (s *ApiKeyService) CreateDefaultAdminAPIKey(ctx context.Context, userID, rawKey string) (*apikey.ApiKeyCreatedDto, error)
- func (s *ApiKeyService) CreateEnvironmentApiKey(ctx context.Context, environmentID string, userID string) (*apikey.ApiKeyCreatedDto, error)
- func (s *ApiKeyService) DeleteApiKey(ctx context.Context, id string) error
- func (s *ApiKeyService) GetApiKey(ctx context.Context, id string) (*apikey.ApiKey, error)
- func (s *ApiKeyService) GetEnvironmentByApiKey(ctx context.Context, rawKey string) (*string, error)
- func (s *ApiKeyService) ListApiKeys(ctx context.Context, params pagination.QueryParams) ([]apikey.ApiKey, pagination.Response, error)
- func (s *ApiKeyService) ReconcileDefaultAdminAPIKey(ctx context.Context, rawKey string) error
- func (s *ApiKeyService) UpdateApiKey(ctx context.Context, id string, req apikey.UpdateApiKey) (*apikey.ApiKey, error)
- func (s *ApiKeyService) ValidateApiKey(ctx context.Context, rawKey string) (*models.User, error)
- type ApplicationImagesService
- type AppriseNotificationPayload
- type AppriseServicedeprecated
- func (s *AppriseService) CreateOrUpdateSettings(ctx context.Context, apiURL string, enabled bool, ...) (*models.AppriseSettings, error)
- func (s *AppriseService) GetSettings(ctx context.Context) (*models.AppriseSettings, error)
- func (s *AppriseService) SendBatchImageUpdateNotification(ctx context.Context, environmentName string, ...) error
- func (s *AppriseService) SendContainerUpdateNotification(ctx context.Context, ...) error
- func (s *AppriseService) SendImageUpdateNotification(ctx context.Context, environmentName, imageRef string, ...) error
- func (s *AppriseService) SendNotification(ctx context.Context, title, body, format string, ...) error
- func (s *AppriseService) TestNotification(ctx context.Context, environmentName, testType string) error
- type Argon2Params
- type AuthService
- func (s *AuthService) ChangePassword(ctx context.Context, ...) error
- func (s *AuthService) GetOidcConfig(ctx context.Context) (*models.OidcConfig, error)
- func (s *AuthService) GetOidcConfigurationStatus(ctx context.Context) (*auth.OidcStatusInfo, error)
- func (s *AuthService) GetSessionTimeout(ctx context.Context) (int, error)
- func (s *AuthService) InvalidateUserTokenCache(userID string)
- func (s *AuthService) IsLocalAuthEnabled(ctx context.Context) (bool, error)
- func (s *AuthService) IsOidcEnabled(ctx context.Context) (bool, error)
- func (s *AuthService) LogLogout(ctx context.Context, user *models.User)
- func (s *AuthService) Login(ctx context.Context, username, password string, meta auth.SessionMeta) (*models.User, *TokenPair, error)
- func (s *AuthService) OidcLogin(ctx context.Context, userInfo auth.OidcUserInfo, ...) (*models.User, *TokenPair, error)
- func (s *AuthService) RefreshToken(ctx context.Context, refreshToken string, meta auth.SessionMeta) (*TokenPair, error)
- func (s *AuthService) RevokeSession(ctx context.Context, sessionID string) error
- func (s *AuthService) VerifyToken(ctx context.Context, accessToken string) (*models.User, string, error)
- type AuthSettings
- type BuildService
- func (s *BuildService) BuildImage(ctx context.Context, environmentID string, req imagetypes.BuildRequest, ...) (*imagetypes.BuildResult, error)
- func (s *BuildService) BuildSettings() buildtypes.BuildSettings
- func (s *BuildService) GetAllRegistryAuthConfigs(ctx context.Context) (map[string]dockerregistry.AuthConfig, error)
- func (s *BuildService) GetImageBuildByID(ctx context.Context, environmentID, buildID string) (*imagetypes.BuildRecord, error)
- func (s *BuildService) GetRegistryAuthForHost(ctx context.Context, registryHost string) (string, error)
- func (s *BuildService) GetRegistryAuthForImage(ctx context.Context, imageRef string) (string, error)
- func (s *BuildService) ListImageBuildsByEnvironmentPaginated(ctx context.Context, environmentID string, params pagination.QueryParams) ([]imagetypes.BuildRecord, pagination.Response, error)
- type BuildWorkspaceService
- func (s *BuildWorkspaceService) CreateDirectory(ctx context.Context, dirPath string) error
- func (s *BuildWorkspaceService) DeleteFile(ctx context.Context, filePath string) error
- func (s *BuildWorkspaceService) DownloadFile(ctx context.Context, filePath string) (io.ReadCloser, int64, error)
- func (s *BuildWorkspaceService) GetFileContent(ctx context.Context, filePath string, maxBytes int64) ([]byte, string, error)
- func (s *BuildWorkspaceService) ListDirectory(ctx context.Context, dirPath string) ([]volumetypes.FileEntry, error)
- func (s *BuildWorkspaceService) UploadFile(ctx context.Context, destPath string, content io.Reader, filename string) error
- type ContainerListResult
- type ContainerRegistryService
- func (s *ContainerRegistryService) CreateRegistry(ctx context.Context, req models.CreateContainerRegistryRequest) (*models.ContainerRegistry, error)
- func (s *ContainerRegistryService) DeleteRegistry(ctx context.Context, id string) error
- func (s *ContainerRegistryService) GetAllRegistries(ctx context.Context) ([]models.ContainerRegistry, error)
- func (s *ContainerRegistryService) GetAllRegistryAuthConfigs(ctx context.Context) (map[string]dockerregistry.AuthConfig, error)
- func (s *ContainerRegistryService) GetDecryptedToken(ctx context.Context, id string) (string, error)
- func (s *ContainerRegistryService) GetEnabledRegistries(ctx context.Context) ([]models.ContainerRegistry, error)
- func (s *ContainerRegistryService) GetImageDigest(ctx context.Context, imageRef string) (string, error)
- func (s *ContainerRegistryService) GetOrRefreshECRToken(ctx context.Context, reg *models.ContainerRegistry) (username, password string, err error)
- func (s *ContainerRegistryService) GetRegistriesPaginated(ctx context.Context, params pagination.QueryParams) ([]containerregistry.ContainerRegistry, pagination.Response, error)
- func (s *ContainerRegistryService) GetRegistryAuthForHost(ctx context.Context, registryHost string) (string, error)
- func (s *ContainerRegistryService) GetRegistryAuthForImage(ctx context.Context, imageRef string) (string, error)
- func (s *ContainerRegistryService) GetRegistryByID(ctx context.Context, id string) (*models.ContainerRegistry, error)
- func (s *ContainerRegistryService) GetRegistryPullUsage(ctx context.Context) (containerregistry.PullUsageResponse, error)
- func (s *ContainerRegistryService) RecordImagePull(ctx context.Context, imageRef string) error
- func (s *ContainerRegistryService) SyncRegistries(ctx context.Context, syncItems []containerregistry.Sync) error
- func (s *ContainerRegistryService) TestECRRegistry(ctx context.Context, reg *models.ContainerRegistry) error
- func (s *ContainerRegistryService) TestRegistry(ctx context.Context, registryURL, username, token string) error
- func (s *ContainerRegistryService) UpdateRegistry(ctx context.Context, id string, req models.UpdateContainerRegistryRequest) (*models.ContainerRegistry, error)
- type ContainerService
- func (s *ContainerService) AttachExec(ctx context.Context, containerID, execID string) (*ExecSession, error)
- func (s *ContainerService) CreateContainer(ctx context.Context, config *container.Config, ...) (*container.InspectResponse, error)
- func (s *ContainerService) CreateExec(ctx context.Context, containerID string, cmd []string) (string, error)
- func (s *ContainerService) DeleteContainer(ctx context.Context, containerID string, force bool, removeVolumes bool, ...) error
- func (s *ContainerService) GetContainerByID(ctx context.Context, id string) (*container.InspectResponse, error)
- func (s *ContainerService) GetContainerByReference(ctx context.Context, ref string) (*container.InspectResponse, error)
- func (s *ContainerService) GetContainerDetails(ctx context.Context, id string) (containertypes.Details, error)
- func (s *ContainerService) GetContainerNameByID(ctx context.Context, id string) (string, error)
- func (s *ContainerService) GetContainerNameByReference(ctx context.Context, ref string) (string, error)
- func (s *ContainerService) ListContainersPaginated(ctx context.Context, params pagination.QueryParams, includeAll bool, ...) (ContainerListResult, error)
- func (s *ContainerService) RedeployContainer(ctx context.Context, containerID string, user models.User) (string, error)
- func (s *ContainerService) RestartContainer(ctx context.Context, containerID string, user models.User) error
- func (s *ContainerService) StartContainer(ctx context.Context, containerID string, user models.User) error
- func (s *ContainerService) StopContainer(ctx context.Context, containerID string, user models.User) error
- func (s *ContainerService) StreamLogs(ctx context.Context, containerID string, logsChan chan<- string, follow bool, ...) error
- func (s *ContainerService) StreamStats(ctx context.Context, containerID string, statsChan chan<- any) error
- type CreateEventRequest
- type CustomizeSearchService
- type DashboardActionItemsOptions
- type DashboardService
- func (s *DashboardService) GetActionItems(ctx context.Context, options DashboardActionItemsOptions) (*dashboardtypes.ActionItems, error)
- func (s *DashboardService) GetEnvironmentsOverview(ctx context.Context, options DashboardActionItemsOptions) (*dashboardtypes.EnvironmentsOverview, error)
- func (s *DashboardService) GetSnapshot(ctx context.Context, options DashboardActionItemsOptions) (*dashboardtypes.Snapshot, error)
- type DeploymentSnippetFile
- type DeploymentSnippetMTLS
- type DeploymentSnippets
- type DockerClientService
- func (s *DockerClientService) DockerHost() string
- func (s *DockerClientService) GetAllContainers(ctx context.Context) ([]container.Summary, int, int, int, error)
- func (s *DockerClientService) GetAllImages(ctx context.Context) ([]image.Summary, int, int, int, error)
- func (s *DockerClientService) GetAllNetworks(ctx context.Context) (_ []network.Summary, inuseNetworks int, unusedNetworks int, totalNetworks int, ...)
- func (s *DockerClientService) GetAllVolumes(ctx context.Context) ([]*volume.Volume, int, int, int, error)
- func (s *DockerClientService) GetClient(ctx context.Context) (*client.Client, error)
- func (s *DockerClientService) RefreshClient(ctx context.Context) error
- type EnvironmentService
- func (s *EnvironmentService) CreateEnvironment(ctx context.Context, environment *models.Environment, userID, username *string) (*models.Environment, error)
- func (s *EnvironmentService) DeleteEnvironment(ctx context.Context, id string, userID, username *string) error
- func (s *EnvironmentService) EnsureLocalEnvironment(ctx context.Context, appUrl string) error
- func (s *EnvironmentService) EnsureSwarmNodeAgentEnvironment(ctx context.Context, ...) (*models.Environment, string, error)
- func (s *EnvironmentService) ExecuteRemoteRequest(ctx context.Context, envID string, method string, path string, body []byte) (*remenv.Response, error)
- func (s *EnvironmentService) GenerateDeploymentSnippets(ctx context.Context, envID string, envAddress string, apiKey string) (*DeploymentSnippets, error)
- func (s *EnvironmentService) GenerateEdgeDeploymentSnippets(ctx context.Context, envID string, managerURL string, apiKey string, ...) (*DeploymentSnippets, error)
- func (s *EnvironmentService) GetDB() *database.DB
- func (s *EnvironmentService) GetEnabledRegistryCredentials(ctx context.Context) ([]containerregistry.Credential, error)
- func (s *EnvironmentService) GetEnvironmentByID(ctx context.Context, id string) (*models.Environment, error)
- func (s *EnvironmentService) ListEnvironmentsPaginated(ctx context.Context, params pagination.QueryParams) ([]environment.Environment, pagination.Response, error)
- func (s *EnvironmentService) ListRemoteEnvironments(ctx context.Context) ([]models.Environment, error)
- func (s *EnvironmentService) ListSwarmNodeAgentEnvironments(ctx context.Context, parentEnvironmentID string) ([]models.Environment, error)
- func (s *EnvironmentService) ListVisibleEnvironments(ctx context.Context) ([]environment.Environment, error)
- func (s *EnvironmentService) PairAgentWithBootstrap(ctx context.Context, apiUrl, bootstrapToken string) (string, error)
- func (s *EnvironmentService) PairAndPersistAgentToken(ctx context.Context, environmentID, apiUrl, bootstrapToken string) (string, error)
- func (s *EnvironmentService) ProxyJSONRequest(ctx context.Context, envID string, method string, path string, body []byte, ...) error
- func (s *EnvironmentService) ProxyRequest(ctx context.Context, envID string, method string, path string, body []byte) ([]byte, int, error)
- func (s *EnvironmentService) ReconcileEdgeStatusesOnStartup(ctx context.Context) error
- func (s *EnvironmentService) RegenerateEnvironmentApiKey(ctx context.Context, envID string, newApiKeyID string, encryptedKey string, ...) error
- func (s *EnvironmentService) ResolveEdgeEnvironmentByToken(ctx context.Context, token string) (string, error)
- func (s *EnvironmentService) ResolveEnvironmentByAccessToken(ctx context.Context, token string) (*models.Environment, error)
- func (s *EnvironmentService) SyncRegistriesToEnvironment(ctx context.Context, environmentID string) error
- func (s *EnvironmentService) SyncRegistriesToRemoteEnvironments(ctx context.Context) error
- func (s *EnvironmentService) SyncRepositoriesToEnvironment(ctx context.Context, environmentID string) error
- func (s *EnvironmentService) TestConnection(ctx context.Context, id string, customApiUrl *string) (string, error)
- func (s *EnvironmentService) UpdateEnvironment(ctx context.Context, id string, updates map[string]any, ...) (*models.Environment, error)
- func (s *EnvironmentService) UpdateEnvironmentConnectionState(ctx context.Context, id string, connected bool) error
- func (s *EnvironmentService) UpdateEnvironmentHeartbeat(ctx context.Context, id string) error
- func (s *EnvironmentService) UpdateSwarmNodeIdentity(ctx context.Context, envID, swarmNodeID string) error
- type EventService
- func (s *EventService) CreateEvent(ctx context.Context, req CreateEventRequest) (*models.Event, error)
- func (s *EventService) CreateEventFromDto(ctx context.Context, req event.CreateEvent) (*event.Event, error)
- func (s *EventService) DeleteEvent(ctx context.Context, eventID string) error
- func (s *EventService) DeleteOldEvents(ctx context.Context, olderThan time.Duration) error
- func (s *EventService) GetEventsByEnvironmentPaginated(ctx context.Context, environmentID string, params pagination.QueryParams) ([]event.Event, pagination.Response, error)
- func (s *EventService) ListEventsPaginated(ctx context.Context, params pagination.QueryParams) ([]event.Event, pagination.Response, error)
- func (s *EventService) LogContainerEvent(ctx context.Context, eventType models.EventType, ...) error
- func (s *EventService) LogErrorEvent(ctx context.Context, eventType models.EventType, ...)
- func (s *EventService) LogImageEvent(ctx context.Context, eventType models.EventType, ...) error
- func (s *EventService) LogNetworkEvent(ctx context.Context, eventType models.EventType, ...) error
- func (s *EventService) LogProjectEvent(ctx context.Context, eventType models.EventType, ...) error
- func (s *EventService) LogUserEvent(ctx context.Context, eventType models.EventType, userID, username string, ...) error
- func (s *EventService) LogVolumeEvent(ctx context.Context, eventType models.EventType, ...) error
- type ExecSession
- type FontService
- type GitOpsSyncService
- func (s *GitOpsSyncService) BrowseFiles(ctx context.Context, environmentID, id string, path string) (*gitops.BrowseResponse, error)
- func (s *GitOpsSyncService) CreateSync(ctx context.Context, environmentID string, req gitops.CreateSyncRequest, ...) (*models.GitOpsSync, error)
- func (s *GitOpsSyncService) DeleteSync(ctx context.Context, environmentID, id string, actor models.User) error
- func (s *GitOpsSyncService) GetSyncByID(ctx context.Context, environmentID, id string) (*models.GitOpsSync, error)
- func (s *GitOpsSyncService) GetSyncStatus(ctx context.Context, environmentID, id string) (*gitops.SyncStatus, error)
- func (s *GitOpsSyncService) GetSyncsPaginated(ctx context.Context, environmentID string, params pagination.QueryParams) ([]gitops.GitOpsSync, pagination.Response, gitops.SyncCounts, error)
- func (s *GitOpsSyncService) ImportSyncs(ctx context.Context, environmentID string, ...) (*gitops.ImportGitOpsSyncResponse, error)
- func (s *GitOpsSyncService) ListSyncIntervalsRaw(ctx context.Context) ([]startup.IntervalMigrationItem, error)
- func (s *GitOpsSyncService) PerformSync(ctx context.Context, environmentID, id string, actor models.User) (*gitops.SyncResult, error)
- func (s *GitOpsSyncService) ReconcileDirectorySyncProjectsOnStartup(ctx context.Context) error
- func (s *GitOpsSyncService) SyncAllEnabled(ctx context.Context) error
- func (s *GitOpsSyncService) UpdateSync(ctx context.Context, environmentID, id string, req gitops.UpdateSyncRequest, ...) (*models.GitOpsSync, error)
- func (s *GitOpsSyncService) UpdateSyncIntervalMinutes(ctx context.Context, id string, minutes int) error
- type GitRepositoryService
- func (s *GitRepositoryService) BrowseFiles(ctx context.Context, id, branch, path string) (*gitops.BrowseResponse, error)
- func (s *GitRepositoryService) CreateRepository(ctx context.Context, req models.CreateGitRepositoryRequest, actor models.User) (*models.GitRepository, error)
- func (s *GitRepositoryService) DeleteRepository(ctx context.Context, id string, actor models.User) error
- func (s *GitRepositoryService) FindEnabledRepositoryByURL(ctx context.Context, rawURL string) (*models.GitRepository, error)
- func (s *GitRepositoryService) GetAuthConfig(ctx context.Context, repository *models.GitRepository) (git.AuthConfig, error)
- func (s *GitRepositoryService) GetRepositoriesPaginated(ctx context.Context, params pagination.QueryParams) ([]gitops.GitRepository, pagination.Response, error)
- func (s *GitRepositoryService) GetRepositoryByID(ctx context.Context, id string) (*models.GitRepository, error)
- func (s *GitRepositoryService) GetRepositoryByName(ctx context.Context, name string) (*models.GitRepository, error)
- func (s *GitRepositoryService) ListBranches(ctx context.Context, id string) ([]gitops.BranchInfo, error)
- func (s *GitRepositoryService) SyncRepositories(ctx context.Context, syncItems []gitops.RepositorySync) error
- func (s *GitRepositoryService) TestConnection(ctx context.Context, id string, branch string, actor models.User) error
- func (s *GitRepositoryService) UpdateRepository(ctx context.Context, id string, req models.UpdateGitRepositoryRequest, ...) (*models.GitRepository, error)
- type ImageParts
- type ImageService
- func (s *ImageService) BuildProjectIDMap(ctx context.Context, containers []container.Summary) map[string]string
- func (s *ImageService) GetImageDetail(ctx context.Context, id string) (*imagetypes.DetailSummary, error)
- func (s *ImageService) GetTotalImageSize(ctx context.Context) (int64, error)
- func (s *ImageService) GetUpdateInfoByImageIDs(ctx context.Context, imageIDs []string) (map[string]*imagetypes.UpdateInfo, error)
- func (s *ImageService) GetUpdateInfoByImageRefs(ctx context.Context, imageRefs []string) (map[string]*imagetypes.UpdateInfo, error)
- func (s *ImageService) ImageExistsLocally(ctx context.Context, imageName string) (bool, error)
- func (s *ImageService) ListImagesPaginated(ctx context.Context, params pagination.QueryParams) ([]imagetypes.Summary, pagination.Response, error)
- func (s *ImageService) LoadImageFromReader(ctx context.Context, reader io.Reader, fileName string, user models.User, ...) (*imagetypes.LoadResult, error)
- func (s *ImageService) PruneImages(ctx context.Context, options systemtypes.PruneImagesOptions) (*image.PruneReport, error)
- func (s *ImageService) PullImage(ctx context.Context, imageName string, progressWriter io.Writer, ...) error
- func (s *ImageService) ReconcilePulledImageUpdate(ctx context.Context, imageName string) error
- func (s *ImageService) RemoveImage(ctx context.Context, id string, force bool, user models.User) error
- type ImageUpdateService
- func (s *ImageUpdateService) CheckAllImages(ctx context.Context, limit int, externalCreds []containerregistry.Credential) (map[string]*imageupdate.Response, error)
- func (s *ImageUpdateService) CheckImageUpdate(ctx context.Context, imageRef string) (*imageupdate.Response, error)
- func (s *ImageUpdateService) CheckImageUpdateByID(ctx context.Context, imageID string) (*imageupdate.Response, error)
- func (s *ImageUpdateService) CheckMultipleImages(ctx context.Context, imageRefs []string, ...) (map[string]*imageupdate.Response, error)
- func (s *ImageUpdateService) CleanupOrphanedRecords(ctx context.Context) error
- func (s *ImageUpdateService) GetUnnotifiedUpdates(ctx context.Context) (map[string]*models.ImageUpdateRecord, error)
- func (s *ImageUpdateService) GetUpdateSummary(ctx context.Context) (*imageupdate.Summary, error)
- func (s *ImageUpdateService) MarkImageRefUpToDateAfterPull(ctx context.Context, imageRef string) error
- func (s *ImageUpdateService) MarkUpdatesAsNotified(ctx context.Context, imageIDs []string) error
- type JobRunner
- type JobService
- func (s *JobService) GetJobSchedules(ctx context.Context) jobschedule.Config
- func (s *JobService) ListJobs(ctx context.Context) (*jobschedule.JobListResponse, error)
- func (s *JobService) RescheduleJobsForSettingKeys(ctx context.Context, changedKeys []string)
- func (s *JobService) RunJobNowInline(ctx context.Context, jobID string) error
- func (s *JobService) SetScheduler(ctx context.Context, scheduler JobRunner)
- func (s *JobService) UpdateJobSchedules(ctx context.Context, updates jobschedule.Update) (jobschedule.Config, error)
- type KVService
- func (s *KVService) Get(ctx context.Context, key string) (string, bool, error)
- func (s *KVService) GetBool(ctx context.Context, key string, defaultValue bool) (bool, error)
- func (s *KVService) GetInt64(ctx context.Context, key string, defaultValue int64) (int64, error)
- func (s *KVService) IncrementInt64(ctx context.Context, key string, delta int64) (int64, error)
- func (s *KVService) Set(ctx context.Context, key, value string) error
- func (s *KVService) SetBool(ctx context.Context, key string, value bool) error
- type NetworkService
- func (s *NetworkService) CreateNetwork(ctx context.Context, name string, options client.NetworkCreateOptions, ...) (*network.CreateResponse, error)
- func (s *NetworkService) GetNetworkByID(ctx context.Context, id string) (*network.Inspect, error)
- func (s *NetworkService) GetNetworkTopology(ctx context.Context) (*networktypes.Topology, error)
- func (s *NetworkService) ListNetworksPaginated(ctx context.Context, params pagination.QueryParams) ([]networktypes.Summary, pagination.Response, networktypes.UsageCounts, error)
- func (s *NetworkService) PruneNetworks(ctx context.Context) (*network.PruneReport, error)
- func (s *NetworkService) RemoveNetwork(ctx context.Context, id string, user models.User) error
- type NotificationService
- func (s *NotificationService) CreateOrUpdateSettings(ctx context.Context, provider models.NotificationProvider, enabled bool, ...) (*models.NotificationSettings, error)
- func (s *NotificationService) DeleteSettings(ctx context.Context, provider models.NotificationProvider) error
- func (s *NotificationService) DispatchNotification(ctx context.Context, accessToken string, ...) error
- func (s *NotificationService) GetAllSettings(ctx context.Context) ([]models.NotificationSettings, error)
- func (s *NotificationService) GetSettingsByProvider(ctx context.Context, provider models.NotificationProvider) (*models.NotificationSettings, error)
- func (s *NotificationService) MigrateDiscordWebhookUrlToFields(ctx context.Context) error
- func (s *NotificationService) ResolveNotificationTarget(ctx context.Context, environmentID string) (NotificationTarget, error)
- func (s *NotificationService) SendAutoHealNotification(ctx context.Context, containerName, containerID string) error
- func (s *NotificationService) SendBatchImageUpdateNotification(ctx context.Context, updates map[string]*imageupdate.Response) error
- func (s *NotificationService) SendContainerUpdateNotification(ctx context.Context, containerName, imageRef, oldDigest, newDigest string) error
- func (s *NotificationService) SendImageUpdateNotification(ctx context.Context, imageRef string, updateInfo *imageupdate.Response, ...) error
- func (s *NotificationService) SendPruneReportNotification(ctx context.Context, result *system.PruneAllResult) error
- func (s *NotificationService) SendVulnerabilityNotification(ctx context.Context, payload VulnerabilityNotificationPayload) error
- func (s *NotificationService) TestNotification(ctx context.Context, environmentID string, ...) error
- type NotificationTarget
- type OidcService
- func (s *OidcService) ExchangeDeviceToken(ctx context.Context, deviceCode string) (*auth.OidcUserInfo, *auth.OidcTokenResponse, error)
- func (s *OidcService) GenerateAuthURL(ctx context.Context, redirectTo string, origin string, ...) (string, string, error)
- func (s *OidcService) GetMobileRedirectAllowlist(ctx context.Context) []string
- func (s *OidcService) GetOidcRedirectURL(origin string) string
- func (s *OidcService) HandleCallback(ctx context.Context, ...) (*auth.OidcUserInfo, *auth.OidcTokenResponse, error)
- func (s *OidcService) InitiateDeviceAuth(ctx context.Context) (*auth.OidcDeviceAuthResponse, error)
- func (s *OidcService) ValidateMobileRedirectURI(ctx context.Context, uri string) error
- type OidcState
- type PortService
- type ProjectBuildOptions
- type ProjectService
- func (s *ProjectService) ApplyGitSyncProjectFiles(ctx context.Context, projectID string, composeContent string, ...) (*models.Project, error)
- func (s *ProjectService) ArchiveProject(ctx context.Context, projectID string, user models.User) error
- func (s *ProjectService) BuildProjectServices(ctx context.Context, projectID string, options ProjectBuildOptions, ...) error
- func (s *ProjectService) CreateProject(ctx context.Context, name, composeContent string, envContent *string, ...) (*models.Project, error)
- func (s *ProjectService) DeployProject(ctx context.Context, projectID string, user models.User, ...) error
- func (s *ProjectService) DestroyProject(ctx context.Context, projectID string, removeFiles, removeVolumes bool, ...) error
- func (s *ProjectService) DownProject(ctx context.Context, projectID string, user models.User) error
- func (s *ProjectService) EnsureProjectImagesPresent(ctx context.Context, projectID string, progressWriter io.Writer, ...) error
- func (s *ProjectService) GetProjectByComposeName(ctx context.Context, name string) (*models.Project, error)
- func (s *ProjectService) GetProjectContent(ctx context.Context, projectID string) (composeContent, envContent string, err error)
- func (s *ProjectService) GetProjectDetails(ctx context.Context, projectID string) (project.Details, error)
- func (s *ProjectService) GetProjectFileContent(ctx context.Context, projectID, relativePath string) (project.IncludeFile, error)
- func (s *ProjectService) GetProjectFromDatabaseByID(ctx context.Context, id string) (*models.Project, error)
- func (s *ProjectService) GetProjectRelativePath(ctx context.Context, projectPath string) string
- func (s *ProjectService) GetProjectServices(ctx context.Context, projectID string) ([]ProjectServiceInfo, error)
- func (s *ProjectService) GetProjectStatusCounts(ctx context.Context) (...)
- func (s *ProjectService) ListAllProjects(ctx context.Context) ([]models.Project, error)
- func (s *ProjectService) ListProjects(ctx context.Context, params pagination.QueryParams) ([]project.Details, pagination.Response, error)
- func (s *ProjectService) PullProjectImages(ctx context.Context, projectID string, progressWriter io.Writer, ...) error
- func (s *ProjectService) RedeployProject(ctx context.Context, projectID string, user models.User) error
- func (s *ProjectService) RestartProject(ctx context.Context, projectID string, user models.User) error
- func (s *ProjectService) StreamProjectLogs(ctx context.Context, projectID string, logsChan chan<- string, follow bool, ...) error
- func (s *ProjectService) SyncProjectsFromFileSystem(ctx context.Context) error
- func (s *ProjectService) UnarchiveProject(ctx context.Context, projectID string, user models.User) error
- func (s *ProjectService) UpdateProject(ctx context.Context, projectID string, name *string, ...) (*models.Project, error)
- func (s *ProjectService) UpdateProjectIncludeFile(ctx context.Context, projectID, relativePath, content string, user models.User) error
- func (s *ProjectService) UpdateProjectServices(ctx context.Context, projectID string, servicesToUpdate []string, ...) error
- type ProjectServiceInfo
- type RegistryDaemonClient
- type SessionService
- func (s *SessionService) CreateSession(ctx context.Context, userID string, expiresAt time.Time, meta auth.SessionMeta) (*models.UserSession, string, error)
- func (s *SessionService) DeleteExpiredSessions(ctx context.Context, revokedRetention time.Duration) (int64, error)
- func (s *SessionService) GetSessionByID(ctx context.Context, sessionID string) (*models.UserSession, error)
- func (s *SessionService) RevokeAllUserSessionsExcept(ctx context.Context, userID, exceptSessionID string) error
- func (s *SessionService) RevokeSession(ctx context.Context, sessionID string) error
- func (s *SessionService) RotateRefreshToken(ctx context.Context, sessionID string, refreshJTI string, ...) (*models.UserSession, string, error)
- type SettingsSearchService
- type SettingsService
- func (s *SettingsService) EnsureDefaultSettings(ctx context.Context) error
- func (s *SettingsService) EnsureEncryptionKey(ctx context.Context) (string, error)
- func (s *SettingsService) GetBoolSetting(ctx context.Context, key string, defaultValue bool) bool
- func (s *SettingsService) GetIntSetting(ctx context.Context, key string, defaultValue int) int
- func (s *SettingsService) GetSettingType(key string) string
- func (s *SettingsService) GetSettings(ctx context.Context) (*models.Settings, error)
- func (s *SettingsService) GetSettingsConfig() *models.Settings
- func (s *SettingsService) GetSettingsOrDefaults(ctx context.Context) *models.Settings
- func (s *SettingsService) GetStringSetting(ctx context.Context, key, defaultValue string) string
- func (s *SettingsService) ListSettings(visibility models.SettingVisibility) []models.SettingVariable
- func (s *SettingsService) LoadDatabaseSettings(ctx context.Context) (err error)
- func (s *SettingsService) MigrateOidcConfigToFields(ctx context.Context) error
- func (s *SettingsService) NormalizeBuildsDirectory(ctx context.Context) error
- func (s *SettingsService) NormalizeProjectsDirectory(ctx context.Context, projectsDirEnv string) error
- func (s *SettingsService) PersistEnvSettingsIfMissing(ctx context.Context) error
- func (s *SettingsService) PruneUnknownSettings(ctx context.Context) error
- func (s *SettingsService) SetBoolSetting(ctx context.Context, key string, value bool) error
- func (s *SettingsService) SetContainerAutoUpdateExclusionInternal(ctx context.Context, containerName string, excluded bool) error
- func (s *SettingsService) SetIntSetting(ctx context.Context, key string, value int) error
- func (s *SettingsService) SetStringSetting(ctx context.Context, key, value string) error
- func (s *SettingsService) UpdateSetting(ctx context.Context, key, value string) error
- func (s *SettingsService) UpdateSettings(ctx context.Context, updates settings.Update) ([]models.SettingVariable, error)
- type SwarmNodeIdentity
- type SwarmService
- 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) 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) 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, req swarmtypes.StackRenderConfigRequest) (*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) UpdateConfig(ctx context.Context, configID string, req swarmtypes.ConfigUpdateRequest) (*swarmtypes.ConfigSummary, error)
- func (s *SwarmService) UpdateNode(ctx context.Context, nodeID string, req swarmtypes.NodeUpdateRequest) error
- func (s *SwarmService) UpdateSecret(ctx context.Context, secretID string, req swarmtypes.SecretUpdateRequest) (*swarmtypes.SecretSummary, 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 SystemService
- func (s *SystemService) ConvertToDockerCompose(parsed *system.DockerRunCommand) (string, string, string, error)
- func (s *SystemService) GetDiskUsagePath(ctx context.Context) string
- func (s *SystemService) ParseDockerRunCommand(command string) (*system.DockerRunCommand, error)
- func (s *SystemService) PruneAll(ctx context.Context, req system.PruneAllRequest) (*system.PruneAllResult, error)
- func (s *SystemService) StartAllContainers(ctx context.Context) (*containertypes.ActionResult, error)
- func (s *SystemService) StartAllStoppedContainers(ctx context.Context) (*containertypes.ActionResult, error)
- func (s *SystemService) StopAllContainers(ctx context.Context) (*containertypes.ActionResult, error)
- type SystemUpgradeService
- type TemplateService
- func (s *TemplateService) CreateRegistry(ctx context.Context, registry *models.TemplateRegistry) error
- func (s *TemplateService) CreateTemplate(ctx context.Context, template *models.ComposeTemplate) error
- func (s *TemplateService) DeleteRegistry(ctx context.Context, id string) error
- func (s *TemplateService) DeleteTemplate(ctx context.Context, id string) error
- func (s *TemplateService) DownloadTemplate(ctx context.Context, remoteTemplate *models.ComposeTemplate) (*models.ComposeTemplate, error)
- func (s *TemplateService) FetchRaw(ctx context.Context, url string) ([]byte, error)
- func (s *TemplateService) FetchTemplateContent(ctx context.Context, template *models.ComposeTemplate) (string, string, error)
- func (s *TemplateService) GetAllTemplates(ctx context.Context) ([]models.ComposeTemplate, error)
- func (s *TemplateService) GetAllTemplatesPaginated(ctx context.Context, params pagination.QueryParams) ([]tmpl.Template, pagination.Response, error)
- func (s *TemplateService) GetComposeTemplate() string
- func (s *TemplateService) GetEnvTemplate() string
- func (s *TemplateService) GetGlobalVariables(ctx context.Context) ([]env.Variable, error)
- func (s *TemplateService) GetRegistries(ctx context.Context) ([]models.TemplateRegistry, error)
- func (s *TemplateService) GetRegistryFetchErrors() map[string]string
- func (s *TemplateService) GetSwarmStackEnvTemplate() string
- func (s *TemplateService) GetSwarmStackTemplate() string
- func (s *TemplateService) GetTemplate(ctx context.Context, id string) (*models.ComposeTemplate, error)
- func (s *TemplateService) GetTemplateContentWithParsedData(ctx context.Context, id string) (*tmpl.TemplateContent, error)
- func (s *TemplateService) ParseComposeServices(ctx context.Context, composeContent string) []string
- func (s *TemplateService) SaveComposeTemplate(content string) error
- func (s *TemplateService) SaveEnvTemplate(content string) error
- func (s *TemplateService) SyncLocalTemplatesFromFilesystem(ctx context.Context) error
- func (s *TemplateService) UpdateGlobalVariables(ctx context.Context, vars []env.Variable) error
- func (s *TemplateService) UpdateRegistry(ctx context.Context, id string, updates *models.TemplateRegistry) error
- func (s *TemplateService) UpdateTemplate(ctx context.Context, id string, updates *models.ComposeTemplate) error
- type TokenPair
- type UpdaterService
- func (s *UpdaterService) ApplyPending(ctx context.Context, dryRun bool) (*updater.Result, error)
- func (s *UpdaterService) GetHistory(ctx context.Context, limit int) ([]models.AutoUpdateRecord, error)
- func (s *UpdaterService) GetStatus() updater.Status
- func (s *UpdaterService) UpdateSingleContainer(ctx context.Context, containerID string) (*updater.Result, error)
- type UserService
- func (s *UserService) AttachOidcSubjectTransactional(ctx context.Context, userID string, subject string, ...) (*models.User, error)
- func (s *UserService) CreateDefaultAdmin(ctx context.Context) error
- func (s *UserService) CreateUser(ctx context.Context, user *models.User) (*models.User, error)
- func (s *UserService) DeleteUser(ctx context.Context, id string) error
- func (s *UserService) GetUser(ctx context.Context, userID string) (*models.User, error)
- func (s *UserService) GetUserByEmail(ctx context.Context, email string) (*models.User, error)
- func (s *UserService) GetUserByID(ctx context.Context, id string) (*models.User, error)
- func (s *UserService) GetUserByOidcSubjectId(ctx context.Context, subjectId string) (*models.User, error)
- func (s *UserService) GetUserByUsername(ctx context.Context, username string) (*models.User, error)
- func (s *UserService) HashPassword(password string) (string, error)
- func (s *UserService) ListUsersPaginated(ctx context.Context, params pagination.QueryParams) ([]user.User, pagination.Response, error)
- func (s *UserService) NeedsPasswordUpgrade(hash string) bool
- func (s *UserService) ToUserResponseDto(ctx context.Context, u models.User) (user.User, error)
- func (s *UserService) UpdateUser(ctx context.Context, user *models.User) (*models.User, error)
- func (s *UserService) UpgradePasswordHash(ctx context.Context, userID, password string) error
- func (s *UserService) ValidatePassword(encodedHash, password string) error
- type VersionService
- func (s *VersionService) GetAppVersionInfo(ctx context.Context) *version.Info
- func (s *VersionService) GetLatestVersion(ctx context.Context) (string, error)
- func (s *VersionService) GetVersionInformation(ctx context.Context, currentVersion string) (*version.Check, error)
- func (s *VersionService) IsNewer(latest, current string) bool
- func (s *VersionService) ReleaseURL(version string) string
- type VolumeService
- func (s *VolumeService) BackupHasPath(ctx context.Context, backupID string, filePath string) (bool, error)
- func (s *VolumeService) BackupMountWarning(ctx context.Context) string
- func (s *VolumeService) CleanupHelperContainers(ctx context.Context)
- func (s *VolumeService) CleanupOrphanedVolumeHelpers(ctx context.Context) error
- func (s *VolumeService) CreateBackup(ctx context.Context, volumeName string, user models.User) (*models.VolumeBackup, error)
- func (s *VolumeService) CreateDirectory(ctx context.Context, volumeName, dirPath string, user *models.User) error
- func (s *VolumeService) CreateVolume(ctx context.Context, options client.VolumeCreateOptions, user models.User) (*volumetypes.Volume, error)
- func (s *VolumeService) DeleteBackup(ctx context.Context, backupID string, user *models.User) error
- func (s *VolumeService) DeleteFile(ctx context.Context, volumeName, filePath string, user *models.User) error
- func (s *VolumeService) DeleteVolume(ctx context.Context, name string, force bool, user models.User) error
- func (s *VolumeService) DownloadBackup(ctx context.Context, backupID string, user *models.User) (io.ReadCloser, int64, error)
- func (s *VolumeService) DownloadFile(ctx context.Context, volumeName, filePath string) (io.ReadCloser, int64, error)
- func (s *VolumeService) GetFileContent(ctx context.Context, volumeName, filePath string, maxBytes int64) ([]byte, string, error)
- func (s *VolumeService) GetVolumeByName(ctx context.Context, name string) (*volumetypes.Volume, error)
- func (s *VolumeService) GetVolumeSizes(ctx context.Context) (map[string]VolumeSizeData, error)
- func (s *VolumeService) GetVolumeUsage(ctx context.Context, name string) (bool, []string, error)
- func (s *VolumeService) ListBackupFiles(ctx context.Context, backupID string) ([]string, error)
- func (s *VolumeService) ListBackups(ctx context.Context, volumeName string) ([]models.VolumeBackup, error)
- func (s *VolumeService) ListBackupsPaginated(ctx context.Context, volumeName string, params pagination.QueryParams) ([]models.VolumeBackup, pagination.Response, error)
- func (s *VolumeService) ListDirectory(ctx context.Context, volumeName, dirPath string) ([]volumetypes.FileEntry, error)
- func (s *VolumeService) ListVolumesPaginated(ctx context.Context, params pagination.QueryParams, includeInternal bool) ([]volumetypes.Volume, pagination.Response, volumetypes.UsageCounts, error)
- func (s *VolumeService) PruneVolumes(ctx context.Context) (*volumetypes.PruneReport, error)
- func (s *VolumeService) PruneVolumesWithOptions(ctx context.Context, all bool) (*volumetypes.PruneReport, error)
- func (s *VolumeService) RestoreBackup(ctx context.Context, volumeName, backupID string, user models.User) error
- func (s *VolumeService) RestoreBackupFiles(ctx context.Context, volumeName, backupID string, paths []string, ...) error
- func (s *VolumeService) UploadAndRestore(ctx context.Context, volumeName string, archive io.Reader, filename string, ...) error
- func (s *VolumeService) UploadFile(ctx context.Context, volumeName, destPath string, content io.Reader, ...) error
- type VolumeSizeData
- type VulnerabilityNotificationPayload
- type VulnerabilityService
- func (s *VulnerabilityService) CleanupOrphanedScanRecords(ctx context.Context) (deleted int64, err error)
- func (s *VulnerabilityService) DeleteScanResult(ctx context.Context, imageID string) error
- func (s *VulnerabilityService) DeleteScanResultsByImageIDs(ctx context.Context, imageIDs []string) error
- func (s *VulnerabilityService) GetEnvironmentSummary(ctx context.Context) (*vulnerability.EnvironmentVulnerabilitySummary, error)
- func (s *VulnerabilityService) GetIgnoreRecordsForImage(ctx context.Context, envID string, imageID string) ([]models.VulnerabilityIgnore, error)
- func (s *VulnerabilityService) GetScanResult(ctx context.Context, imageID string) (*vulnerability.ScanResult, error)
- func (s *VulnerabilityService) GetScanSummariesByImageIDs(ctx context.Context, imageIDs []string) (map[string]*vulnerability.ScanSummary, error)
- func (s *VulnerabilityService) GetScanSummary(ctx context.Context, imageID string) (*vulnerability.ScanSummary, error)
- func (s *VulnerabilityService) GetTrivyVersion(ctx context.Context) string
- func (s *VulnerabilityService) IgnoreVulnerability(ctx context.Context, envID string, payload *vulnerability.IgnorePayload) (*models.VulnerabilityIgnore, error)
- func (s *VulnerabilityService) ListAllVulnerabilities(ctx context.Context, envID string, params pagination.QueryParams) ([]vulnerability.VulnerabilityWithImage, pagination.Response, error)
- func (s *VulnerabilityService) ListAllVulnerabilityImageOptions(ctx context.Context, severityFilter string) ([]string, error)
- func (s *VulnerabilityService) ListIgnoredVulnerabilities(ctx context.Context, envID string, params pagination.QueryParams) ([]vulnerability.IgnoredVulnerability, pagination.Response, error)
- func (s *VulnerabilityService) ListVulnerabilities(ctx context.Context, imageID string, params pagination.QueryParams) ([]vulnerability.Vulnerability, pagination.Response, error)
- func (s *VulnerabilityService) ScanAllImages(ctx context.Context, envID string, user models.User) (scanned, failed int, err error)
- func (s *VulnerabilityService) ScanImage(ctx context.Context, envID string, imageID string, user models.User) (*vulnerability.ScanResult, error)
- func (s *VulnerabilityService) UnignoreVulnerability(ctx context.Context, envID string, ignoreID string) error
- type WebhookService
- func (s *WebhookService) CreateWebhook(ctx context.Context, ...) (*models.Webhook, string, error)
- func (s *WebhookService) DeleteWebhook(ctx context.Context, id, environmentID string, actor models.User) error
- func (s *WebhookService) GetWebhookByID(ctx context.Context, id, environmentID string) (*models.Webhook, error)
- func (s *WebhookService) ListWebhookSummaries(ctx context.Context, environmentID string) ([]webhooktypes.Summary, error)
- func (s *WebhookService) ListWebhooks(ctx context.Context, environmentID string) ([]models.Webhook, error)
- func (s *WebhookService) TriggerByToken(ctx context.Context, rawToken string) (*updater.Result, error)
- func (s *WebhookService) UpdateWebhook(ctx context.Context, id, environmentID string, enabled bool, actor models.User) (*models.Webhook, error)
Constants ¶
const ( // DefaultArcaneToolsImage is the shared Arcane toolbox image used for // helper commands and Trivy-based vulnerability scans. DefaultArcaneToolsImage = "ghcr.io/getarcaneapp/tools:latest" // DefaultTrivyImage preserves the existing setting name, but now points at // the shared Arcane tools image that includes the Trivy binary. DefaultTrivyImage = DefaultArcaneToolsImage DefaultTrivyNetworkMode = "bridge" )
const KVKeySwarmEnabled = "swarm.enabled"
Variables ¶
var ( ErrApiKeyNotFound = errors.New("API key not found") ErrApiKeyExpired = errors.New("API key has expired") ErrApiKeyInvalid = errors.New("invalid API key") ErrApiKeyProtected = errors.New("API key is protected") )
var ( ErrInvalidCredentials = errors.New("invalid credentials") ErrUserNotFound = errors.New("user not found") ErrInvalidToken = errors.New("invalid token") ErrExpiredToken = errors.New("token expired") ErrTokenVersionMismatch = errors.New("token version mismatch") ErrLocalAuthDisabled = errors.New("local authentication is disabled") ErrOidcAuthDisabled = errors.New("OIDC authentication is disabled") )
var ( ErrEnvironmentAccessTokenRequired = errors.New("environment access token required") ErrInvalidEnvironmentAccessToken = errors.New("invalid environment access token") )
var ( ErrNotRunningInDocker = errors.New("arcane is not running in a Docker container") ErrContainerNotFound = errors.New("could not find Arcane container") ErrUpgradeInProgress = errors.New("an upgrade is already in progress") ErrDockerSocketAccess = errors.New("docker socket is not accessible") ArcaneUpgraderImage = "ghcr.io/getarcaneapp/arcane:latest" )
var ( ErrWebhookNotFound = errors.New("webhook not found") ErrWebhookInvalid = errors.New("invalid webhook token") ErrWebhookDisabled = errors.New("webhook is disabled") ErrWebhookInvalidType = errors.New("invalid webhook target type") ErrWebhookInvalidAction = errors.New("invalid webhook action type") ErrWebhookMissingTarget = errors.New("target ID is required for container, project, and gitops webhook types") )
var ErrCannotRemoveLastAdmin = errors.New("cannot remove the last admin user")
var ErrSwarmManagerRequired = errors.New("swarm manager access required")
var ErrSwarmNotEnabled = errors.New("swarm mode is not enabled")
var ErrTemplateNotFound = errors.New("template not found")
var ErrUnsupportedDispatchKind = errors.New("unsupported notification dispatch kind")
Functions ¶
func ApplyEnvironmentRuntimeState ¶ added in v1.18.0
func ApplyEnvironmentRuntimeState(env *environmenttypes.Environment)
ApplyEnvironmentRuntimeState normalizes edge environment runtime status using in-memory tunnel and poll registries without mutating persisted state.
func DefaultSettingsConfig ¶ added in v1.17.1
DefaultSettingsConfig returns the canonical default settings model used by Arcane.
Types ¶
type ApiKeyService ¶
type ApiKeyService struct {
// contains filtered or unexported fields
}
func NewApiKeyService ¶
func NewApiKeyService(db *database.DB, userService *UserService) *ApiKeyService
func (*ApiKeyService) CreateApiKey ¶
func (s *ApiKeyService) CreateApiKey(ctx context.Context, userID string, req apikey.CreateApiKey) (*apikey.ApiKeyCreatedDto, error)
func (*ApiKeyService) CreateDefaultAdminAPIKey ¶ added in v1.17.0
func (s *ApiKeyService) CreateDefaultAdminAPIKey(ctx context.Context, userID, rawKey string) (*apikey.ApiKeyCreatedDto, error)
func (*ApiKeyService) CreateEnvironmentApiKey ¶
func (s *ApiKeyService) CreateEnvironmentApiKey(ctx context.Context, environmentID string, userID string) (*apikey.ApiKeyCreatedDto, error)
func (*ApiKeyService) DeleteApiKey ¶
func (s *ApiKeyService) DeleteApiKey(ctx context.Context, id string) error
func (*ApiKeyService) GetEnvironmentByApiKey ¶
func (*ApiKeyService) ListApiKeys ¶
func (s *ApiKeyService) ListApiKeys(ctx context.Context, params pagination.QueryParams) ([]apikey.ApiKey, pagination.Response, error)
func (*ApiKeyService) ReconcileDefaultAdminAPIKey ¶ added in v1.17.0
func (s *ApiKeyService) ReconcileDefaultAdminAPIKey(ctx context.Context, rawKey string) error
func (*ApiKeyService) UpdateApiKey ¶
func (s *ApiKeyService) UpdateApiKey(ctx context.Context, id string, req apikey.UpdateApiKey) (*apikey.ApiKey, error)
func (*ApiKeyService) ValidateApiKey ¶
type ApplicationImagesService ¶
type ApplicationImagesService struct {
// contains filtered or unexported fields
}
func NewApplicationImagesService ¶
func NewApplicationImagesService(embeddedFS embed.FS, settingsService *SettingsService) *ApplicationImagesService
func (*ApplicationImagesService) GetImageWithColor ¶
type AppriseService
deprecated
type AppriseService struct {
// contains filtered or unexported fields
}
AppriseService handles sending notifications through Apprise API
Deprecated: Built-in providers (e.g., SMTP via Shoutrrr) are preferred.
func NewAppriseService ¶
func NewAppriseService(db *database.DB, cfg *config.Config) *AppriseService
func (*AppriseService) CreateOrUpdateSettings ¶
func (s *AppriseService) CreateOrUpdateSettings(ctx context.Context, apiURL string, enabled bool, imageUpdateTag, containerUpdateTag string) (*models.AppriseSettings, error)
func (*AppriseService) GetSettings ¶
func (s *AppriseService) GetSettings(ctx context.Context) (*models.AppriseSettings, error)
func (*AppriseService) SendBatchImageUpdateNotification ¶
func (s *AppriseService) SendBatchImageUpdateNotification(ctx context.Context, environmentName string, updates map[string]*imageupdate.Response) error
func (*AppriseService) SendContainerUpdateNotification ¶
func (s *AppriseService) SendContainerUpdateNotification(ctx context.Context, environmentName, containerName, imageRef, oldDigest, newDigest string) error
func (*AppriseService) SendImageUpdateNotification ¶
func (s *AppriseService) SendImageUpdateNotification(ctx context.Context, environmentName, imageRef string, updateInfo *imageupdate.Response) error
func (*AppriseService) SendNotification ¶
func (s *AppriseService) SendNotification(ctx context.Context, title, body, format string, notificationType models.NotificationEventType) error
func (*AppriseService) TestNotification ¶
func (s *AppriseService) TestNotification(ctx context.Context, environmentName, testType string) error
type Argon2Params ¶
type Argon2Params struct {
// contains filtered or unexported fields
}
func DefaultArgon2Params ¶
func DefaultArgon2Params() *Argon2Params
type AuthService ¶
type AuthService struct {
// contains filtered or unexported fields
}
func NewAuthService ¶
func NewAuthService(userService *UserService, settingsService *SettingsService, eventService *EventService, sessionService *SessionService, jwtSecret string, cfg *config.Config) *AuthService
func (*AuthService) ChangePassword ¶
func (s *AuthService) ChangePassword(ctx context.Context, userID, currentPassword, newPassword, currentSessionID string) error
func (*AuthService) GetOidcConfig ¶
func (s *AuthService) GetOidcConfig(ctx context.Context) (*models.OidcConfig, error)
func (*AuthService) GetOidcConfigurationStatus ¶
func (s *AuthService) GetOidcConfigurationStatus(ctx context.Context) (*auth.OidcStatusInfo, error)
func (*AuthService) GetSessionTimeout ¶
func (s *AuthService) GetSessionTimeout(ctx context.Context) (int, error)
func (*AuthService) InvalidateUserTokenCache ¶ added in v1.19.1
func (s *AuthService) InvalidateUserTokenCache(userID string)
InvalidateUserTokenCache purges all cached token verifications for a user. Call this after admin-initiated role changes, account disable, or user deletion so stale verifications cannot grant access for the cache TTL.
func (*AuthService) IsLocalAuthEnabled ¶
func (s *AuthService) IsLocalAuthEnabled(ctx context.Context) (bool, error)
func (*AuthService) IsOidcEnabled ¶
func (s *AuthService) IsOidcEnabled(ctx context.Context) (bool, error)
func (*AuthService) LogLogout ¶ added in v1.16.0
func (s *AuthService) LogLogout(ctx context.Context, user *models.User)
func (*AuthService) Login ¶
func (s *AuthService) Login(ctx context.Context, username, password string, meta auth.SessionMeta) (*models.User, *TokenPair, error)
func (*AuthService) OidcLogin ¶
func (s *AuthService) OidcLogin(ctx context.Context, userInfo auth.OidcUserInfo, tokenResp *auth.OidcTokenResponse, meta auth.SessionMeta) (*models.User, *TokenPair, error)
func (*AuthService) RefreshToken ¶
func (s *AuthService) RefreshToken(ctx context.Context, refreshToken string, meta auth.SessionMeta) (*TokenPair, error)
func (*AuthService) RevokeSession ¶ added in v1.19.1
func (s *AuthService) RevokeSession(ctx context.Context, sessionID string) error
func (*AuthService) VerifyToken ¶
type AuthSettings ¶
type AuthSettings struct {
LocalAuthEnabled bool `json:"localAuthEnabled"`
OidcEnabled bool `json:"oidcEnabled"`
SessionTimeout int `json:"sessionTimeout"`
Oidc *models.OidcConfig `json:"oidc,omitempty"`
}
type BuildService ¶ added in v1.16.0
type BuildService struct {
// contains filtered or unexported fields
}
func NewBuildService ¶ added in v1.16.0
func NewBuildService( db *database.DB, settings *SettingsService, dockerService *DockerClientService, registryService *ContainerRegistryService, gitRepository *GitRepositoryService, eventService *EventService, ) *BuildService
func (*BuildService) BuildImage ¶ added in v1.16.0
func (s *BuildService) BuildImage(ctx context.Context, environmentID string, req imagetypes.BuildRequest, progressWriter io.Writer, serviceName string, user *models.User) (*imagetypes.BuildResult, error)
func (*BuildService) BuildSettings ¶ added in v1.16.0
func (s *BuildService) BuildSettings() buildtypes.BuildSettings
func (*BuildService) GetAllRegistryAuthConfigs ¶ added in v1.16.0
func (s *BuildService) GetAllRegistryAuthConfigs(ctx context.Context) (map[string]dockerregistry.AuthConfig, error)
func (*BuildService) GetImageBuildByID ¶ added in v1.16.0
func (s *BuildService) GetImageBuildByID(ctx context.Context, environmentID, buildID string) (*imagetypes.BuildRecord, error)
func (*BuildService) GetRegistryAuthForHost ¶ added in v1.16.0
func (*BuildService) GetRegistryAuthForImage ¶ added in v1.16.0
func (*BuildService) ListImageBuildsByEnvironmentPaginated ¶ added in v1.16.0
func (s *BuildService) ListImageBuildsByEnvironmentPaginated(ctx context.Context, environmentID string, params pagination.QueryParams) ([]imagetypes.BuildRecord, pagination.Response, error)
type BuildWorkspaceService ¶ added in v1.16.0
type BuildWorkspaceService struct {
// contains filtered or unexported fields
}
BuildWorkspaceService provides file operations for the manual build workspace.
func NewBuildWorkspaceService ¶ added in v1.16.0
func NewBuildWorkspaceService(settings *SettingsService) *BuildWorkspaceService
func (*BuildWorkspaceService) CreateDirectory ¶ added in v1.16.0
func (s *BuildWorkspaceService) CreateDirectory(ctx context.Context, dirPath string) error
func (*BuildWorkspaceService) DeleteFile ¶ added in v1.16.0
func (s *BuildWorkspaceService) DeleteFile(ctx context.Context, filePath string) error
func (*BuildWorkspaceService) DownloadFile ¶ added in v1.16.0
func (s *BuildWorkspaceService) DownloadFile(ctx context.Context, filePath string) (io.ReadCloser, int64, error)
func (*BuildWorkspaceService) GetFileContent ¶ added in v1.16.0
func (*BuildWorkspaceService) ListDirectory ¶ added in v1.16.0
func (s *BuildWorkspaceService) ListDirectory(ctx context.Context, dirPath string) ([]volumetypes.FileEntry, error)
func (*BuildWorkspaceService) UploadFile ¶ added in v1.16.0
type ContainerListResult ¶ added in v1.16.2
type ContainerListResult struct {
Items []containertypes.Summary
Groups []containertypes.SummaryGroup
Pagination pagination.Response
Counts containertypes.StatusCounts
}
type ContainerRegistryService ¶
type ContainerRegistryService struct {
// contains filtered or unexported fields
}
func NewContainerRegistryService ¶
func NewContainerRegistryService(db *database.DB, dockerClient registryDaemonGetter, kvService *KVService) *ContainerRegistryService
NewContainerRegistryService creates a registry service. kvService may be nil in tests that do not need pull tracking or rate-limit caching.
func (*ContainerRegistryService) CreateRegistry ¶
func (s *ContainerRegistryService) CreateRegistry(ctx context.Context, req models.CreateContainerRegistryRequest) (*models.ContainerRegistry, error)
func (*ContainerRegistryService) DeleteRegistry ¶
func (s *ContainerRegistryService) DeleteRegistry(ctx context.Context, id string) error
func (*ContainerRegistryService) GetAllRegistries ¶
func (s *ContainerRegistryService) GetAllRegistries(ctx context.Context) ([]models.ContainerRegistry, error)
func (*ContainerRegistryService) GetAllRegistryAuthConfigs ¶ added in v1.16.0
func (s *ContainerRegistryService) GetAllRegistryAuthConfigs(ctx context.Context) (map[string]dockerregistry.AuthConfig, error)
func (*ContainerRegistryService) GetDecryptedToken ¶
func (s *ContainerRegistryService) GetDecryptedToken(ctx context.Context, id string) (string, error)
GetDecryptedToken returns the decrypted token for a registry
func (*ContainerRegistryService) GetEnabledRegistries ¶
func (s *ContainerRegistryService) GetEnabledRegistries(ctx context.Context) ([]models.ContainerRegistry, error)
GetEnabledRegistries returns all enabled registries
func (*ContainerRegistryService) GetImageDigest ¶
func (s *ContainerRegistryService) GetImageDigest(ctx context.Context, imageRef string) (string, error)
GetImageDigest fetches the current digest for an image:tag from the registry This is used for digest-based update detection for non-semver tags
func (*ContainerRegistryService) GetOrRefreshECRToken ¶ added in v1.17.0
func (s *ContainerRegistryService) GetOrRefreshECRToken(ctx context.Context, reg *models.ContainerRegistry) (username, password string, err error)
GetOrRefreshECRToken returns a valid ECR auth token (username + password) for the given registry. If the cached token (stored encrypted in the DB) is still within its 12-hour validity window it is returned directly; otherwise a new token is obtained from the AWS ECR API, persisted back to the DB, and returned. Concurrent refreshes for the same registry are deduplicated via singleflight.
func (*ContainerRegistryService) GetRegistriesPaginated ¶
func (s *ContainerRegistryService) GetRegistriesPaginated(ctx context.Context, params pagination.QueryParams) ([]containerregistry.ContainerRegistry, pagination.Response, error)
func (*ContainerRegistryService) GetRegistryAuthForHost ¶ added in v1.16.0
func (s *ContainerRegistryService) GetRegistryAuthForHost(ctx context.Context, registryHost string) (string, error)
GetRegistryAuthForHost returns X-Registry-Auth for a configured and enabled registry.
func (*ContainerRegistryService) GetRegistryAuthForImage ¶ added in v1.16.0
func (s *ContainerRegistryService) GetRegistryAuthForImage(ctx context.Context, imageRef string) (string, error)
GetRegistryAuthForImage returns X-Registry-Auth for the image's registry host.
func (*ContainerRegistryService) GetRegistryByID ¶
func (s *ContainerRegistryService) GetRegistryByID(ctx context.Context, id string) (*models.ContainerRegistry, error)
func (*ContainerRegistryService) GetRegistryPullUsage ¶ added in v1.19.0
func (s *ContainerRegistryService) GetRegistryPullUsage(ctx context.Context) (containerregistry.PullUsageResponse, error)
GetRegistryPullUsage returns pull usage visibility for configured registries.
func (*ContainerRegistryService) RecordImagePull ¶ added in v1.19.0
func (s *ContainerRegistryService) RecordImagePull(ctx context.Context, imageRef string) error
RecordImagePull increments Arcane's observed successful pull counter for an image registry.
func (*ContainerRegistryService) SyncRegistries ¶
func (s *ContainerRegistryService) SyncRegistries(ctx context.Context, syncItems []containerregistry.Sync) error
SyncRegistries syncs registries from a manager to this agent instance It creates, updates, or deletes registries to match the provided list
func (*ContainerRegistryService) TestECRRegistry ¶ added in v1.17.0
func (s *ContainerRegistryService) TestECRRegistry(ctx context.Context, reg *models.ContainerRegistry) error
TestECRRegistry tests connectivity for an ECR registry by generating an auth token and attempting a Docker login.
func (*ContainerRegistryService) TestRegistry ¶ added in v1.16.2
func (s *ContainerRegistryService) TestRegistry(ctx context.Context, registryURL, username, token string) error
func (*ContainerRegistryService) UpdateRegistry ¶
func (s *ContainerRegistryService) UpdateRegistry(ctx context.Context, id string, req models.UpdateContainerRegistryRequest) (*models.ContainerRegistry, error)
type ContainerService ¶
type ContainerService struct {
// contains filtered or unexported fields
}
func NewContainerService ¶
func NewContainerService(db *database.DB, eventService *EventService, dockerService *DockerClientService, imageService *ImageService, settingsService *SettingsService, projectService *ProjectService) *ContainerService
func (*ContainerService) AttachExec ¶
func (s *ContainerService) AttachExec(ctx context.Context, containerID, execID string) (*ExecSession, error)
AttachExec attaches to an exec instance and returns an ExecSession for lifecycle management.
func (*ContainerService) CreateContainer ¶
func (s *ContainerService) CreateContainer(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, containerName string, user models.User, credentials []containerregistry.Credential) (*container.InspectResponse, error)
func (*ContainerService) CreateExec ¶
func (s *ContainerService) CreateExec(ctx context.Context, containerID string, cmd []string) (string, error)
CreateExec creates an exec instance in the container
func (*ContainerService) DeleteContainer ¶
func (*ContainerService) GetContainerByID ¶
func (s *ContainerService) GetContainerByID(ctx context.Context, id string) (*container.InspectResponse, error)
func (*ContainerService) GetContainerByReference ¶ added in v1.17.0
func (s *ContainerService) GetContainerByReference(ctx context.Context, ref string) (*container.InspectResponse, error)
func (*ContainerService) GetContainerDetails ¶ added in v1.19.0
func (s *ContainerService) GetContainerDetails(ctx context.Context, id string) (containertypes.Details, error)
func (*ContainerService) GetContainerNameByID ¶ added in v1.17.0
GetContainerNameByID resolves a container's clean name from its Docker ID.
func (*ContainerService) GetContainerNameByReference ¶ added in v1.17.0
func (s *ContainerService) GetContainerNameByReference(ctx context.Context, ref string) (string, error)
GetContainerNameByReference resolves a container's clean name from a Docker ID or name.
func (*ContainerService) ListContainersPaginated ¶
func (s *ContainerService) ListContainersPaginated( ctx context.Context, params pagination.QueryParams, includeAll bool, includeInternal bool, groupBy string, ) (ContainerListResult, error)
func (*ContainerService) RedeployContainer ¶ added in v1.17.0
func (*ContainerService) RestartContainer ¶
func (*ContainerService) StartContainer ¶
func (*ContainerService) StopContainer ¶
func (*ContainerService) StreamLogs ¶
func (*ContainerService) StreamStats ¶
type CreateEventRequest ¶
type CreateEventRequest struct {
Type models.EventType `json:"type"`
Severity models.EventSeverity `json:"severity,omitempty"`
Title string `json:"title"`
Description string `json:"description,omitempty"`
ResourceType *string `json:"resourceType,omitempty"`
ResourceID *string `json:"resourceId,omitempty"`
ResourceName *string `json:"resourceName,omitempty"`
UserID *string `json:"userId,omitempty"`
Username *string `json:"username,omitempty"`
EnvironmentID *string `json:"environmentId,omitempty"`
Metadata models.JSON `json:"metadata,omitempty"`
}
type CustomizeSearchService ¶
type CustomizeSearchService struct {
// contains filtered or unexported fields
}
func NewCustomizeSearchService ¶
func NewCustomizeSearchService() *CustomizeSearchService
func (*CustomizeSearchService) GetCustomizeCategories ¶
func (s *CustomizeSearchService) GetCustomizeCategories() []category.Category
GetCustomizeCategories returns all available customization categories with their metadata
type DashboardActionItemsOptions ¶ added in v1.16.0
type DashboardActionItemsOptions struct {
DebugAllGood bool
}
type DashboardService ¶ added in v1.16.0
type DashboardService struct {
// contains filtered or unexported fields
}
func NewDashboardService ¶ added in v1.16.0
func NewDashboardService( db *database.DB, dockerService *DockerClientService, containerService *ContainerService, projectService *ProjectService, imageService *ImageService, settingsService *SettingsService, vulnerabilityService *VulnerabilityService, environmentService *EnvironmentService, versionService *VersionService, ) *DashboardService
func (*DashboardService) GetActionItems ¶ added in v1.16.0
func (s *DashboardService) GetActionItems(ctx context.Context, options DashboardActionItemsOptions) (*dashboardtypes.ActionItems, error)
func (*DashboardService) GetEnvironmentsOverview ¶ added in v1.18.0
func (s *DashboardService) GetEnvironmentsOverview( ctx context.Context, options DashboardActionItemsOptions, ) (*dashboardtypes.EnvironmentsOverview, error)
func (*DashboardService) GetSnapshot ¶ added in v1.17.0
func (s *DashboardService) GetSnapshot(ctx context.Context, options DashboardActionItemsOptions) (*dashboardtypes.Snapshot, error)
type DeploymentSnippetFile ¶ added in v1.19.0
type DeploymentSnippetMTLS ¶ added in v1.19.0
type DeploymentSnippetMTLS struct {
DockerRun string
DockerCompose string
Files []DeploymentSnippetFile
HostDirHint string
}
type DeploymentSnippets ¶
type DeploymentSnippets struct {
DockerRun string
DockerCompose string
MTLS *DeploymentSnippetMTLS
}
DeploymentSnippets contains deployment configuration snippets for an environment.
type DockerClientService ¶
type DockerClientService struct {
// contains filtered or unexported fields
}
func NewDockerClientService ¶
func NewDockerClientService(db *database.DB, cfg *config.Config, settingsService *SettingsService) *DockerClientService
func (*DockerClientService) DockerHost ¶ added in v1.17.0
func (s *DockerClientService) DockerHost() string
DockerHost returns the configured DOCKER_HOST value.
func (*DockerClientService) GetAllContainers ¶
func (*DockerClientService) GetAllImages ¶
func (*DockerClientService) GetAllNetworks ¶
func (*DockerClientService) GetAllVolumes ¶
func (*DockerClientService) GetClient ¶
GetClient returns a singleton Docker client instance. It initializes the client on the first call.
func (*DockerClientService) RefreshClient ¶ added in v1.19.0
func (s *DockerClientService) RefreshClient(ctx context.Context) error
RefreshClient probes the Docker daemon and recreates the cached client when the daemon's effective API version changed.
type EnvironmentService ¶
type EnvironmentService struct {
// contains filtered or unexported fields
}
func NewEnvironmentService ¶
func NewEnvironmentService(db *database.DB, httpClient *http.Client, dockerService *DockerClientService, eventService *EventService, settingsService *SettingsService, apiKeyService *ApiKeyService) *EnvironmentService
func (*EnvironmentService) CreateEnvironment ¶
func (s *EnvironmentService) CreateEnvironment(ctx context.Context, environment *models.Environment, userID, username *string) (*models.Environment, error)
func (*EnvironmentService) DeleteEnvironment ¶
func (*EnvironmentService) EnsureLocalEnvironment ¶
func (s *EnvironmentService) EnsureLocalEnvironment(ctx context.Context, appUrl string) error
func (*EnvironmentService) EnsureSwarmNodeAgentEnvironment ¶ added in v1.17.0
func (s *EnvironmentService) EnsureSwarmNodeAgentEnvironment( ctx context.Context, parentEnvironmentID, nodeID, hostname, userID, username string, rotate bool, ) (*models.Environment, string, error)
func (*EnvironmentService) ExecuteRemoteRequest ¶ added in v1.19.0
func (*EnvironmentService) GenerateDeploymentSnippets ¶
func (s *EnvironmentService) GenerateDeploymentSnippets(ctx context.Context, envID string, envAddress string, apiKey string) (*DeploymentSnippets, error)
GenerateDeploymentSnippets generates Docker deployment snippets for an environment.
func (*EnvironmentService) GenerateEdgeDeploymentSnippets ¶
func (s *EnvironmentService) GenerateEdgeDeploymentSnippets(ctx context.Context, envID string, managerURL string, apiKey string, edgeCfg *edge.Config) (*DeploymentSnippets, error)
GenerateEdgeDeploymentSnippets generates Docker deployment snippets for an edge agent. Edge agents connect outbound to the manager and don't require exposed ports.
func (*EnvironmentService) GetDB ¶
func (s *EnvironmentService) GetDB() *database.DB
func (*EnvironmentService) GetEnabledRegistryCredentials ¶
func (s *EnvironmentService) GetEnabledRegistryCredentials(ctx context.Context) ([]containerregistry.Credential, error)
func (*EnvironmentService) GetEnvironmentByID ¶
func (s *EnvironmentService) GetEnvironmentByID(ctx context.Context, id string) (*models.Environment, error)
func (*EnvironmentService) ListEnvironmentsPaginated ¶
func (s *EnvironmentService) ListEnvironmentsPaginated(ctx context.Context, params pagination.QueryParams) ([]environment.Environment, pagination.Response, error)
func (*EnvironmentService) ListRemoteEnvironments ¶
func (s *EnvironmentService) ListRemoteEnvironments(ctx context.Context) ([]models.Environment, error)
ListRemoteEnvironments returns all non-local, enabled environments for syncing purposes.
func (*EnvironmentService) ListSwarmNodeAgentEnvironments ¶ added in v1.17.0
func (s *EnvironmentService) ListSwarmNodeAgentEnvironments(ctx context.Context, parentEnvironmentID string) ([]models.Environment, error)
func (*EnvironmentService) ListVisibleEnvironments ¶ added in v1.18.0
func (s *EnvironmentService) ListVisibleEnvironments(ctx context.Context) ([]environment.Environment, error)
func (*EnvironmentService) PairAgentWithBootstrap ¶
func (s *EnvironmentService) PairAgentWithBootstrap(ctx context.Context, apiUrl, bootstrapToken string) (string, error)
Deprecated - Use the Api Key flow
func (*EnvironmentService) PairAndPersistAgentToken ¶
func (*EnvironmentService) ProxyJSONRequest ¶ added in v1.19.0
func (*EnvironmentService) ProxyRequest ¶
func (s *EnvironmentService) ProxyRequest(ctx context.Context, envID string, method string, path string, body []byte) ([]byte, int, error)
ProxyRequest sends a request to a remote environment's API.
func (*EnvironmentService) ReconcileEdgeStatusesOnStartup ¶ added in v1.16.0
func (s *EnvironmentService) ReconcileEdgeStatusesOnStartup(ctx context.Context) error
ReconcileEdgeStatusesOnStartup resets edge environments to offline when the manager starts. Live edge tunnels are process-local runtime state, so persisted "online" flags can be stale after a restart until agents reconnect. Pending environments are left untouched.
func (*EnvironmentService) RegenerateEnvironmentApiKey ¶
func (*EnvironmentService) ResolveEdgeEnvironmentByToken ¶ added in v1.16.2
func (*EnvironmentService) ResolveEnvironmentByAccessToken ¶ added in v1.16.2
func (s *EnvironmentService) ResolveEnvironmentByAccessToken(ctx context.Context, token string) (*models.Environment, error)
func (*EnvironmentService) SyncRegistriesToEnvironment ¶
func (s *EnvironmentService) SyncRegistriesToEnvironment(ctx context.Context, environmentID string) error
SyncRegistriesToEnvironment syncs all registries from this manager to a remote environment
func (*EnvironmentService) SyncRegistriesToRemoteEnvironments ¶
func (s *EnvironmentService) SyncRegistriesToRemoteEnvironments(ctx context.Context) error
SyncRegistriesToRemoteEnvironments syncs container registries to all eligible remote environments. Eligibility requires a non-local, enabled environment with a configured access token.
func (*EnvironmentService) SyncRepositoriesToEnvironment ¶
func (s *EnvironmentService) SyncRepositoriesToEnvironment(ctx context.Context, environmentID string) error
SyncRepositoriesToEnvironment syncs all git repositories from this manager to a remote environment
func (*EnvironmentService) TestConnection ¶
func (*EnvironmentService) UpdateEnvironment ¶
func (s *EnvironmentService) UpdateEnvironment(ctx context.Context, id string, updates map[string]any, userID, username *string) (*models.Environment, error)
func (*EnvironmentService) UpdateEnvironmentConnectionState ¶ added in v1.16.0
func (s *EnvironmentService) UpdateEnvironmentConnectionState(ctx context.Context, id string, connected bool) error
UpdateEnvironmentConnectionState updates runtime connectivity status without creating a generic "environment updated" event. This is used for edge tunnel connect/disconnect.
func (*EnvironmentService) UpdateEnvironmentHeartbeat ¶
func (s *EnvironmentService) UpdateEnvironmentHeartbeat(ctx context.Context, id string) error
func (*EnvironmentService) UpdateSwarmNodeIdentity ¶ added in v1.17.0
func (s *EnvironmentService) UpdateSwarmNodeIdentity(ctx context.Context, envID, swarmNodeID string) error
type EventService ¶
type EventService struct {
// contains filtered or unexported fields
}
func NewEventService ¶
func (*EventService) CreateEvent ¶
func (s *EventService) CreateEvent(ctx context.Context, req CreateEventRequest) (*models.Event, error)
func (*EventService) CreateEventFromDto ¶
func (s *EventService) CreateEventFromDto(ctx context.Context, req event.CreateEvent) (*event.Event, error)
func (*EventService) DeleteEvent ¶
func (s *EventService) DeleteEvent(ctx context.Context, eventID string) error
func (*EventService) DeleteOldEvents ¶
func (*EventService) GetEventsByEnvironmentPaginated ¶
func (s *EventService) GetEventsByEnvironmentPaginated(ctx context.Context, environmentID string, params pagination.QueryParams) ([]event.Event, pagination.Response, error)
func (*EventService) ListEventsPaginated ¶
func (s *EventService) ListEventsPaginated(ctx context.Context, params pagination.QueryParams) ([]event.Event, pagination.Response, error)
func (*EventService) LogContainerEvent ¶
func (*EventService) LogErrorEvent ¶
func (*EventService) LogImageEvent ¶
func (*EventService) LogNetworkEvent ¶
func (*EventService) LogProjectEvent ¶
func (*EventService) LogUserEvent ¶
type ExecSession ¶
type ExecSession struct {
// contains filtered or unexported fields
}
ExecSession manages the lifecycle of a Docker exec session.
func (*ExecSession) Close ¶
func (e *ExecSession) Close(ctx context.Context) error
Close terminates the exec session and kills the process if still running.
func (*ExecSession) Stdin ¶
func (e *ExecSession) Stdin() io.WriteCloser
func (*ExecSession) Stdout ¶
func (e *ExecSession) Stdout() io.Reader
type FontService ¶
type FontService struct {
// contains filtered or unexported fields
}
func NewFontService ¶
func NewFontService(embeddedFS embed.FS) *FontService
func (*FontService) GetFont ¶
func (s *FontService) GetFont(fontPath string) ([]byte, string, error)
func (*FontService) GetMonoFont ¶
func (s *FontService) GetMonoFont() ([]byte, string, error)
func (*FontService) GetSansFont ¶
func (s *FontService) GetSansFont() ([]byte, string, error)
type GitOpsSyncService ¶
type GitOpsSyncService struct {
// contains filtered or unexported fields
}
func NewGitOpsSyncService ¶
func NewGitOpsSyncService(db *database.DB, repoService *GitRepositoryService, projectService *ProjectService, swarmService *SwarmService, eventService *EventService, settingsService *SettingsService) *GitOpsSyncService
func (*GitOpsSyncService) BrowseFiles ¶
func (s *GitOpsSyncService) BrowseFiles(ctx context.Context, environmentID, id string, path string) (*gitops.BrowseResponse, error)
func (*GitOpsSyncService) CreateSync ¶
func (s *GitOpsSyncService) CreateSync(ctx context.Context, environmentID string, req gitops.CreateSyncRequest, actor models.User) (*models.GitOpsSync, error)
func (*GitOpsSyncService) DeleteSync ¶
func (*GitOpsSyncService) GetSyncByID ¶
func (s *GitOpsSyncService) GetSyncByID(ctx context.Context, environmentID, id string) (*models.GitOpsSync, error)
func (*GitOpsSyncService) GetSyncStatus ¶
func (s *GitOpsSyncService) GetSyncStatus(ctx context.Context, environmentID, id string) (*gitops.SyncStatus, error)
func (*GitOpsSyncService) GetSyncsPaginated ¶
func (s *GitOpsSyncService) GetSyncsPaginated(ctx context.Context, environmentID string, params pagination.QueryParams) ([]gitops.GitOpsSync, pagination.Response, gitops.SyncCounts, error)
func (*GitOpsSyncService) ImportSyncs ¶
func (s *GitOpsSyncService) ImportSyncs(ctx context.Context, environmentID string, req []gitops.ImportGitOpsSyncRequest, actor models.User) (*gitops.ImportGitOpsSyncResponse, error)
func (*GitOpsSyncService) ListSyncIntervalsRaw ¶
func (s *GitOpsSyncService) ListSyncIntervalsRaw(ctx context.Context) ([]startup.IntervalMigrationItem, error)
func (*GitOpsSyncService) PerformSync ¶
func (s *GitOpsSyncService) PerformSync(ctx context.Context, environmentID, id string, actor models.User) (*gitops.SyncResult, error)
func (*GitOpsSyncService) ReconcileDirectorySyncProjectsOnStartup ¶ added in v1.17.2
func (s *GitOpsSyncService) ReconcileDirectorySyncProjectsOnStartup(ctx context.Context) error
func (*GitOpsSyncService) SyncAllEnabled ¶
func (s *GitOpsSyncService) SyncAllEnabled(ctx context.Context) error
func (*GitOpsSyncService) UpdateSync ¶
func (s *GitOpsSyncService) UpdateSync(ctx context.Context, environmentID, id string, req gitops.UpdateSyncRequest, actor models.User) (*models.GitOpsSync, error)
func (*GitOpsSyncService) UpdateSyncIntervalMinutes ¶
type GitRepositoryService ¶
type GitRepositoryService struct {
// contains filtered or unexported fields
}
func NewGitRepositoryService ¶
func NewGitRepositoryService(db *database.DB, workDir string, eventService *EventService, settingsService *SettingsService) *GitRepositoryService
func (*GitRepositoryService) BrowseFiles ¶
func (s *GitRepositoryService) BrowseFiles(ctx context.Context, id, branch, path string) (*gitops.BrowseResponse, error)
func (*GitRepositoryService) CreateRepository ¶
func (s *GitRepositoryService) CreateRepository(ctx context.Context, req models.CreateGitRepositoryRequest, actor models.User) (*models.GitRepository, error)
func (*GitRepositoryService) DeleteRepository ¶
func (*GitRepositoryService) FindEnabledRepositoryByURL ¶ added in v1.16.1
func (s *GitRepositoryService) FindEnabledRepositoryByURL(ctx context.Context, rawURL string) (*models.GitRepository, error)
func (*GitRepositoryService) GetAuthConfig ¶
func (s *GitRepositoryService) GetAuthConfig(ctx context.Context, repository *models.GitRepository) (git.AuthConfig, error)
func (*GitRepositoryService) GetRepositoriesPaginated ¶
func (s *GitRepositoryService) GetRepositoriesPaginated(ctx context.Context, params pagination.QueryParams) ([]gitops.GitRepository, pagination.Response, error)
func (*GitRepositoryService) GetRepositoryByID ¶
func (s *GitRepositoryService) GetRepositoryByID(ctx context.Context, id string) (*models.GitRepository, error)
func (*GitRepositoryService) GetRepositoryByName ¶
func (s *GitRepositoryService) GetRepositoryByName(ctx context.Context, name string) (*models.GitRepository, error)
func (*GitRepositoryService) ListBranches ¶
func (s *GitRepositoryService) ListBranches(ctx context.Context, id string) ([]gitops.BranchInfo, error)
func (*GitRepositoryService) SyncRepositories ¶
func (s *GitRepositoryService) SyncRepositories(ctx context.Context, syncItems []gitops.RepositorySync) error
SyncRepositories syncs repositories from a manager to this agent instance. It creates, updates, or deletes repositories to match the provided list.
func (*GitRepositoryService) TestConnection ¶
func (*GitRepositoryService) UpdateRepository ¶
func (s *GitRepositoryService) UpdateRepository(ctx context.Context, id string, req models.UpdateGitRepositoryRequest, actor models.User) (*models.GitRepository, error)
type ImageParts ¶
type ImageService ¶
type ImageService struct {
// contains filtered or unexported fields
}
func NewImageService ¶
func NewImageService(db *database.DB, dockerService *DockerClientService, registryService *ContainerRegistryService, imageUpdateService *ImageUpdateService, vulnerabilityService *VulnerabilityService, eventService *EventService) *ImageService
func (*ImageService) BuildProjectIDMap ¶ added in v1.19.0
func (s *ImageService) BuildProjectIDMap(ctx context.Context, containers []container.Summary) map[string]string
BuildProjectIDMap returns a map of compose project name → project ID for any containers that carry the com.docker.compose.project label. The lookup uses a short-TTL cache shared across all callers of this ImageService instance.
func (*ImageService) GetImageDetail ¶
func (s *ImageService) GetImageDetail(ctx context.Context, id string) (*imagetypes.DetailSummary, error)
GetImageDetail returns a DetailSummary for the given image ID. It fetches ImageInspect and ImageList concurrently so the size field reflects the same metric shown in the image table (docker image ls / docker system df).
func (*ImageService) GetTotalImageSize ¶
func (s *ImageService) GetTotalImageSize(ctx context.Context) (int64, error)
func (*ImageService) GetUpdateInfoByImageIDs ¶
func (s *ImageService) GetUpdateInfoByImageIDs(ctx context.Context, imageIDs []string) (map[string]*imagetypes.UpdateInfo, error)
GetUpdateInfoByImageIDs returns a map of image ID to UpdateInfo for the given image IDs. This is used by the container service to populate update info for containers.
func (*ImageService) GetUpdateInfoByImageRefs ¶ added in v1.18.0
func (s *ImageService) GetUpdateInfoByImageRefs(ctx context.Context, imageRefs []string) (map[string]*imagetypes.UpdateInfo, error)
GetUpdateInfoByImageRefs returns persisted update information keyed by the original image reference string.
func (*ImageService) ImageExistsLocally ¶
func (*ImageService) ListImagesPaginated ¶
func (s *ImageService) ListImagesPaginated(ctx context.Context, params pagination.QueryParams) ([]imagetypes.Summary, pagination.Response, error)
func (*ImageService) LoadImageFromReader ¶
func (s *ImageService) LoadImageFromReader(ctx context.Context, reader io.Reader, fileName string, user models.User, maxSizeBytes int64) (*imagetypes.LoadResult, error)
func (*ImageService) PruneImages ¶
func (s *ImageService) PruneImages(ctx context.Context, options systemtypes.PruneImagesOptions) (*image.PruneReport, error)
func (*ImageService) PullImage ¶
func (s *ImageService) PullImage(ctx context.Context, imageName string, progressWriter io.Writer, user models.User, externalCreds []containerregistry.Credential) error
func (*ImageService) ReconcilePulledImageUpdate ¶ added in v1.18.0
func (s *ImageService) ReconcilePulledImageUpdate(ctx context.Context, imageName string) error
func (*ImageService) RemoveImage ¶
type ImageUpdateService ¶
type ImageUpdateService struct {
// contains filtered or unexported fields
}
func NewImageUpdateService ¶
func NewImageUpdateService(db *database.DB, settingsService *SettingsService, registryService *ContainerRegistryService, dockerService *DockerClientService, eventService *EventService, notificationService *NotificationService) *ImageUpdateService
func (*ImageUpdateService) CheckAllImages ¶
func (s *ImageUpdateService) CheckAllImages(ctx context.Context, limit int, externalCreds []containerregistry.Credential) (map[string]*imageupdate.Response, error)
func (*ImageUpdateService) CheckImageUpdate ¶
func (s *ImageUpdateService) CheckImageUpdate(ctx context.Context, imageRef string) (*imageupdate.Response, error)
func (*ImageUpdateService) CheckImageUpdateByID ¶
func (s *ImageUpdateService) CheckImageUpdateByID(ctx context.Context, imageID string) (*imageupdate.Response, error)
func (*ImageUpdateService) CheckMultipleImages ¶
func (s *ImageUpdateService) CheckMultipleImages(ctx context.Context, imageRefs []string, externalCreds []containerregistry.Credential) (map[string]*imageupdate.Response, error)
func (*ImageUpdateService) CleanupOrphanedRecords ¶
func (s *ImageUpdateService) CleanupOrphanedRecords(ctx context.Context) error
func (*ImageUpdateService) GetUnnotifiedUpdates ¶
func (s *ImageUpdateService) GetUnnotifiedUpdates(ctx context.Context) (map[string]*models.ImageUpdateRecord, error)
GetUnnotifiedUpdates returns a map of image IDs that have updates but haven't been notified yet
func (*ImageUpdateService) GetUpdateSummary ¶
func (s *ImageUpdateService) GetUpdateSummary(ctx context.Context) (*imageupdate.Summary, error)
func (*ImageUpdateService) MarkImageRefUpToDateAfterPull ¶ added in v1.18.0
func (s *ImageUpdateService) MarkImageRefUpToDateAfterPull(ctx context.Context, imageRef string) error
func (*ImageUpdateService) MarkUpdatesAsNotified ¶
func (s *ImageUpdateService) MarkUpdatesAsNotified(ctx context.Context, imageIDs []string) error
MarkUpdatesAsNotified marks the given image IDs as having been notified
type JobRunner ¶
type JobRunner interface {
GetJob(jobID string) (schedulertypes.Job, bool)
RescheduleJob(ctx context.Context, job schedulertypes.Job) error
}
type JobService ¶
type JobService struct {
// contains filtered or unexported fields
}
JobService manages configuration for background job schedules.
Intervals are persisted in the existing settings table as individual keys. After updates, the SettingsService cache is reloaded and active jobs are rescheduled through the configured scheduler.
NOTE: This is intentionally separate from SettingsService to keep the API surface job-focused and to centralize schedule validation/rescheduling.
func NewJobService ¶
func NewJobService(db *database.DB, settings *SettingsService, cfg *config.Config) *JobService
func (*JobService) GetJobSchedules ¶
func (s *JobService) GetJobSchedules(ctx context.Context) jobschedule.Config
func (*JobService) ListJobs ¶
func (s *JobService) ListJobs(ctx context.Context) (*jobschedule.JobListResponse, error)
func (*JobService) RescheduleJobsForSettingKeys ¶ added in v1.19.0
func (s *JobService) RescheduleJobsForSettingKeys(ctx context.Context, changedKeys []string)
func (*JobService) RunJobNowInline ¶
func (s *JobService) RunJobNowInline(ctx context.Context, jobID string) error
func (*JobService) SetScheduler ¶
func (s *JobService) SetScheduler(ctx context.Context, scheduler JobRunner)
func (*JobService) UpdateJobSchedules ¶
func (s *JobService) UpdateJobSchedules(ctx context.Context, updates jobschedule.Update) (jobschedule.Config, error)
type KVService ¶ added in v1.16.2
type KVService struct {
// contains filtered or unexported fields
}
KVService persists lightweight application state in the kv table.
func NewKVService ¶ added in v1.16.2
func (*KVService) IncrementInt64 ¶ added in v1.19.0
type NetworkService ¶
type NetworkService struct {
// contains filtered or unexported fields
}
func NewNetworkService ¶
func NewNetworkService(db *database.DB, dockerService *DockerClientService, eventService *EventService) *NetworkService
func (*NetworkService) CreateNetwork ¶
func (s *NetworkService) CreateNetwork(ctx context.Context, name string, options client.NetworkCreateOptions, user models.User) (*network.CreateResponse, error)
func (*NetworkService) GetNetworkByID ¶
func (*NetworkService) GetNetworkTopology ¶ added in v1.17.0
func (s *NetworkService) GetNetworkTopology(ctx context.Context) (*networktypes.Topology, error)
func (*NetworkService) ListNetworksPaginated ¶
func (s *NetworkService) ListNetworksPaginated(ctx context.Context, params pagination.QueryParams) ([]networktypes.Summary, pagination.Response, networktypes.UsageCounts, error)
func (*NetworkService) PruneNetworks ¶
func (s *NetworkService) PruneNetworks(ctx context.Context) (*network.PruneReport, error)
func (*NetworkService) RemoveNetwork ¶
type NotificationService ¶
type NotificationService struct {
// contains filtered or unexported fields
}
func NewNotificationService ¶
func NewNotificationService(db *database.DB, cfg *config.Config, environmentSvc *EnvironmentService) *NotificationService
func (*NotificationService) CreateOrUpdateSettings ¶
func (s *NotificationService) CreateOrUpdateSettings(ctx context.Context, provider models.NotificationProvider, enabled bool, config models.JSON) (*models.NotificationSettings, error)
func (*NotificationService) DeleteSettings ¶
func (s *NotificationService) DeleteSettings(ctx context.Context, provider models.NotificationProvider) error
func (*NotificationService) DispatchNotification ¶ added in v1.16.2
func (s *NotificationService) DispatchNotification(ctx context.Context, accessToken string, payload notificationdto.DispatchRequest) error
func (*NotificationService) GetAllSettings ¶
func (s *NotificationService) GetAllSettings(ctx context.Context) ([]models.NotificationSettings, error)
func (*NotificationService) GetSettingsByProvider ¶
func (s *NotificationService) GetSettingsByProvider(ctx context.Context, provider models.NotificationProvider) (*models.NotificationSettings, error)
func (*NotificationService) MigrateDiscordWebhookUrlToFields ¶
func (s *NotificationService) MigrateDiscordWebhookUrlToFields(ctx context.Context) error
MigrateDiscordWebhookUrlToFields migrates legacy Discord webhookUrl to separate webhookId and token fields. This should be called during bootstrap to ensure existing Discord configurations are preserved.
func (*NotificationService) ResolveNotificationTarget ¶ added in v1.16.2
func (s *NotificationService) ResolveNotificationTarget(ctx context.Context, environmentID string) (NotificationTarget, error)
func (*NotificationService) SendAutoHealNotification ¶ added in v1.16.0
func (s *NotificationService) SendAutoHealNotification(ctx context.Context, containerName, containerID string) error
SendAutoHealNotification sends a notification when a container is auto-healed.
func (*NotificationService) SendBatchImageUpdateNotification ¶
func (s *NotificationService) SendBatchImageUpdateNotification(ctx context.Context, updates map[string]*imageupdate.Response) error
func (*NotificationService) SendContainerUpdateNotification ¶
func (s *NotificationService) SendContainerUpdateNotification(ctx context.Context, containerName, imageRef, oldDigest, newDigest string) error
func (*NotificationService) SendImageUpdateNotification ¶
func (s *NotificationService) SendImageUpdateNotification(ctx context.Context, imageRef string, updateInfo *imageupdate.Response, eventType models.NotificationEventType) error
func (*NotificationService) SendPruneReportNotification ¶
func (s *NotificationService) SendPruneReportNotification(ctx context.Context, result *system.PruneAllResult) error
func (*NotificationService) SendVulnerabilityNotification ¶
func (s *NotificationService) SendVulnerabilityNotification(ctx context.Context, payload VulnerabilityNotificationPayload) error
SendVulnerabilityNotification notifies all enabled providers that have vulnerability_found event enabled. Only daily summary payloads are sent; legacy per-CVE payloads are ignored.
func (*NotificationService) TestNotification ¶
func (s *NotificationService) TestNotification(ctx context.Context, environmentID string, provider models.NotificationProvider, testType string) error
type NotificationTarget ¶ added in v1.16.2
type OidcService ¶
type OidcService struct {
// contains filtered or unexported fields
}
func NewOidcService ¶
func NewOidcService(authService *AuthService, settingsService *SettingsService, cfg *config.Config, httpClient *http.Client) *OidcService
func (*OidcService) ExchangeDeviceToken ¶
func (s *OidcService) ExchangeDeviceToken(ctx context.Context, deviceCode string) (*auth.OidcUserInfo, *auth.OidcTokenResponse, error)
ExchangeDeviceToken exchanges a device code for tokens.
func (*OidcService) GenerateAuthURL ¶
func (*OidcService) GetMobileRedirectAllowlist ¶ added in v1.19.1
func (s *OidcService) GetMobileRedirectAllowlist(ctx context.Context) []string
GetMobileRedirectAllowlist returns the configured list of acceptable mobile OAuth redirect URIs.
func (*OidcService) GetOidcRedirectURL ¶
func (s *OidcService) GetOidcRedirectURL(origin string) string
func (*OidcService) HandleCallback ¶
func (s *OidcService) HandleCallback(ctx context.Context, code, state, storedState, origin, mobileRedirectURI string) (*auth.OidcUserInfo, *auth.OidcTokenResponse, error)
func (*OidcService) InitiateDeviceAuth ¶
func (s *OidcService) InitiateDeviceAuth(ctx context.Context) (*auth.OidcDeviceAuthResponse, error)
InitiateDeviceAuth initiates the OIDC device authorization flow.
func (*OidcService) ValidateMobileRedirectURI ¶ added in v1.19.1
func (s *OidcService) ValidateMobileRedirectURI(ctx context.Context, uri string) error
ValidateMobileRedirectURI returns nil if uri exactly matches one of the configured mobile redirect URIs. Full-string match is required — partial matches on scheme or host could be abused for open-redirect attacks.
type PortService ¶ added in v1.17.0
type PortService struct {
// contains filtered or unexported fields
}
func NewPortService ¶ added in v1.17.0
func NewPortService(dockerService *DockerClientService) *PortService
func (*PortService) ListPortsPaginated ¶ added in v1.17.0
func (s *PortService) ListPortsPaginated(ctx context.Context, params pagination.QueryParams) ([]porttypes.PortMapping, pagination.Response, error)
type ProjectBuildOptions ¶ added in v1.16.0
type ProjectService ¶
type ProjectService struct {
// contains filtered or unexported fields
}
func NewProjectService ¶
func NewProjectService(db *database.DB, settingsService *SettingsService, eventService *EventService, imageService *ImageService, dockerService *DockerClientService, buildService *BuildService, cfg *config.Config) *ProjectService
func (*ProjectService) ApplyGitSyncProjectFiles ¶ added in v1.16.3
func (*ProjectService) ArchiveProject ¶ added in v1.19.0
func (*ProjectService) BuildProjectServices ¶ added in v1.16.0
func (s *ProjectService) BuildProjectServices(ctx context.Context, projectID string, options ProjectBuildOptions, progressWriter io.Writer, user *models.User) error
func (*ProjectService) CreateProject ¶
func (*ProjectService) DeployProject ¶
func (s *ProjectService) DeployProject(ctx context.Context, projectID string, user models.User, options *project.DeployOptions) error
func (*ProjectService) DestroyProject ¶
func (*ProjectService) DownProject ¶
func (*ProjectService) EnsureProjectImagesPresent ¶
func (s *ProjectService) EnsureProjectImagesPresent(ctx context.Context, projectID string, progressWriter io.Writer, user models.User, credentials []containerregistry.Credential) error
EnsureProjectImagesPresent checks all compose service images for the project and pulls based on service pull policy: - always/refresh: always pull - missing/if_not_present/default: pull only if local image is missing - never: never pull (fails early if image is missing locally)
func (*ProjectService) GetProjectByComposeName ¶ added in v1.17.0
func (*ProjectService) GetProjectContent ¶
func (*ProjectService) GetProjectDetails ¶
func (*ProjectService) GetProjectFileContent ¶ added in v1.17.2
func (s *ProjectService) GetProjectFileContent(ctx context.Context, projectID, relativePath string) (project.IncludeFile, error)
func (*ProjectService) GetProjectFromDatabaseByID ¶
func (*ProjectService) GetProjectRelativePath ¶ added in v1.17.0
func (s *ProjectService) GetProjectRelativePath(ctx context.Context, projectPath string) string
func (*ProjectService) GetProjectServices ¶
func (s *ProjectService) GetProjectServices(ctx context.Context, projectID string) ([]ProjectServiceInfo, error)
func (*ProjectService) GetProjectStatusCounts ¶
func (s *ProjectService) GetProjectStatusCounts(ctx context.Context) (folderCount, runningProjects, stoppedProjects, totalProjects, archivedProjects int, err error)
func (*ProjectService) ListAllProjects ¶
func (*ProjectService) ListProjects ¶
func (s *ProjectService) ListProjects(ctx context.Context, params pagination.QueryParams) ([]project.Details, pagination.Response, error)
func (*ProjectService) PullProjectImages ¶
func (s *ProjectService) PullProjectImages(ctx context.Context, projectID string, progressWriter io.Writer, user models.User, credentials []containerregistry.Credential) error
func (*ProjectService) RedeployProject ¶
func (*ProjectService) RestartProject ¶
func (*ProjectService) StreamProjectLogs ¶
func (*ProjectService) SyncProjectsFromFileSystem ¶
func (s *ProjectService) SyncProjectsFromFileSystem(ctx context.Context) error
func (*ProjectService) UnarchiveProject ¶ added in v1.19.0
func (*ProjectService) UpdateProject ¶
func (*ProjectService) UpdateProjectIncludeFile ¶
func (*ProjectService) UpdateProjectServices ¶ added in v1.17.0
type ProjectServiceInfo ¶
type ProjectServiceInfo struct {
Name string `json:"name"`
Image string `json:"image"`
Status string `json:"status"`
ContainerID string `json:"container_id"`
ContainerName string `json:"container_name"`
Ports []string `json:"ports"`
Health *string `json:"health,omitempty"`
IconURL string `json:"icon_url,omitempty"`
ServiceConfig *composetypes.ServiceConfig `json:"service_config,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
RedeployDisabled bool `json:"redeploy_disabled,omitempty"`
}
type RegistryDaemonClient ¶ added in v1.16.2
type RegistryDaemonClient interface {
RegistryLogin(ctx context.Context, options client.RegistryLoginOptions) (client.RegistryLoginResult, error)
DistributionInspect(ctx context.Context, imageRef string, options client.DistributionInspectOptions) (client.DistributionInspectResult, error)
}
type SessionService ¶ added in v1.19.1
type SessionService struct {
// contains filtered or unexported fields
}
func NewSessionService ¶ added in v1.19.1
func NewSessionService(db *database.DB) *SessionService
func (*SessionService) CreateSession ¶ added in v1.19.1
func (s *SessionService) CreateSession(ctx context.Context, userID string, expiresAt time.Time, meta auth.SessionMeta) (*models.UserSession, string, error)
func (*SessionService) DeleteExpiredSessions ¶ added in v1.19.1
func (*SessionService) GetSessionByID ¶ added in v1.19.1
func (s *SessionService) GetSessionByID(ctx context.Context, sessionID string) (*models.UserSession, error)
func (*SessionService) RevokeAllUserSessionsExcept ¶ added in v1.19.1
func (s *SessionService) RevokeAllUserSessionsExcept(ctx context.Context, userID, exceptSessionID string) error
RevokeAllUserSessionsExcept revokes every active session for userID, leaving exceptSessionID active. Pass "" to revoke all sessions.
func (*SessionService) RevokeSession ¶ added in v1.19.1
func (s *SessionService) RevokeSession(ctx context.Context, sessionID string) error
func (*SessionService) RotateRefreshToken ¶ added in v1.19.1
func (s *SessionService) RotateRefreshToken(ctx context.Context, sessionID string, refreshJTI string, meta auth.SessionMeta) (*models.UserSession, string, error)
type SettingsSearchService ¶
type SettingsSearchService struct {
// contains filtered or unexported fields
}
func NewSettingsSearchService ¶
func NewSettingsSearchService() *SettingsSearchService
func (*SettingsSearchService) GetSettingsCategories ¶
func (s *SettingsSearchService) GetSettingsCategories() []category.Category
GetSettingsCategories returns all available settings categories with their metadata
type SettingsService ¶
type SettingsService struct {
OnImagePollingSettingsChanged func(ctx context.Context)
OnAutoUpdateSettingsChanged func(ctx context.Context)
OnProjectsDirectoryChanged func(ctx context.Context)
OnScheduledPruneSettingsChanged func(ctx context.Context)
OnVulnerabilityScanSettingsChanged func(ctx context.Context)
OnAutoHealSettingsChanged func(ctx context.Context)
OnTimeoutSettingsChanged func(ctx context.Context, timeoutSettings []libarcane.SettingUpdate)
// contains filtered or unexported fields
}
func NewSettingsService ¶
func (*SettingsService) EnsureDefaultSettings ¶
func (s *SettingsService) EnsureDefaultSettings(ctx context.Context) error
func (*SettingsService) EnsureEncryptionKey ¶
func (s *SettingsService) EnsureEncryptionKey(ctx context.Context) (string, error)
func (*SettingsService) GetBoolSetting ¶
func (*SettingsService) GetIntSetting ¶
func (*SettingsService) GetSettingType ¶
func (s *SettingsService) GetSettingType(key string) string
GetSettingType returns the type from the setting metadata
func (*SettingsService) GetSettings ¶
func (*SettingsService) GetSettingsConfig ¶
func (s *SettingsService) GetSettingsConfig() *models.Settings
func (*SettingsService) GetSettingsOrDefaults ¶ added in v1.19.0
func (s *SettingsService) GetSettingsOrDefaults(ctx context.Context) *models.Settings
GetSettingsOrDefaults is a convenience for hot paths that need a snapshot but cannot meaningfully recover from a settings load failure. It logs any error and guarantees a non-nil *Settings (defaults: a zero-valued struct, which the SettingVariable helpers like utils.BoolOrDefault treat as "use the caller's default").
func (*SettingsService) GetStringSetting ¶
func (s *SettingsService) GetStringSetting(ctx context.Context, key, defaultValue string) string
func (*SettingsService) ListSettings ¶
func (s *SettingsService) ListSettings(visibility models.SettingVisibility) []models.SettingVariable
func (*SettingsService) LoadDatabaseSettings ¶
func (s *SettingsService) LoadDatabaseSettings(ctx context.Context) (err error)
func (*SettingsService) MigrateOidcConfigToFields ¶
func (s *SettingsService) MigrateOidcConfigToFields(ctx context.Context) error
MigrateOidcConfigToFields migrates the legacy JSON authOidcConfig to individual fields, and renames legacy auth* keys to their new oidc* names. This should be called during bootstrap to ensure existing configurations are preserved.
func (*SettingsService) NormalizeBuildsDirectory ¶ added in v1.16.0
func (s *SettingsService) NormalizeBuildsDirectory(ctx context.Context) error
func (*SettingsService) NormalizeProjectsDirectory ¶
func (s *SettingsService) NormalizeProjectsDirectory(ctx context.Context, projectsDirEnv string) error
func (*SettingsService) PersistEnvSettingsIfMissing ¶
func (s *SettingsService) PersistEnvSettingsIfMissing(ctx context.Context) error
func (*SettingsService) PruneUnknownSettings ¶
func (s *SettingsService) PruneUnknownSettings(ctx context.Context) error
func (*SettingsService) SetBoolSetting ¶
func (*SettingsService) SetContainerAutoUpdateExclusionInternal ¶ added in v1.17.0
func (s *SettingsService) SetContainerAutoUpdateExclusionInternal(ctx context.Context, containerName string, excluded bool) error
SetContainerAutoUpdateExclusionInternal adds or removes a container name from the autoUpdateExcludedContainers setting. When excluded is true the container is added to the list; when false it is removed.
func (*SettingsService) SetIntSetting ¶
func (*SettingsService) SetStringSetting ¶
func (s *SettingsService) SetStringSetting(ctx context.Context, key, value string) error
func (*SettingsService) UpdateSetting ¶
func (s *SettingsService) UpdateSetting(ctx context.Context, key, value string) error
func (*SettingsService) UpdateSettings ¶
func (s *SettingsService) UpdateSettings(ctx context.Context, updates settings.Update) ([]models.SettingVariable, error)
type SwarmNodeIdentity ¶ added in v1.17.0
type SwarmService ¶ added in v1.17.0
type SwarmService struct {
// contains filtered or unexported fields
}
SwarmService provides Docker Swarm related operations.
func NewSwarmService ¶ added in v1.17.0
func NewSwarmService( dockerService *DockerClientService, settingsService *SettingsService, kvService *KVService, registryService *ContainerRegistryService, environmentService *EnvironmentService, ) *SwarmService
func (*SwarmService) CreateConfig ¶ added in v1.17.0
func (s *SwarmService) CreateConfig(ctx context.Context, req swarmtypes.ConfigCreateRequest) (*swarmtypes.ConfigSummary, error)
func (*SwarmService) CreateSecret ¶ added in v1.17.0
func (s *SwarmService) CreateSecret(ctx context.Context, req swarmtypes.SecretCreateRequest) (*swarmtypes.SecretSummary, error)
func (*SwarmService) CreateService ¶ added in v1.17.0
func (s *SwarmService) CreateService(ctx context.Context, req swarmtypes.ServiceCreateRequest) (*swarmtypes.ServiceCreateResponse, error)
func (*SwarmService) DemoteNode ¶ added in v1.17.0
func (s *SwarmService) DemoteNode(ctx context.Context, nodeID string) error
func (*SwarmService) DeployStack ¶ added in v1.17.0
func (s *SwarmService) DeployStack(ctx context.Context, environmentID string, req swarmtypes.StackDeployRequest) (*swarmtypes.StackDeployResponse, error)
func (*SwarmService) GetConfig ¶ added in v1.17.0
func (s *SwarmService) GetConfig(ctx context.Context, configID string) (*swarmtypes.ConfigSummary, error)
func (*SwarmService) GetLocalNodeIdentity ¶ added in v1.17.0
func (s *SwarmService) GetLocalNodeIdentity(ctx context.Context) (*SwarmNodeIdentity, error)
func (*SwarmService) GetNode ¶ added in v1.17.0
func (s *SwarmService) GetNode(ctx context.Context, environmentID, nodeID string) (*swarmtypes.NodeSummary, error)
func (*SwarmService) GetSecret ¶ added in v1.17.0
func (s *SwarmService) GetSecret(ctx context.Context, secretID string) (*swarmtypes.SecretSummary, error)
func (*SwarmService) GetService ¶ added in v1.17.0
func (s *SwarmService) GetService(ctx context.Context, serviceID string) (*swarmtypes.ServiceInspect, error)
func (*SwarmService) GetStack ¶ added in v1.17.0
func (s *SwarmService) GetStack(ctx context.Context, environmentID, stackName string) (*swarmtypes.StackInspect, error)
func (*SwarmService) GetStackSource ¶ added in v1.17.0
func (s *SwarmService) GetStackSource(ctx context.Context, environmentID, stackName string) (*swarmtypes.StackSource, error)
func (*SwarmService) GetSwarmInfo ¶ added in v1.17.0
func (s *SwarmService) GetSwarmInfo(ctx context.Context) (*swarmtypes.SwarmInfo, error)
func (*SwarmService) GetSwarmJoinTokens ¶ added in v1.17.0
func (s *SwarmService) GetSwarmJoinTokens(ctx context.Context) (*swarmtypes.SwarmJoinTokensResponse, error)
func (*SwarmService) GetSwarmUnlockKey ¶ added in v1.17.0
func (s *SwarmService) GetSwarmUnlockKey(ctx context.Context) (*swarmtypes.SwarmUnlockKeyResponse, error)
func (*SwarmService) InitSwarm ¶ added in v1.17.0
func (s *SwarmService) InitSwarm(ctx context.Context, req swarmtypes.SwarmInitRequest) (*swarmtypes.SwarmInitResponse, error)
func (*SwarmService) IsEnabled ¶ added in v1.17.0
func (s *SwarmService) IsEnabled(ctx context.Context) (bool, error)
func (*SwarmService) JoinSwarm ¶ added in v1.17.0
func (s *SwarmService) JoinSwarm(ctx context.Context, req swarmtypes.SwarmJoinRequest) error
func (*SwarmService) LeaveSwarm ¶ added in v1.17.0
func (s *SwarmService) LeaveSwarm(ctx context.Context, req swarmtypes.SwarmLeaveRequest) error
func (*SwarmService) ListConfigs ¶ added in v1.17.0
func (s *SwarmService) ListConfigs(ctx context.Context) ([]swarmtypes.ConfigSummary, error)
func (*SwarmService) ListNodeTasksPaginated ¶ added in v1.17.0
func (s *SwarmService) ListNodeTasksPaginated(ctx context.Context, nodeID string, params pagination.QueryParams) ([]swarmtypes.TaskSummary, pagination.Response, error)
func (*SwarmService) ListNodesPaginated ¶ added in v1.17.0
func (s *SwarmService) ListNodesPaginated(ctx context.Context, environmentID string, params pagination.QueryParams) ([]swarmtypes.NodeSummary, pagination.Response, error)
func (*SwarmService) ListSecrets ¶ added in v1.17.0
func (s *SwarmService) ListSecrets(ctx context.Context) ([]swarmtypes.SecretSummary, error)
func (*SwarmService) ListServiceTasksPaginated ¶ added in v1.17.0
func (s *SwarmService) ListServiceTasksPaginated(ctx context.Context, serviceID string, params pagination.QueryParams) ([]swarmtypes.TaskSummary, pagination.Response, error)
func (*SwarmService) ListServicesPaginated ¶ added in v1.17.0
func (s *SwarmService) ListServicesPaginated(ctx context.Context, params pagination.QueryParams) ([]swarmtypes.ServiceSummary, pagination.Response, error)
func (*SwarmService) ListStackServicesPaginated ¶ added in v1.17.0
func (s *SwarmService) ListStackServicesPaginated(ctx context.Context, stackName string, params pagination.QueryParams) ([]swarmtypes.ServiceSummary, pagination.Response, error)
func (*SwarmService) ListStackTasksPaginated ¶ added in v1.17.0
func (s *SwarmService) ListStackTasksPaginated(ctx context.Context, stackName string, params pagination.QueryParams) ([]swarmtypes.TaskSummary, pagination.Response, error)
func (*SwarmService) ListStacksPaginated ¶ added in v1.17.0
func (s *SwarmService) ListStacksPaginated(ctx context.Context, environmentID string, params pagination.QueryParams) ([]swarmtypes.StackSummary, pagination.Response, error)
func (*SwarmService) ListTasksPaginated ¶ added in v1.17.0
func (s *SwarmService) ListTasksPaginated(ctx context.Context, params pagination.QueryParams) ([]swarmtypes.TaskSummary, pagination.Response, error)
func (*SwarmService) PromoteNode ¶ added in v1.17.0
func (s *SwarmService) PromoteNode(ctx context.Context, nodeID string) error
func (*SwarmService) RemoveConfig ¶ added in v1.17.0
func (s *SwarmService) RemoveConfig(ctx context.Context, configID string) error
func (*SwarmService) RemoveNode ¶ added in v1.17.0
func (*SwarmService) RemoveSecret ¶ added in v1.17.0
func (s *SwarmService) RemoveSecret(ctx context.Context, secretID string) error
func (*SwarmService) RemoveService ¶ added in v1.17.0
func (s *SwarmService) RemoveService(ctx context.Context, serviceID string) error
func (*SwarmService) RemoveStack ¶ added in v1.17.0
func (s *SwarmService) RemoveStack(ctx context.Context, environmentID, stackName string) error
func (*SwarmService) RenderStackConfig ¶ added in v1.17.0
func (s *SwarmService) RenderStackConfig(ctx context.Context, req swarmtypes.StackRenderConfigRequest) (*swarmtypes.StackRenderConfigResponse, error)
func (*SwarmService) RollbackService ¶ added in v1.17.0
func (s *SwarmService) RollbackService(ctx context.Context, serviceID string) (*swarmtypes.ServiceUpdateResponse, error)
func (*SwarmService) RotateSwarmJoinTokens ¶ added in v1.17.0
func (s *SwarmService) RotateSwarmJoinTokens(ctx context.Context, req swarmtypes.SwarmRotateJoinTokensRequest) error
func (*SwarmService) ScaleService ¶ added in v1.17.0
func (s *SwarmService) ScaleService(ctx context.Context, serviceID string, replicas uint64) (*swarmtypes.ServiceUpdateResponse, error)
func (*SwarmService) StreamServiceLogs ¶ added in v1.17.0
func (*SwarmService) SyncSwarmEnabledState ¶ added in v1.17.0
func (s *SwarmService) SyncSwarmEnabledState(ctx context.Context) error
func (*SwarmService) UnlockSwarm ¶ added in v1.17.0
func (s *SwarmService) UnlockSwarm(ctx context.Context, req swarmtypes.SwarmUnlockRequest) error
func (*SwarmService) UpdateConfig ¶ added in v1.17.0
func (s *SwarmService) UpdateConfig(ctx context.Context, configID string, req swarmtypes.ConfigUpdateRequest) (*swarmtypes.ConfigSummary, error)
func (*SwarmService) UpdateNode ¶ added in v1.17.0
func (s *SwarmService) UpdateNode(ctx context.Context, nodeID string, req swarmtypes.NodeUpdateRequest) error
func (*SwarmService) UpdateSecret ¶ added in v1.17.0
func (s *SwarmService) UpdateSecret(ctx context.Context, secretID string, req swarmtypes.SecretUpdateRequest) (*swarmtypes.SecretSummary, error)
func (*SwarmService) UpdateService ¶ added in v1.17.0
func (s *SwarmService) UpdateService(ctx context.Context, serviceID string, req swarmtypes.ServiceUpdateRequest) (*swarmtypes.ServiceUpdateResponse, error)
func (*SwarmService) UpdateStackSource ¶ added in v1.17.1
func (s *SwarmService) UpdateStackSource(ctx context.Context, environmentID, stackName string, req swarmtypes.StackSourceUpdateRequest) (*swarmtypes.StackSource, error)
func (*SwarmService) UpdateSwarmSpec ¶ added in v1.17.0
func (s *SwarmService) UpdateSwarmSpec(ctx context.Context, req swarmtypes.SwarmUpdateRequest) error
type SystemService ¶
type SystemService struct {
// contains filtered or unexported fields
}
func NewSystemService ¶
func NewSystemService( db *database.DB, dockerService *DockerClientService, containerService *ContainerService, imageService *ImageService, volumeService *VolumeService, networkService *NetworkService, settingsService *SettingsService, ) *SystemService
func (*SystemService) ConvertToDockerCompose ¶
func (s *SystemService) ConvertToDockerCompose(parsed *system.DockerRunCommand) (string, string, string, error)
func (*SystemService) GetDiskUsagePath ¶
func (s *SystemService) GetDiskUsagePath(ctx context.Context) string
func (*SystemService) ParseDockerRunCommand ¶
func (s *SystemService) ParseDockerRunCommand(command string) (*system.DockerRunCommand, error)
func (*SystemService) PruneAll ¶
func (s *SystemService) PruneAll(ctx context.Context, req system.PruneAllRequest) (*system.PruneAllResult, error)
func (*SystemService) StartAllContainers ¶
func (s *SystemService) StartAllContainers(ctx context.Context) (*containertypes.ActionResult, error)
func (*SystemService) StartAllStoppedContainers ¶
func (s *SystemService) StartAllStoppedContainers(ctx context.Context) (*containertypes.ActionResult, error)
func (*SystemService) StopAllContainers ¶
func (s *SystemService) StopAllContainers(ctx context.Context) (*containertypes.ActionResult, error)
type SystemUpgradeService ¶
type SystemUpgradeService struct {
// contains filtered or unexported fields
}
func NewSystemUpgradeService ¶
func NewSystemUpgradeService( dockerService *DockerClientService, versionService *VersionService, eventService *EventService, settingsService *SettingsService, ) *SystemUpgradeService
func (*SystemUpgradeService) CanUpgrade ¶
func (s *SystemUpgradeService) CanUpgrade(ctx context.Context) (bool, error)
CanUpgrade checks if self-upgrade is possible
func (*SystemUpgradeService) TriggerUpgradeViaCLI ¶
TriggerUpgradeViaCLI spawns the upgrade CLI command in a separate container This avoids self-termination issues by running the upgrade from outside
type TemplateService ¶
type TemplateService struct {
// contains filtered or unexported fields
}
func NewTemplateService ¶
func NewTemplateService(ctx context.Context, db *database.DB, httpClient *http.Client, settingsService *SettingsService) *TemplateService
func (*TemplateService) CreateRegistry ¶
func (s *TemplateService) CreateRegistry(ctx context.Context, registry *models.TemplateRegistry) error
func (*TemplateService) CreateTemplate ¶
func (s *TemplateService) CreateTemplate(ctx context.Context, template *models.ComposeTemplate) error
func (*TemplateService) DeleteRegistry ¶
func (s *TemplateService) DeleteRegistry(ctx context.Context, id string) error
func (*TemplateService) DeleteTemplate ¶
func (s *TemplateService) DeleteTemplate(ctx context.Context, id string) error
func (*TemplateService) DownloadTemplate ¶
func (s *TemplateService) DownloadTemplate(ctx context.Context, remoteTemplate *models.ComposeTemplate) (*models.ComposeTemplate, error)
func (*TemplateService) FetchTemplateContent ¶
func (s *TemplateService) FetchTemplateContent(ctx context.Context, template *models.ComposeTemplate) (string, string, error)
func (*TemplateService) GetAllTemplates ¶
func (s *TemplateService) GetAllTemplates(ctx context.Context) ([]models.ComposeTemplate, error)
func (*TemplateService) GetAllTemplatesPaginated ¶
func (s *TemplateService) GetAllTemplatesPaginated(ctx context.Context, params pagination.QueryParams) ([]tmpl.Template, pagination.Response, error)
func (*TemplateService) GetComposeTemplate ¶
func (s *TemplateService) GetComposeTemplate() string
func (*TemplateService) GetEnvTemplate ¶
func (s *TemplateService) GetEnvTemplate() string
func (*TemplateService) GetGlobalVariables ¶
func (*TemplateService) GetRegistries ¶
func (s *TemplateService) GetRegistries(ctx context.Context) ([]models.TemplateRegistry, error)
func (*TemplateService) GetRegistryFetchErrors ¶ added in v1.17.4
func (s *TemplateService) GetRegistryFetchErrors() map[string]string
GetRegistryFetchErrors returns a snapshot of the last fetch error per registry ID. An absent entry means the registry fetched successfully (or has never been attempted).
func (*TemplateService) GetSwarmStackEnvTemplate ¶ added in v1.17.0
func (s *TemplateService) GetSwarmStackEnvTemplate() string
func (*TemplateService) GetSwarmStackTemplate ¶ added in v1.17.0
func (s *TemplateService) GetSwarmStackTemplate() string
func (*TemplateService) GetTemplate ¶
func (s *TemplateService) GetTemplate(ctx context.Context, id string) (*models.ComposeTemplate, error)
func (*TemplateService) GetTemplateContentWithParsedData ¶
func (s *TemplateService) GetTemplateContentWithParsedData(ctx context.Context, id string) (*tmpl.TemplateContent, error)
GetTemplateContentWithParsedData returns template content along with parsed metadata
func (*TemplateService) ParseComposeServices ¶
func (s *TemplateService) ParseComposeServices(ctx context.Context, composeContent string) []string
ParseComposeServices extracts service names from a compose file content using compose-go
func (*TemplateService) SaveComposeTemplate ¶
func (s *TemplateService) SaveComposeTemplate(content string) error
func (*TemplateService) SaveEnvTemplate ¶
func (s *TemplateService) SaveEnvTemplate(content string) error
func (*TemplateService) SyncLocalTemplatesFromFilesystem ¶
func (s *TemplateService) SyncLocalTemplatesFromFilesystem(ctx context.Context) error
func (*TemplateService) UpdateGlobalVariables ¶
func (*TemplateService) UpdateRegistry ¶
func (s *TemplateService) UpdateRegistry(ctx context.Context, id string, updates *models.TemplateRegistry) error
func (*TemplateService) UpdateTemplate ¶
func (s *TemplateService) UpdateTemplate(ctx context.Context, id string, updates *models.ComposeTemplate) error
type UpdaterService ¶
type UpdaterService struct {
// contains filtered or unexported fields
}
UpdaterService coordinates image update checks, container recreation, and project redeploy flows for Arcane's auto-update system.
func NewUpdaterService ¶
func NewUpdaterService( db *database.DB, settings *SettingsService, docker *DockerClientService, projects *ProjectService, imageUpdates *ImageUpdateService, registries *ContainerRegistryService, events *EventService, imageSvc *ImageService, notifications *NotificationService, upgrade selfUpgradeService, ) *UpdaterService
NewUpdaterService constructs an UpdaterService with the dependencies needed to plan, execute, and record container and project updates.
func (*UpdaterService) ApplyPending ¶
ApplyPending executes the currently pending image updates and returns a per-resource result summary. When dryRun is true, it reports the planned actions without mutating containers or projects.
func (*UpdaterService) GetHistory ¶
func (s *UpdaterService) GetHistory(ctx context.Context, limit int) ([]models.AutoUpdateRecord, error)
GetHistory returns the most recent auto-update history records, newest first.
func (*UpdaterService) GetStatus ¶
func (s *UpdaterService) GetStatus() updater.Status
GetStatus returns the current in-memory update activity snapshot.
func (*UpdaterService) UpdateSingleContainer ¶
func (s *UpdaterService) UpdateSingleContainer(ctx context.Context, containerID string) (*updater.Result, error)
UpdateSingleContainer updates a single container by ID to the latest available image. It pulls the new image, stops the container, removes it, and recreates it with the new image.
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func NewUserService(db *database.DB) *UserService
func (*UserService) AttachOidcSubjectTransactional ¶
func (s *UserService) AttachOidcSubjectTransactional(ctx context.Context, userID string, subject string, updateFn func(u *models.User)) (*models.User, error)
AttachOidcSubjectTransactional safely links an OIDC subject to the given user inside a DB transaction. It uses a row lock (FOR UPDATE) to prevent concurrent merges from racing and validates that the user isn't already linked to a different subject. The provided updateFn can mutate the user (e.g., roles, display name, tokens, last login) before persisting.
Note: The clause.Locking{Strength: "UPDATE"} statement is used to acquire a row-level lock. This MUST be done inside a transaction to ensure the lock is held until the update is committed.
func (*UserService) CreateDefaultAdmin ¶
func (s *UserService) CreateDefaultAdmin(ctx context.Context) error
func (*UserService) CreateUser ¶
func (*UserService) DeleteUser ¶
func (s *UserService) DeleteUser(ctx context.Context, id string) error
func (*UserService) GetUserByEmail ¶
func (*UserService) GetUserByID ¶
func (*UserService) GetUserByOidcSubjectId ¶
func (*UserService) GetUserByUsername ¶
func (*UserService) HashPassword ¶
func (s *UserService) HashPassword(password string) (string, error)
func (*UserService) ListUsersPaginated ¶
func (s *UserService) ListUsersPaginated(ctx context.Context, params pagination.QueryParams) ([]user.User, pagination.Response, error)
func (*UserService) NeedsPasswordUpgrade ¶
func (s *UserService) NeedsPasswordUpgrade(hash string) bool
func (*UserService) ToUserResponseDto ¶ added in v1.16.2
func (*UserService) UpdateUser ¶
func (*UserService) UpgradePasswordHash ¶
func (s *UserService) UpgradePasswordHash(ctx context.Context, userID, password string) error
func (*UserService) ValidatePassword ¶
func (s *UserService) ValidatePassword(encodedHash, password string) error
type VersionService ¶
type VersionService struct {
// contains filtered or unexported fields
}
func NewVersionService ¶
func NewVersionService(httpClient *http.Client, disabled bool, version string, revision string, containerRegistryService *ContainerRegistryService, dockerService *DockerClientService) *VersionService
func (*VersionService) GetAppVersionInfo ¶
func (s *VersionService) GetAppVersionInfo(ctx context.Context) *version.Info
GetAppVersionInfo returns application version information including display version
func (*VersionService) GetLatestVersion ¶
func (s *VersionService) GetLatestVersion(ctx context.Context) (string, error)
func (*VersionService) GetVersionInformation ¶
func (*VersionService) IsNewer ¶
func (s *VersionService) IsNewer(latest, current string) bool
func (*VersionService) ReleaseURL ¶
func (s *VersionService) ReleaseURL(version string) string
type VolumeService ¶
type VolumeService struct {
// contains filtered or unexported fields
}
func NewVolumeService ¶
func NewVolumeService(db *database.DB, dockerService *DockerClientService, eventService *EventService, settingsService *SettingsService, containerService *ContainerService, imageService *ImageService, backupVolumeName string) *VolumeService
func (*VolumeService) BackupHasPath ¶
func (*VolumeService) BackupMountWarning ¶
func (s *VolumeService) BackupMountWarning(ctx context.Context) string
func (*VolumeService) CleanupHelperContainers ¶
func (s *VolumeService) CleanupHelperContainers(ctx context.Context)
func (*VolumeService) CleanupOrphanedVolumeHelpers ¶
func (s *VolumeService) CleanupOrphanedVolumeHelpers(ctx context.Context) error
func (*VolumeService) CreateBackup ¶
func (s *VolumeService) CreateBackup(ctx context.Context, volumeName string, user models.User) (*models.VolumeBackup, error)
func (*VolumeService) CreateDirectory ¶
func (*VolumeService) CreateVolume ¶
func (s *VolumeService) CreateVolume(ctx context.Context, options client.VolumeCreateOptions, user models.User) (*volumetypes.Volume, error)
func (*VolumeService) DeleteBackup ¶
func (*VolumeService) DeleteFile ¶
func (*VolumeService) DeleteVolume ¶
func (*VolumeService) DownloadBackup ¶
func (s *VolumeService) DownloadBackup(ctx context.Context, backupID string, user *models.User) (io.ReadCloser, int64, error)
func (*VolumeService) DownloadFile ¶
func (s *VolumeService) DownloadFile(ctx context.Context, volumeName, filePath string) (io.ReadCloser, int64, error)
func (*VolumeService) GetFileContent ¶
func (*VolumeService) GetVolumeByName ¶
func (s *VolumeService) GetVolumeByName(ctx context.Context, name string) (*volumetypes.Volume, error)
func (*VolumeService) GetVolumeSizes ¶
func (s *VolumeService) GetVolumeSizes(ctx context.Context) (map[string]VolumeSizeData, error)
GetVolumeSizes returns disk usage data for all volumes. This is a slow operation as it calls Docker's DiskUsage API.
func (*VolumeService) GetVolumeUsage ¶
func (*VolumeService) ListBackupFiles ¶
func (*VolumeService) ListBackups ¶
func (s *VolumeService) ListBackups(ctx context.Context, volumeName string) ([]models.VolumeBackup, error)
func (*VolumeService) ListBackupsPaginated ¶
func (s *VolumeService) ListBackupsPaginated(ctx context.Context, volumeName string, params pagination.QueryParams) ([]models.VolumeBackup, pagination.Response, error)
func (*VolumeService) ListDirectory ¶
func (s *VolumeService) ListDirectory(ctx context.Context, volumeName, dirPath string) ([]volumetypes.FileEntry, error)
func (*VolumeService) ListVolumesPaginated ¶
func (s *VolumeService) ListVolumesPaginated(ctx context.Context, params pagination.QueryParams, includeInternal bool) ([]volumetypes.Volume, pagination.Response, volumetypes.UsageCounts, error)
func (*VolumeService) PruneVolumes ¶
func (s *VolumeService) PruneVolumes(ctx context.Context) (*volumetypes.PruneReport, error)
func (*VolumeService) PruneVolumesWithOptions ¶
func (s *VolumeService) PruneVolumesWithOptions(ctx context.Context, all bool) (*volumetypes.PruneReport, error)
func (*VolumeService) RestoreBackup ¶
func (*VolumeService) RestoreBackupFiles ¶
func (*VolumeService) UploadAndRestore ¶
type VolumeSizeData ¶
VolumeSizeData holds size information for a volume.
type VulnerabilityNotificationPayload ¶
type VulnerabilityNotificationPayload struct {
CVEID string // e.g. CVE-2024-1234
CVELink string // e.g. https://nvd.nist.gov/vuln/detail/CVE-2024-1234
Severity string // CRITICAL, HIGH, MEDIUM, LOW, UNKNOWN
ImageName string // e.g. nginx:latest
FixedVersion string
PkgName string // optional
InstalledVersion string // optional
}
VulnerabilityNotificationPayload is the data sent to all providers for vulnerability_found events. Only vulnerabilities with a fixed version should trigger this notification.
type VulnerabilityService ¶
type VulnerabilityService struct {
// contains filtered or unexported fields
}
VulnerabilityService handles vulnerability scanning of container images
func NewVulnerabilityService ¶
func NewVulnerabilityService(db *database.DB, dockerService *DockerClientService, eventService *EventService, settingsService *SettingsService, notificationService *NotificationService) *VulnerabilityService
NewVulnerabilityService creates a new VulnerabilityService instance
func (*VulnerabilityService) CleanupOrphanedScanRecords ¶
func (s *VulnerabilityService) CleanupOrphanedScanRecords(ctx context.Context) (deleted int64, err error)
CleanupOrphanedScanRecords removes vulnerability scan records for images that no longer exist in Docker. This keeps "images scanned" counts in sync (e.g. avoids "5/3" when images were deleted after being scanned). Safe to call even when no images exist; returns the number of records deleted.
func (*VulnerabilityService) DeleteScanResult ¶
func (s *VulnerabilityService) DeleteScanResult(ctx context.Context, imageID string) error
DeleteScanResult deletes the scan result for an image
func (*VulnerabilityService) DeleteScanResultsByImageIDs ¶
func (s *VulnerabilityService) DeleteScanResultsByImageIDs(ctx context.Context, imageIDs []string) error
DeleteScanResultsByImageIDs deletes scan results for multiple images in one query.
func (*VulnerabilityService) GetEnvironmentSummary ¶
func (s *VulnerabilityService) GetEnvironmentSummary(ctx context.Context) (*vulnerability.EnvironmentVulnerabilitySummary, error)
GetEnvironmentSummary returns aggregated vulnerability counts across all images.
func (*VulnerabilityService) GetIgnoreRecordsForImage ¶
func (s *VulnerabilityService) GetIgnoreRecordsForImage(ctx context.Context, envID string, imageID string) ([]models.VulnerabilityIgnore, error)
GetIgnoreRecordsForImage retrieves all ignore records for a specific image
func (*VulnerabilityService) GetScanResult ¶
func (s *VulnerabilityService) GetScanResult(ctx context.Context, imageID string) (*vulnerability.ScanResult, error)
GetScanResult retrieves the most recent scan result for an image
func (*VulnerabilityService) GetScanSummariesByImageIDs ¶
func (s *VulnerabilityService) GetScanSummariesByImageIDs(ctx context.Context, imageIDs []string) (map[string]*vulnerability.ScanSummary, error)
GetScanSummariesByImageIDs retrieves scan summaries for multiple images
func (*VulnerabilityService) GetScanSummary ¶
func (s *VulnerabilityService) GetScanSummary(ctx context.Context, imageID string) (*vulnerability.ScanSummary, error)
GetScanSummary retrieves just the summary for an image (for list views)
func (*VulnerabilityService) GetTrivyVersion ¶
func (s *VulnerabilityService) GetTrivyVersion(ctx context.Context) string
GetTrivyVersion returns the Trivy version from the configured scanner image.
func (*VulnerabilityService) IgnoreVulnerability ¶
func (s *VulnerabilityService) IgnoreVulnerability(ctx context.Context, envID string, payload *vulnerability.IgnorePayload) (*models.VulnerabilityIgnore, error)
IgnoreVulnerability creates a new ignore record for a vulnerability
func (*VulnerabilityService) ListAllVulnerabilities ¶
func (s *VulnerabilityService) ListAllVulnerabilities(ctx context.Context, envID string, params pagination.QueryParams) ([]vulnerability.VulnerabilityWithImage, pagination.Response, error)
ListAllVulnerabilities returns a paginated list of vulnerabilities across all scanned images.
func (*VulnerabilityService) ListAllVulnerabilityImageOptions ¶ added in v1.16.0
func (s *VulnerabilityService) ListAllVulnerabilityImageOptions(ctx context.Context, severityFilter string) ([]string, error)
ListAllVulnerabilityImageOptions returns unique image names (or image IDs when name is empty) for vulnerability filtering, optionally constrained by severity.
func (*VulnerabilityService) ListIgnoredVulnerabilities ¶
func (s *VulnerabilityService) ListIgnoredVulnerabilities(ctx context.Context, envID string, params pagination.QueryParams) ([]vulnerability.IgnoredVulnerability, pagination.Response, error)
ListIgnoredVulnerabilities returns a list of ignored vulnerabilities for an environment
func (*VulnerabilityService) ListVulnerabilities ¶
func (s *VulnerabilityService) ListVulnerabilities(ctx context.Context, imageID string, params pagination.QueryParams) ([]vulnerability.Vulnerability, pagination.Response, error)
ListVulnerabilities returns a paginated, filtered list of vulnerabilities for an image.
func (*VulnerabilityService) ScanAllImages ¶
func (s *VulnerabilityService) ScanAllImages(ctx context.Context, envID string, user models.User) (scanned, failed int, err error)
ScanAllImages scans all Docker images for vulnerabilities. It is intended for use by the scheduled vulnerability scan job. A single long-running Trivy container is created and reused for every image via docker exec, which avoids the overhead of creating/destroying a container per scan. The caller-supplied user is recorded in the event log.
func (*VulnerabilityService) ScanImage ¶
func (s *VulnerabilityService) ScanImage(ctx context.Context, envID string, imageID string, user models.User) (*vulnerability.ScanResult, error)
ScanImage scans an image for vulnerabilities using Trivy
func (*VulnerabilityService) UnignoreVulnerability ¶
func (s *VulnerabilityService) UnignoreVulnerability(ctx context.Context, envID string, ignoreID string) error
UnignoreVulnerability removes an ignore record
type WebhookService ¶ added in v1.17.0
type WebhookService struct {
// contains filtered or unexported fields
}
func NewWebhookService ¶ added in v1.17.0
func NewWebhookService(db *database.DB, containerService *ContainerService, updaterService *UpdaterService, projectService *ProjectService, gitOpsSyncService *GitOpsSyncService, eventService *EventService) *WebhookService
func (*WebhookService) CreateWebhook ¶ added in v1.17.0
func (s *WebhookService) CreateWebhook(ctx context.Context, name, targetType, actionType, targetID, environmentID string, actor models.User) (*models.Webhook, string, error)
CreateWebhook creates a new webhook targeting a stack, the environment-wide updater, or a gitops sync. It returns the webhook record with the raw token populated (only available at creation time).
func (*WebhookService) DeleteWebhook ¶ added in v1.17.0
func (s *WebhookService) DeleteWebhook(ctx context.Context, id, environmentID string, actor models.User) error
DeleteWebhook removes a webhook by ID, scoped to an environment.
func (*WebhookService) GetWebhookByID ¶ added in v1.17.0
func (s *WebhookService) GetWebhookByID(ctx context.Context, id, environmentID string) (*models.Webhook, error)
GetWebhookByID returns a single webhook by ID, scoped to an environment.
func (*WebhookService) ListWebhookSummaries ¶ added in v1.17.0
func (s *WebhookService) ListWebhookSummaries(ctx context.Context, environmentID string) ([]webhooktypes.Summary, error)
func (*WebhookService) ListWebhooks ¶ added in v1.17.0
func (s *WebhookService) ListWebhooks(ctx context.Context, environmentID string) ([]models.Webhook, error)
ListWebhooks returns all webhooks for an environment.
func (*WebhookService) TriggerByToken ¶ added in v1.17.0
func (s *WebhookService) TriggerByToken(ctx context.Context, rawToken string) (*updater.Result, error)
TriggerByToken looks up a webhook by its raw token and executes the configured action. Returns an updater result for "updater" webhooks; nil for "project" and "gitops".
Source Files
¶
- api_key_service.go
- app_images_service.go
- apprise_service.go
- auth_service.go
- build_service.go
- build_workspace_service.go
- container_registry_service.go
- container_service.go
- customize_search_service.go
- dashboard_service.go
- docker_client_service.go
- ecr_token_service.go
- environment_runtime_state.go
- environment_service.go
- event_service.go
- font_service.go
- git_repository_service.go
- gitops_sync_service.go
- image_service.go
- image_update_service.go
- job_service.go
- kv_service.go
- log_stream_util.go
- network_service.go
- notification_service.go
- oidc_service.go
- port_service.go
- project_service.go
- session_service.go
- settings_search_service.go
- settings_service.go
- swarm_service.go
- system_service.go
- system_upgrade_service.go
- template_service.go
- updater_service.go
- user_service.go
- version_service.go
- volume_service.go
- vulnerability_service.go
- webhook_service.go