service

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeRegistry added in v1.9.0

func NormalizeRegistry(registry string) string

NormalizeRegistry turns user input such as "https://GHCR.io/" into the registry host the API expects ("ghcr.io"). It mirrors the server-side normalization so the value can be used as a single URL path segment.

func ServerRegistryRows added in v1.9.0

func ServerRegistryRows(registries []models.ServerRegistry, showSensitive bool, mask string) []models.ServerRegistryRow

ServerRegistryRows converts registries into table rows. Usernames are replaced with mask unless showSensitive is set; empty usernames stay empty.

func ServerRegistryStatus added in v1.9.0

func ServerRegistryStatus(registry models.ServerRegistry) string

ServerRegistryStatus returns the human readable login status of a registry.

func ServerRegistryUsageSummary added in v1.9.0

func ServerRegistryUsageSummary(users []models.ServerRegistryUser) string

ServerRegistryUsageSummary summarizes the resources using a registry, for example "3 applications, 1 database". Types are listed in order of first appearance.

Types

type ApplicationService

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

ApplicationService handles application-related operations

func NewApplicationService

func NewApplicationService(client *api.Client) *ApplicationService

NewApplicationService creates a new application service

func (*ApplicationService) AddDestination added in v1.7.0

func (s *ApplicationService) AddDestination(ctx context.Context, uuid, destinationUUID string) (map[string]any, error)

func (*ApplicationService) BulkUpdateEnvs

BulkUpdateEnvs updates multiple environment variables in a single request

func (*ApplicationService) Clone added in v1.7.0

func (*ApplicationService) CreateDeployKey added in v1.4.0

CreateDeployKey creates an application from a private repository using SSH deploy key

func (*ApplicationService) CreateDockerImage added in v1.4.0

CreateDockerImage creates an application from a pre-built Docker image

func (*ApplicationService) CreateDockerfile added in v1.4.0

CreateDockerfile creates an application from a custom Dockerfile

func (*ApplicationService) CreateEnv

CreateEnv creates a new environment variable for an application

func (*ApplicationService) CreateGitHubApp added in v1.4.0

CreateGitHubApp creates an application from a private repository using GitHub App

func (*ApplicationService) CreatePreview added in v1.9.0

CreatePreview opens a preview deployment, or redeploys it when it already exists

func (*ApplicationService) CreatePublic added in v1.4.0

CreatePublic creates an application from a public git repository

func (*ApplicationService) CreateScheduledTask added in v1.7.0

func (s *ApplicationService) CreateScheduledTask(ctx context.Context, appUUID string, req models.ScheduledTaskCreateRequest) (*models.ScheduledTask, error)

CreateScheduledTask creates a scheduled task for an application.

func (*ApplicationService) CreateStorage added in v1.5.0

func (s *ApplicationService) CreateStorage(ctx context.Context, uuid string, req *models.StorageCreateRequest) error

CreateStorage creates a new storage for an application

func (*ApplicationService) Delete

func (s *ApplicationService) Delete(ctx context.Context, uuid string) error

Delete deletes an application

func (*ApplicationService) DeleteEnv

func (s *ApplicationService) DeleteEnv(ctx context.Context, appUUID string, envUUID string) error

DeleteEnv deletes an environment variable from an application

func (*ApplicationService) DeletePreview added in v1.6.2

func (s *ApplicationService) DeletePreview(ctx context.Context, appUUID, prID string) error

DeletePreview deletes a preview deployment for an application

func (*ApplicationService) DeleteScheduledTask added in v1.7.0

func (s *ApplicationService) DeleteScheduledTask(ctx context.Context, appUUID, taskUUID string) error

DeleteScheduledTask deletes a scheduled task from an application.

func (*ApplicationService) DeleteStorage added in v1.5.0

func (s *ApplicationService) DeleteStorage(ctx context.Context, appUUID, storageUUID string) error

DeleteStorage deletes a storage from an application

func (*ApplicationService) DeleteStorageBackupSchedule added in v1.7.0

func (s *ApplicationService) DeleteStorageBackupSchedule(ctx context.Context, appUUID, storageUUID string) error

func (*ApplicationService) ExecuteScheduledTask added in v1.7.0

func (s *ApplicationService) ExecuteScheduledTask(ctx context.Context, appUUID, taskUUID string) (map[string]any, error)

ExecuteScheduledTask runs an application scheduled task immediately.

func (*ApplicationService) Get

Get retrieves a specific application by UUID

func (*ApplicationService) GetEnv

func (s *ApplicationService) GetEnv(ctx context.Context, appUUID, envIdentifier string) (*models.EnvironmentVariable, error)

GetEnv retrieves a single environment variable by UUID or key

func (*ApplicationService) GetPreview added in v1.9.0

func (s *ApplicationService) GetPreview(ctx context.Context, appUUID string, prID int) (*models.ApplicationPreview, error)

GetPreview retrieves a preview deployment by pull request ID

func (*ApplicationService) List

List retrieves all applications

func (*ApplicationService) ListDestinations added in v1.7.0

func (s *ApplicationService) ListDestinations(ctx context.Context, uuid string) ([]map[string]any, error)

func (*ApplicationService) ListEnvs

ListEnvs retrieves all environment variables for an application

func (*ApplicationService) ListPreviews added in v1.9.0

func (s *ApplicationService) ListPreviews(ctx context.Context, appUUID string) ([]models.ApplicationPreview, error)

ListPreviews retrieves the preview deployments of an application

func (*ApplicationService) ListRollbackImages added in v1.7.0

func (s *ApplicationService) ListRollbackImages(ctx context.Context, uuid string) (map[string]any, error)

func (*ApplicationService) ListScheduledTaskExecutions added in v1.7.0

func (s *ApplicationService) ListScheduledTaskExecutions(ctx context.Context, appUUID, taskUUID string) ([]models.ScheduledTaskExecution, error)

ListScheduledTaskExecutions lists executions for an application scheduled task.

func (*ApplicationService) ListScheduledTasks added in v1.7.0

func (s *ApplicationService) ListScheduledTasks(ctx context.Context, appUUID string) ([]models.ScheduledTask, error)

