service

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 6 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

This section is empty.

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) BulkUpdateEnvs

BulkUpdateEnvs updates multiple environment variables in a single request

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) CreatePublic added in v1.4.0

CreatePublic creates an application from a public git repository

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) 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) 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) List

List retrieves all applications

func (*ApplicationService) ListEnvs

ListEnvs retrieves all environment variables 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

Logs retrieves logs for an application

func (*ApplicationService) Restart

Restart restarts an application

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) 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 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) 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) 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) Restart

Restart restarts a database

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 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 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) List

List retrieves all private keys

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) 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

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 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) error

Delete deletes a server by UUID

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) Validate

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

Validate validates a server by UUID

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) BulkUpdateEnvs

BulkUpdateEnvs updates multiple environment variables in a single request

func (*Service) Create

Create creates a new service

func (*Service) CreateEnv

CreateEnv creates a new environment variable 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) 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) 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) Get

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

Get retrieves a service by UUID

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) ListEnvs

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

ListEnvs retrieves all environment variables 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) Restart

Restart restarts a service

func (*Service) Start

Start starts a service

func (*Service) Stop

Stop stops 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) UpdateEnv

UpdateEnv updates an environment variable 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 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 currently authenticated team

func (*TeamService) CurrentMembers

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

CurrentMembers retrieves members of the currently authenticated team

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

Jump to

Keyboard shortcuts

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