service

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2025 License: MIT Imports: 6 Imported by: 0

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

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

type BulkUpdateEnvsRequest

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

BulkUpdateEnvsRequest represents a bulk update request for environment variables

type BulkUpdateEnvsResponse

type BulkUpdateEnvsResponse struct {
	Message string `json:"message"`
}

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

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

Get retrieves a database by UUID

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

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

func (s *DeploymentService) Deploy(ctx context.Context, uuid string, force bool) (*DeployResponse, error)

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

func (s *Service) BulkUpdateEnvs(ctx context.Context, serviceUUID string, req *BulkUpdateEnvsRequest) (*BulkUpdateEnvsResponse, error)

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) 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) 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.EnvironmentVariable, 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.EnvironmentVariable, error)

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

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