ListScheduledTasks lists scheduled tasks for an application.

func (*ApplicationService) ListStorages added in v1.5.0

func (s *ApplicationService) ListStorages(ctx context.Context, uuid string) ([]models.StorageListItem, error)

ListStorages retrieves all storages for an application

func (*ApplicationService) Logs

func (s *ApplicationService) Logs(ctx context.Context, uuid string, lines int, showTimestamps bool, serviceName string) (*models.ApplicationLogsResponse, error)

Logs retrieves logs for an application. serviceName selects a docker-compose service container (API query service_name). Empty serviceName keeps legacy behavior (first/only container).

func (*ApplicationService) Move added in v1.7.0

Move moves an application to another environment.

func (*ApplicationService) RemoveDestination added in v1.7.0

func (s *ApplicationService) RemoveDestination(ctx context.Context, uuid, destinationUUID string) error

func (*ApplicationService) Restart

Restart restarts an application

func (*ApplicationService) Rollback added in v1.7.0

func (s *ApplicationService) Rollback(ctx context.Context, uuid, commit string) (map[string]any, error)

func (*ApplicationService) RunStorageBackup added in v1.7.0

func (s *ApplicationService) RunStorageBackup(ctx context.Context, appUUID, storageUUID string) (map[string]any, error)

func (*ApplicationService) SetStorageBackupSchedule added in v1.7.0

func (s *ApplicationService) SetStorageBackupSchedule(ctx context.Context, appUUID, storageUUID string, req models.VolumeBackupScheduleRequest) (map[string]any, error)

func (*ApplicationService) Start

func (s *ApplicationService) Start(ctx context.Context, uuid string, force bool, instantDeploy bool) (*models.ApplicationLifecycleResponse, error)

Start starts an application (initiates deployment)

func (*ApplicationService) Stop

Stop stops an application

func (*ApplicationService) Update

Update updates an application

func (*ApplicationService) UpdateEnv

UpdateEnv updates an existing environment variable for an application

func (*ApplicationService) UpdatePreviewDomains added in v1.9.0

UpdatePreviewDomains replaces the domains of a preview deployment

func (*ApplicationService) UpdateScheduledTask added in v1.7.0

func (s *ApplicationService) UpdateScheduledTask(ctx context.Context, appUUID, taskUUID string, req models.ScheduledTaskUpdateRequest) (*models.ScheduledTask, error)

UpdateScheduledTask updates a scheduled task for an application.

func (*ApplicationService) UpdateStorage added in v1.5.0

func (s *ApplicationService) UpdateStorage(ctx context.Context, uuid string, req *models.StorageUpdateRequest) error

UpdateStorage updates a storage for an application

type BulkUpdateEnvsRequest

type BulkUpdateEnvsRequest struct {
	Data []models.EnvironmentVariableCreateRequest `json:"data"`
}

BulkUpdateEnvsRequest represents a bulk update request for environment variables

type BulkUpdateEnvsResponse

type BulkUpdateEnvsResponse []models.EnvironmentVariable

BulkUpdateEnvsResponse represents the response from bulk update

type CancelResponse

type CancelResponse struct {
	Message        string `json:"message"`
	DeploymentUUID string `json:"deployment_uuid"`
	Status         string `json:"status"`
}

CancelResponse represents the response from canceling a deployment

type CloudInitService added in v1.7.0

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

func NewCloudInitService added in v1.7.0

func NewCloudInitService(client *api.Client) *CloudInitService

func (*CloudInitService) Create added in v1.7.0

func (*CloudInitService) Delete added in v1.7.0

func (s *CloudInitService) Delete(ctx context.Context, uuid string) error

func (*CloudInitService) Get added in v1.7.0

func (*CloudInitService) List added in v1.7.0

func (*CloudInitService) Update added in v1.7.0

type CloudTokenService added in v1.7.0

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

func NewCloudTokenService added in v1.7.0

func NewCloudTokenService(client *api.Client) *CloudTokenService

func (*CloudTokenService) Create added in v1.7.0

func (*CloudTokenService) Delete added in v1.7.0

func (s *CloudTokenService) Delete(ctx context.Context, uuid string) error

func (*CloudTokenService) Get added in v1.7.0

func (*CloudTokenService) List added in v1.7.0

func (*CloudTokenService) Update added in v1.7.0

func (*CloudTokenService) Validate added in v1.7.0

type DatabaseService

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

DatabaseService handles database-related operations

func NewDatabaseService

func NewDatabaseService(client *api.Client) *DatabaseService

NewDatabaseService creates a new database service

func (*DatabaseService) BulkUpdateEnvs added in v1.5.0

BulkUpdateEnvs updates multiple environment variables for a database in a single request

func (*DatabaseService) Clone added in v1.7.0

func (*DatabaseService) Create

Create creates a new database of the specified type

func (*DatabaseService) CreateBackup

CreateBackup creates a new scheduled backup configuration Note: This endpoint will be available in a future version of Coolify

func (*DatabaseService) CreateEnv added in v1.5.0

CreateEnv creates a new environment variable for a database

func (*DatabaseService) CreateStorage added in v1.5.0

func (s *DatabaseService) CreateStorage(ctx context.Context, uuid string, req *models.StorageCreateRequest) error

CreateStorage creates a new storage for a database

func (*DatabaseService) Delete

func (s *DatabaseService) Delete(ctx context.Context, uuid string, deleteConfigurations, deleteVolumes, dockerCleanup, deleteConnectedNetworks bool) error

Delete deletes a database

func (*DatabaseService) DeleteBackup

func (s *DatabaseService) DeleteBackup(ctx context.Context, dbUUID, backupUUID string, deleteS3 bool) error

DeleteBackup deletes a backup configuration

func (*DatabaseService) DeleteBackupExecution

func (s *DatabaseService) DeleteBackupExecution(ctx context.Context, dbUUID, backupUUID, executionUUID string, deleteS3 bool) error

DeleteBackupExecution deletes a specific backup execution

func (*DatabaseService) DeleteEnv added in v1.5.0

func (s *DatabaseService) DeleteEnv(ctx context.Context, dbUUID, envUUID string) error

DeleteEnv deletes an environment variable from a database

func (*DatabaseService) DeleteStorage added in v1.5.0

func (s *DatabaseService) DeleteStorage(ctx context.Context, dbUUID, storageUUID string) error

DeleteStorage deletes a storage from a database

func (*DatabaseService) DeleteStorageBackupSchedule added in v1.7.0

func (s *DatabaseService) DeleteStorageBackupSchedule(ctx context.Context, dbUUID, storageUUID string) error

func (*DatabaseService) Get

func (s *DatabaseService) Get(ctx context.Context, uuid string) (*models.Database, error)

Get retrieves a database by UUID

func (*DatabaseService) GetEnv added in v1.5.0

func (s *DatabaseService) GetEnv(ctx context.Context, dbUUID, envIdentifier string) (*models.DatabaseEnvironmentVariable, error)

GetEnv retrieves a single environment variable by UUID or key

func (*DatabaseService) List

func (s *DatabaseService) List(ctx context.Context) ([]models.Database, error)

List retrieves all databases

func (*DatabaseService) ListBackupExecutions

func (s *DatabaseService) ListBackupExecutions(ctx context.Context, dbUUID, backupUUID string) ([]models.DatabaseBackupExecution, error)

ListBackupExecutions retrieves all executions for a backup configuration

func (*DatabaseService) ListBackups

func (s *DatabaseService) ListBackups(ctx context.Context, uuid string) ([]models.DatabaseBackup, error)

ListBackups retrieves all backup configurations for a database

func (*DatabaseService) ListEnvs added in v1.5.0

ListEnvs retrieves all environment variables for a database

func (*DatabaseService) ListStorages added in v1.5.0

func (s *DatabaseService) ListStorages(ctx context.Context, uuid string) ([]models.StorageListItem, error)

ListStorages retrieves all storages for a database

func (*DatabaseService) Logs added in v1.7.0

func (s *DatabaseService) Logs(ctx context.Context, uuid string, lines int, showTimestamps bool) (*models.LogsResponse, error)

Logs retrieves container logs for a database.

func (*DatabaseService) Move added in v1.7.0

func (s *DatabaseService) Move(ctx context.Context, uuid, environmentUUID string) (*models.MoveResourceResponse, error)

Move moves a database to another environment.

func (*DatabaseService) Restart

Restart restarts a database

func (*DatabaseService) RunStorageBackup added in v1.7.0

func (s *DatabaseService) RunStorageBackup(ctx context.Context, dbUUID, storageUUID string) (map[string]any, error)

func (*DatabaseService) SetStorageBackupSchedule added in v1.7.0

func (s *DatabaseService) SetStorageBackupSchedule(ctx context.Context, dbUUID, storageUUID string, req models.VolumeBackupScheduleRequest) (map[string]any, error)

func (*DatabaseService) Start

Start starts a database

func (*DatabaseService) Stop

Stop stops a database

func (*DatabaseService) Update

Update updates a database

func (*DatabaseService) UpdateBackup

func (s *DatabaseService) UpdateBackup(ctx context.Context, dbUUID, backupUUID string, req *models.DatabaseBackupUpdateRequest) error

UpdateBackup updates a backup configuration

func (*DatabaseService) UpdateEnv added in v1.5.0

UpdateEnv updates an environment variable for a database

func (*DatabaseService) UpdateStorage added in v1.5.0

func (s *DatabaseService) UpdateStorage(ctx context.Context, uuid string, req *models.StorageUpdateRequest) error

UpdateStorage updates a storage for a database

type DeployResponse

type DeployResponse struct {
	Deployments []DeploymentInfo `json:"deployments"`
}

DeployResponse represents the response from a deploy operation

type DeploymentInfo

type DeploymentInfo struct {
	Message        string `json:"message"`
	ResourceUUID   string `json:"resource_uuid"`
	DeploymentUUID string `json:"deployment_uuid"`
}

DeploymentInfo represents a single deployment in the deploy response

type DeploymentService

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

DeploymentService handles deployment-related operations

func NewDeploymentService

func NewDeploymentService(client *api.Client) *DeploymentService

NewDeploymentService creates a new deployment service

func (*DeploymentService) Cancel

func (s *DeploymentService) Cancel(ctx context.Context, uuid string) (*CancelResponse, error)

Cancel cancels an in-progress deployment Note: This endpoint will be available in a future version of Coolify

func (*DeploymentService) Deploy

Deploy triggers a deployment for a resource

func (*DeploymentService) Get

Get retrieves a deployment by UUID

func (*DeploymentService) GetLogsByApplication

func (s *DeploymentService) GetLogsByApplication(ctx context.Context, appUUID string, lines int) (string, error)

GetLogsByApplication retrieves deployment logs for a specific application This gets the latest deployment and returns its logs

func (*DeploymentService) GetLogsByApplicationWithFormat

func (s *DeploymentService) GetLogsByApplicationWithFormat(ctx context.Context, appUUID string, take int, showHidden bool, format string) (string, error)

GetLogsByApplicationWithFormat retrieves deployment logs with format control

func (*DeploymentService) GetLogsByApplicationWithOptions

func (s *DeploymentService) GetLogsByApplicationWithOptions(ctx context.Context, appUUID string, take int, showHidden bool) (string, error)

GetLogsByApplicationWithOptions retrieves deployment logs for a specific application with formatting options

func (*DeploymentService) GetLogsByDeployment

func (s *DeploymentService) GetLogsByDeployment(ctx context.Context, deploymentUUID string) (string, error)

GetLogsByDeployment retrieves logs for a specific deployment by UUID

func (*DeploymentService) GetLogsByDeploymentWithFormat

func (s *DeploymentService) GetLogsByDeploymentWithFormat(ctx context.Context, deploymentUUID string, showHidden bool, format string) (string, error)

GetLogsByDeploymentWithFormat retrieves logs with format control (json/pretty/table)

func (*DeploymentService) GetLogsByDeploymentWithOptions

func (s *DeploymentService) GetLogsByDeploymentWithOptions(ctx context.Context, deploymentUUID string, showHidden bool) (string, error)

GetLogsByDeploymentWithOptions retrieves logs for a specific deployment by UUID with formatting options

func (*DeploymentService) List

List retrieves all deployments

func (*DeploymentService) ListByApplication

func (s *DeploymentService) ListByApplication(ctx context.Context, appUUID string) ([]models.Deployment, error)

ListByApplication retrieves all deployments for a specific application

func (*DeploymentService) ListByApplicationWithPagination

func (s *DeploymentService) ListByApplicationWithPagination(ctx context.Context, appUUID string, skip, take int) ([]models.Deployment, error)

ListByApplicationWithPagination retrieves deployments with pagination support

type DeploymentsListResponse

type DeploymentsListResponse struct {
	Count       int                 `json:"count"`
	Deployments []models.Deployment `json:"deployments"`
}

DeploymentsListResponse represents the response from listing deployments

type DestinationService added in v1.7.0

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

func NewDestinationService added in v1.7.0

func NewDestinationService(client *api.Client) *DestinationService

func (*DestinationService) CreateForServer added in v1.7.0

func (s *DestinationService) CreateForServer(ctx context.Context, serverUUID string, req models.DestinationCreateRequest) (*models.Destination, error)

func (*DestinationService) Delete added in v1.7.0

func (s *DestinationService) Delete(ctx context.Context, uuid string) error

func (*DestinationService) Get added in v1.7.0

func (*DestinationService) List added in v1.7.0

func (*DestinationService) ListByServer added in v1.7.0

func (s *DestinationService) ListByServer(ctx context.Context, serverUUID string) ([]models.Destination, error)

func (*DestinationService) Update added in v1.7.0

type DigitalOceanService added in v1.7.0

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

func NewDigitalOceanService added in v1.7.0

func NewDigitalOceanService(client *api.Client) *DigitalOceanService

func (*DigitalOceanService) Create added in v1.7.0

func (*DigitalOceanService) Images added in v1.7.0

func (*DigitalOceanService) Regions added in v1.7.0

func (s *DigitalOceanService) Regions(ctx context.Context, token string) ([]models.ProviderOption, error)

func (*DigitalOceanService) SSHKeys added in v1.7.0

func (s *DigitalOceanService) SSHKeys(ctx context.Context, token string) ([]models.ProviderOption, error)

func (*DigitalOceanService) Sizes added in v1.7.0

type GitHubAppService

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

GitHubAppService handles GitHub App-related operations

func NewGitHubAppService

func NewGitHubAppService(client *api.Client) *GitHubAppService

NewGitHubAppService creates a new GitHub App service

func (*GitHubAppService) Create

Create creates a new GitHub App

func (*GitHubAppService) Delete

func (s *GitHubAppService) Delete(ctx context.Context, uuid string) error

Delete deletes a GitHub App

func (*GitHubAppService) Get

Get retrieves a specific GitHub App by UUID Note: This endpoint will be available in a future version of Coolify

func (*GitHubAppService) List

List retrieves all GitHub Apps Note: This endpoint will be available in a future version of Coolify

func (*GitHubAppService) ListBranches

func (s *GitHubAppService) ListBranches(ctx context.Context, appUUID string, owner, repo string) ([]models.GitHubBranch, error)

ListBranches lists all branches for a repository

func (*GitHubAppService) ListRepositories

func (s *GitHubAppService) ListRepositories(ctx context.Context, appUUID string) ([]models.GitHubRepository, error)

ListRepositories lists all repositories accessible by a GitHub App

func (*GitHubAppService) Update

Update updates an existing GitHub App

type GitLabAppService added in v1.7.0

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

GitLabAppService handles GitLab App (OAuth source) operations

func NewGitLabAppService added in v1.7.0

func NewGitLabAppService(client *api.Client) *GitLabAppService

NewGitLabAppService creates a new GitLab App service

func (*GitLabAppService) Create added in v1.7.0

Create creates a new GitLab App

func (*GitLabAppService) Delete added in v1.7.0

func (s *GitLabAppService) Delete(ctx context.Context, idOrUUID string) error

Delete deletes a GitLab App (by numeric ID or UUID)

func (*GitLabAppService) Get added in v1.7.0

func (s *GitLabAppService) Get(ctx context.Context, idOrUUID string) (*models.GitLabApp, error)

Get retrieves a GitLab App by numeric ID or UUID (resolved via list)

func (*GitLabAppService) List added in v1.7.0

List retrieves all GitLab Apps for the current token team (plus system-wide)

func (*GitLabAppService) Update added in v1.7.0

Update updates an existing GitLab App (by numeric ID or UUID)

type HetznerService added in v1.7.0

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

func NewHetznerService added in v1.7.0

func NewHetznerService(client *api.Client) *HetznerService

func (*HetznerService) Create added in v1.7.0

func (*HetznerService) Firewalls added in v1.7.0

func (s *HetznerService) Firewalls(ctx context.Context, token string) ([]models.HetznerFirewall, error)

func (*HetznerService) Images added in v1.7.0

func (s *HetznerService) Images(ctx context.Context, token string) ([]models.HetznerImage, error)

func (*HetznerService) Locations added in v1.7.0

func (s *HetznerService) Locations(ctx context.Context, token string) ([]models.HetznerLocation, error)

func (*HetznerService) Networks added in v1.7.0

func (s *HetznerService) Networks(ctx context.Context, token string) ([]models.HetznerNetwork, error)

func (*HetznerService) SSHKeys added in v1.7.0

func (s *HetznerService) SSHKeys(ctx context.Context, token string) ([]models.ProviderSSHKey, error)

func (*HetznerService) ServerTypes added in v1.7.0

func (s *HetznerService) ServerTypes(ctx context.Context, token string) ([]models.HetznerServerType, error)

type InstanceEmailSettingsService added in v1.8.0

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

func NewInstanceEmailSettingsService added in v1.8.0

func NewInstanceEmailSettingsService(client *api.Client) *InstanceEmailSettingsService

func (*InstanceEmailSettingsService) Get added in v1.8.0

func (*InstanceEmailSettingsService) Update added in v1.8.0

func (s *InstanceEmailSettingsService) Update(ctx context.Context, body map[string]any) (map[string]any, error)

type MCPService added in v1.7.0

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

MCPService handles MCP server enable/disable operations

func NewMCPService added in v1.7.0

func NewMCPService(client *api.Client) *MCPService

NewMCPService creates a new MCP service

func (*MCPService) Disable added in v1.7.0

func (s *MCPService) Disable(ctx context.Context) (*models.Response, error)

Disable disables the MCP server (root team only)

func (*MCPService) Enable added in v1.7.0

func (s *MCPService) Enable(ctx context.Context) (*models.Response, error)

Enable enables the MCP server (root team only)

type NotificationService added in v1.7.0

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

func NewNotificationService added in v1.7.0

func NewNotificationService(client *api.Client) *NotificationService

func (*NotificationService) Get added in v1.7.0

func (s *NotificationService) Get(ctx context.Context, channel string) (map[string]any, error)

func (*NotificationService) Update added in v1.7.0

func (s *NotificationService) Update(ctx context.Context, channel string, body map[string]any) (map[string]any, error)

type PrivateKeyService

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

PrivateKeyService handles private key-related operations

func NewPrivateKeyService

func NewPrivateKeyService(client *api.Client) *PrivateKeyService

NewPrivateKeyService creates a new private key service

func (*PrivateKeyService) Create

Create creates a new private key

func (*PrivateKeyService) Delete

func (s *PrivateKeyService) Delete(ctx context.Context, uuid string) error

Delete deletes a private key by UUID

func (*PrivateKeyService) Get added in v1.7.0

Get retrieves a private key by UUID

func (*PrivateKeyService) List

List retrieves all private keys

func (*PrivateKeyService) Update added in v1.7.0

Update updates an existing private key

type ProjectService

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

ProjectService handles project-related operations

func NewProjectService

func NewProjectService(client *api.Client) *ProjectService

NewProjectService creates a new project service

func (*ProjectService) Create added in v1.4.0

Create creates a new project

func (*ProjectService) CreateEnvironment added in v1.7.0

func (s *ProjectService) CreateEnvironment(ctx context.Context, projectUUID string, req models.EnvironmentCreateRequest) (*models.UUID, error)

CreateEnvironment creates an environment in a project

func (*ProjectService) Delete added in v1.7.0

func (s *ProjectService) Delete(ctx context.Context, uuid string) error

Delete deletes a project by UUID

func (*ProjectService) DeleteEnvironment added in v1.7.0

func (s *ProjectService) DeleteEnvironment(ctx context.Context, projectUUID, envNameOrUUID string) error

DeleteEnvironment deletes an environment by name or UUID

func (*ProjectService) Get

func (s *ProjectService) Get(ctx context.Context, uuid string) (*models.Project, error)

Get retrieves a specific project by UUID

func (*ProjectService) List

func (s *ProjectService) List(ctx context.Context) ([]models.Project, error)

List retrieves all projects

func (*ProjectService) ListEnvironments added in v1.7.0

func (s *ProjectService) ListEnvironments(ctx context.Context, projectUUID string) ([]models.Environment, error)

ListEnvironments lists environments in a project

func (*ProjectService) Update added in v1.7.0

Update patches a project by UUID

func (*ProjectService) UpdateEnvironment added in v1.7.0

func (s *ProjectService) UpdateEnvironment(ctx context.Context, projectUUID, envNameOrUUID string, req models.EnvironmentUpdateRequest) (map[string]any, error)

UpdateEnvironment patches a project environment name/description

type ResourceService

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

ResourceService handles resource-related operations

func NewResourceService

func NewResourceService(client *api.Client) *ResourceService

NewResourceService creates a new resource service

func (*ResourceService) List

func (s *ResourceService) List(ctx context.Context) ([]models.Resource, error)

List retrieves all resources

type S3StorageService added in v1.7.0

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

func NewS3StorageService added in v1.7.0

func NewS3StorageService(client *api.Client) *S3StorageService

func (*S3StorageService) Create added in v1.7.0

func (*S3StorageService) Delete added in v1.7.0

func (s *S3StorageService) Delete(ctx context.Context, uuid string) error

func (*S3StorageService) Get added in v1.7.0

func (*S3StorageService) List added in v1.7.0

func (*S3StorageService) Update added in v1.7.0

func (*S3StorageService) Validate added in v1.7.0

type ServerRegistryService added in v1.9.0

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

ServerRegistryService manages Docker registry logins on a server.

func NewServerRegistryService added in v1.9.0

func NewServerRegistryService(client *api.Client) *ServerRegistryService

NewServerRegistryService creates a new server registry service.

func (*ServerRegistryService) Check added in v1.9.0

func (s *ServerRegistryService) Check(ctx context.Context, serverUUID, registry string) (*models.Response, error)

Check verifies that the saved login of the server for a registry still works.

func (*ServerRegistryService) List added in v1.9.0

List returns the registries the server is logged in to and the registries its resources use.

func (*ServerRegistryService) Login added in v1.9.0

Login runs docker login on the server. The password is sent only in the JSON body.

func (*ServerRegistryService) Logout added in v1.9.0

func (s *ServerRegistryService) Logout(ctx context.Context, serverUUID, registry string) error

Logout runs docker logout on the server for a registry.

type ServerService

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

ServerService handles server-related operations

func NewServerService

func NewServerService(client *api.Client) *ServerService

NewServerService creates a new server service

func (*ServerService) Create

Create creates a new server

func (*ServerService) Delete

func (s *ServerService) Delete(ctx context.Context, uuid string, force, deleteFromProvider bool) error

Delete deletes a server by UUID. force also deletes all resources on the server, deleteFromProvider also deletes the server from its cloud provider.

func (*ServerService) Get

func (s *ServerService) Get(ctx context.Context, uuid string) (*models.Server, error)

Get returns a single server by UUID

func (*ServerService) GetDomains

func (s *ServerService) GetDomains(ctx context.Context, uuid string) ([]models.Domain, error)

GetDomains returns domains for a server

func (*ServerService) GetResources

func (s *ServerService) GetResources(ctx context.Context, uuid string) (*models.Resources, error)

GetResources returns resources for a server

func (*ServerService) List

func (s *ServerService) List(ctx context.Context) ([]models.Server, error)

List returns all servers

func (*ServerService) Update added in v1.7.0

Update patches a server by UUID. Returns the API response (typically uuid).

func (*ServerService) Validate

func (s *ServerService) Validate(ctx context.Context, uuid string, install bool) (*models.Response, error)

Validate validates a server by UUID

type ServerSubsystemService added in v1.7.0

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

func NewServerSubsystemService added in v1.7.0

func NewServerSubsystemService(client *api.Client) *ServerSubsystemService

func (*ServerSubsystemService) DisableCloudflareTunnel added in v1.7.0

func (s *ServerSubsystemService) DisableCloudflareTunnel(ctx context.Context, serverUUID string) (map[string]any, error)

func (*ServerSubsystemService) EnableCloudflareTunnel added in v1.7.0

func (s *ServerSubsystemService) EnableCloudflareTunnel(ctx context.Context, serverUUID string) (map[string]any, error)

func (*ServerSubsystemService) GetCloudflareTunnel added in v1.7.0

func (s *ServerSubsystemService) GetCloudflareTunnel(ctx context.Context, serverUUID string) (map[string]any, error)

func (*ServerSubsystemService) GetDockerCleanup added in v1.7.0

func (s *ServerSubsystemService) GetDockerCleanup(ctx context.Context, serverUUID string) (*models.DockerCleanupSettings, error)

func (*ServerSubsystemService) GetLogDrains added in v1.7.0

func (s *ServerSubsystemService) GetLogDrains(ctx context.Context, serverUUID string) (map[string]any, error)

func (*ServerSubsystemService) GetProxy added in v1.7.0

func (s *ServerSubsystemService) GetProxy(ctx context.Context, serverUUID string) (*models.ServerProxySettings, error)

func (*ServerSubsystemService) GetSentinel added in v1.7.0

func (s *ServerSubsystemService) GetSentinel(ctx context.Context, serverUUID string) (map[string]any, error)

func (*ServerSubsystemService) ListDockerCleanupExecutions added in v1.7.0

func (s *ServerSubsystemService) ListDockerCleanupExecutions(ctx context.Context, serverUUID string) ([]map[string]any, error)

func (*ServerSubsystemService) RestartProxy added in v1.7.0

func (s *ServerSubsystemService) RestartProxy(ctx context.Context, serverUUID string) (map[string]any, error)

func (*ServerSubsystemService) RunDockerCleanup added in v1.7.0

func (s *ServerSubsystemService) RunDockerCleanup(ctx context.Context, serverUUID string) (map[string]any, error)

func (*ServerSubsystemService) SaveProxyConfiguration added in v1.7.0

func (s *ServerSubsystemService) SaveProxyConfiguration(ctx context.Context, serverUUID string, configuration string) (map[string]any, error)

func (*ServerSubsystemService) UpdateCloudflareTunnel added in v1.7.0

func (s *ServerSubsystemService) UpdateCloudflareTunnel(ctx context.Context, serverUUID string, enabled bool) (map[string]any, error)

UpdateCloudflareTunnel PATCHes the is_cloudflare_tunnel setting.

func (*ServerSubsystemService) UpdateDockerCleanup added in v1.7.0

func (*ServerSubsystemService) UpdateLogDrains added in v1.7.0

func (s *ServerSubsystemService) UpdateLogDrains(ctx context.Context, serverUUID string, body map[string]any) (map[string]any, error)

func (*ServerSubsystemService) UpdateProxy added in v1.7.0

func (*ServerSubsystemService) UpdateSentinel added in v1.7.0

func (s *ServerSubsystemService) UpdateSentinel(ctx context.Context, serverUUID string, body map[string]any) (map[string]any, error)

type Service

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

Service handles service-related operations

func NewService

func NewService(client *api.Client) *Service

NewService creates a new service instance

func (*Service) ApplicationLogs added in v1.7.0

func (s *Service) ApplicationLogs(ctx context.Context, serviceUUID, applicationUUID string, lines int) (*models.LogsResponse, error)

ApplicationLogs retrieves logs for one compose application belonging to a service.

func (*Service) BulkUpdateEnvs

BulkUpdateEnvs updates multiple environment variables in a single request

func (*Service) Clone added in v1.7.0

func (*Service) Create

Create creates a new service

func (*Service) CreateEnv

CreateEnv creates a new environment variable for a service

func (*Service) CreateScheduledTask added in v1.7.0

func (s *Service) CreateScheduledTask(ctx context.Context, serviceUUID string, req models.ScheduledTaskCreateRequest) (*models.ScheduledTask, error)

CreateScheduledTask creates a scheduled task for a service.

func (*Service) CreateStorage added in v1.5.0

func (s *Service) CreateStorage(ctx context.Context, uuid string, req *models.ServiceStorageCreateRequest) error

CreateStorage creates a new storage for a service

func (*Service) DatabaseLogs added in v1.7.0

func (s *Service) DatabaseLogs(ctx context.Context, serviceUUID, databaseUUID string, lines int) (*models.LogsResponse, error)

DatabaseLogs retrieves logs for one compose database belonging to a service.

func (*Service) Delete

func (s *Service) Delete(ctx context.Context, uuid string, deleteConfigurations, deleteVolumes, dockerCleanup, deleteConnectedNetworks bool) error

Delete deletes a service

func (*Service) DeleteEnv

func (s *Service) DeleteEnv(ctx context.Context, serviceUUID, envUUID string) error

DeleteEnv deletes an environment variable from a service

func (*Service) DeleteScheduledTask added in v1.7.0

func (s *Service) DeleteScheduledTask(ctx context.Context, serviceUUID, taskUUID string) error

DeleteScheduledTask deletes a scheduled task from a service.

func (*Service) DeleteStorage added in v1.5.0

func (s *Service) DeleteStorage(ctx context.Context, svcUUID, storageUUID string) error

DeleteStorage deletes a storage from a service

func (*Service) DeleteStorageBackupSchedule added in v1.7.0

func (s *Service) DeleteStorageBackupSchedule(ctx context.Context, serviceUUID, storageUUID string) error

func (*Service) ExecuteScheduledTask added in v1.7.0

func (s *Service) ExecuteScheduledTask(ctx context.Context, serviceUUID, taskUUID string) (map[string]any, error)

ExecuteScheduledTask runs a service scheduled task immediately.

func (*Service) Get

func (s *Service) Get(ctx context.Context, uuid string) (*models.Service, error)

Get retrieves a service by UUID

func (*Service) GetApplication added in v1.7.0

func (s *Service) GetApplication(ctx context.Context, serviceUUID, applicationUUID string) (*models.ServiceApplication, error)

GetApplication retrieves one compose application belonging to a service.

func (*Service) GetDatabase added in v1.7.0

func (s *Service) GetDatabase(ctx context.Context, serviceUUID, databaseUUID string) (*models.ServiceDatabase, error)

GetDatabase retrieves one compose database belonging to a service.

func (*Service) GetEnv

func (s *Service) GetEnv(ctx context.Context, serviceUUID, envIdentifier string) (*models.ServiceEnvironmentVariable, error)

GetEnv retrieves a single environment variable by UUID or key

func (*Service) List

func (s *Service) List(ctx context.Context) ([]models.Service, error)

List retrieves all services

func (*Service) ListApplications added in v1.7.0

func (s *Service) ListApplications(ctx context.Context, serviceUUID string) ([]models.ServiceApplication, error)

ListApplications lists compose applications belonging to a service.

func (*Service) ListDatabases added in v1.7.0

func (s *Service) ListDatabases(ctx context.Context, serviceUUID string) ([]models.ServiceDatabase, error)

ListDatabases lists compose databases belonging to a service.

func (*Service) ListEnvs

func (s *Service) ListEnvs(ctx context.Context, uuid string) ([]models.ServiceEnvironmentVariable, error)

ListEnvs retrieves all environment variables for a service

func (*Service) ListScheduledTaskExecutions added in v1.7.0

func (s *Service) ListScheduledTaskExecutions(ctx context.Context, serviceUUID, taskUUID string) ([]models.ScheduledTaskExecution, error)

ListScheduledTaskExecutions lists executions for a service scheduled task.

func (*Service) ListScheduledTasks added in v1.7.0

func (s *Service) ListScheduledTasks(ctx context.Context, serviceUUID string) ([]models.ScheduledTask, error)

ListScheduledTasks lists scheduled tasks for a service.

func (*Service) ListStorages added in v1.5.0

func (s *Service) ListStorages(ctx context.Context, uuid string) ([]models.StorageListItem, error)

ListStorages retrieves all storages for a service

func (*Service) Logs added in v1.7.0

func (s *Service) Logs(ctx context.Context, uuid, subServiceName string, lines int, showTimestamps bool) (*models.LogsResponse, error)

Logs retrieves logs for one sub-resource in a service.

func (*Service) Move added in v1.7.0

func (s *Service) Move(ctx context.Context, uuid, environmentUUID string) (*models.MoveResourceResponse, error)

Move moves a service to another environment.

func (*Service) Restart

Restart restarts a service

func (*Service) RestartApplication added in v1.7.0

func (s *Service) RestartApplication(ctx context.Context, serviceUUID, applicationUUID string) (*models.ServiceLifecycleResponse, error)

RestartApplication restarts one compose application belonging to a service.

func (*Service) RestartDatabase added in v1.7.0

func (s *Service) RestartDatabase(ctx context.Context, serviceUUID, databaseUUID string) (*models.ServiceLifecycleResponse, error)

RestartDatabase restarts one compose database belonging to a service.

func (*Service) RunStorageBackup added in v1.7.0

func (s *Service) RunStorageBackup(ctx context.Context, serviceUUID, storageUUID string) (map[string]any, error)

func (*Service) SetStorageBackupSchedule added in v1.7.0

func (s *Service) SetStorageBackupSchedule(ctx context.Context, serviceUUID, storageUUID string, req models.VolumeBackupScheduleRequest) (map[string]any, error)

func (*Service) Start

Start starts a service

func (*Service) StartApplication added in v1.7.0

func (s *Service) StartApplication(ctx context.Context, serviceUUID, applicationUUID string, force, latest bool) (*models.ServiceLifecycleResponse, error)

StartApplication deploys one compose application belonging to a service.

func (*Service) StartDatabase added in v1.7.0

func (s *Service) StartDatabase(ctx context.Context, serviceUUID, databaseUUID string, force, latest bool) (*models.ServiceLifecycleResponse, error)

StartDatabase deploys one compose database belonging to a service.

func (*Service) Stop

Stop stops a service

func (*Service) StopApplication added in v1.7.0

func (s *Service) StopApplication(ctx context.Context, serviceUUID, applicationUUID string) (*models.ServiceLifecycleResponse, error)

StopApplication stops one compose application belonging to a service.

func (*Service) StopDatabase added in v1.7.0

func (s *Service) StopDatabase(ctx context.Context, serviceUUID, databaseUUID string) (*models.ServiceLifecycleResponse, error)

StopDatabase stops one compose database belonging to a service.

func (*Service) Update

func (s *Service) Update(ctx context.Context, uuid string, req *models.ServiceUpdateRequest) (*models.Service, error)

Update updates a service

func (*Service) UpdateApplication added in v1.7.0

func (s *Service) UpdateApplication(ctx context.Context, serviceUUID, applicationUUID string, forceDomainOverride bool, request *models.ServiceApplicationUpdateRequest) (*models.ServiceApplication, error)

UpdateApplication updates one compose application belonging to a service.

func (*Service) UpdateDatabase added in v1.7.0

func (s *Service) UpdateDatabase(ctx context.Context, serviceUUID, databaseUUID string, request *models.ServiceDatabaseUpdateRequest) (*models.ServiceDatabase, error)

UpdateDatabase updates one compose database belonging to a service.

func (*Service) UpdateEnv

UpdateEnv updates an environment variable for a service

func (*Service) UpdateScheduledTask added in v1.7.0

func (s *Service) UpdateScheduledTask(ctx context.Context, serviceUUID, taskUUID string, req models.ScheduledTaskUpdateRequest) (*models.ScheduledTask, error)

UpdateScheduledTask updates a scheduled task for a service.

func (*Service) UpdateStorage added in v1.5.0

func (s *Service) UpdateStorage(ctx context.Context, uuid string, req *models.StorageUpdateRequest) error

UpdateStorage updates a storage for a service

type SharedEnvService added in v1.7.0

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

func NewSharedEnvService added in v1.7.0

func NewSharedEnvService(client *api.Client) *SharedEnvService

func (*SharedEnvService) CreateEnvironment added in v1.7.0

func (s *SharedEnvService) CreateEnvironment(ctx context.Context, projectUUID, envNameOrUUID string, req models.SharedEnvCreateRequest) (*models.SharedEnvCreateResponse, error)

func (*SharedEnvService) CreateProject added in v1.7.0

func (*SharedEnvService) CreateServer added in v1.7.0

func (*SharedEnvService) CreateTeam added in v1.7.0

func (*SharedEnvService) DeleteEnvironment added in v1.7.0

func (s *SharedEnvService) DeleteEnvironment(ctx context.Context, projectUUID, envNameOrUUID string, id int) error

func (*SharedEnvService) DeleteProject added in v1.7.0

func (s *SharedEnvService) DeleteProject(ctx context.Context, projectUUID string, id int) error

func (*SharedEnvService) DeleteServer added in v1.7.0

func (s *SharedEnvService) DeleteServer(ctx context.Context, serverUUID string, id int) error

func (*SharedEnvService) DeleteTeam added in v1.7.0

func (s *SharedEnvService) DeleteTeam(ctx context.Context, id int) error

func (*SharedEnvService) ListEnvironment added in v1.7.0

func (s *SharedEnvService) ListEnvironment(ctx context.Context, projectUUID, envNameOrUUID string) ([]models.SharedEnvironmentVariable, error)

func (*SharedEnvService) ListProject added in v1.7.0

func (s *SharedEnvService) ListProject(ctx context.Context, projectUUID string) ([]models.SharedEnvironmentVariable, error)

func (*SharedEnvService) ListServer added in v1.7.0

func (s *SharedEnvService) ListServer(ctx context.Context, serverUUID string) ([]models.SharedEnvironmentVariable, error)

func (*SharedEnvService) ListTeam added in v1.7.0

func (*SharedEnvService) UpdateEnvironment added in v1.7.0

func (s *SharedEnvService) UpdateEnvironment(ctx context.Context, projectUUID, envNameOrUUID string, id int, req models.SharedEnvUpdateRequest) (*models.SharedEnvironmentVariable, error)

func (*SharedEnvService) UpdateProject added in v1.7.0

func (*SharedEnvService) UpdateServer added in v1.7.0

func (*SharedEnvService) UpdateTeam added in v1.7.0

type TagResourceType added in v1.7.0

type TagResourceType string
const (
	TagResourceApplications TagResourceType = "applications"
	TagResourceDatabases    TagResourceType = "databases"
	TagResourceServices     TagResourceType = "services"
)

type TagService added in v1.7.0

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

func NewTagService added in v1.7.0

func NewTagService(client *api.Client) *TagService

func (*TagService) Create added in v1.7.0

func (s *TagService) Create(ctx context.Context, name string) (*models.Tag, error)

func (*TagService) CreateForResource added in v1.7.0

func (s *TagService) CreateForResource(ctx context.Context, resourceType TagResourceType, uuid, name string) ([]models.Tag, error)

func (*TagService) Delete added in v1.7.0

func (s *TagService) Delete(ctx context.Context, uuid string) error

func (*TagService) DeleteForResource added in v1.7.0

func (s *TagService) DeleteForResource(ctx context.Context, resourceType TagResourceType, uuid, tagUUID string) error

func (*TagService) List added in v1.7.0

func (s *TagService) List(ctx context.Context) ([]models.Tag, error)

func (*TagService) ListForResource added in v1.7.0

func (s *TagService) ListForResource(ctx context.Context, resourceType TagResourceType, uuid string) ([]models.Tag, error)

func (*TagService) Update added in v1.7.0

func (s *TagService) Update(ctx context.Context, uuid, name string) (*models.Tag, error)

type TeamService

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

TeamService handles team-related operations

func NewTeamService

func NewTeamService(client *api.Client) *TeamService

NewTeamService creates a new team service

func (*TeamService) Current

func (s *TeamService) Current(ctx context.Context) (*models.Team, error)

Current retrieves the team bound to the API token

func (*TeamService) CurrentMembers

func (s *TeamService) CurrentMembers(ctx context.Context) ([]models.TeamMember, error)

CurrentMembers retrieves members of the team bound to the API token

func (*TeamService) Get

func (s *TeamService) Get(ctx context.Context, id string) (*models.Team, error)

Get retrieves a team by ID

func (*TeamService) List

func (s *TeamService) List(ctx context.Context) ([]models.Team, error)

List retrieves all teams

func (*TeamService) ListMembers

func (s *TeamService) ListMembers(ctx context.Context, teamID string) ([]models.TeamMember, error)

ListMembers retrieves members of a specific team

type VultrService added in v1.7.0

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

func NewVultrService added in v1.7.0

func NewVultrService(client *api.Client) *VultrService

func (*VultrService) Create added in v1.7.0

func (*VultrService) OperatingSystems added in v1.7.0

func (s *VultrService) OperatingSystems(ctx context.Context, token string) ([]models.ProviderOption, error)

func (*VultrService) Plans added in v1.7.0

func (s *VultrService) Plans(ctx context.Context, token string) ([]models.ProviderOption, error)

func (*VultrService) Regions added in v1.7.0

func (s *VultrService) Regions(ctx context.Context, token string) ([]models.ProviderOption, error)

func (*VultrService) SSHKeys added in v1.7.0

func (s *VultrService) SSHKeys(ctx context.Context, token string) ([]models.ProviderOption, error)

Jump to

Keyboard shortcuts

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