pipeops

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: MIT Imports: 15 Imported by: 1

Documentation

Overview

Package pipeops provides a Go client library for the PipeOps Control Plane API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyCreateProjectDefaults added in v0.13.0

func ApplyCreateProjectDefaults(req *CreateProjectRequest)

ApplyCreateProjectDefaults fills empty fields only (prefer client/dashboard values). Safe to call before Create; Create invokes it automatically.

func CanonicalizeRepository added in v0.17.3

func CanonicalizeRepository(repository, source string) string

CanonicalizeRepository returns a cloneable git repository URL for create and source-control updates. Full HTTPS/SSH URLs are kept (trailing .git stripped). Short owner/repo form is expanded using the VCS source host (default github). Azure DevOps short form is left as-is because clone URLs are not owner/repo shaped.

Callers that build create/update bodies outside ProjectService.Create should use this so the runner never receives an uncloneable short-form repository.

func CheckResponse

func CheckResponse(r *http.Response) error

CheckResponse checks the API response for errors.

func JoinAuditActions added in v0.18.5

func JoinAuditActions(actions ...string) string

JoinAuditActions joins multiple action codes for the action= query param.

Types

type AWSAccount

type AWSAccount struct {
	ID            string     `json:"id,omitempty"`
	UUID          string     `json:"uuid,omitempty"`
	AccessKeyID   string     `json:"access_key_id,omitempty"`
	SecretKey     string     `json:"secret_key,omitempty"`
	Region        string     `json:"region,omitempty"`
	WorkspaceUUID string     `json:"workspace_uuid,omitempty"`
	CreatedAt     *Timestamp `json:"created_at,omitempty"`
}

AWSAccount represents an AWS account configuration.

type AWSAccountRequest

type AWSAccountRequest struct {
	AccessKeyID string `json:"access_key_id"`
	SecretKey   string `json:"secret_key"`
	Region      string `json:"region"`
}

AWSAccountRequest represents a request to add an AWS account.

type AWSAccountResponse

type AWSAccountResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Account AWSAccount `json:"account"`
	} `json:"data"`
}

AWSAccountResponse represents AWS account response.

type AcceptInviteRequest added in v0.3.0

type AcceptInviteRequest struct {
	InviteID    string `json:"invite_id"`
	InviteEmail string `json:"invite_email,omitempty"`
}

AcceptInviteRequest represents a request to accept a team invite.

type ActivateEmailRequest

type ActivateEmailRequest struct {
	Token string `json:"token"`
}

ActivateEmailRequest represents an email activation request.

type AddCardRequest

type AddCardRequest struct {
	Token string `json:"token"` // Payment provider token
}

AddCardRequest represents a request to add a payment card.

type AddOn

type AddOn struct {
	ID          string     `json:"id,omitempty"`
	UID         string     `json:"UID,omitempty"`
	UUID        string     `json:"uuid,omitempty"`
	Name        string     `json:"Name,omitempty"`
	Description string     `json:"Description,omitempty"`
	Category    string     `json:"Category,omitempty"`
	Version     string     `json:"version,omitempty"`
	Icon        string     `json:"icon,omitempty"`
	ImageURL    string     `json:"ImageURL,omitempty"`
	Status      string     `json:"SubmissionStatus,omitempty"`
	IsFeatured  bool       `json:"IsFeatured,omitempty"`
	IsVerified  bool       `json:"IsVerified,omitempty"`
	CreatedAt   *Timestamp `json:"created_at,omitempty"`
	UpdatedAt   *Timestamp `json:"updated_at,omitempty"`
}

AddOn represents a PipeOps add-on.

type AddOnCategoriesData added in v0.12.0

type AddOnCategoriesData struct {
	Categories []AddOnCategory `json:"categories,omitempty"`
}

func (*AddOnCategoriesData) UnmarshalJSON added in v0.12.0

func (d *AddOnCategoriesData) UnmarshalJSON(data []byte) error

type AddOnCategoriesResponse

type AddOnCategoriesResponse struct {
	Success bool                `json:"success,omitempty"`
	Status  string              `json:"status,omitempty"`
	Message string              `json:"message"`
	Data    AddOnCategoriesData `json:"data,omitempty"`
}

AddOnCategoriesResponse represents a list of add-on categories response.

type AddOnCategory

type AddOnCategory struct {
	ID          string `json:"id,omitempty"`
	UUID        string `json:"uuid,omitempty"`
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
	Icon        string `json:"icon,omitempty"`
}

AddOnCategory represents an add-on category.

type AddOnDeployment

type AddOnDeployment struct {
	UID               string     `json:"UID,omitempty"`
	Name              string     `json:"Name,omitempty"`
	DeploymentName    string     `json:"DeploymentName,omitempty"`
	DeploymentURL     string     `json:"DeploymentURL,omitempty"`
	Category          string     `json:"Category,omitempty"`
	Status            string     `json:"Status,omitempty"`
	StatusMessage     string     `json:"StatusMessage,omitempty"`
	Environment       string     `json:"Environment,omitempty"`
	ImageURL          string     `json:"ImageURL,omitempty"`
	Version           string     `json:"Version,omitempty"`
	CurrentVersion    string     `json:"current_version,omitempty"`
	UpgradableVersion string     `json:"upgradable_version,omitempty"`
	UpgradeAvailable  bool       `json:"upgrade_available,omitempty"`
	CreatedAt         *Timestamp `json:"CreatedAt,omitempty"`
	UpdatedAt         *Timestamp `json:"UpdatedAt,omitempty"`
}

AddOnDeployment represents a deployed add-on instance.

type AddOnDeploymentResponse

type AddOnDeploymentResponse struct {
	Status  string          `json:"status"`
	Message string          `json:"message"`
	Success bool            `json:"success,omitempty"`
	Data    AddOnDeployment `json:"data"`
}

AddOnDeploymentResponse represents a single add-on deployment response. Deploy endpoints may return data as a single object, a nested deployment, or an array of deployments — UnmarshalJSON normalizes these shapes.

func (*AddOnDeploymentResponse) UnmarshalJSON added in v0.17.8

func (r *AddOnDeploymentResponse) UnmarshalJSON(b []byte) error

UnmarshalJSON accepts:

{"data":{...deployment fields...}}
{"data":{"deployment":{...}}}
{"data":[{...}, ...]}  // POST /addons/deploy plural

type AddOnDeploymentsResponse

type AddOnDeploymentsResponse struct {
	Data []AddOnDeployment `json:"data"`
}

AddOnDeploymentsResponse represents a list of add-on deployments response.

type AddOnResponse

type AddOnResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    AddOn  `json:"data"`
}

AddOnResponse represents a single add-on response.

type AddOnService

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

AddOnService handles communication with the add-on related methods of the PipeOps API.

func (*AddOnService) AddDomain

func (s *AddOnService) AddDomain(ctx context.Context, addonUUID string, req *DomainRequest) (*http.Response, error)

AddDomain adds a domain to an add-on deployment. Controller: POST /addons/:id/domain with {action,value,...} — not {domain}. DomainRequest.Domain is accepted for backward compatibility and mapped to action=create,value=.

func (*AddOnService) AlterDomain added in v0.18.1

func (s *AddOnService) AlterDomain(ctx context.Context, addonUUID string, req *AddonDomainRequest) (*http.Response, error)

AlterDomain create/update/delete an add-on custom domain.

func (*AddOnService) BulkDeleteDeployments

func (s *AddOnService) BulkDeleteDeployments(ctx context.Context, req *BulkDeleteDeploymentsRequest) (*http.Response, error)

BulkDeleteDeployments deletes multiple add-on deployments.

func (*AddOnService) DeleteAddOn

func (s *AddOnService) DeleteAddOn(ctx context.Context, addonUUID string) (*http.Response, error)

DeleteAddOn deletes an add-on (admin only).

func (*AddOnService) DeleteDeployment

func (s *AddOnService) DeleteDeployment(ctx context.Context, deploymentUUID string) (*http.Response, error)

DeleteDeployment deletes an add-on deployment.

func (*AddOnService) Deploy

Deploy deploys an add-on via POST /addons/deploy. Sends both nested dashboard shape and thin aliases so older/newer controllers accept it. Prefer-client fills missing Config/Environment from catalog and cluster defaults.

func (*AddOnService) DownloadAddonBackupExport added in v0.14.0

func (s *AddOnService) DownloadAddonBackupExport(ctx context.Context, deploymentUID, exportID string) (*http.Response, error)

DownloadAddonBackupExport returns the download response (follow DownloadURL or stream). GET /addons/deployments/:id/backups/exports/:export_id/download

func (*AddOnService) Get

func (s *AddOnService) Get(ctx context.Context, addonUUID string) (*AddOnResponse, *http.Response, error)

Get fetches an add-on by UUID.

func (*AddOnService) GetAddonBackupExport added in v0.14.0

func (s *AddOnService) GetAddonBackupExport(ctx context.Context, deploymentUID, exportID string) (*AddonBackupExportResponse, *http.Response, error)

GetAddonBackupExport polls export status. GET /addons/deployments/:id/backups/exports/:export_id

func (*AddOnService) GetDeployment

func (s *AddOnService) GetDeployment(ctx context.Context, deploymentUUID string, opts ...*ListDeploymentsOptions) (*AddOnDeploymentResponse, *http.Response, error)

GetDeployment fetches an add-on deployment by UUID. Control plane has no GET /addons/deployments/:id; resolve from overview list.

func (*AddOnService) GetDeploymentOverview

func (s *AddOnService) GetDeploymentOverview(ctx context.Context) (*DeploymentOverviewResponse, *http.Response, error)

GetDeploymentOverview retrieves deployment overview. Prefer ListDeployments for typed deployment rows; this helper remains for callers that expect the generic overview envelope.

func (*AddOnService) GetDeploymentSession

func (s *AddOnService) GetDeploymentSession(ctx context.Context, sessionID string, opts ...*GetDeploymentSessionOptions) (*DeploymentSessionResponse, *http.Response, error)

GetDeploymentSession retrieves deployments that share a deployment session ID. GET /addons/deployments/sessions/:sessionID?workspace= Controller middleware expects ?workspace= for addon routes. Prefer an explicit workspace; when empty, the query is omitted so CheckAddonPermission can derive it from the first matching deployment when possible. Auto-first-workspace is not used (wrong workspace → HTML 403s on some edges).

func (*AddOnService) GetMySubmissions

func (s *AddOnService) GetMySubmissions(ctx context.Context) (*MySubmissionsResponse, *http.Response, error)

GetMySubmissions retrieves user's add-on submissions.

func (*AddOnService) GetSubmittedAddOns

func (s *AddOnService) GetSubmittedAddOns(ctx context.Context) (*MySubmissionsResponse, *http.Response, error)

GetSubmittedAddOns retrieves submitted add-ons (admin only). Same envelope as GetMySubmissions: data is a bare addon array.

func (*AddOnService) List

List lists all available add-ons.

func (*AddOnService) ListAddonBackups added in v0.14.0

func (s *AddOnService) ListAddonBackups(ctx context.Context, deploymentUID string) (*AddonBackupListResponse, *http.Response, error)

ListAddonBackups lists snapshots for an addon deployment. GET /addons/deployments/:id/backups

func (*AddOnService) ListCategories

func (s *AddOnService) ListCategories(ctx context.Context) (*AddOnCategoriesResponse, *http.Response, error)

ListCategories lists all add-on categories.

func (*AddOnService) ListDeployments

ListDeployments lists all add-on deployments for a workspace.

func (*AddOnService) PublishAddOn

func (s *AddOnService) PublishAddOn(ctx context.Context, addonUUID string) (*http.Response, error)

PublishAddOn publishes an approved add-on (admin only).

func (*AddOnService) RestartDeployment added in v0.19.0

func (s *AddOnService) RestartDeployment(ctx context.Context, deploymentUUID string, opts ...*ListDeploymentsOptions) (*AddOnDeploymentResponse, *http.Response, error)

RestartDeployment rolls an add-on deployment's pods without rebuilding.

func (*AddOnService) ReviewAddOnApprove

func (s *AddOnService) ReviewAddOnApprove(ctx context.Context, addonUUID string, req *ReviewAddOnRequest) (*http.Response, error)

ReviewAddOnApprove approves an add-on submission (admin only).

func (*AddOnService) Search added in v0.11.0

func (s *AddOnService) Search(ctx context.Context, query string, opts ...*ListAddOnsOptions) (*AddOnsResponse, *http.Response, error)

Search searches available add-ons using the same filters as List.

func (*AddOnService) StartAddonBackupExport added in v0.14.0

func (s *AddOnService) StartAddonBackupExport(ctx context.Context, deploymentUID string, body *AddonBackupExportRequest) (*AddonBackupExportResponse, *http.Response, error)

StartAddonBackupExport starts an async backup export for a snapshot path. POST /addons/deployments/:id/backups/export

func (*AddOnService) SubmitAddOn

SubmitAddOn submits a new add-on for review.

func (*AddOnService) SyncDeployment

func (s *AddOnService) SyncDeployment(ctx context.Context, deploymentUID string) (*http.Response, error)

SyncDeployment syncs an add-on deployment.

func (*AddOnService) UnpublishAddOn

func (s *AddOnService) UnpublishAddOn(ctx context.Context, addonUUID string) (*http.Response, error)

UnpublishAddOn unpublishes an add-on (admin only).

func (*AddOnService) UpdateDeployment

func (s *AddOnService) UpdateDeployment(ctx context.Context, deploymentUUID string, req *UpdateDeploymentRequest) (*AddOnDeploymentResponse, *http.Response, error)

UpdateDeployment updates an add-on deployment configuration.

func (*AddOnService) ViewDeploymentConfigs

func (s *AddOnService) ViewDeploymentConfigs(ctx context.Context, addonUUID string, opts ...*ViewDeploymentConfigsOptions) (*DeploymentConfigsResponse, *http.Response, error)

ViewDeploymentConfigs views deployment configurations.

type AddOnSubmissionRequest

type AddOnSubmissionRequest struct {
	Name        string                 `json:"name"`
	Description string                 `json:"description"`
	Category    string                 `json:"category"`
	Version     string                 `json:"version"`
	Config      map[string]interface{} `json:"config,omitempty"`
}

AddOnSubmissionRequest represents an add-on submission request.

type AddOnsResponse

type AddOnsResponse struct {
	Status  string  `json:"status"`
	Message string  `json:"message"`
	Data    []AddOn `json:"data"`
}

AddOnsResponse represents a list of add-ons response.

type AddonBackupExportRequest added in v0.14.0

type AddonBackupExportRequest struct {
	SnapshotID string `json:"snapshot_id"`
	Path       string `json:"path,omitempty"`
	Format     string `json:"format,omitempty"` // auto | sql | rdb | archive
}

AddonBackupExportRequest is POST /addons/deployments/:id/backups/export body.

type AddonBackupExportResponse added in v0.14.0

type AddonBackupExportResponse struct {
	Success bool                    `json:"success,omitempty"`
	Message string                  `json:"message,omitempty"`
	Data    AddonBackupExportStatus `json:"data"`
}

AddonBackupExportResponse wraps export status.

type AddonBackupExportStatus added in v0.14.0

type AddonBackupExportStatus struct {
	ExportID     string `json:"export_id,omitempty"`
	Status       string `json:"status,omitempty"`
	DownloadURL  string `json:"download_url,omitempty"`
	Filename     string `json:"filename,omitempty"`
	ContentType  string `json:"content_type,omitempty"`
	SizeBytes    int64  `json:"size_bytes,omitempty"`
	ErrorMessage string `json:"error_message,omitempty"`
	SnapshotID   string `json:"snapshot_id,omitempty"`
	Path         string `json:"path,omitempty"`
	CreatedAt    string `json:"created_at,omitempty"`
}

AddonBackupExportStatus is create/get export status.

type AddonBackupListResponse added in v0.14.0

type AddonBackupListResponse struct {
	Success bool   `json:"success,omitempty"`
	Message string `json:"message,omitempty"`
	Data    struct {
		AddonUID   string                `json:"addon_uid,omitempty"`
		Namespace  string                `json:"namespace,omitempty"`
		ServerCode string                `json:"server_code,omitempty"`
		Snapshots  []AddonBackupSnapshot `json:"snapshots,omitempty"`
	} `json:"data"`
}

AddonBackupListResponse is GET /addons/deployments/:id/backups.

type AddonBackupSnapshot added in v0.14.0

type AddonBackupSnapshot struct {
	ID             string   `json:"id,omitempty"`
	Name           string   `json:"name,omitempty"`
	Time           string   `json:"time,omitempty"`
	TotalSizeBytes int64    `json:"total_size_bytes,omitempty"`
	Useful         bool     `json:"useful,omitempty"`
	SizeUnknown    bool     `json:"size_unknown,omitempty"`
	TypeChip       string   `json:"type_chip,omitempty"`
	Paths          []string `json:"paths,omitempty"`
	Warning        string   `json:"warning,omitempty"`
	Hostname       string   `json:"hostname,omitempty"`
}

AddonBackupSnapshot is one snapshot row in the Backups tab.

type AddonDomainRequest added in v0.18.1

type AddonDomainRequest struct {
	Action      string `json:"action"`                // create | update | delete
	Value       string `json:"value"`                 // domain name
	PrevValue   string `json:"prevValue,omitempty"`   // required for update
	NetworkUUID string `json:"networkUUID,omitempty"` // optional network target
	NetworkPort int32  `json:"networkPort,omitempty"` // optional port for network resolution
}

AddonDomainRequest is POST /addons/:id/domain (CreateOrAlterDomainName). Action must be "create", "update", or "delete". Value is the domain hostname.

type AgentHeartbeatRequest

type AgentHeartbeatRequest struct {
	Status      string                 `json:"status"`
	Metrics     map[string]interface{} `json:"metrics,omitempty"`
	LastUpdated string                 `json:"last_updated,omitempty"`
}

AgentHeartbeatRequest represents an agent heartbeat request.

type AgentRegisterRequest

type AgentRegisterRequest struct {
	ClusterName string                 `json:"cluster_name"`
	ServerSpecs map[string]interface{} `json:"server_specs,omitempty"`
}

AgentRegisterRequest represents an agent registration request.

type AgentRegisterResponse

type AgentRegisterResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		ClusterUUID string `json:"cluster_uuid"`
		Token       string `json:"token"`
	} `json:"data"`
}

AgentRegisterResponse represents an agent registration response.

type Alert

type Alert struct {
	ID        string     `json:"id,omitempty"`
	UUID      string     `json:"uuid,omitempty"`
	Type      string     `json:"type,omitempty"`
	Severity  string     `json:"severity,omitempty"`
	Message   string     `json:"message,omitempty"`
	Resolved  bool       `json:"resolved,omitempty"`
	CreatedAt *Timestamp `json:"created_at,omitempty"`
}

Alert represents an alert.

type AlertService

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

AlertService handles alert and monitoring related methods.

func (*AlertService) CreateAlert

func (s *AlertService) CreateAlert(ctx context.Context, req *CreateAlertRequest) (*http.Response, error)

CreateAlert creates a new alert rule.

func (*AlertService) DeleteAlert

func (s *AlertService) DeleteAlert(ctx context.Context, alertUUID string) (*http.Response, error)

DeleteAlert deletes an alert rule.

func (*AlertService) ListAlerts

func (s *AlertService) ListAlerts(ctx context.Context) (*AlertsResponse, *http.Response, error)

ListAlerts lists all alerts.

func (*AlertService) ResolveAlert

func (s *AlertService) ResolveAlert(ctx context.Context, alertUUID string) (*http.Response, error)

ResolveAlert resolves an alert.

type AlertsResponse

type AlertsResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Alerts []Alert `json:"alerts"`
	} `json:"data"`
}

AlertsResponse represents alerts response.

type ApplyDiscountRequest

type ApplyDiscountRequest struct {
	SubscriptionUUID string  `json:"subscription_uuid"`
	DiscountPercent  float64 `json:"discount_percent"`
	Duration         int     `json:"duration,omitempty"` // months
}

ApplyDiscount applies a discount to a subscription.

type AttachProjectGroupMemberRequest added in v0.15.0

type AttachProjectGroupMemberRequest struct {
	MemberType     string `json:"member_type"` // project | addon_deployment
	MemberUUID     string `json:"member_uuid"`
	IncludeSession *bool  `json:"include_session,omitempty"`
	Move           bool   `json:"move,omitempty"`
}

AttachProjectGroupMemberRequest attaches a service to a group.

type AttachProjectGroupMemberResponse added in v0.15.0

type AttachProjectGroupMemberResponse struct {
	AttachedMemberUUIDs   []string `json:"attached_member_uuids,omitempty"`
	IncludeSessionApplied bool     `json:"include_session_applied,omitempty"`
	GroupUUID             string   `json:"group_uuid,omitempty"`
}

AttachProjectGroupMemberResponse is returned after attach/move.

type AuditLogPagination added in v0.18.5

type AuditLogPagination struct {
	Total  int64 `json:"total"`
	Limit  int   `json:"limit"`
	Offset int   `json:"offset"`
}

AuditLogPagination is the list envelope pagination block.

type AuditLogService

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

AuditLogService lists project- and workspace-scoped activity (who did what).

Controller routes (user JWT / team session; project read permission for project path):

GET /project/audit-logs/:uuid?limit=&offset=&action=&actor_type=&category=&search=&from=&to=
GET /project/workspace-audit-logs?workspace_uuid=&project_uuid=&limit=&offset=&...

These are the console “audit log” surfaces for historical actions (deploy, env change, domain, pause/resume, agent/webhook deploys, etc.). They are distinct from admin-only staff audit tables.

func (*AuditLogService) ListAuditLogs deprecated

ListAuditLogs is a convenience alias for ListWorkspace (workspace-wide feed). Prefer ListWorkspace or ListProject for explicit scope.

Deprecated: use ListWorkspace or ListProject. Kept so existing AuditLogs callers that expected a list method still compile; they previously hit a non-existent /audit/logs path.

func (*AuditLogService) ListProject added in v0.18.5

ListProject returns historical actions for one project. GET /project/audit-logs/:projectUUID

func (*AuditLogService) ListWorkspace added in v0.18.5

ListWorkspace returns historical actions across projects in a workspace. GET /project/workspace-audit-logs?workspace_uuid=

If opts.WorkspaceUUID is empty, the SDK attempts firstWorkspaceUUID for prefer-client single-workspace accounts.

type AuthService

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

AuthService handles communication with the authentication related methods of the PipeOps API.

func (*AuthService) ActivateEmail

func (s *AuthService) ActivateEmail(ctx context.Context, req *ActivateEmailRequest) (*http.Response, error)

ActivateEmail activates a user's email.

func (*AuthService) ChangePassword

ChangePassword changes the user's password.

func (*AuthService) Login

Login authenticates a user with email and password.

func (*AuthService) OAuthCallback

func (s *AuthService) OAuthCallback(ctx context.Context, provider string) (*LoginResponse, *http.Response, error)

OAuthCallback handles OAuth callback.

func (*AuthService) OAuthSignup

func (s *AuthService) OAuthSignup(ctx context.Context, provider string) (*http.Response, error)

OAuthSignup initiates OAuth signup with a provider.

func (*AuthService) RequestPasswordReset

func (s *AuthService) RequestPasswordReset(ctx context.Context, req *PasswordResetRequest) (*PasswordResetResponse, *http.Response, error)

RequestPasswordReset sends a password reset email.

func (*AuthService) ResetPassword

func (s *AuthService) ResetPassword(ctx context.Context, req *ResetPasswordRequest) (*http.Response, error)

ResetPassword resets password with a token.

func (*AuthService) Signup

Signup creates a new user account.

func (*AuthService) VerifyLogin

VerifyLogin verifies a login with 2FA code.

func (*AuthService) VerifyPasswordResetToken

func (s *AuthService) VerifyPasswordResetToken(ctx context.Context, token string) (*http.Response, error)

VerifyPasswordResetToken verifies a password reset token.

type AuthorizeOptions

type AuthorizeOptions struct {
	ClientID     string `url:"client_id"`
	RedirectURI  string `url:"redirect_uri"`
	ResponseType string `url:"response_type"` // "code" for authorization code flow
	Scope        string `url:"scope,omitempty"`
	State        string `url:"state,omitempty"`
}

AuthorizeOptions represents OAuth authorization request parameters.

type AzureAccountResponse

type AzureAccountResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Account map[string]interface{} `json:"account"`
	} `json:"data"`
}

AzureAccountResponse represents Azure account response.

type AzureCredentialRequest

type AzureCredentialRequest struct {
	SubscriptionID string `json:"subscription_id"`
	TenantID       string `json:"tenant_id"`
	ClientID       string `json:"client_id"`
	ClientSecret   string `json:"client_secret"`
}

AzureCredentialRequest represents a request to add Azure credentials.

type Backup deprecated

type Backup struct {
	ID        string     `json:"id,omitempty"`
	UUID      string     `json:"uuid,omitempty"`
	ProjectID string     `json:"project_id,omitempty"`
	Type      string     `json:"type,omitempty"`
	Status    string     `json:"status,omitempty"`
	Size      int64      `json:"size,omitempty"`
	CreatedAt *Timestamp `json:"created_at,omitempty"`
}

Backup is retained for binary compatibility with older callers.

Deprecated: use AddOnService backup DTOs instead.

type BackupService deprecated

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

BackupService is a legacy alias surface.

Deprecated: The previous paths (backups/projects/..., backups/:id/restore) do not exist on the control plane. Prefer AddOnService backup-export methods:

AddOns.ListAddonBackups
AddOns.StartAddonBackupExport
AddOns.GetAddonBackupExport
AddOns.DownloadAddonBackupExport

and VolumeService for workspace PVC export.

func (*BackupService) CreateBackup deprecated

func (s *BackupService) CreateBackup(ctx context.Context, projectUUID string) (*http.Response, error)

CreateBackup is retired.

Deprecated: wrong path; use AddOns.StartAddonBackupExport.

func (*BackupService) DeleteBackup deprecated

func (s *BackupService) DeleteBackup(ctx context.Context, backupUUID string) (*http.Response, error)

DeleteBackup is retired.

Deprecated: no matching control-plane route.

func (*BackupService) ListBackups deprecated

func (s *BackupService) ListBackups(ctx context.Context, projectUUID string) (*BackupsResponse, *http.Response, error)

ListBackups is retired.

Deprecated: wrong path; use AddOns.ListAddonBackups.

func (*BackupService) RestoreBackup deprecated

func (s *BackupService) RestoreBackup(ctx context.Context, backupUUID string) (*http.Response, error)

RestoreBackup is retired (no control-plane restore endpoint of this shape).

Deprecated: use addon/volume recovery APIs instead.

type BackupsResponse deprecated

type BackupsResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Backups []Backup `json:"backups"`
	} `json:"data"`
}

BackupsResponse is retained for binary compatibility.

Deprecated: use AddOnService backup list response types.

type BalanceResponse

type BalanceResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Balance  float64 `json:"balance"`
		Currency string  `json:"currency"`
	} `json:"data"`
}

BalanceResponse represents account balance response.

func (*BalanceResponse) UnmarshalJSON added in v0.10.3

func (r *BalanceResponse) UnmarshalJSON(data []byte) error

type BillingBalance added in v0.10.3

type BillingBalance struct {
	Balance  float64 `json:"balance,omitempty"`
	Currency string  `json:"currency,omitempty"`
}

BillingBalance represents the current wallet balance snapshot.

type BillingHistoryResponse

type BillingHistoryResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		History []map[string]interface{} `json:"history"`
	} `json:"data"`
}

BillingHistoryResponse represents billing history response.

type BillingInfoResponse added in v0.10.3

type BillingInfoResponse struct {
	Status  string `json:"status,omitempty"`
	Message string `json:"message,omitempty"`
	Data    struct {
		Balance             BillingBalance `json:"balance"`
		CurrentSubscription *Subscription  `json:"current_subscription,omitempty"`
	} `json:"data"`
}

BillingInfoResponse represents controller-backed billing information.

type BillingService

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

BillingService handles communication with the billing related methods of the PipeOps API.

func (*BillingService) AddCard

AddCard adds a new payment card.

func (*BillingService) AddCredit

AddCredit adds credit to the account.

func (*BillingService) ApplyDiscount

func (s *BillingService) ApplyDiscount(ctx context.Context, req *ApplyDiscountRequest) (*http.Response, error)

ApplyDiscount applies a discount (admin only).

func (*BillingService) CancelSubscription

func (s *BillingService) CancelSubscription(ctx context.Context, subscriptionUUID string) (*http.Response, error)

CancelSubscription cancels a subscription.

func (*BillingService) CreateFreeServer

func (s *BillingService) CreateFreeServer(ctx context.Context, req *CreateFreeServerRequest) (*http.Response, error)

CreateFreeServer creates a free trial server.

func (*BillingService) CreateWorkspaceBilling

func (s *BillingService) CreateWorkspaceBilling(ctx context.Context) (*http.Response, error)

CreateWorkspaceBilling creates workspace billing configuration.

func (*BillingService) DeleteCard

func (s *BillingService) DeleteCard(ctx context.Context, cardUUID string) (*http.Response, error)

DeleteCard deletes a payment card.

func (*BillingService) DeploymentQuotaTopup

func (s *BillingService) DeploymentQuotaTopup(ctx context.Context, req *DeploymentQuotaTopupRequest) (*http.Response, error)

DeploymentQuotaTopup adds deployment quota.

func (*BillingService) ExportInvoices

func (s *BillingService) ExportInvoices(ctx context.Context, req *ExportInvoicesRequest) (*http.Response, error)

ExportInvoices exports invoices.

func (*BillingService) GetActiveCard

func (s *BillingService) GetActiveCard(ctx context.Context) (*CardResponse, *http.Response, error)

GetActiveCard retrieves the active workspace billing card.

func (*BillingService) GetBalance

func (s *BillingService) GetBalance(ctx context.Context) (*BalanceResponse, *http.Response, error)

GetBalance retrieves the current account balance.

func (*BillingService) GetBillingInfo added in v0.10.3

func (s *BillingService) GetBillingInfo(ctx context.Context) (*BillingInfoResponse, *http.Response, error)

GetBillingInfo retrieves controller-backed billing balance and current subscription information.

func (*BillingService) GetBillingReports

func (s *BillingService) GetBillingReports(ctx context.Context) (*http.Response, error)

GetBillingReports retrieves billing reports (admin only).

func (*BillingService) GetCurrentSubscription

func (s *BillingService) GetCurrentSubscription(ctx context.Context) (*SubscriptionResponse, *http.Response, error)

GetCurrentSubscription retrieves the current subscription.

func (*BillingService) GetHistory

GetHistory retrieves billing history.

func (*BillingService) GetPlans

GetPlans retrieves available billing plans. Defaults location=US so MCP/CLI succeed without an explicit country.

func (*BillingService) GetPortalURL

func (s *BillingService) GetPortalURL(ctx context.Context) (*PortalResponse, *http.Response, error)

GetPortalURL retrieves the billing portal URL.

func (*BillingService) GetSubscription

func (s *BillingService) GetSubscription(ctx context.Context, subscriptionUUID string) (*SubscriptionResponse, *http.Response, error)

GetSubscription gets a subscription by UUID.

func (*BillingService) GetTeamSeatSubscription

func (s *BillingService) GetTeamSeatSubscription(ctx context.Context) (*SubscriptionResponse, *http.Response, error)

GetTeamSeatSubscription retrieves team seat subscription.

func (*BillingService) GetUsage

GetUsage gets current billing usage.

func (*BillingService) GetUsagePlanProviders

func (s *BillingService) GetUsagePlanProviders(ctx context.Context) (*http.Response, error)

GetUsagePlanProviders retrieves usage plan providers.

func (*BillingService) GetWorkspaceCards

func (s *BillingService) GetWorkspaceCards(ctx context.Context) (*CardsResponse, *http.Response, error)

GetWorkspaceCards retrieves cards for a workspace.

func (*BillingService) GetWorkspaceSubscription

func (s *BillingService) GetWorkspaceSubscription(ctx context.Context, workspaceUUID string) (*SubscriptionResponse, *http.Response, error)

GetWorkspaceSubscription retrieves subscription for a workspace.

func (*BillingService) ListCards

func (s *BillingService) ListCards(ctx context.Context) (*CardsResponse, *http.Response, error)

ListCards lists all payment cards.

func (*BillingService) ListInvoices

func (s *BillingService) ListInvoices(ctx context.Context) (*InvoicesResponse, *http.Response, error)

ListInvoices lists all invoices.

func (*BillingService) ListSubscriptions

func (s *BillingService) ListSubscriptions(ctx context.Context) (*SubscriptionsResponse, *http.Response, error)

ListSubscriptions lists all subscriptions.

func (*BillingService) ListWorkspaceCards

func (s *BillingService) ListWorkspaceCards(ctx context.Context) (*CardsResponse, *http.Response, error)

ListWorkspaceCards lists workspace payment cards.

func (*BillingService) ProcessRefund

func (s *BillingService) ProcessRefund(ctx context.Context, req *RefundRequest) (*http.Response, error)

ProcessRefund processes a billing refund (admin only).

func (*BillingService) ResetSubscription

func (s *BillingService) ResetSubscription(ctx context.Context, userUUID string) (*http.Response, error)

ResetSubscription resets a user's subscription (admin only).

func (*BillingService) SetActiveCard

func (s *BillingService) SetActiveCard(ctx context.Context, cardUUID string) (*http.Response, error)

SetActiveCard sets the active billing card.

func (*BillingService) StartTrial

func (s *BillingService) StartTrial(ctx context.Context, req *StartTrialRequest) (*http.Response, error)

StartTrial starts a free trial.

func (*BillingService) Subscribe

Subscribe creates a new subscription.

func (*BillingService) UpdateCard

func (s *BillingService) UpdateCard(ctx context.Context, cardUUID string, req *AddCardRequest) (*CardResponse, *http.Response, error)

UpdateCard updates a payment card.

func (*BillingService) UpdatePaymentMethod

func (s *BillingService) UpdatePaymentMethod(ctx context.Context, req *UpdatePaymentMethodRequest) (*http.Response, error)

UpdatePaymentMethod updates payment method.

type BuildLogsOptions added in v0.16.2

type BuildLogsOptions struct {
	// WorkspaceUUID scopes the request (multi-workspace tokens).
	WorkspaceUUID string `url:"workspace_uuid,omitempty"`
	// DeploymentUUID selects a deployment; when empty the control plane uses the latest.
	DeploymentUUID string `url:"deployment_uuid,omitempty"`
	// BuildSha overrides the deployment's build_sha when known.
	BuildSha string `url:"build_sha,omitempty"`
	// Stage filters to git | build | deploy when set.
	Stage string `url:"stage,omitempty"`
	// Limit caps the number of log lines (default 2000, max 5000).
	Limit int `url:"limit,omitempty"`
}

BuildLogsOptions controls GET /project/build-logs/:uuid. Logs come from Firebase pipeops-build-logs (same source as the dashboard).

type BuildLogsResponse added in v0.16.2

type BuildLogsResponse struct {
	Success bool   `json:"success"`
	Message string `json:"message"`
	Data    struct {
		ProjectUUID    string                   `json:"project_uuid"`
		DeploymentUUID string                   `json:"deployment_uuid"`
		BuildSha       string                   `json:"build_sha"`
		Status         string                   `json:"status"`
		CurrentStage   string                   `json:"current_stage"`
		Source         string                   `json:"source"`
		Count          int                      `json:"count"`
		Logs           []map[string]interface{} `json:"logs"`
	} `json:"data"`
}

BuildLogsResponse is the control-plane build-logs payload.

type BulkDeleteDeploymentsRequest

type BulkDeleteDeploymentsRequest struct {
	DeploymentUIDs []string `json:"deployment_uids"`
}

BulkDeleteDeploymentsRequest represents a request to bulk delete deployments.

type BulkDeleteRequest

type BulkDeleteRequest struct {
	ProjectUUIDs []string `json:"project_uuids"`
}

BulkDeleteRequest represents a request to delete multiple projects.

type CPUMetricsRequest

type CPUMetricsRequest struct {
	ProjectUUID string `json:"project_uuid"`
	StartTime   string `json:"start_time,omitempty"`
	EndTime     string `json:"end_time,omitempty"`
}

CPUMetricsRequest represents CPU metrics request.

type CalculatorResponse

type CalculatorResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Cost float64 `json:"cost"`
	} `json:"data"`
}

CalculatorResponse represents a calculator response.

type Campaign

type Campaign struct {
	ID          string     `json:"id,omitempty"`
	UUID        string     `json:"uuid,omitempty"`
	Name        string     `json:"name,omitempty"`
	Description string     `json:"description,omitempty"`
	StartDate   *Timestamp `json:"start_date,omitempty"`
	EndDate     *Timestamp `json:"end_date,omitempty"`
	Status      string     `json:"status,omitempty"`
	CreatedAt   *Timestamp `json:"created_at,omitempty"`
}

Campaign represents a campaign.

type CampaignRequest

type CampaignRequest struct {
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	StartDate   string `json:"start_date,omitempty"`
	EndDate     string `json:"end_date,omitempty"`
}

CampaignRequest represents a campaign request.

type CampaignResponse

type CampaignResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Campaign Campaign `json:"campaign"`
	} `json:"data"`
}

CampaignResponse represents a campaign response.

type CampaignService

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

CampaignService handles campaign related methods of the PipeOps API.

func (*CampaignService) Create

Create creates a new campaign.

func (*CampaignService) Delete

func (s *CampaignService) Delete(ctx context.Context, campaignUUID string) (*http.Response, error)

Delete deletes a campaign.

func (*CampaignService) Get

func (s *CampaignService) Get(ctx context.Context, campaignUUID string) (*CampaignResponse, *http.Response, error)

Get gets a campaign by UUID.

func (*CampaignService) List

List lists all campaigns.

func (*CampaignService) Start

func (s *CampaignService) Start(ctx context.Context, campaignUUID string) (*http.Response, error)

Start starts a campaign.

func (*CampaignService) Stop

func (s *CampaignService) Stop(ctx context.Context, campaignUUID string) (*http.Response, error)

Stop stops a campaign.

func (*CampaignService) Update

func (s *CampaignService) Update(ctx context.Context, campaignUUID string, req *CampaignRequest) (*CampaignResponse, *http.Response, error)

Update updates a campaign.

type CampaignsResponse

type CampaignsResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Campaigns []Campaign `json:"campaigns"`
	} `json:"data"`
}

CampaignsResponse represents campaigns response.

type Card

type Card struct {
	ID        string     `json:"id,omitempty"`
	UUID      string     `json:"uuid,omitempty"`
	Provider  string     `json:"provider,omitempty"`
	Last4     string     `json:"last4,omitempty"`
	Brand     string     `json:"brand,omitempty"`
	CardType  string     `json:"card_type,omitempty"`
	ExpMonth  int        `json:"exp_month,omitempty"`
	ExpYear   int        `json:"exp_year,omitempty"`
	IsDefault bool       `json:"is_default,omitempty"`
	IsActive  bool       `json:"is_active,omitempty"`
	Channel   string     `json:"channel,omitempty"`
	Bank      string     `json:"bank,omitempty"`
	Country   string     `json:"country,omitempty"`
	CreatedAt *Timestamp `json:"created_at,omitempty"`
}

Card represents a billing card.

func (*Card) UnmarshalJSON added in v0.10.3

func (c *Card) UnmarshalJSON(data []byte) error

type CardResponse

type CardResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Card        Card   `json:"card"`
		CheckoutURL string `json:"checkout_url,omitempty"`
		Message     string `json:"message,omitempty"`
	} `json:"data"`
}

CardResponse represents a single card response.

func (*CardResponse) UnmarshalJSON added in v0.10.3

func (r *CardResponse) UnmarshalJSON(data []byte) error

type CardsResponse

type CardsResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Cards []Card `json:"cards"`
	} `json:"data"`
}

CardsResponse represents a list of cards response.

func (*CardsResponse) UnmarshalJSON added in v0.10.3

func (r *CardsResponse) UnmarshalJSON(data []byte) error

type ChangePasswordRequest

type ChangePasswordRequest struct {
	OldPassword string `json:"old_password"`
	NewPassword string `json:"new_password"`
}

ChangePasswordRequest represents a password change request.

type ChangePasswordResponse

type ChangePasswordResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
}

ChangePasswordResponse represents a password change response.

type CheckDockerfileRequest

type CheckDockerfileRequest struct {
	Provider   string `json:"provider"`
	Workspace  string `json:"workspace"`
	Repository string `json:"repository"`
	Branch     string `json:"branch"`
}

CheckDockerfileRequest represents dockerfile check request.

type CheckDockerfileResponse

type CheckDockerfileResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Exists bool `json:"exists"`
	} `json:"data"`
}

CheckDockerfileResponse represents dockerfile check response.

type CheckDomainSSLRequest

type CheckDomainSSLRequest struct {
	Domain string `json:"domain"`
}

CheckDomainSSLRequest represents domain SSL check request.

type Client

type Client struct {

	// Base URL for API requests.
	BaseURL *url.URL

	// User agent used when communicating with the PipeOps API.
	UserAgent string

	// Services used for talking to different parts of the PipeOps API.
	Auth                *AuthService
	OAuth               *OAuthService
	Projects            *ProjectService
	Servers             *ServerService
	Environments        *EnvironmentService
	Teams               *TeamService
	Workspaces          *WorkspaceService
	Billing             *BillingService
	AddOns              *AddOnService
	Webhooks            *WebhookService
	Users               *UserService
	CloudProviders      *CloudProviderService
	Events              *EventService
	Survey              *SurveyService
	Partners            *PartnerService
	Misc                *MiscService
	DeploymentWebhooks  *DeploymentWebhookService
	Campaign            *CampaignService
	Coupons             *CouponService
	Services            *ServiceService
	PartnerAgreements   *PartnerAgreementService
	PartnerParticipants *PartnerParticipantService
	Profile             *ProfileService
	MCPRegistry         *MCPRegistryService
	OpenCost            *OpenCostService
	Notifications       *NotificationService
	Templates           *TemplateService
	Integrations        *IntegrationService
	HealthCheck         *HealthCheckService
	Backups             *BackupService
	SecurityScan        *SecurityScanService
	Logs                *LogService
	AuditLogs           *AuditLogService
	Alerts              *AlertService
	ServiceTokens       *ServiceTokenService
	ExternalRegistries  *ExternalRegistryService
	Volumes             *VolumeService
	GitOps              *GitOpsService
	ProjectGroups       *ProjectGroupService
	Sandboxes           *SandboxService
	// contains filtered or unexported fields
}

Client manages communication with the PipeOps API.

func MustNewClient added in v0.1.2

func MustNewClient(baseURL string, opts ...ClientOption) *Client

MustNewClient returns a new PipeOps API client and panics on error. This should only be used in init functions or when you are certain the URL is valid.

func NewClient

func NewClient(baseURL string, opts ...ClientOption) (*Client, error)

NewClient returns a new PipeOps API client with optional configuration. If baseURL is empty, the default API URL is used. Returns an error if the provided baseURL is invalid.

func (*Client) Do

func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*http.Response, error)

Do sends an API request and returns the API response with automatic retry logic.

func (*Client) NewRequest

func (c *Client) NewRequest(method, urlStr string, body interface{}) (*http.Request, error)

NewRequest creates an API request.

func (*Client) SetHTTPClient

func (c *Client) SetHTTPClient(client *http.Client)

SetHTTPClient sets a custom HTTP client.

func (*Client) SetToken

func (c *Client) SetToken(token string)

SetToken sets the authentication token for API requests.

type ClientOption added in v0.2.0

type ClientOption func(*Client) error

ClientOption is a function that configures a Client.

func WithHTTPClient added in v0.2.0

func WithHTTPClient(client *http.Client) ClientOption

WithHTTPClient sets a custom HTTP client.

func WithLogger added in v0.2.0

func WithLogger(logger Logger) ClientOption

WithLogger sets a custom logger for the client.

func WithMaxRetries added in v0.2.0

func WithMaxRetries(maxRetries int) ClientOption

WithMaxRetries sets the maximum number of retry attempts.

func WithRetryConfig added in v0.2.0

func WithRetryConfig(config *RetryConfig) ClientOption

WithRetryConfig sets custom retry configuration.

func WithTimeout added in v0.2.0

func WithTimeout(timeout time.Duration) ClientOption

WithTimeout sets the timeout for API requests.

func WithUserAgent added in v0.2.0

func WithUserAgent(userAgent string) ClientOption

WithUserAgent sets a custom user agent string.

type CloudInstanceType added in v0.10.0

type CloudInstanceType struct {
	Name         string  `json:"name,omitempty"`
	VCPU         int     `json:"vcpu,omitempty"`
	Memory       int64   `json:"memory,omitempty"`
	MinNode      int     `json:"minNode,omitempty"`
	MaxNode      int     `json:"maxNode,omitempty"`
	PricePerHour float64 `json:"pricePerHour,omitempty"`
	DefaultNode  int     `json:"defaultNode,omitempty"`
}

CloudInstanceType represents a cloud provider instance type.

type CloudProviderInstanceCategoriesResponse added in v0.10.0

type CloudProviderInstanceCategoriesResponse struct {
	Success bool   `json:"success,omitempty"`
	Status  string `json:"status,omitempty"`
	Message string `json:"message,omitempty"`
	Data    map[string]struct {
		InstanceCategories []string `json:"instanceCategories"`
	} `json:"data"`
}

CloudProviderInstanceCategoriesResponse represents available instance categories.

type CloudProviderInstanceTypesOptions added in v0.10.0

type CloudProviderInstanceTypesOptions struct {
	InstanceClass string `url:"instanceClass,omitempty"`
	Region        string `url:"region,omitempty"`
}

CloudProviderInstanceTypesOptions specifies query parameters for instance type listing.

type CloudProviderInstanceTypesResponse added in v0.10.0

type CloudProviderInstanceTypesResponse struct {
	Success bool                                      `json:"success,omitempty"`
	Status  string                                    `json:"status,omitempty"`
	Message string                                    `json:"message,omitempty"`
	Data    map[string]map[string][]CloudInstanceType `json:"data"`
}

CloudProviderInstanceTypesResponse represents instance types grouped by provider and category.

type CloudProviderRegionsResponse added in v0.10.0

type CloudProviderRegionsResponse struct {
	Success bool                     `json:"success,omitempty"`
	Status  string                   `json:"status,omitempty"`
	Message string                   `json:"message,omitempty"`
	Data    map[string][]CloudRegion `json:"data"`
}

CloudProviderRegionsResponse represents a cloud provider regions response.

type CloudProviderServerTemplatesResponse added in v0.10.0

type CloudProviderServerTemplatesResponse struct {
	Success bool                             `json:"success,omitempty"`
	Status  string                           `json:"status,omitempty"`
	Message string                           `json:"message,omitempty"`
	Data    map[string][]CloudServerTemplate `json:"data"`
}

CloudProviderServerTemplatesResponse represents cloud provider server templates.

type CloudProviderService

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

CloudProviderService handles communication with cloud provider related methods of the PipeOps API.

func (*CloudProviderService) AddAWSAccount

AddAWSAccount adds a new AWS account.

func (*CloudProviderService) AddAzureAccount

AddAzureAccount adds Azure cloud credentials.

func (*CloudProviderService) AddDigitalOceanAccount

AddDigitalOceanAccount adds DigitalOcean credentials.

func (*CloudProviderService) AddHuaweiAccount

AddHuaweiAccount adds Huawei cloud credentials.

func (*CloudProviderService) CalculateEBSCost

CalculateEBSCost calculates EBS costs.

func (*CloudProviderService) CalculateEC2Cost

CalculateEC2Cost calculates EC2 costs.

func (*CloudProviderService) CalculateELBCost

CalculateELBCost calculates ELB costs.

func (*CloudProviderService) DeleteAWSAccount

func (s *CloudProviderService) DeleteAWSAccount(ctx context.Context, accountUUID string) (*http.Response, error)

DeleteAWSAccount deletes an AWS account.

func (*CloudProviderService) DeleteAzureAccount

func (s *CloudProviderService) DeleteAzureAccount(ctx context.Context, accountUUID string) (*http.Response, error)

DeleteAzureAccount deletes an Azure account.

func (*CloudProviderService) DeleteDigitalOceanAccount

func (s *CloudProviderService) DeleteDigitalOceanAccount(ctx context.Context, accountUUID string) (*http.Response, error)

DeleteDigitalOceanAccount deletes a DigitalOcean account.

func (*CloudProviderService) DeleteGCPAccount

func (s *CloudProviderService) DeleteGCPAccount(ctx context.Context, accountUUID string) (*http.Response, error)

DeleteGCPAccount deletes a GCP account.

func (*CloudProviderService) DeleteHuaweiAccount

func (s *CloudProviderService) DeleteHuaweiAccount(ctx context.Context, accountUUID string) (*http.Response, error)

DeleteHuaweiAccount deletes a Huawei account.

func (*CloudProviderService) DisconnectAWSAccount

func (s *CloudProviderService) DisconnectAWSAccount(ctx context.Context, accountUUID string) (*http.Response, error)

DisconnectAWSAccount disconnects an AWS account.

func (*CloudProviderService) GetAWSReference

func (s *CloudProviderService) GetAWSReference(ctx context.Context) (*http.Response, error)

GetAWSReference retrieves AWS reference data.

func (*CloudProviderService) GetDigitalOceanToken

func (s *CloudProviderService) GetDigitalOceanToken(ctx context.Context) (*http.Response, error)

GetDigitalOceanToken exchanges authorization code for token.

func (*CloudProviderService) InitializeDigitalOceanAuthFlow

func (s *CloudProviderService) InitializeDigitalOceanAuthFlow(ctx context.Context) (*http.Response, error)

InitializeDigitalOceanAuthFlow initializes the DigitalOcean OAuth flow.

func (*CloudProviderService) ListInstanceCategories added in v0.10.0

ListInstanceCategories lists cloud provider instance categories.

func (*CloudProviderService) ListInstanceTypes added in v0.10.0

ListInstanceTypes lists cloud provider instance types.

func (*CloudProviderService) ListRegions added in v0.10.0

ListRegions lists cloud provider regions.

func (*CloudProviderService) ListServerTemplates added in v0.10.0

ListServerTemplates lists recommended server templates for a cloud provider.

func (*CloudProviderService) UploadGCPCredential

func (s *CloudProviderService) UploadGCPCredential(ctx context.Context, workspaceUUID string, req *GCPCredentialRequest) (*GCPAccountResponse, *http.Response, error)

UploadGCPCredential uploads GCP service account credentials.

type CloudRegion added in v0.10.0

type CloudRegion struct {
	Title string `json:"title,omitempty"`
	Value string `json:"value,omitempty"`
	Code  string `json:"code,omitempty"`
}

CloudRegion represents a cloud provider region option.

type CloudServerTemplate added in v0.10.0

type CloudServerTemplate struct {
	UUID             string `json:"uuid,omitempty"`
	InstanceCategory string `json:"instanceCategory,omitempty"`
	Package          string `json:"package,omitempty"`
	Environment      string `json:"environment,omitempty"`
	CloudProvider    string `json:"cloudProvider,omitempty"`
	VCPU             int    `json:"vcpu,omitempty"`
	Memory           int64  `json:"memory,omitempty"`
	Storage          int    `json:"storage,omitempty"`
	GPU              bool   `json:"gpu,omitempty"`
	MinNode          int    `json:"minNode,omitempty"`
	DefaultNode      int    `json:"defaultNode,omitempty"`
	MaxNode          int    `json:"maxNode,omitempty"`
}

CloudServerTemplate represents a recommended server template.

type ClusterConnectionResponse

type ClusterConnectionResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Connection map[string]interface{} `json:"connection"`
	} `json:"data"`
}

ClusterConnectionResponse represents cluster connection information.

type ClusterCostResponse

type ClusterCostResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Cost map[string]interface{} `json:"cost"`
	} `json:"data"`
}

ClusterCostResponse represents cluster cost response.

type ConnectProjectGroupServicesRequest added in v0.15.0

type ConnectProjectGroupServicesRequest struct {
	ConsumerType string `json:"consumer_type"` // project
	ConsumerUUID string `json:"consumer_uuid"`
	ProviderType string `json:"provider_type"` // addon_deployment
	ProviderUUID string `json:"provider_uuid"`
	Overwrite    bool   `json:"overwrite,omitempty"`
	VariableSet  string `json:"variable_set,omitempty"`
}

ConnectProjectGroupServicesRequest wires provider connection envs into a consumer.

type ConnectProjectGroupServicesResponse added in v0.15.0

type ConnectProjectGroupServicesResponse struct {
	WrittenKeys      []string                 `json:"written_keys,omitempty"`
	SkippedKeys      []string                 `json:"skipped_keys,omitempty"`
	RestartTriggered bool                     `json:"restart_triggered,omitempty"`
	Edge             ProjectGroupTopologyEdge `json:"edge,omitempty"`
	Message          string                   `json:"message,omitempty"`
}

ConnectProjectGroupServicesResponse is returned after env wiring.

type ConsentResponse

type ConsentResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
}

ConsentResponse represents the OAuth consent page response.

type ContactUsRequest

type ContactUsRequest struct {
	Name    string `json:"name"`
	Email   string `json:"email"`
	Subject string `json:"subject"`
	Message string `json:"message"`
}

ContactUsRequest represents a contact us request.

type ContactUsResponse

type ContactUsResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
}

ContactUsResponse represents a contact us response.

type CostAllocationResponse

type CostAllocationResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Costs map[string]interface{} `json:"costs"`
	} `json:"data"`
}

CostAllocationResponse represents cost allocation response.

type CostsResponse

type CostsResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Costs map[string]interface{} `json:"costs"`
	} `json:"data"`
}

CostsResponse represents project costs response.

type Coupon

type Coupon struct {
	ID        string     `json:"id,omitempty"`
	UUID      string     `json:"uuid,omitempty"`
	Code      string     `json:"code,omitempty"`
	Discount  float64    `json:"discount,omitempty"`
	Type      string     `json:"type,omitempty"`
	ExpiresAt *Timestamp `json:"expires_at,omitempty"`
	CreatedAt *Timestamp `json:"created_at,omitempty"`
}

Coupon represents a coupon.

type CouponRequest

type CouponRequest struct {
	Code      string  `json:"code"`
	Discount  float64 `json:"discount"`
	Type      string  `json:"type,omitempty"`
	ExpiresAt string  `json:"expires_at,omitempty"`
}

CouponRequest represents a coupon request.

type CouponResponse

type CouponResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Coupon Coupon `json:"coupon"`
	} `json:"data"`
}

CouponResponse represents a coupon response.

type CouponService

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

CouponService handles coupon related methods of the PipeOps API.

func (*CouponService) Create

func (s *CouponService) Create(ctx context.Context, agreementUUID string, req *CouponRequest) (*CouponResponse, *http.Response, error)

Create creates a new coupon for an agreement.

func (*CouponService) Get

func (s *CouponService) Get(ctx context.Context, couponUUID, agreementUUID string) (*CouponResponse, *http.Response, error)

Get gets a coupon by UUID and agreement.

type CreateAlertRequest

type CreateAlertRequest struct {
	Type      string `json:"type"`
	Threshold int    `json:"threshold"`
	ProjectID string `json:"project_id,omitempty"`
}

CreateAlertRequest represents create alert request.

type CreateDatabaseRequest

type CreateDatabaseRequest struct {
	Name     string `json:"name"`
	Type     string `json:"type"`
	Version  string `json:"version,omitempty"`
	ServerID string `json:"server_id"`
}

CreateDatabaseRequest represents a database creation request.

type CreateEnvironmentRequest

type CreateEnvironmentRequest struct {
	Name          string        `json:"name"`
	WorkspaceID   string        `json:"workspace_id,omitempty"`
	WorkspaceUUID string        `json:"workspace_uuid,omitempty"`
	ClusterUUID   string        `json:"cluster_uuid,omitempty"`
	EnvVariables  []EnvVariable `json:"env_variables,omitempty"`
}

CreateEnvironmentRequest represents a request to create an environment.

type CreateExternalRegistryRequest added in v0.10.0

type CreateExternalRegistryRequest struct {
	Name        string `json:"name"`
	Type        string `json:"type"`
	Username    string `json:"username"`
	Password    string `json:"password"`
	RegistryURL string `json:"registry_url,omitempty"`
	Region      string `json:"region,omitempty"`
	AccountID   string `json:"account_id,omitempty"`
}

CreateExternalRegistryRequest represents a request to create an external registry.

type CreateFreeServerRequest

type CreateFreeServerRequest struct {
	Provider string `json:"provider"`
	Region   string `json:"region"`
}

CreateFreeServerRequest represents a request to create a free server.

type CreateGitOpsConfigRequest added in v0.15.0

type CreateGitOpsConfigRequest struct {
	Name          string `json:"name"`
	ProjectID     *uint  `json:"project_id,omitempty"`
	EnvironmentID *uint  `json:"environment_id,omitempty"`
	// WorkspaceUUID scopes the config (body and/or workspace_uuid query; required by controller).
	WorkspaceUUID string `json:"workspace_uuid,omitempty"`

	RepoURL        string `json:"repo_url"`
	Branch         string `json:"branch,omitempty"`
	Path           string `json:"path,omitempty"`
	TargetRevision string `json:"target_revision,omitempty"`
	ManifestType   string `json:"manifest_type,omitempty"` // pipeops | kubernetes

	SyncPolicy *GitOpsSyncPolicyRequest `json:"sync_policy,omitempty"`

	HealthCheckEnabled  *bool `json:"health_check_enabled,omitempty"`
	HealthCheckInterval int   `json:"health_check_interval,omitempty"`
}

CreateGitOpsConfigRequest is POST /api/v1/gitops/applications.

type CreatePartnerRequest

type CreatePartnerRequest struct {
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
}

CreatePartnerRequest represents a request to create a partner.

type CreateProjectBuildSettings added in v0.12.11

type CreateProjectBuildSettings struct {
	Type           string `json:"type,omitempty"`
	BuildMethod    string `json:"buildMethod,omitempty"`
	BuildCommand   string `json:"buildCommand,omitempty"`
	RunCommand     string `json:"runCommand,omitempty"`
	Worker         *bool  `json:"worker,omitempty"`
	BuildPath      string `json:"buildPath,omitempty"`
	BuilderHost    string `json:"builderHost,omitempty"`
	BuilderID      string `json:"builderID,omitempty"`
	BuildVersion   string `json:"buildVersion,omitempty"`
	BuildDirectory string `json:"buildDirectory,omitempty"`
	SkipBuild      bool   `json:"skipBuild,omitempty"`
	SkipCommit     bool   `json:"skipCommit,omitempty"`
	UseDockerImage bool   `json:"useDockerImage,omitempty"`
	DockerImageURL string `json:"dockerImageURL,omitempty"`
	DockerPath     string `json:"dockerPath,omitempty"`
	NoCache        bool   `json:"noCache,omitempty"`
	// Dashboard-only kind flags (ignored by strict schemas, accepted by API).
	Function  bool `json:"function,omitempty"`
	Terraform bool `json:"terraform,omitempty"`
}

CreateProjectBuildSettings is the buildSettings object on POST /project/create (controller models.BuildSettingsPublish + dashboard extras).

type CreateProjectDomainRef added in v0.12.11

type CreateProjectDomainRef struct {
	Domain           string `json:"Domain,omitempty"`
	DomainName       string `json:"domain,omitempty"`
	PipeopsGenerated bool   `json:"PipeopsGenerated,omitempty"`
}

CreateProjectDomainRef is a domain nested under networkSettings.

type CreateProjectEnvVar added in v0.12.11

type CreateProjectEnvVar struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

CreateProjectEnvVar is envVariables[] on create (key/value).

type CreateProjectFunctionSpec added in v0.12.11

type CreateProjectFunctionSpec struct {
	SourceURL string `json:"source_url,omitempty"`
	Runtime   string `json:"runtime,omitempty"`
	Handler   string `json:"handler,omitempty"`
}

CreateProjectFunctionSpec is function_spec when kind=function.

type CreateProjectGitOpsSettings added in v0.12.11

type CreateProjectGitOpsSettings struct {
	ManifestPath string `json:"manifestPath,omitempty"`
	ManifestType string `json:"manifestType,omitempty"` // pipeops | kubernetes
	SyncPolicy   string `json:"syncPolicy,omitempty"`   // manual | auto | webhook
	AutoPrune    bool   `json:"autoPrune,omitempty"`
	SelfHeal     bool   `json:"selfHeal,omitempty"`
}

CreateProjectGitOpsSettings is gitopsSettings when projectType is gitops*.

type CreateProjectGroupRequest added in v0.15.0

type CreateProjectGroupRequest struct {
	Name                   string  `json:"name"`
	DefaultClusterUUID     *string `json:"default_cluster_uuid,omitempty"`
	DefaultEnvironmentUUID *string `json:"default_environment_uuid,omitempty"`
}

CreateProjectGroupRequest creates an empty group.

type CreateProjectJobDetails added in v0.12.11

type CreateProjectJobDetails struct {
	Enable         *bool  `json:"enable,omitempty"`
	Suspended      *bool  `json:"suspended,omitempty"`
	JobRunInterval string `json:"JobRunInterval,omitempty"`
	JobRunCommand  string `json:"JobRunCommand,omitempty"`
}

CreateProjectJobDetails is jobDetails on create/redeploy.

type CreateProjectMemory added in v0.12.11

type CreateProjectMemory struct {
	Value float64 `json:"Value,omitempty"`
	Unit  string  `json:"Unit,omitempty"`
}

CreateProjectMemory is memory sizing on create.

type CreateProjectNetworkSetting added in v0.12.11

type CreateProjectNetworkSetting struct {
	Port      int32                    `json:"Port"`
	Protocol  string                   `json:"Protocol,omitempty"`
	Domains   []CreateProjectDomainRef `json:"Domains,omitempty"`
	Public    *bool                    `json:"Public,omitempty"`
	Default   *bool                    `json:"Default,omitempty"`
	AutoHTTPS *bool                    `json:"AutoHTTPS,omitempty"`
	EnvPort   bool                     `json:"EnvPort,omitempty"`
}

CreateProjectNetworkSetting is one networkSettings entry (dashboard uses capital keys).

type CreateProjectRequest

type CreateProjectRequest struct {
	Name               string                        `json:"name"`
	Username           string                        `json:"username,omitempty"`
	Source             string                        `json:"source,omitempty"` // github | gitlab | bitbucket | image
	Repository         string                        `json:"repository,omitempty"`
	CommitURL          string                        `json:"commitURL,omitempty"`
	CommitSha          string                        `json:"commitSha,omitempty"`
	RepositoryLanguage string                        `json:"repositoryLanguage,omitempty"`
	RawLanguage        string                        `json:"rawLanguage,omitempty"`
	Framework          string                        `json:"framework,omitempty"`
	GitlabID           string                        `json:"gitlabID,omitempty"`
	Branch             string                        `json:"branch,omitempty"`
	EnvironmentUUID    string                        `json:"environment_uuid,omitempty"`
	Environment        string                        `json:"environment,omitempty"` // env name/slug, e.g. development
	CustomDomainName   string                        `json:"customDomainName,omitempty"`
	ClusterUUID        string                        `json:"clusterUUID"`
	ClusterVersion     string                        `json:"clusterVersion,omitempty"`
	EnvVariables       []CreateProjectEnvVar         `json:"envVariables"`
	BuildSettings      CreateProjectBuildSettings    `json:"buildSettings"`
	NetworkSettings    []CreateProjectNetworkSetting `json:"networkSettings,omitempty"`
	PostStart          string                        `json:"postStart,omitempty"`
	WorkerRunCommand   string                        `json:"workerRunCommand,omitempty"`
	JobDetails         CreateProjectJobDetails       `json:"jobDetails,omitempty"`
	WorkspaceUUID      string                        `json:"workspace_uuid"`
	Replicas           int                           `json:"replicas,omitempty"`
	VCPU               float32                       `json:"vcpu,omitempty"`
	Memory             *CreateProjectMemory          `json:"memory,omitempty"`
	Preset             string                        `json:"preset,omitempty"`
	Configuration      json.RawMessage               `json:"configuration,omitempty"`
	ZDD                bool                          `json:"zdd,omitempty"`
	HA                 bool                          `json:"ha,omitempty"`
	Kind               string                        `json:"kind,omitempty"` // application | function | database | terraform
	FunctionSpec       *CreateProjectFunctionSpec    `json:"function_spec,omitempty"`
	ProjectType        string                        `json:"projectType,omitempty"` // standard | gitops | gitops-k8s
	GitOpsSettings     *CreateProjectGitOpsSettings  `json:"gitopsSettings,omitempty"`
}

CreateProjectRequest is POST /project/create body.

Field names match control-plane types.CreateProject / dashboard publish.

Prefer-client defaults

Create() and the control plane only fill gaps. If the dashboard (or any client) already set a field, that value is kept:

  • workspace_uuid: client → else first workspace
  • environment: client → else "development"
  • source: client → else "github"
  • envVariables: client list → else []; PORT injected only if missing and network Port set
  • buildSettings.worker: client → else false
  • networkSettings.Protocol: client → else "HTTP"
  • replicas: client when >0 (server also defaults when 0)

Minimum for a standard git web app (parity with dashboard): name, username, source, repository, branch, commitURL, commitSha, repositoryLanguage, clusterUUID, environment_uuid, workspace_uuid, buildSettings.buildMethod, networkSettings (with Port), envVariables (or PORT default).

K8s env secret name is server/runner-owned: "{name}-{namespace}-secret".

type CreateSandboxRequest added in v0.18.0

type CreateSandboxRequest struct {
	Name  string `json:"name,omitempty"`
	Image string `json:"image,omitempty"`
	Role  string `json:"role,omitempty"`
}

CreateSandboxRequest creates a sandbox (empty body uses server defaults).

type CreateServerRequest

type CreateServerRequest struct {
	ServerName   string `json:"server_name,omitempty"`
	ServerRegion string `json:"server_region,omitempty"`
	ServerType   string `json:"server_type,omitempty"`
	ServerCloud  string `json:"server_cloud,omitempty"`

	Name      string `json:"-"`
	Region    string `json:"-"`
	Port      string `json:"-"`
	IPAddress string `json:"-"`
	Provider  string `json:"-"`
}

CreateServerRequest represents a request to create a server.

type CreateSurveyRequest

type CreateSurveyRequest struct {
	RoleID  string   `json:"role_id"`
	Answers []string `json:"answers"`
}

CreateSurveyRequest represents a request to create a survey.

type CreateTeamRequest

type CreateTeamRequest struct {
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
}

CreateTeamRequest represents a request to create a team.

type CreateWebhookRequest

type CreateWebhookRequest struct {
	URL         string   `json:"url"`
	Events      []string `json:"events"`
	Secret      string   `json:"secret,omitempty"`
	Description string   `json:"description,omitempty"`
}

CreateWebhookRequest represents a request to create a webhook.

type CreateWorkspaceRequest

type CreateWorkspaceRequest struct {
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	TeamID      string `json:"team_id,omitempty"`
}

CreateWorkspaceRequest represents a request to create a workspace.

type CreditRequest

type CreditRequest struct {
	Amount float64 `json:"amount"`
}

CreditRequest represents a credit add request.

type DashboardDataResponse

type DashboardDataResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Dashboard map[string]interface{} `json:"dashboard"`
	} `json:"data"`
}

DashboardDataResponse represents dashboard data response.

type DeployAddOnRequest

type DeployAddOnRequest struct {
	// ID is the marketplace addon UID (also accepted as Deployment.ID).
	ID string `json:"id,omitempty"`
	// Server is the cluster UUID.
	Server string `json:"Server,omitempty"`
	// Workspace is the workspace UUID.
	Workspace string `json:"Workspace,omitempty"`
	// Environment is the environment UUID. When empty, control plane picks the
	// first environment on the target cluster (prefer-client).
	Environment string `json:"Environment,omitempty"`
	// ProjectID is optional placement hint (reserved / future).
	ProjectID string `json:"project_id,omitempty"`
	// Tag is the image/version tag override.
	Tag string `json:"Tag,omitempty"`
	// Config is optional partial deployment config. Gaps are filled from catalog.
	Config map[string]interface{} `json:"config,omitempty"`
}

DeployAddOnRequest represents a request to deploy an add-on. Prefer-client on the control plane fills Config from the marketplace catalog when omitted; thin clients only need addon ID + workspace + server.

type DeployFromImageMemory added in v0.10.0

type DeployFromImageMemory struct {
	Value int    `json:"value"`
	Unit  string `json:"unit"`
}

DeployFromImageMemory represents memory allocation for BYOI deployment.

type DeployFromImageRequest added in v0.10.0

type DeployFromImageRequest struct {
	Name               string                `json:"name"`
	ContainerImage     string                `json:"container_image"`
	ImageTag           string                `json:"image_tag,omitempty"`
	ExternalRegistryID int                   `json:"external_registry_id,omitempty"`
	Port               int                   `json:"port"`
	EnvVariables       []EnvVariable         `json:"env_variables,omitempty"`
	Replicas           int                   `json:"replicas,omitempty"`
	VCPU               float64               `json:"vcpu"`
	Memory             DeployFromImageMemory `json:"memory"`
	ClusterUUID        string                `json:"cluster_uuid"`
	EnvironmentUUID    string                `json:"environment_uuid"`
	WorkspaceUUID      string                `json:"workspace_uuid"`
	Preset             string                `json:"preset,omitempty"`
}

DeployFromImageRequest represents a BYOI deployment request.

type DeployFromImageResponse added in v0.10.0

type DeployFromImageResponse struct {
	Success bool   `json:"success,omitempty"`
	Status  string `json:"status,omitempty"`
	Message string `json:"message,omitempty"`
	Data    struct {
		BuildSHA       string `json:"build_sha"`
		ContainerImage string `json:"container_image"`
		Domain         string `json:"domain"`
		ImageTag       string `json:"image_tag"`
		ProjectName    string `json:"project_name"`
		ProjectUUID    string `json:"project_uuid"`
		Status         string `json:"status"`
	} `json:"data"`
}

DeployFromImageResponse represents a BYOI deployment response.

type DeploySettingsRequest added in v0.15.3

type DeploySettingsRequest struct {
	AutoDeployEnabled *bool  `json:"autoDeployEnabled,omitempty"`
	Branch            string `json:"branch,omitempty"`
	AutoRollback      *bool  `json:"autoRollback,omitempty"`
	UserName          string `json:"username,omitempty"`
	Repository        string `json:"repository,omitempty"`
	// WorkspaceUUID scopes the request when multi-workspace tokens are used.
	WorkspaceUUID string `json:"-"`
}

DeploySettingsRequest is a thin prefer-client body for POST /project/settings/deploy/:uuid. Omitted strings and nil bool pointers are filled from the stored project on the control plane; non-empty client values win.

type DeploySettingsResponse added in v0.15.3

type DeploySettingsResponse struct {
	Success bool   `json:"success"`
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		AutoDeployEnabled *bool  `json:"autoDeployEnabled"`
		Branch            string `json:"branch"`
	} `json:"data"`
}

DeploySettingsResponse is the control-plane response for deploy settings update.

type DeploymentConfigsResponse

type DeploymentConfigsResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Configs map[string]interface{} `json:"configs"`
	} `json:"data"`
}

DeploymentConfigsResponse represents deployment configs response.

type DeploymentOverviewResponse

type DeploymentOverviewResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Overview map[string]interface{} `json:"overview"`
	} `json:"data"`
}

DeploymentOverviewResponse represents deployment overview response.

type DeploymentQuotaTopupRequest

type DeploymentQuotaTopupRequest struct {
	Amount int `json:"amount"`
}

DeploymentQuotaTopupRequest represents a deployment quota topup request.

type DeploymentSessionResponse

type DeploymentSessionResponse struct {
	Success bool   `json:"success,omitempty"`
	Status  string `json:"status,omitempty"`
	Message string `json:"message,omitempty"`
	// Deployments is the session's add-on deployments (API data array).
	Deployments []map[string]interface{} `json:"-"`
	// Session is populated when the API returns a single object (legacy/alternate shape).
	Session map[string]interface{} `json:"-"`
	// RawData preserves the original data field for callers that need it.
	RawData json.RawMessage `json:"-"`
}

DeploymentSessionResponse represents GET /addons/deployments/sessions/:sessionID. The control plane returns data as an array of AddonDeployment rows (session members), not a nested {session: ...} object.

func (*DeploymentSessionResponse) UnmarshalJSON added in v0.18.3

func (r *DeploymentSessionResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON accepts data as either a deployment array or an object.

type DeploymentWebhookService

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

DeploymentWebhookService handles deployment webhook related methods of the PipeOps API.

func (*DeploymentWebhookService) BitbucketWebhook

func (s *DeploymentWebhookService) BitbucketWebhook(ctx context.Context, payload *WebhookPayload) (*WebhookResponse, *http.Response, error)

BitbucketWebhook handles Bitbucket deployment webhook.

func (*DeploymentWebhookService) GitHubWebhook

GitHubWebhook handles GitHub deployment webhook.

func (*DeploymentWebhookService) GitLabWebhook

GitLabWebhook handles GitLab deployment webhook.

type DigitalOceanAccountRequest

type DigitalOceanAccountRequest struct {
	Token string `json:"token"`
}

DigitalOceanAccountRequest represents a request to add DigitalOcean credentials.

type DigitalOceanAccountResponse

type DigitalOceanAccountResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Account map[string]interface{} `json:"account"`
	} `json:"data"`
}

DigitalOceanAccountResponse represents DigitalOcean account response.

type DockerHubListOptions added in v0.10.0

type DockerHubListOptions struct {
	Page     int `url:"page,omitempty"`
	PageSize int `url:"page_size,omitempty"`
}

DockerHubListOptions specifies optional parameters for Docker Hub list/search operations.

type DockerHubRepositoriesResponse added in v0.10.0

type DockerHubRepositoriesResponse struct {
	Success bool   `json:"success,omitempty"`
	Status  string `json:"status,omitempty"`
	Message string `json:"message,omitempty"`
	Data    struct {
		Repositories []DockerHubRepository `json:"repositories,omitempty"`
		Results      []DockerHubRepository `json:"results,omitempty"`
		Total        int                   `json:"total,omitempty"`
		Page         int                   `json:"page,omitempty"`
		PageSize     int                   `json:"page_size,omitempty"`
		HasMore      bool                  `json:"has_more,omitempty"`
	} `json:"data"`
}

DockerHubRepositoriesResponse represents a repositories response.

type DockerHubRepository added in v0.10.0

type DockerHubRepository struct {
	Name             string `json:"name,omitempty"`
	Namespace        string `json:"namespace,omitempty"`
	FullName         string `json:"full_name,omitempty"`
	Description      string `json:"description,omitempty"`
	ShortDescription string `json:"short_description,omitempty"`
	IsPrivate        bool   `json:"is_private,omitempty"`
	StarCount        int    `json:"star_count,omitempty"`
	PullCount        int    `json:"pull_count,omitempty"`
	LastUpdated      string `json:"last_updated,omitempty"`
}

DockerHubRepository represents a repository returned by registry APIs.

type DockerHubSearchOptions added in v0.10.0

type DockerHubSearchOptions struct {
	Query    string `url:"q,omitempty"`
	Page     int    `url:"page,omitempty"`
	PageSize int    `url:"page_size,omitempty"`
}

DockerHubSearchOptions specifies optional parameters for public image search.

type DockerHubTag added in v0.10.0

type DockerHubTag struct {
	Name        string `json:"name,omitempty"`
	FullSize    int64  `json:"full_size,omitempty"`
	LastUpdated string `json:"last_updated,omitempty"`
	Digest      string `json:"digest,omitempty"`
}

DockerHubTag represents a Docker image tag.

type DockerHubTagsResponse added in v0.10.0

type DockerHubTagsResponse struct {
	Success bool   `json:"success,omitempty"`
	Status  string `json:"status,omitempty"`
	Message string `json:"message,omitempty"`
	Data    struct {
		Tags     []DockerHubTag `json:"tags"`
		Total    int            `json:"total,omitempty"`
		Page     int            `json:"page,omitempty"`
		PageSize int            `json:"page_size,omitempty"`
		HasMore  bool           `json:"has_more,omitempty"`
	} `json:"data"`
}

DockerHubTagsResponse represents an image tags response.

type DomainRequest

type DomainRequest struct {
	Domain string `json:"domain"`
}

DomainRequest represents a request to add/update a project domain.

type DomainResponse

type DomainResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Domain string `json:"domain"`
	} `json:"data"`
}

DomainResponse represents domain response.

type EBSCalculatorRequest

type EBSCalculatorRequest struct {
	VolumeType string `json:"volume_type"`
	SizeGB     int    `json:"size_gb"`
	Region     string `json:"region"`
}

EBSCalculatorRequest represents EBS cost calculator request.

type EC2CalculatorRequest

type EC2CalculatorRequest struct {
	InstanceType string `json:"instance_type"`
	Region       string `json:"region"`
	Hours        int    `json:"hours,omitempty"`
}

EC2CalculatorRequest represents an EC2 cost calculator request.

type ELBCalculatorRequest

type ELBCalculatorRequest struct {
	LoadBalancerType string `json:"load_balancer_type"`
	Region           string `json:"region"`
	Hours            int    `json:"hours,omitempty"`
}

ELBCalculatorRequest represents ELB cost calculator request.

type EnvVariable

type EnvVariable struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

EnvVariable represents an environment variable.

type EnvVariablesData added in v0.15.1

type EnvVariablesData struct {
	EnvVariables []EnvVariable
}

EnvVariablesData unmarshals either a bare env array or {envVariables|env_variables: [...]}.

func (*EnvVariablesData) UnmarshalJSON added in v0.15.1

func (d *EnvVariablesData) UnmarshalJSON(b []byte) error

UnmarshalJSON accepts data as [] or {envVariables|env_variables:[]}.

type EnvVariablesRequest

type EnvVariablesRequest struct {
	EnvVariables []EnvVariable `json:"envVariables"`
	// Merge when true, POST with ?merge=true: client keys win, others kept.
	Merge bool `json:"-"`
	// WorkspaceUUID scopes the request when multi-workspace tokens are used.
	WorkspaceUUID string `json:"-"`
}

EnvVariablesRequest represents a request to update environment variables. Body uses control-plane camelCase envVariables (dashboard contract). Set Merge=true to overlay keys onto existing envs (?merge=true) so thin clients can patch without wiping the full set.

type EnvVariablesResponse

type EnvVariablesResponse struct {
	Success bool   `json:"success"`
	Status  string `json:"status"`
	Message string `json:"message"`
	// Data is flexible: control plane returns []EnvVariable at "data".
	Data EnvVariablesData `json:"data"`
}

EnvVariablesResponse represents environment variables response. Data may be a bare array (GET/POST success from control plane) or wrapped.

type Environment

type Environment struct {
	ID          string     `json:"id,omitempty"`
	UUID        string     `json:"uuid,omitempty"`
	Name        string     `json:"name,omitempty"`
	WorkspaceID string     `json:"workspace_id,omitempty"`
	CreatedAt   *Timestamp `json:"created_at,omitempty"`
	UpdatedAt   *Timestamp `json:"updated_at,omitempty"`
}

Environment represents a PipeOps environment.

type EnvironmentResponse

type EnvironmentResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Environment Environment `json:"environment"`
	} `json:"data"`
}

EnvironmentResponse represents a single environment response.

type EnvironmentService

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

EnvironmentService handles communication with the environment related methods of the PipeOps API.

func (*EnvironmentService) CloneEnvironment

func (s *EnvironmentService) CloneEnvironment(ctx context.Context, envUUID string) (*EnvironmentResponse, *http.Response, error)

CloneEnvironment clones an environment with its settings.

func (*EnvironmentService) Create

Create creates a new environment.

func (*EnvironmentService) Delete

func (s *EnvironmentService) Delete(ctx context.Context, envUUID string) (*http.Response, error)

Delete deletes an environment.

func (*EnvironmentService) ExportEnvironment

func (s *EnvironmentService) ExportEnvironment(ctx context.Context, envUUID string) (*http.Response, error)

ExportEnvironment exports environment configuration.

func (*EnvironmentService) Get

Get fetches an environment by UUID.

func (*EnvironmentService) List

List lists all environments.

func (*EnvironmentService) SetEnvVariables

func (s *EnvironmentService) SetEnvVariables(ctx context.Context, envUUID string, req *SetEnvironmentVariablesRequest) (*http.Response, error)

SetEnvVariables sets environment variables for an environment.

func (*EnvironmentService) Update

Update updates an environment. Note: controller route PUT /environment/:uuid/update is currently disabled ("a user can only add env to an environment; it cannot be edited"). Callers should treat this as unsupported until the control plane re-enables it.

type EnvironmentsResponse

type EnvironmentsResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Environments []Environment `json:"environments"`
	} `json:"data"`
}

EnvironmentsResponse represents a list of environments response.

type ErrorResponse

type ErrorResponse struct {
	Response *http.Response
	Message  string `json:"message"`
	Status   string `json:"status"`
}

ErrorResponse represents an error response from the PipeOps API.

func (*ErrorResponse) Error

func (r *ErrorResponse) Error() string

type Event

type Event struct {
	ID          string     `json:"id,omitempty"`
	UUID        string     `json:"uuid,omitempty"`
	Type        string     `json:"type,omitempty"`
	Description string     `json:"description,omitempty"`
	Enabled     bool       `json:"enabled,omitempty"`
	CreatedAt   *Timestamp `json:"created_at,omitempty"`
}

Event represents a system event.

type EventResponse

type EventResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Event Event `json:"event"`
	} `json:"data"`
}

EventResponse represents a single event response.

type EventService

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

EventService handles communication with the events related methods of the PipeOps API.

func (*EventService) GetResourceEvents

func (s *EventService) GetResourceEvents(ctx context.Context) (*EventsResponse, *http.Response, error)

GetResourceEvents gets resource usage events.

func (*EventService) ListEvents

func (s *EventService) ListEvents(ctx context.Context) (*EventsResponse, *http.Response, error)

ListEvents lists all events.

func (*EventService) ToggleEvent

func (s *EventService) ToggleEvent(ctx context.Context, eventUUID string, req *ToggleEventRequest) (*EventResponse, *http.Response, error)

ToggleEvent toggles an event on/off.

func (*EventService) UpdateResourceEvent

func (s *EventService) UpdateResourceEvent(ctx context.Context, eventUUID string, req *UpdateResourceEventRequest) (*EventResponse, *http.Response, error)

UpdateResourceEvent updates resource usage event settings.

type EventsResponse

type EventsResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Events []Event `json:"events"`
	} `json:"data"`
}

EventsResponse represents a list of events response.

type ExecSandboxRequest added in v0.18.1

type ExecSandboxRequest struct {
	Command        string   `json:"command,omitempty"`
	Cmd            []string `json:"cmd,omitempty"`
	WorkDir        string   `json:"workdir,omitempty"`
	Env            []string `json:"env,omitempty"`
	User           string   `json:"user,omitempty"`
	TimeoutSeconds int      `json:"timeout_seconds,omitempty"` // default 60, max 300
}

ExecSandboxRequest is POST /api/v1/sandboxes/:id/exec. Prefer Command for shell strings; Cmd is argv when you need no shell.

type ExecSandboxResponse added in v0.18.1

type ExecSandboxResponse struct {
	Success bool              `json:"success,omitempty"`
	Message string            `json:"message,omitempty"`
	Data    ExecSandboxResult `json:"data"`
}

ExecSandboxResponse is the BFF envelope for POST .../exec.

type ExecSandboxResult added in v0.18.1

type ExecSandboxResult struct {
	SandboxID string   `json:"sandbox_id,omitempty"`
	Stdout    string   `json:"stdout,omitempty"`
	Stderr    string   `json:"stderr,omitempty"`
	Output    string   `json:"output,omitempty"`
	ExitCode  int      `json:"exit_code"`
	Command   string   `json:"command,omitempty"`
	Cmd       []string `json:"cmd,omitempty"`
	Truncated bool     `json:"truncated,omitempty"`
}

ExecSandboxResult is the captured output from a non-interactive sandbox exec.

type ExportInvoicesRequest

type ExportInvoicesRequest struct {
	Format    string `json:"format"` // "csv" or "pdf"
	StartDate string `json:"start_date,omitempty"`
	EndDate   string `json:"end_date,omitempty"`
}

ExportInvoices exports invoices to CSV/PDF.

type ExternalRegistry added in v0.10.0

type ExternalRegistry struct {
	ID          int        `json:"id,omitempty"`
	UID         string     `json:"uid,omitempty"`
	Name        string     `json:"name,omitempty"`
	Type        string     `json:"type,omitempty"`
	RegistryURL string     `json:"registry_url,omitempty"`
	Username    string     `json:"username,omitempty"`
	Region      string     `json:"region,omitempty"`
	AccountID   string     `json:"account_id,omitempty"`
	IsActive    bool       `json:"is_active,omitempty"`
	CreatedAt   *Timestamp `json:"created_at,omitempty"`
	UpdatedAt   *Timestamp `json:"updated_at,omitempty"`
}

ExternalRegistry represents an external container registry configuration.

type ExternalRegistryListOptions added in v0.10.0

type ExternalRegistryListOptions struct {
	Page     int `url:"page,omitempty"`
	PageSize int `url:"page_size,omitempty"`
}

ExternalRegistryListOptions specifies optional parameters for listing registries.

type ExternalRegistryListResponse added in v0.10.0

type ExternalRegistryListResponse struct {
	Success bool   `json:"success,omitempty"`
	Status  string `json:"status,omitempty"`
	Message string `json:"message,omitempty"`
	Data    struct {
		Registries []ExternalRegistry `json:"registries"`
		Total      int                `json:"total,omitempty"`
		Page       int                `json:"page,omitempty"`
		PageSize   int                `json:"page_size,omitempty"`
	} `json:"data"`
}

ExternalRegistryListResponse represents a list of external registries response.

type ExternalRegistryResponse added in v0.10.0

type ExternalRegistryResponse struct {
	Success bool             `json:"success,omitempty"`
	Status  string           `json:"status,omitempty"`
	Message string           `json:"message,omitempty"`
	Data    ExternalRegistry `json:"data"`
}

ExternalRegistryResponse represents a single external registry response.

type ExternalRegistryService added in v0.10.0

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

ExternalRegistryService handles communication with BYOI/external registry endpoints.

func (*ExternalRegistryService) Create added in v0.10.0

Create creates a new external registry in a workspace.

func (*ExternalRegistryService) Delete added in v0.10.0

func (s *ExternalRegistryService) Delete(ctx context.Context, registryUID string) (*http.Response, error)

Delete deletes an external registry by UID.

func (*ExternalRegistryService) Get added in v0.10.0

Get gets an external registry by UID.

func (*ExternalRegistryService) List added in v0.10.0

List lists external registries for a workspace.

func (*ExternalRegistryService) ListDockerHubImages added in v0.10.0

ListDockerHubImages lists repositories for an authenticated Docker Hub registry.

func (*ExternalRegistryService) ListDockerHubTags added in v0.10.0

func (s *ExternalRegistryService) ListDockerHubTags(ctx context.Context, registryUID, namespace, repository string, opts *DockerHubListOptions) (*DockerHubTagsResponse, *http.Response, error)

ListDockerHubTags lists tags for a repository in an authenticated Docker Hub registry.

func (*ExternalRegistryService) ListPublicDockerHubTags added in v0.10.0

func (s *ExternalRegistryService) ListPublicDockerHubTags(ctx context.Context, namespace, repository string, opts *DockerHubListOptions) (*DockerHubTagsResponse, *http.Response, error)

ListPublicDockerHubTags lists tags for a public Docker Hub image.

func (*ExternalRegistryService) SearchPublicDockerHubImages added in v0.10.0

SearchPublicDockerHubImages searches public Docker Hub images without a registry configuration.

type FlexibleCSVString added in v0.12.12

type FlexibleCSVString string

FlexibleCSVString unmarshals a JSON string or array of strings. Arrays are joined with commas (controller project/fetch splits CustomDomainName).

func (FlexibleCSVString) All added in v0.12.12

func (f FlexibleCSVString) All() []string

All returns individual domain entries.

func (FlexibleCSVString) First added in v0.12.12

func (f FlexibleCSVString) First() string

First returns the first domain entry (preferred for public URL display).

func (FlexibleCSVString) MarshalJSON added in v0.12.12

func (f FlexibleCSVString) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler (always a string).

func (FlexibleCSVString) String added in v0.12.12

func (f FlexibleCSVString) String() string

String returns the joined domain string.

func (*FlexibleCSVString) UnmarshalJSON added in v0.12.12

func (f *FlexibleCSVString) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler.

type GCPAccountResponse

type GCPAccountResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Account map[string]interface{} `json:"account"`
	} `json:"data"`
}

GCPAccountResponse represents GCP account response.

type GCPCredentialRequest

type GCPCredentialRequest struct {
	CredentialsJSON string `json:"credentials_json"`
}

GCPCredentialRequest represents a request to upload GCP credentials.

type GetDeploymentSessionOptions added in v0.18.1

type GetDeploymentSessionOptions struct {
	WorkspaceUUID string `url:"workspace,omitempty"`
}

GetDeploymentSessionOptions scopes session fetch to a workspace (middleware requires query).

type GitHubBranchesRequest

type GitHubBranchesRequest struct {
	Repository   string `json:"repository,omitempty"`
	RepoFullname string `json:"repo_fullname,omitempty"`
	Visibility   string `json:"visibility,omitempty"`
}

GitHubBranchesRequest represents a request to fetch GitHub branches.

type GitHubBranchesResponse

type GitHubBranchesResponse struct {
	Status  string `json:"status"`
	Success bool   `json:"success,omitempty"`
	Message string `json:"message"`
	Data    struct {
		Branches []string `json:"branches"`
	} `json:"data"`
}

GitHubBranchesResponse represents GitHub branches response.

type GitHubOrgsResponse

type GitHubOrgsResponse struct {
	Status  string `json:"status"`
	Success bool   `json:"success,omitempty"`
	Message string `json:"message"`
	Data    struct {
		Organizations []map[string]interface{} `json:"organizations"`
	} `json:"data"`
}

GitHubOrgsResponse represents GitHub organizations response.

type GitLabOrgReposRequest

type GitLabOrgReposRequest struct {
	OrgID   string `json:"org_id,omitempty"`
	OrgName string `json:"org_name,omitempty"`
}

GitLabOrgReposRequest represents GitLab org repos request.

type GitLabReposResponse

type GitLabReposResponse struct {
	Status  string `json:"status"`
	Success bool   `json:"success,omitempty"`
	Message string `json:"message"`
	Data    struct {
		Repos []map[string]interface{} `json:"repos"`
	} `json:"data"`
}

GitLabReposResponse represents GitLab repos response.

type GitOpsAutomatedSync added in v0.15.0

type GitOpsAutomatedSync struct {
	Prune      bool `json:"prune"`
	SelfHeal   bool `json:"self_heal"`
	AllowEmpty bool `json:"allow_empty"`
}

GitOpsAutomatedSync is stored automated sync settings.

type GitOpsAutomatedSyncRequest added in v0.15.0

type GitOpsAutomatedSyncRequest struct {
	Prune      bool `json:"prune"`
	SelfHeal   bool `json:"self_heal"`
	AllowEmpty bool `json:"allow_empty"`
}

GitOpsAutomatedSyncRequest configures auto-sync.

type GitOpsConfig added in v0.15.0

type GitOpsConfig struct {
	UUID                string           `json:"uuid,omitempty"`
	Name                string           `json:"name,omitempty"`
	ProjectID           *uint            `json:"project_id,omitempty"`
	ProjectName         string           `json:"project_name,omitempty"`
	EnvironmentID       *uint            `json:"environment_id,omitempty"`
	EnvironmentName     string           `json:"environment_name,omitempty"`
	RepoURL             string           `json:"repo_url,omitempty"`
	Branch              string           `json:"branch,omitempty"`
	Path                string           `json:"path,omitempty"`
	TargetRevision      string           `json:"target_revision,omitempty"`
	SyncPolicy          GitOpsSyncPolicy `json:"sync_policy,omitempty"`
	HealthCheckEnabled  bool             `json:"health_check_enabled,omitempty"`
	HealthCheckInterval int              `json:"health_check_interval,omitempty"`
	LastSyncedCommit    string           `json:"last_synced_commit,omitempty"`
	LastSyncedAt        string           `json:"last_synced_at,omitempty"`
	SyncStatus          string           `json:"sync_status,omitempty"`
	SyncMessage         string           `json:"sync_message,omitempty"`
	HealthStatus        string           `json:"health_status,omitempty"`
	HealthMessage       string           `json:"health_message,omitempty"`
	CreatedAt           string           `json:"created_at,omitempty"`
	UpdatedAt           string           `json:"updated_at,omitempty"`
}

GitOpsConfig is a GitOps application configuration.

type GitOpsConfigResponse added in v0.15.0

type GitOpsConfigResponse struct {
	Success bool         `json:"success,omitempty"`
	Message string       `json:"message,omitempty"`
	Data    GitOpsConfig `json:"data"`
}

GitOpsConfigResponse is a single config envelope.

type GitOpsDiffResponse added in v0.15.0

type GitOpsDiffResponse struct {
	Success bool   `json:"success,omitempty"`
	Message string `json:"message,omitempty"`
	Data    struct {
		CurrentCommit string              `json:"current_commit,omitempty"`
		TargetCommit  string              `json:"target_commit,omitempty"`
		Diff          *GitOpsDiffSnapshot `json:"diff,omitempty"`
		SyncRequired  bool                `json:"sync_required,omitempty"`
	} `json:"data"`
}

GitOpsDiffResponse is GET .../diff.

type GitOpsDiffSnapshot added in v0.15.0

type GitOpsDiffSnapshot struct {
	Added    []GitOpsResourceChange `json:"added,omitempty"`
	Modified []GitOpsResourceChange `json:"modified,omitempty"`
	Removed  []GitOpsResourceChange `json:"removed,omitempty"`
}

GitOpsDiffSnapshot captures added/modified/removed resources.

type GitOpsListOptions added in v0.15.0

type GitOpsListOptions struct {
	Page          int    `url:"page,omitempty"`
	Limit         int    `url:"limit,omitempty"`
	WorkspaceUUID string `url:"workspace_uuid,omitempty"`
}

GitOpsListOptions filters list/history pagination.

type GitOpsListResponse added in v0.15.0

type GitOpsListResponse struct {
	Success bool   `json:"success,omitempty"`
	Message string `json:"message,omitempty"`
	Data    struct {
		Items      []GitOpsConfig `json:"items"`
		Total      int64          `json:"total"`
		Page       int            `json:"page"`
		Limit      int            `json:"limit"`
		TotalPages int            `json:"total_pages"`
	} `json:"data"`
}

GitOpsListResponse is GET /api/v1/gitops/applications.

type GitOpsResourceChange added in v0.15.0

type GitOpsResourceChange struct {
	Kind     string      `json:"kind,omitempty"`
	Name     string      `json:"name,omitempty"`
	Field    string      `json:"field,omitempty"`
	OldValue interface{} `json:"old_value,omitempty"`
	NewValue interface{} `json:"new_value,omitempty"`
}

GitOpsResourceChange is a single resource change in a diff.

type GitOpsRetryStrategy added in v0.15.0

type GitOpsRetryStrategy struct {
	Limit              int `json:"limit"`
	BackoffDuration    int `json:"backoff_duration"`
	BackoffFactor      int `json:"backoff_factor"`
	BackoffMaxDuration int `json:"backoff_max_duration"`
}

GitOpsRetryStrategy is stored retry settings.

type GitOpsRetryStrategyRequest added in v0.15.0

type GitOpsRetryStrategyRequest struct {
	Limit              int `json:"limit"`
	BackoffDuration    int `json:"backoff_duration"`
	BackoffFactor      int `json:"backoff_factor"`
	BackoffMaxDuration int `json:"backoff_max_duration"`
}

GitOpsRetryStrategyRequest configures retry backoff for failed syncs.

type GitOpsService added in v0.15.0

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

GitOpsService handles GitOps application configuration APIs.

Controller routes (JWT session):

POST   /api/v1/gitops/applications
GET    /api/v1/gitops/applications
GET    /api/v1/gitops/applications/:uuid
PUT    /api/v1/gitops/applications/:uuid
DELETE /api/v1/gitops/applications/:uuid
POST   /api/v1/gitops/applications/:uuid/sync
GET    /api/v1/gitops/applications/:uuid/sync-status
GET    /api/v1/gitops/applications/:uuid/diff
GET    /api/v1/gitops/applications/:uuid/history

func (*GitOpsService) Create added in v0.15.0

Create creates a new GitOps application configuration. POST /api/v1/gitops/applications?workspace_uuid=

func (*GitOpsService) Delete added in v0.15.0

func (s *GitOpsService) Delete(ctx context.Context, uuid string, opts *GitOpsWorkspaceOptions) (*http.Response, error)

Delete removes a GitOps application configuration. DELETE /api/v1/gitops/applications/:uuid?workspace_uuid=

func (*GitOpsService) Get added in v0.15.0

Get returns one GitOps application by UUID. GET /api/v1/gitops/applications/:uuid?workspace_uuid= opts may be nil but production controllers require workspace_uuid.

func (*GitOpsService) GetDiff added in v0.15.0

GetDiff returns the git vs live state diff for an application. GET /api/v1/gitops/applications/:uuid/diff?workspace_uuid=

func (*GitOpsService) GetHistory added in v0.15.0

GetHistory returns paginated sync history for an application. GET /api/v1/gitops/applications/:uuid/history?page=&limit=&workspace_uuid=

func (*GitOpsService) GetSyncStatus added in v0.15.0

GetSyncStatus returns the current sync/health status. GET /api/v1/gitops/applications/:uuid/sync-status?workspace_uuid=

func (*GitOpsService) List added in v0.15.0

List returns paginated GitOps applications for the session workspace. GET /api/v1/gitops/applications?page=&limit=

func (*GitOpsService) TriggerSync added in v0.15.0

TriggerSync starts a manual sync for a GitOps application. POST /api/v1/gitops/applications/:uuid/sync?workspace_uuid=

func (*GitOpsService) Update added in v0.15.0

Update updates a GitOps application configuration. PUT /api/v1/gitops/applications/:uuid?workspace_uuid=

type GitOpsSyncHistoryEntry added in v0.15.0

type GitOpsSyncHistoryEntry struct {
	ID            uint                `json:"id,omitempty"`
	CommitSHA     string              `json:"commit_sha,omitempty"`
	CommitMessage string              `json:"commit_message,omitempty"`
	CommitAuthor  string              `json:"commit_author,omitempty"`
	SyncStatus    string              `json:"sync_status,omitempty"`
	SyncMessage   string              `json:"sync_message,omitempty"`
	StartedAt     string              `json:"started_at,omitempty"`
	FinishedAt    string              `json:"finished_at,omitempty"`
	DurationMs    int                 `json:"duration_ms,omitempty"`
	TriggeredBy   string              `json:"triggered_by,omitempty"`
	DiffSnapshot  *GitOpsDiffSnapshot `json:"diff_snapshot,omitempty"`
	CreatedAt     string              `json:"created_at,omitempty"`
}

GitOpsSyncHistoryEntry is one sync history row.

type GitOpsSyncHistoryResponse added in v0.15.0

type GitOpsSyncHistoryResponse struct {
	Success bool   `json:"success,omitempty"`
	Message string `json:"message,omitempty"`
	Data    struct {
		Items      []GitOpsSyncHistoryEntry `json:"items"`
		Total      int64                    `json:"total"`
		Page       int                      `json:"page"`
		Limit      int                      `json:"limit"`
		TotalPages int                      `json:"total_pages"`
	} `json:"data"`
}

GitOpsSyncHistoryResponse is GET .../history.

type GitOpsSyncPolicy added in v0.15.0

type GitOpsSyncPolicy struct {
	Automated   *GitOpsAutomatedSync `json:"automated,omitempty"`
	SyncOptions []string             `json:"sync_options,omitempty"`
	Retry       *GitOpsRetryStrategy `json:"retry,omitempty"`
}

GitOpsSyncPolicy is the policy stored on a config.

type GitOpsSyncPolicyRequest added in v0.15.0

type GitOpsSyncPolicyRequest struct {
	Automated   *GitOpsAutomatedSyncRequest `json:"automated,omitempty"`
	SyncOptions []string                    `json:"sync_options,omitempty"`
	Retry       *GitOpsRetryStrategyRequest `json:"retry,omitempty"`
}

GitOpsSyncPolicyRequest is the sync policy payload on create/update.

type GitOpsSyncStatusResponse added in v0.15.0

type GitOpsSyncStatusResponse struct {
	Success bool   `json:"success,omitempty"`
	Message string `json:"message,omitempty"`
	Data    struct {
		SyncStatus       string  `json:"sync_status,omitempty"`
		SyncMessage      string  `json:"sync_message,omitempty"`
		LastSyncedCommit string  `json:"last_synced_commit,omitempty"`
		LastSyncedAt     *string `json:"last_synced_at,omitempty"`
		HealthStatus     string  `json:"health_status,omitempty"`
		HealthMessage    string  `json:"health_message,omitempty"`
	} `json:"data"`
}

GitOpsSyncStatusResponse is GET .../sync-status.

type GitOpsSyncTriggerResponse added in v0.15.0

type GitOpsSyncTriggerResponse struct {
	Success bool   `json:"success,omitempty"`
	Message string `json:"message,omitempty"`
	Data    struct {
		Status   string `json:"status,omitempty"`
		Revision string `json:"revision,omitempty"`
		DryRun   bool   `json:"dry_run,omitempty"`
	} `json:"data"`
}

GitOpsSyncTriggerResponse is POST .../sync.

type GitOpsWorkspaceOptions added in v0.18.3

type GitOpsWorkspaceOptions struct {
	WorkspaceUUID string `url:"workspace_uuid,omitempty"`
}

GitOpsWorkspaceOptions scopes by-UUID GitOps routes. The controller requires workspace_uuid on Get/Update/Delete/Sync/Diff/History when WorkspaceContext is not set by middleware.

type HealthCheckResponse

type HealthCheckResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Health map[string]interface{} `json:"health"`
	} `json:"data"`
}

HealthCheckResponse represents health check response.

type HealthCheckService

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

HealthCheckService handles health check related methods.

func (*HealthCheckService) CheckAPIHealth

CheckAPIHealth checks API health.

func (*HealthCheckService) CheckDatabaseHealth

func (s *HealthCheckService) CheckDatabaseHealth(ctx context.Context) (*HealthCheckResponse, *http.Response, error)

CheckDatabaseHealth checks database health.

type HuaweiAccountRequest

type HuaweiAccountRequest struct {
	AccessKey string `json:"access_key"`
	SecretKey string `json:"secret_key"`
	Region    string `json:"region"`
}

HuaweiAccountRequest represents a request to add Huawei credentials.

type HuaweiAccountResponse

type HuaweiAccountResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Account map[string]interface{} `json:"account"`
	} `json:"data"`
}

HuaweiAccountResponse represents Huawei account response.

type InjectProjectGroupSharedEnvRequest added in v0.15.0

type InjectProjectGroupSharedEnvRequest struct {
	Overwrite      bool     `json:"overwrite,omitempty"`
	Redeploy       bool     `json:"redeploy,omitempty"`
	MemberUUIDs    []string `json:"member_uuids,omitempty"`
	KeepReferences bool     `json:"keep_references,omitempty"`
}

InjectProjectGroupSharedEnvRequest pushes stored group shared env into members.

type InjectProjectGroupSharedEnvResponse added in v0.15.0

type InjectProjectGroupSharedEnvResponse struct {
	WrittenKeys     []string `json:"written_keys,omitempty"`
	SkippedKeys     []string `json:"skipped_keys,omitempty"`
	ProjectsTouched []string `json:"projects_touched,omitempty"`
	AddonsTouched   []string `json:"addons_touched,omitempty"`
	RedeployQueued  []string `json:"redeploy_queued,omitempty"`
	Message         string   `json:"message,omitempty"`
}

InjectProjectGroupSharedEnvResponse reports inject results.

type Integration

type Integration struct {
	ID        string     `json:"id,omitempty"`
	UUID      string     `json:"uuid,omitempty"`
	Name      string     `json:"name,omitempty"`
	Type      string     `json:"type,omitempty"`
	Enabled   bool       `json:"enabled,omitempty"`
	CreatedAt *Timestamp `json:"created_at,omitempty"`
}

Integration represents a third-party integration.

type IntegrationService

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

IntegrationService handles integration related methods.

func (*IntegrationService) ConnectIntegration

func (s *IntegrationService) ConnectIntegration(ctx context.Context, integrationType string) (*http.Response, error)

ConnectIntegration connects an integration.

func (*IntegrationService) DisconnectIntegration

func (s *IntegrationService) DisconnectIntegration(ctx context.Context, integrationUUID string) (*http.Response, error)

DisconnectIntegration disconnects an integration.

func (*IntegrationService) ListIntegrations

func (s *IntegrationService) ListIntegrations(ctx context.Context) (*IntegrationsResponse, *http.Response, error)

ListIntegrations lists all integrations.

type IntegrationsResponse

type IntegrationsResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Integrations []Integration `json:"integrations"`
	} `json:"data"`
}

IntegrationsResponse represents integrations response.

type InviteTeamMemberRequest

type InviteTeamMemberRequest struct {
	Email       string   `json:"email"`
	Role        string   `json:"role,omitempty"`
	Permissions []string `json:"permissions,omitempty"`
}

InviteTeamMemberRequest represents a request to invite a team member.

type InviteTeamMemberResponse

type InviteTeamMemberResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		InviteID string `json:"invite_id,omitempty"`
	} `json:"data"`
}

InviteTeamMemberResponse represents a team member invite response.

type Invoice

type Invoice struct {
	ID            string     `json:"id,omitempty"`
	UUID          string     `json:"uuid,omitempty"`
	InvoiceNumber string     `json:"invoice_number,omitempty"`
	Amount        float64    `json:"amount,omitempty"`
	Currency      string     `json:"currency,omitempty"`
	Status        string     `json:"status,omitempty"`
	DueDate       *Timestamp `json:"due_date,omitempty"`
	PaidAt        *Timestamp `json:"paid_at,omitempty"`
	CreatedAt     *Timestamp `json:"created_at,omitempty"`
}

Invoice represents a billing invoice.

func (*Invoice) UnmarshalJSON added in v0.12.1

func (i *Invoice) UnmarshalJSON(data []byte) error

type InvoicesResponse

type InvoicesResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Invoices []Invoice `json:"invoices"`
	} `json:"data"`
}

InvoicesResponse represents a list of invoices response.

func (*InvoicesResponse) UnmarshalJSON added in v0.12.1

func (r *InvoicesResponse) UnmarshalJSON(data []byte) error

type JobEventResponse

type JobEventResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Event map[string]interface{} `json:"event"`
	} `json:"data"`
}

JobEventResponse represents job event response.

type JoinWaitlistRequest

type JoinWaitlistRequest struct {
	Email string `json:"email"`
	Name  string `json:"name,omitempty"`
}

JoinWaitlistRequest represents a join waitlist request.

type JoinWaitlistResponse

type JoinWaitlistResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
}

JoinWaitlistResponse represents a join waitlist response.

type LinkProviderRequest added in v0.11.0

type LinkProviderRequest struct {
	RedirectPath string `json:"redirectPath"`
}

LinkProviderRequest represents a provider link request.

type LinkProviderResponse added in v0.11.0

type LinkProviderResponse struct {
	RedirectURL string `json:"redirectUrl"`
	Provider    string `json:"provider"`
}

LinkProviderResponse represents a provider link response.

type ListAddOnsOptions added in v0.9.0

type ListAddOnsOptions struct {
	Page          int    `url:"page,omitempty"`
	Limit         int    `url:"limit,omitempty"`
	Size          int    `url:"size,omitempty"`
	Category      string `url:"category,omitempty"`
	Search        string `url:"s,omitempty"`
	Featured      *bool  `url:"featured,omitempty"`
	WorkspaceUUID string `url:"workspace,omitempty"`
}

List lists all available add-ons. ListAddOnsOptions specifies optional parameters for listing addons.

type ListDeploymentsOptions added in v0.8.0

type ListDeploymentsOptions struct {
	WorkspaceUUID string `url:"workspace,omitempty"`
}

ListDeploymentsOptions specifies optional parameters for listing deployments.

type LogQuery

type LogQuery struct {
	Query     string `json:"query,omitempty"`
	StartTime string `json:"start_time,omitempty"`
	EndTime   string `json:"end_time,omitempty"`
	Limit     int    `json:"limit,omitempty"`
}

LogQuery represents a log query request.

type LogService

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

LogService handles centralized logging related methods.

func (*LogService) QueryLogs

func (s *LogService) QueryLogs(ctx context.Context, req *LogQuery) (*LogsResponse, *http.Response, error)

QueryLogs queries logs across projects.

func (*LogService) StreamLogs

func (s *LogService) StreamLogs(ctx context.Context, projectUUID string) (*http.Response, error)

StreamLogs streams logs in real-time.

type Logger added in v0.2.0

type Logger interface {
	Debug(msg string, keysAndValues ...interface{})
	Info(msg string, keysAndValues ...interface{})
	Warn(msg string, keysAndValues ...interface{})
	Error(msg string, keysAndValues ...interface{})
}

Logger is an interface for logging SDK operations.

type LoginRequest

type LoginRequest struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

LoginRequest represents a login request.

type LoginResponse

type LoginResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Token string `json:"token"`
		User  User   `json:"user"`
	} `json:"data"`
}

LoginResponse represents a login response.

type LogsData added in v0.6.2

type LogsData struct {
	Logs []map[string]interface{} `json:"logs,omitempty"`
}

LogsData supports both legacy shapes (`data.logs`) and the Postman/API shape (`data: []`).

func (*LogsData) UnmarshalJSON added in v0.6.2

func (d *LogsData) UnmarshalJSON(data []byte) error

type LogsOptions

type LogsOptions struct {
	// WorkspaceUUID scopes the request to a workspace (required by the API).
	WorkspaceUUID string `url:"workspace_uuid,omitempty"`
	WorkspaceID   string `url:"workspace_id,omitempty"`

	// App is required by the API; defaults to "project".
	App string `url:"app,omitempty"`

	// Start and End match the API query parameters.
	Start string `url:"start,omitempty"`
	End   string `url:"end,omitempty"`

	// StartTime and EndTime are kept for backward compatibility and are mapped
	// to Start/End when Start/End are empty.
	StartTime string `url:"start_time,omitempty"`
	EndTime   string `url:"end_time,omitempty"`

	Limit  int    `url:"limit,omitempty"`
	Search string `url:"search,omitempty"`

	// Log enables streaming modes like tail ("tail") with optional Delay.
	Log   string `url:"log,omitempty"`
	Delay int    `url:"delay,omitempty"`
}

LogsOptions specifies options for retrieving project logs.

type LogsResponse

type LogsResponse struct {
	Success bool     `json:"success,omitempty"`
	Status  string   `json:"status,omitempty"`
	Message string   `json:"message"`
	Data    LogsData `json:"data,omitempty"`
}

LogsResponse represents project logs response.

type MCPRegistryService

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

MCPRegistryService handles MCP registry related methods.

func (*MCPRegistryService) GetMCPServers

GetMCPServers retrieves MCP registry servers.

type MCPServersResponse

type MCPServersResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Servers []map[string]interface{} `json:"servers"`
	} `json:"data"`
}

MCPServersResponse represents MCP servers response.

type MessageOnlyResponse added in v0.18.0

type MessageOnlyResponse struct {
	Success bool   `json:"success,omitempty"`
	Message string `json:"message,omitempty"`
}

MessageOnlyResponse is start/stop/delete success without a body payload.

type MetricsRequest

type MetricsRequest struct {
	App           string `json:"app,omitempty" url:"app,omitempty"`
	WorkspaceUUID string `json:"workspace_uuid,omitempty" url:"workspace_uuid,omitempty"`
	ProjectUUID   string `json:"project_uuid,omitempty" url:"project_uuid,omitempty"`
	StartTime     string `json:"start_time,omitempty" url:"start_time,omitempty"`
	EndTime       string `json:"end_time,omitempty" url:"end_time,omitempty"`
}

MetricsRequest represents a metrics request.

type MetricsResponse

type MetricsResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Metrics map[string]interface{} `json:"metrics"`
	} `json:"data"`
}

MetricsResponse represents metrics response.

type MintRexecAPITokenRequest added in v0.18.0

type MintRexecAPITokenRequest struct {
	Name          string `json:"name,omitempty"`
	ExpiresInDays *int   `json:"expires_in_days,omitempty"` // default 90, max 365
}

MintRexecAPITokenRequest is POST /api/v1/sandboxes/api-token.

type MintRexecAPITokenResponse added in v0.18.0

type MintRexecAPITokenResponse struct {
	Success bool                    `json:"success,omitempty"`
	Message string                  `json:"message,omitempty"`
	Data    MintRexecAPITokenResult `json:"data"`
}

MintRexecAPITokenResponse is POST .../api-token.

type MintRexecAPITokenResult added in v0.18.0

type MintRexecAPITokenResult struct {
	Token       string     `json:"token,omitempty"`
	TokenID     string     `json:"token_id,omitempty"`
	TokenPrefix string     `json:"token_prefix,omitempty"`
	Name        string     `json:"name,omitempty"`
	Scopes      []string   `json:"scopes,omitempty"`
	BaseURL     string     `json:"base_url,omitempty"`
	ExpiresAt   *Timestamp `json:"expires_at,omitempty"`
	UsageHint   string     `json:"usage_hint,omitempty"`
}

MintRexecAPITokenResult is returned once; store the token client-side.

type MiscService

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

MiscService handles miscellaneous API methods.

func (*MiscService) ContactUs

ContactUs sends a contact us message.

func (*MiscService) GetDashboardData

func (s *MiscService) GetDashboardData(ctx context.Context) (*DashboardDataResponse, *http.Response, error)

GetDashboardData gets dashboard data.

func (*MiscService) JoinWaitlist

JoinWaitlist joins the waitlist.

type MySubmissionsResponse

type MySubmissionsResponse struct {
	Status  string  `json:"status"`
	Success bool    `json:"success"`
	Message string  `json:"message"`
	Data    []AddOn `json:"data"`
}

MySubmissionsResponse represents user's add-on submissions response. Controller returns data as a bare array of addons (not {submissions:[]}).

func (*MySubmissionsResponse) Submissions added in v0.18.1

func (r *MySubmissionsResponse) Submissions() []AddOn

Submissions is an alias for Data for callers that used the old nested field.

type NetworkPoliciesResponse

type NetworkPoliciesResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Policies []NetworkPolicy `json:"policies"`
	} `json:"data"`
}

NetworkPoliciesResponse represents network policies response.

type NetworkPolicy

type NetworkPolicy struct {
	ID          string     `json:"id,omitempty"`
	UUID        string     `json:"uuid,omitempty"`
	Name        string     `json:"name,omitempty"`
	Description string     `json:"description,omitempty"`
	Rules       []string   `json:"rules,omitempty"`
	CreatedAt   *Timestamp `json:"created_at,omitempty"`
}

NetworkPolicy represents a network policy.

type NetworkPolicyRequest

type NetworkPolicyRequest struct {
	Name        string   `json:"name"`
	Description string   `json:"description,omitempty"`
	Rules       []string `json:"rules,omitempty"`
}

NetworkPolicyRequest represents a network policy request.

type NetworkPolicyResponse

type NetworkPolicyResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Policy NetworkPolicy `json:"policy"`
	} `json:"data"`
}

NetworkPolicyResponse represents a network policy response.

type NetworkSettingsRequest

type NetworkSettingsRequest struct {
	Port int `json:"port"`
}

NetworkSettingsRequest represents network settings update request.

type NetworkSettingsResponse

type NetworkSettingsResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Settings map[string]interface{} `json:"settings"`
	} `json:"data"`
}

NetworkSettingsResponse represents network settings response.

type Notification

type Notification struct {
	ID        string     `json:"id,omitempty"`
	UUID      string     `json:"uuid,omitempty"`
	Type      string     `json:"type,omitempty"`
	Title     string     `json:"title,omitempty"`
	Message   string     `json:"message,omitempty"`
	Read      bool       `json:"read,omitempty"`
	CreatedAt *Timestamp `json:"created_at,omitempty"`
}

Notification represents a notification.

type NotificationService

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

NotificationService handles notification related methods.

func (*NotificationService) DeleteNotification

func (s *NotificationService) DeleteNotification(ctx context.Context, notificationUUID string) (*http.Response, error)

DeleteNotification deletes a notification.

func (*NotificationService) ListNotifications

ListNotifications lists all user notifications.

func (*NotificationService) MarkAllAsRead

func (s *NotificationService) MarkAllAsRead(ctx context.Context) (*http.Response, error)

MarkAllAsRead marks all notifications as read.

func (*NotificationService) MarkAsRead

func (s *NotificationService) MarkAsRead(ctx context.Context, notificationUUID string) (*http.Response, error)

MarkAsRead marks a notification as read.

type NotificationSettings

type NotificationSettings struct {
	Email       bool `json:"email,omitempty"`
	Push        bool `json:"push,omitempty"`
	Deployments bool `json:"deployments,omitempty"`
	Billing     bool `json:"billing,omitempty"`
	Security    bool `json:"security,omitempty"`
}

NotificationSettings represents notification preferences.

type NotificationsResponse

type NotificationsResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Notifications []Notification `json:"notifications"`
	} `json:"data"`
}

NotificationsResponse represents notifications response.

type OAuthService

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

OAuthService handles communication with the OAuth 2.0 related methods of the PipeOps API.

func (*OAuthService) Authorize

func (s *OAuthService) Authorize(opts *AuthorizeOptions) (string, error)

Authorize initiates the OAuth 2.0 authorization code flow. This redirects the user to the authorization endpoint where they can grant access. Returns the authorization URL that the user should be redirected to.

func (*OAuthService) ExchangeCodeForToken

func (s *OAuthService) ExchangeCodeForToken(ctx context.Context, req *TokenRequest) (*TokenResponse, *http.Response, error)

ExchangeCodeForToken exchanges an authorization code for an access token.

func (*OAuthService) GetConsent

func (s *OAuthService) GetConsent(ctx context.Context) (*ConsentResponse, *http.Response, error)

GetConsent retrieves the OAuth consent page (optional endpoint).

func (*OAuthService) GetUserInfo

func (s *OAuthService) GetUserInfo(ctx context.Context) (*UserInfoResponse, *http.Response, error)

GetUserInfo retrieves user information using an OAuth access token. The access token should be set on the client using SetToken().

type OpenCostService

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

OpenCostService handles open cost related methods.

func (*OpenCostService) GetClusterComputeCost

func (s *OpenCostService) GetClusterComputeCost(ctx context.Context, clusterUUID string) (*ClusterCostResponse, *http.Response, error)

GetClusterComputeCost gets total cost for carpenter enabled server.

func (*OpenCostService) GetNovaServerCost

func (s *OpenCostService) GetNovaServerCost(ctx context.Context) (*ClusterCostResponse, *http.Response, error)

GetNovaServerCost gets total cost calculation for nova server.

func (*OpenCostService) GetProjectsCost

func (s *OpenCostService) GetProjectsCost(ctx context.Context) (*ClusterCostResponse, *http.Response, error)

GetProjectsCost gets cluster projects cost metrics.

type ParticipantUploadRequest

type ParticipantUploadRequest struct {
	Data map[string]interface{} `json:"data"`
}

ParticipantUploadRequest represents a participant upload request.

type Partner

type Partner struct {
	ID          string     `json:"id,omitempty"`
	UUID        string     `json:"uuid,omitempty"`
	Name        string     `json:"name,omitempty"`
	Description string     `json:"description,omitempty"`
	CreatedAt   *Timestamp `json:"created_at,omitempty"`
}

Partner represents a partner.

type PartnerAgreement

type PartnerAgreement struct {
	ID          string     `json:"id,omitempty"`
	UUID        string     `json:"uuid,omitempty"`
	PartnerUUID string     `json:"partner_uuid,omitempty"`
	Name        string     `json:"name,omitempty"`
	Terms       string     `json:"terms,omitempty"`
	CreatedAt   *Timestamp `json:"created_at,omitempty"`
}

PartnerAgreement represents a partner agreement.

type PartnerAgreementRequest

type PartnerAgreementRequest struct {
	PartnerUUID string `json:"partner_uuid"`
	Name        string `json:"name"`
	Terms       string `json:"terms,omitempty"`
}

PartnerAgreementRequest represents a partner agreement request.

type PartnerAgreementResponse

type PartnerAgreementResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Agreement PartnerAgreement `json:"agreement"`
	} `json:"data"`
}

PartnerAgreementResponse represents a partner agreement response.

type PartnerAgreementService

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

PartnerAgreementService handles partner agreement related methods.

func (*PartnerAgreementService) CreateAgreement

CreateAgreement creates a partner agreement.

func (*PartnerAgreementService) GetAgreement

func (s *PartnerAgreementService) GetAgreement(ctx context.Context, agreementUUID string) (*PartnerAgreementResponse, *http.Response, error)

GetAgreement gets a partner agreement by UUID.

func (*PartnerAgreementService) ListAgreements

ListAgreements lists all partner agreements.

func (*PartnerAgreementService) UpdateAgreement

UpdateAgreement updates a partner agreement.

type PartnerAgreementsResponse

type PartnerAgreementsResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Agreements []PartnerAgreement `json:"agreements"`
	} `json:"data"`
}

PartnerAgreementsResponse represents partner agreements response.

type PartnerParticipantService

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

PartnerParticipantService handles partner participant related methods.

func (*PartnerParticipantService) UploadParticipants

func (s *PartnerParticipantService) UploadParticipants(ctx context.Context, agreementID string, req *ParticipantUploadRequest) (*http.Response, error)

UploadParticipants uploads participants for an agreement.

func (*PartnerParticipantService) VerifyProgramCode

func (s *PartnerParticipantService) VerifyProgramCode(ctx context.Context, code string) (*VerifyCodeResponse, *http.Response, error)

VerifyProgramCode verifies a program verification code.

type PartnerResponse

type PartnerResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Partner Partner `json:"partner"`
	} `json:"data"`
}

PartnerResponse represents a partner response.

type PartnerService

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

PartnerService handles communication with the partners related methods of the PipeOps API.

func (*PartnerService) Create

Create creates a new partner.

func (*PartnerService) Get

func (s *PartnerService) Get(ctx context.Context, partnerUUID string) (*PartnerResponse, *http.Response, error)

Get gets a partner by UUID.

func (*PartnerService) List

List lists all partners.

func (*PartnerService) Update

Update updates a partner.

type PartnersResponse

type PartnersResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Partners []Partner `json:"partners"`
	} `json:"data"`
}

PartnersResponse represents a list of partners response.

type PasswordResetRequest

type PasswordResetRequest struct {
	Email string `json:"email"`
}

PasswordResetRequest represents a password reset request.

type PasswordResetResponse

type PasswordResetResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
}

PasswordResetResponse represents a password reset response.

type Plan

type Plan struct {
	ID              string   `json:"id,omitempty"`
	UUID            string   `json:"uuid,omitempty"`
	Name            string   `json:"name,omitempty"`
	Description     string   `json:"description,omitempty"`
	Price           float64  `json:"price,omitempty"`
	Currency        string   `json:"currency,omitempty"`
	Interval        string   `json:"interval,omitempty"`
	Period          string   `json:"period,omitempty"`
	Features        []string `json:"features,omitempty"`
	Active          bool     `json:"active,omitempty"`
	FreeTrialDays   int      `json:"free_trial_days,omitempty"`
	ConcurrentBuild int      `json:"concurrent_build,omitempty"`
}

Plan represents a subscription plan.

func (*Plan) UnmarshalJSON added in v0.10.3

func (p *Plan) UnmarshalJSON(data []byte) error

type PlansListOptions added in v0.17.5

type PlansListOptions struct {
	// Location is an ISO country code (e.g. US). Required by the control plane
	// for currency/pricing; defaults to US when empty.
	Location string `url:"location,omitempty"`
}

PlansListOptions filters billing plan listing.

type PlansResponse

type PlansResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Plans []Plan `json:"plans"`
	} `json:"data"`
}

PlansResponse represents a list of plans response.

func (*PlansResponse) UnmarshalJSON added in v0.10.3

func (r *PlansResponse) UnmarshalJSON(data []byte) error

type PodsResponse

type PodsResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Pods []map[string]interface{} `json:"pods"`
	} `json:"data"`
}

PodsResponse represents pods response.

type PortalResponse

type PortalResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		PortalURL string `json:"portal_url"`
	} `json:"data"`
}

PortalResponse represents billing portal response.

func (*PortalResponse) UnmarshalJSON added in v0.10.3

func (r *PortalResponse) UnmarshalJSON(data []byte) error

type ProfileResponse

type ProfileResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		User User `json:"user"`
	} `json:"data"`
}

ProfileResponse represents user profile response.

type ProfileService

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

ProfileService handles profile related methods.

func (*ProfileService) CancelProfileDeletion

func (s *ProfileService) CancelProfileDeletion(ctx context.Context) (*http.Response, error)

CancelProfileDeletion cancels a pending profile deletion.

func (*ProfileService) DeleteProfile

func (s *ProfileService) DeleteProfile(ctx context.Context) (*http.Response, error)

DeleteProfile deletes the user profile.

type Project

type Project struct {
	ID            jsonID `json:"ID,omitempty"`
	UUID          string `json:"UUID,omitempty"`
	Name          string `json:"Name,omitempty"`
	Description   string `json:"Description,omitempty"`
	Status        string `json:"Status,omitempty"`
	ServerID      string `json:"server_id,omitempty"`
	EnvironmentID string `json:"environment_id,omitempty"`
	WorkspaceID   string `json:"workspace_id,omitempty"`
	Repository    string `json:"repository,omitempty"`
	Branch        string `json:"branch,omitempty"`
	BuildCommand  string `json:"build_command,omitempty"`
	StartCommand  string `json:"start_command,omitempty"`
	Port          int    `json:"port,omitempty"`
	Framework     string `json:"framework,omitempty"`
	// PublicURL is the cluster-type-aware public app URL (agent / PKS LB / NonPks).
	// Populated from project/fetch as public_url.
	PublicURL string `json:"public_url,omitempty"`
	// CustomDomainName is the stored managed domain(s) assigned at create/migrate.
	// project/fetch returns this as a string array (comma-split of the DB string);
	// other endpoints may return a plain string. FlexibleCSVString accepts both.
	CustomDomainName FlexibleCSVString `json:"CustomDomainName,omitempty"`
	CreatedAt        *Timestamp        `json:"created_at,omitempty"`
	UpdatedAt        *Timestamp        `json:"updated_at,omitempty"`
}

Project represents a PipeOps project.

type ProjectAuditActor added in v0.18.5

type ProjectAuditActor struct {
	Type      string `json:"type,omitempty"` // user | webhook | system | service_account | agent
	UUID      string `json:"uuid,omitempty"`
	Name      string `json:"name,omitempty"`
	AvatarURL string `json:"avatar_url,omitempty"`
	Label     string `json:"label,omitempty"`
}

ProjectAuditActor is the actor summary returned on list items (email omitted for PII).

type ProjectAuditLog added in v0.18.5

type ProjectAuditLog struct {
	UUID         string                 `json:"uuid,omitempty"`
	Action       string                 `json:"action,omitempty"`       // e.g. project.redeploy
	ActionLabel  string                 `json:"action_label,omitempty"` // human label
	Category     string                 `json:"category,omitempty"`     // lifecycle | settings | deployment | security | access
	Status       string                 `json:"status,omitempty"`       // success | failure | attempted
	Summary      string                 `json:"summary,omitempty"`
	ProjectUUID  string                 `json:"project_uuid,omitempty"`
	ProjectName  string                 `json:"project_name,omitempty"`
	ResourceType string                 `json:"resource_type,omitempty"`
	ResourceUUID string                 `json:"resource_uuid,omitempty"`
	Metadata     map[string]interface{} `json:"metadata,omitempty"`
	CreatedAt    *Timestamp             `json:"created_at,omitempty"`
	Actor        ProjectAuditActor      `json:"actor,omitempty"`
}

ProjectAuditLog is one project-scoped historical action.

type ProjectAuditLogListOptions added in v0.18.5

type ProjectAuditLogListOptions struct {
	// Action is a single action or comma-separated list (project.redeploy,project.env.update).
	Action        string `url:"action,omitempty"`
	ActorUserUUID string `url:"actor_user_uuid,omitempty"`
	ActorType     string `url:"actor_type,omitempty"` // user | webhook | system | service_account | agent
	Category      string `url:"category,omitempty"`   // lifecycle | settings | deployment | security | access
	Search        string `url:"search,omitempty"`     // free-text over summary / names
	// From / To are RFC3339 timestamps (controller parses with time.RFC3339).
	From   string `url:"from,omitempty"`
	To     string `url:"to,omitempty"`
	Limit  int    `url:"limit,omitempty"`
	Offset int    `url:"offset,omitempty"`
}

ProjectAuditLogListOptions filters GET /project/audit-logs/:uuid.

type ProjectAuditLogListResponse added in v0.18.5

type ProjectAuditLogListResponse struct {
	Success    bool               `json:"success,omitempty"`
	Message    string             `json:"message,omitempty"`
	Data       []ProjectAuditLog  `json:"data"`
	Pagination AuditLogPagination `json:"pagination"`
}

ProjectAuditLogListResponse is GET /project/audit-logs/:uuid.

type ProjectDeployOptions added in v0.12.7

type ProjectDeployOptions struct {
	// WorkspaceUUID scopes the redeploy to a workspace (query + body).
	WorkspaceUUID string `url:"workspace_uuid,omitempty" json:"workspace_uuid,omitempty"`
	// NoCache forces a clean rebuild without Docker layer cache.
	NoCache bool `url:"no_cache,omitempty" json:"-"`
}

ProjectDeployOptions controls a project redeployment. The control plane applies prefer-client defaults: omitted body fields are filled from the stored project snapshot, so callers only need project UUID (and optional workspace/no-cache flags).

type ProjectDeploymentHistoryOptions added in v0.12.0

type ProjectDeploymentHistoryOptions struct {
	WorkspaceUUID string `url:"workspace_uuid,omitempty"`
	WorkspaceID   string `url:"workspace_id,omitempty"`
	Page          int    `url:"page,omitempty"`
	Limit         int    `url:"limit,omitempty"`
}

ProjectDeploymentHistoryOptions specifies optional parameters for listing project deployment history.

type ProjectDeploymentHistoryResponse added in v0.12.0

type ProjectDeploymentHistoryResponse struct {
	Success bool                      `json:"success,omitempty"`
	Status  string                    `json:"status,omitempty"`
	Message string                    `json:"message"`
	Data    []ProjectDeploymentRecord `json:"data,omitempty"`
	Meta    ProjectDeploymentMeta     `json:"meta,omitempty"`
}

ProjectDeploymentHistoryResponse represents project deployment history response.

type ProjectDeploymentListOptions added in v0.12.0

type ProjectDeploymentListOptions struct {
	WorkspaceUUID string `url:"workspace_uuid,omitempty"`
	WorkspaceID   string `url:"workspace_id,omitempty"`
	FilterBy      string `url:"filterBy,omitempty"`
	Page          int    `url:"page,omitempty"`
	Limit         int    `url:"limit,omitempty"`
}

ProjectDeploymentListOptions specifies optional parameters for listing project deployments.

type ProjectDeploymentMeta added in v0.12.0

type ProjectDeploymentMeta struct {
	TotalPages   int `json:"total_pages,omitempty"`
	CurrentPage  int `json:"current_page,omitempty"`
	NextPage     int `json:"next_page,omitempty"`
	CurrentCount int `json:"current_count,omitempty"`
}

ProjectDeploymentMeta represents pagination metadata for project deployment endpoints.

type ProjectDeploymentRecord added in v0.12.0

type ProjectDeploymentRecord map[string]interface{}

ProjectDeploymentRecord represents a project deployment payload.

type ProjectDeploymentsResponse added in v0.12.0

type ProjectDeploymentsResponse struct {
	Success bool                      `json:"success,omitempty"`
	Status  string                    `json:"status,omitempty"`
	Message string                    `json:"message"`
	Data    []ProjectDeploymentRecord `json:"data,omitempty"`
	Meta    ProjectDeploymentMeta     `json:"meta,omitempty"`
}

ProjectDeploymentsResponse represents project deployment list response.

type ProjectEnvVariablesOptions added in v0.17.5

type ProjectEnvVariablesOptions struct {
	WorkspaceUUID string `url:"workspace_uuid,omitempty"`
}

ProjectEnvVariablesOptions scopes env-var fetch. Prefer an explicit workspace when known; the bare project path works for most accounts without it.

type ProjectGetOptions added in v0.7.0

type ProjectGetOptions struct {
	WorkspaceUUID string `url:"workspace_uuid,omitempty"`
}

ProjectGetOptions specifies optional parameters for fetching a project.

type ProjectGroup added in v0.15.0

type ProjectGroup struct {
	UUID                   string               `json:"uuid,omitempty"`
	Name                   string               `json:"name,omitempty"`
	NameSlug               string               `json:"name_slug,omitempty"`
	WorkspaceUUID          string               `json:"workspace_uuid,omitempty"`
	DefaultClusterUUID     string               `json:"default_cluster_uuid,omitempty"`
	DefaultEnvironmentUUID string               `json:"default_environment_uuid,omitempty"`
	MemberCount            int                  `json:"member_count,omitempty"`
	Members                []ProjectGroupMember `json:"members,omitempty"`
	CreatedAt              string               `json:"created_at,omitempty"`
	UpdatedAt              string               `json:"updated_at,omitempty"`
}

ProjectGroup is the API representation of a project group (UI: Project).

type ProjectGroupAttachCandidate added in v0.15.0

type ProjectGroupAttachCandidate struct {
	MemberType       string `json:"member_type,omitempty"`
	MemberUUID       string `json:"member_uuid,omitempty"`
	Name             string `json:"name,omitempty"`
	ServiceKind      string `json:"service_kind,omitempty"`
	Status           string `json:"status,omitempty"`
	SessionID        string `json:"session_id,omitempty"`
	CurrentGroupUUID string `json:"current_group_uuid,omitempty"`
	CurrentGroupName string `json:"current_group_name,omitempty"`
	InTargetGroup    bool   `json:"in_target_group,omitempty"`
}

ProjectGroupAttachCandidate is a project or addon that can be attached.

type ProjectGroupAttachCandidates added in v0.15.0

type ProjectGroupAttachCandidates struct {
	Projects []ProjectGroupAttachCandidate `json:"projects,omitempty"`
	Addons   []ProjectGroupAttachCandidate `json:"addons,omitempty"`
}

ProjectGroupAttachCandidates lists attachable services for the picker UI.

type ProjectGroupAttachResponse added in v0.15.0

type ProjectGroupAttachResponse struct {
	Success bool                             `json:"success,omitempty"`
	Message string                           `json:"message,omitempty"`
	Data    AttachProjectGroupMemberResponse `json:"data"`
}

ProjectGroupAttachResponse is POST .../members.

type ProjectGroupCandidatesOptions added in v0.15.0

type ProjectGroupCandidatesOptions struct {
	WorkspaceUUID string `url:"workspace_uuid,omitempty"`
	Workspace     string `url:"workspace,omitempty"`
	GroupUUID     string `url:"group_uuid,omitempty"`
}

ProjectGroupCandidatesOptions is GET /project-groups/candidates.

type ProjectGroupCandidatesResponse added in v0.15.0

type ProjectGroupCandidatesResponse struct {
	Success bool                         `json:"success,omitempty"`
	Message string                       `json:"message,omitempty"`
	Data    ProjectGroupAttachCandidates `json:"data"`
}

ProjectGroupCandidatesResponse is GET /project-groups/candidates.

type ProjectGroupConnectResponse added in v0.15.0

type ProjectGroupConnectResponse struct {
	Success bool                                `json:"success,omitempty"`
	Message string                              `json:"message,omitempty"`
	Data    ConnectProjectGroupServicesResponse `json:"data"`
}

ProjectGroupConnectResponse is POST .../connections.

type ProjectGroupDetachOptions added in v0.15.0

type ProjectGroupDetachOptions struct {
	WorkspaceUUID  string `url:"workspace_uuid,omitempty"`
	Workspace      string `url:"workspace,omitempty"`
	IncludeSession *bool  `url:"include_session,omitempty"`
}

ProjectGroupDetachOptions is DELETE .../members/... query options.

type ProjectGroupEnvironment added in v0.15.0

type ProjectGroupEnvironment struct {
	Slug        string `json:"slug,omitempty"`
	Name        string `json:"name,omitempty"`
	ClusterUUID string `json:"cluster_uuid,omitempty"`
	Namespace   string `json:"namespace,omitempty"`
	IsDefault   bool   `json:"is_default,omitempty"`
}

ProjectGroupEnvironment is a group environment slot.

type ProjectGroupInjectSharedEnvResponse added in v0.15.0

type ProjectGroupInjectSharedEnvResponse struct {
	Success bool                                `json:"success,omitempty"`
	Message string                              `json:"message,omitempty"`
	Data    InjectProjectGroupSharedEnvResponse `json:"data"`
}

ProjectGroupInjectSharedEnvResponse is POST .../env/inject.

type ProjectGroupListOptions added in v0.15.0

type ProjectGroupListOptions struct {
	WorkspaceUUID string `url:"workspace_uuid,omitempty"`
	Workspace     string `url:"workspace,omitempty"`
	Limit         int    `url:"limit,omitempty"`
	Offset        int    `url:"offset,omitempty"`
}

ProjectGroupListOptions filters and paginates group list.

type ProjectGroupListResponse added in v0.15.0

type ProjectGroupListResponse struct {
	Success bool   `json:"success,omitempty"`
	Message string `json:"message,omitempty"`
	Data    struct {
		Groups []ProjectGroup `json:"groups"`
		Total  int64          `json:"total"`
		Limit  int            `json:"limit"`
		Offset int            `json:"offset"`
	} `json:"data"`
}

ProjectGroupListResponse is GET /project-groups.

type ProjectGroupMember added in v0.15.0

type ProjectGroupMember struct {
	MemberType     string `json:"member_type,omitempty"`
	MemberUUID     string `json:"member_uuid,omitempty"`
	ServiceKind    string `json:"service_kind,omitempty"`
	DisplayOrder   int    `json:"display_order,omitempty"`
	Name           string `json:"name,omitempty"`
	Status         string `json:"status,omitempty"`
	ClusterUUID    string `json:"cluster_uuid,omitempty"`
	Environment    string `json:"environment,omitempty"`
	OwnerHref      string `json:"owner_href,omitempty"`
	OwnerSessionID string `json:"owner_session_id,omitempty"`
}

ProjectGroupMember is a service membership row.

type ProjectGroupRedeployAppsResponse added in v0.15.0

type ProjectGroupRedeployAppsResponse struct {
	Success bool                             `json:"success,omitempty"`
	Message string                           `json:"message,omitempty"`
	Data    RedeployProjectGroupAppsResponse `json:"data"`
}

ProjectGroupRedeployAppsResponse is POST .../redeploy-apps.

type ProjectGroupResolveOptions added in v0.15.0

type ProjectGroupResolveOptions struct {
	WorkspaceUUID string `url:"workspace_uuid,omitempty"`
	Workspace     string `url:"workspace,omitempty"`
	MemberType    string `url:"member_type,omitempty"`
	MemberUUID    string `url:"member_uuid,omitempty"`
}

ProjectGroupResolveOptions is GET /project-groups/resolve.

type ProjectGroupResolveResponse added in v0.15.0

type ProjectGroupResolveResponse struct {
	Success bool                        `json:"success,omitempty"`
	Message string                      `json:"message,omitempty"`
	Data    ResolveProjectGroupResponse `json:"data"`
}

ProjectGroupResolveResponse is GET /project-groups/resolve.

type ProjectGroupResponse added in v0.15.0

type ProjectGroupResponse struct {
	Success bool         `json:"success,omitempty"`
	Message string       `json:"message,omitempty"`
	Data    ProjectGroup `json:"data"`
}

ProjectGroupResponse is a single group envelope.

type ProjectGroupService added in v0.15.0

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

ProjectGroupService handles unified project plane (project group) APIs.

Controller routes (JWT + team access):

GET    /project-groups
POST   /project-groups
GET    /project-groups/resolve
GET    /project-groups/candidates
GET    /project-groups/:uuid
PATCH  /project-groups/:uuid
DELETE /project-groups/:uuid
GET    /project-groups/:uuid/topology
GET    /project-groups/:uuid/env
PUT    /project-groups/:uuid/env
POST   /project-groups/:uuid/env/inject
POST   /project-groups/:uuid/members
DELETE /project-groups/:uuid/members/:memberType/:memberUUID
POST   /project-groups/:uuid/connections
POST   /project-groups/:uuid/redeploy-apps

func (*ProjectGroupService) AttachMember added in v0.15.0

AttachMember attaches a project or addon to a group. POST /project-groups/:uuid/members?workspace_uuid=

func (*ProjectGroupService) ConnectServices added in v0.15.0

ConnectServices wires provider connection envs into a consumer project. POST /project-groups/:uuid/connections?workspace_uuid=

func (*ProjectGroupService) Create added in v0.15.0

Create creates an empty project group. POST /project-groups?workspace_uuid=

func (*ProjectGroupService) Delete added in v0.15.0

Delete removes a project group. DELETE /project-groups/:uuid?workspace_uuid=

func (*ProjectGroupService) DetachMember added in v0.15.0

func (s *ProjectGroupService) DetachMember(ctx context.Context, uuid, memberType, memberUUID string, opts *ProjectGroupDetachOptions) (*http.Response, error)

DetachMember detaches a member from a group. DELETE /project-groups/:uuid/members/:memberType/:memberUUID?workspace_uuid=

func (*ProjectGroupService) Get added in v0.15.0

Get returns one project group by UUID. GET /project-groups/:uuid?workspace_uuid=

func (*ProjectGroupService) GetSharedEnv added in v0.15.0

GetSharedEnv returns group-level shared environment variables. GET /project-groups/:uuid/env?workspace_uuid=

func (*ProjectGroupService) GetTopology added in v0.15.0

GetTopology returns the plane topology for a group. GET /project-groups/:uuid/topology?workspace_uuid=

func (*ProjectGroupService) InjectSharedEnv added in v0.15.0

InjectSharedEnv pushes stored group shared env into project members. POST /project-groups/:uuid/env/inject?workspace_uuid=

func (*ProjectGroupService) List added in v0.15.0

List returns project groups for a workspace. GET /project-groups?workspace_uuid=&limit=&offset=

func (*ProjectGroupService) ListCandidates added in v0.15.0

ListCandidates lists attachable projects/addons for the picker UI. GET /project-groups/candidates?workspace_uuid=&group_uuid=

func (*ProjectGroupService) PutSharedEnv added in v0.15.0

PutSharedEnv replaces the group shared env set. PUT /project-groups/:uuid/env?workspace_uuid=

func (*ProjectGroupService) RedeployApps added in v0.15.0

RedeployApps queues redeploys for application (project) members only. POST /project-groups/:uuid/redeploy-apps?workspace_uuid=

func (*ProjectGroupService) ResolveMember added in v0.15.0

ResolveMember maps a service id to its group (deep links). GET /project-groups/resolve?workspace_uuid=&member_type=&member_uuid=

func (*ProjectGroupService) Update added in v0.15.0

Update patches project group metadata. PATCH /project-groups/:uuid?workspace_uuid=

type ProjectGroupSharedEnv added in v0.15.0

type ProjectGroupSharedEnv struct {
	Variables       []ProjectGroupSharedEnvVar `json:"variables,omitempty"`
	Injected        bool                       `json:"injected,omitempty"`
	WrittenKeys     []string                   `json:"written_keys,omitempty"`
	SkippedKeys     []string                   `json:"skipped_keys,omitempty"`
	ProjectsTouched []string                   `json:"projects_touched,omitempty"`
	AddonsTouched   []string                   `json:"addons_touched,omitempty"`
	RedeployQueued  []string                   `json:"redeploy_queued,omitempty"`
	Message         string                     `json:"message,omitempty"`
}

ProjectGroupSharedEnv is the group-level shared environment variables payload.

type ProjectGroupSharedEnvResponse added in v0.15.0

type ProjectGroupSharedEnvResponse struct {
	Success bool                  `json:"success,omitempty"`
	Message string                `json:"message,omitempty"`
	Data    ProjectGroupSharedEnv `json:"data"`
}

ProjectGroupSharedEnvResponse is GET/PUT .../env.

type ProjectGroupSharedEnvVar added in v0.15.0

type ProjectGroupSharedEnvVar struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

ProjectGroupSharedEnvVar is a single shared key/value.

type ProjectGroupTopology added in v0.15.0

type ProjectGroupTopology struct {
	Group              ProjectGroup                 `json:"group"`
	Nodes              []ProjectGroupTopologyNode   `json:"nodes,omitempty"`
	Edges              []ProjectGroupTopologyEdge   `json:"edges,omitempty"`
	Volumes            []ProjectGroupTopologyVolume `json:"volumes,omitempty"`
	UnattachedVolumes  []ProjectGroupTopologyVolume `json:"unattached_volumes,omitempty"`
	Warnings           []string                     `json:"warnings,omitempty"`
	TotalMemberCount   int                          `json:"total_member_count,omitempty"`
	VisibleMemberCount int                          `json:"visible_member_count,omitempty"`
	NestedNodeCount    int                          `json:"nested_node_count,omitempty"`
	Environments       []ProjectGroupEnvironment    `json:"environments,omitempty"`
	ActiveEnvironment  string                       `json:"active_environment,omitempty"`
}

ProjectGroupTopology is the plane payload.

type ProjectGroupTopologyEdge added in v0.15.0

type ProjectGroupTopologyEdge struct {
	Type       string `json:"type,omitempty"`
	FromUUID   string `json:"from_uuid,omitempty"`
	ToUUID     string `json:"to_uuid,omitempty"`
	Label      string `json:"label,omitempty"`
	Confidence string `json:"confidence,omitempty"`
}

ProjectGroupTopologyEdge connects two members or a volume.

type ProjectGroupTopologyNode added in v0.15.0

type ProjectGroupTopologyNode struct {
	MemberType      string   `json:"member_type,omitempty"`
	MemberUUID      string   `json:"member_uuid,omitempty"`
	ServiceKind     string   `json:"service_kind,omitempty"`
	Name            string   `json:"name,omitempty"`
	Status          string   `json:"status,omitempty"`
	ClusterUUID     string   `json:"cluster_uuid,omitempty"`
	EnvironmentUUID string   `json:"environment_uuid,omitempty"`
	Namespace       string   `json:"namespace,omitempty"`
	OwnerHref       string   `json:"owner_href,omitempty"`
	OwnerSessionID  string   `json:"owner_session_id,omitempty"`
	InternalURL     string   `json:"internal_url,omitempty"`
	PublicURLs      []string `json:"public_urls,omitempty"`
	PrivateHostname string   `json:"private_hostname,omitempty"`
	ParentUUID      string   `json:"parent_uuid,omitempty"`
	PosX            float64  `json:"pos_x,omitempty"`
	PosY            float64  `json:"pos_y,omitempty"`
}

ProjectGroupTopologyNode is a plane service card.

type ProjectGroupTopologyResponse added in v0.15.0

type ProjectGroupTopologyResponse struct {
	Success bool                 `json:"success,omitempty"`
	Message string               `json:"message,omitempty"`
	Data    ProjectGroupTopology `json:"data"`
}

ProjectGroupTopologyResponse is GET .../topology.

type ProjectGroupTopologyVolume added in v0.15.0

type ProjectGroupTopologyVolume struct {
	UUID        string  `json:"uuid,omitempty"`
	DisplayName string  `json:"display_name,omitempty"`
	PVCName     string  `json:"pvc_name,omitempty"`
	Status      string  `json:"status,omitempty"`
	OwnerType   string  `json:"owner_type,omitempty"`
	OwnerUUID   string  `json:"owner_uuid,omitempty"`
	SizeGB      float32 `json:"size_gb,omitempty"`
}

ProjectGroupTopologyVolume is a volume chip on the plane.

type ProjectGroupWorkspaceOptions added in v0.15.0

type ProjectGroupWorkspaceOptions struct {
	WorkspaceUUID string `url:"workspace_uuid,omitempty"`
	// Workspace is accepted as an alias by the controller.
	Workspace string `url:"workspace,omitempty"`
}

ProjectGroupWorkspaceOptions carries workspace query params used by most endpoints.

type ProjectListOptions

type ProjectListOptions struct {
	// WorkspaceUUID filters projects by workspace. Prefer this over WorkspaceID.
	WorkspaceUUID string `url:"workspace_uuid,omitempty"`

	// WorkspaceID is kept for backward compatibility (maps to WorkspaceUUID when possible).
	WorkspaceID string `url:"workspace_id,omitempty"`

	ServerID string `url:"server_id,omitempty"`
	Page     int    `url:"page,omitempty"`
	Limit    int    `url:"limit,omitempty"`
}

ProjectListOptions specifies the optional parameters to the ProjectService.List method.

type ProjectNamesResponse

type ProjectNamesResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Names []string `json:"names"`
	} `json:"data"`
}

ProjectNamesResponse represents project names response.

type ProjectResponse

type ProjectResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Project Project `json:"project"`
	} `json:"data"`
}

ProjectResponse represents a single project response.

type ProjectService

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

ProjectService handles communication with the project related methods of the PipeOps API.

func (*ProjectService) BulkDelete

func (s *ProjectService) BulkDelete(ctx context.Context, req *BulkDeleteRequest) (*http.Response, error)

BulkDelete deletes multiple projects.

func (*ProjectService) CheckDockerfile

func (s *ProjectService) CheckDockerfile(ctx context.Context, provider, workspace, repo, branch string) (*CheckDockerfileResponse, *http.Response, error)

CheckDockerfile checks if Dockerfile exists in repository.

func (*ProjectService) CheckDomainSSL

func (s *ProjectService) CheckDomainSSL(ctx context.Context, req *CheckDomainSSLRequest) (*http.Response, error)

CheckDomainSSL checks domain SSL configuration.

func (*ProjectService) CheckProjectName

func (s *ProjectService) CheckProjectName(ctx context.Context) (*http.Response, error)

CheckProjectName checks if a project name is available.

func (*ProjectService) CheckRepositoryDockerfile added in v0.11.0

func (s *ProjectService) CheckRepositoryDockerfile(ctx context.Context, provider, owner, repo, branch string) (*CheckDockerfileResponse, *http.Response, error)

CheckRepositoryDockerfile checks if a Dockerfile exists in a repository branch.

func (*ProjectService) Create

Create creates a new project via POST /project/create. Applies prefer-client defaults (see ApplyCreateProjectDefaults), then requires workspace_uuid.

func (*ProjectService) CreateNetworkPolicy

func (s *ProjectService) CreateNetworkPolicy(ctx context.Context, projectUUID string, req *NetworkPolicyRequest) (*NetworkPolicyResponse, *http.Response, error)

CreateNetworkPolicy creates a network policy for a project.

func (*ProjectService) Delete

func (s *ProjectService) Delete(ctx context.Context, projectUUID string) (*http.Response, error)

Delete deletes a project.

func (*ProjectService) DeleteCustomDomain

func (s *ProjectService) DeleteCustomDomain(ctx context.Context, projectUUID string) (*http.Response, error)

DeleteCustomDomain deletes a custom domain from a project.

func (*ProjectService) Deploy

func (s *ProjectService) Deploy(ctx context.Context, projectUUID string, opts ...*ProjectDeployOptions) (*http.Response, error)

Deploy triggers a deployment via POST /project/redeploy/:uuid.

Body is intentionally thin (prefer-client): the controller reloads name, source, repository, branch, build settings, configuration, and related fields from the project record when omitted. Env vars and network ports are loaded server-side for the runner. Pass ProjectDeployOptions.WorkspaceUUID for workspace-scoped automation; NoCache=true forces a full rebuild.

Full UpdateProject bodies (as sent by the dashboard) still work — client non-empty values always win over stored defaults.

func (*ProjectService) DeployFromImage added in v0.10.0

DeployFromImage deploys a new project from a pre-built container image.

func (*ProjectService) GenerateDomainFromNetworkPort

func (s *ProjectService) GenerateDomainFromNetworkPort(ctx context.Context, projectUUID string) (*DomainResponse, *http.Response, error)

GenerateDomainFromNetworkPort generates a domain from network port.

func (*ProjectService) Get

func (s *ProjectService) Get(ctx context.Context, projectUUID string, opts ...*ProjectGetOptions) (*ProjectResponse, *http.Response, error)

Get fetches a project by UUID.

func (*ProjectService) GetBuildLogs added in v0.16.2

func (s *ProjectService) GetBuildLogs(ctx context.Context, projectUUID string, opts *BuildLogsOptions) (*BuildLogsResponse, *http.Response, error)

GetBuildLogs fetches deployment build logs (Firebase pipeops-build-logs) for automation/MCP. Prefer this over client-side Firebase for service tokens.

Do not invent a workspace_uuid: on production, attaching the wrong workspace_uuid can return a Cloudflare/console 403 HTML page. Only send it when the caller set BuildLogsOptions.WorkspaceUUID.

func (*ProjectService) GetCPUMetrics

func (s *ProjectService) GetCPUMetrics(ctx context.Context, req *MetricsRequest) (*MetricsResponse, *http.Response, error)

GetCPUMetrics retrieves CPU metrics for a project.

func (*ProjectService) GetControlPlaneMetrics

func (s *ProjectService) GetControlPlaneMetrics(ctx context.Context, req *MetricsRequest) (*MetricsResponse, *http.Response, error)

GetControlPlaneMetrics retrieves control plane metrics.

func (*ProjectService) GetCosts

func (s *ProjectService) GetCosts(ctx context.Context, projectUUID string) (*CostsResponse, *http.Response, error)

GetCosts retrieves costs for a project.

func (*ProjectService) GetEnvVariables

func (s *ProjectService) GetEnvVariables(ctx context.Context, projectUUID string, opts ...*ProjectEnvVariablesOptions) (*EnvVariablesResponse, *http.Response, error)

GetEnvVariables retrieves environment variables for a project. Do not auto-pick firstWorkspaceUUID: that often picks a personal workspace and returns 403 for projects in another workspace. Only attach workspace_uuid when the caller supplies it, then fall back to the unscoped path.

func (*ProjectService) GetGitHubBranches

GetGitHubBranches fetches branches from a GitHub repository.

func (*ProjectService) GetGitHubOrgs

func (s *ProjectService) GetGitHubOrgs(ctx context.Context) (*GitHubOrgsResponse, *http.Response, error)

GetGitHubOrgs retrieves GitHub organizations.

func (*ProjectService) GetGitLabOrgRepos

GetGitLabOrgRepos retrieves GitLab organization repos.

func (*ProjectService) GetJobEvent

func (s *ProjectService) GetJobEvent(ctx context.Context, projectUUID, internalProjectName string) (*JobEventResponse, *http.Response, error)

GetJobEvent retrieves job event for a project.

func (*ProjectService) GetLogs

func (s *ProjectService) GetLogs(ctx context.Context, projectUUID string, opts *LogsOptions) (*LogsResponse, *http.Response, error)

GetLogs retrieves logs for a project.

func (*ProjectService) GetMemoryMetrics

func (s *ProjectService) GetMemoryMetrics(ctx context.Context, req *MetricsRequest) (*MetricsResponse, *http.Response, error)

GetMemoryMetrics retrieves memory metrics for a project.

func (*ProjectService) GetMetrics

GetMetrics retrieves metrics for a project.

func (*ProjectService) GetMetricsOverview

func (s *ProjectService) GetMetricsOverview(ctx context.Context, req *MetricsRequest) (*MetricsResponse, *http.Response, error)

GetMetricsOverview retrieves metrics overview for a project.

func (*ProjectService) GetNetworkIOMetrics

func (s *ProjectService) GetNetworkIOMetrics(ctx context.Context, req *MetricsRequest) (*MetricsResponse, *http.Response, error)

GetNetworkIOMetrics retrieves network I/O metrics for a project.

func (*ProjectService) GetNetworkSettings

func (s *ProjectService) GetNetworkSettings(ctx context.Context, projectUUID string) (*NetworkSettingsResponse, *http.Response, error)

GetNetworkSettings retrieves network settings for a project.

func (*ProjectService) GetPodsFromLabel

func (s *ProjectService) GetPodsFromLabel(ctx context.Context, projectUUID string) (*PodsResponse, *http.Response, error)

GetPodsFromLabel retrieves pods from label for a project.

func (*ProjectService) GetProjectNames

func (s *ProjectService) GetProjectNames(ctx context.Context) (*ProjectNamesResponse, *http.Response, error)

GetProjectNames retrieves user's project names.

func (*ProjectService) GetRuntimeLogs

func (s *ProjectService) GetRuntimeLogs(ctx context.Context, projectUUID, podName string) (*RuntimeLogsResponse, *http.Response, error)

GetRuntimeLogs retrieves runtime logs for a project pod.

func (*ProjectService) GetStorageMetrics

func (s *ProjectService) GetStorageMetrics(ctx context.Context, req *MetricsRequest) (*MetricsResponse, *http.Response, error)

GetStorageMetrics retrieves storage metrics for a project.

func (*ProjectService) LinkProvider

func (s *ProjectService) LinkProvider(ctx context.Context, provider string) (*http.Response, error)

LinkProvider initiates linking a Git provider.

func (*ProjectService) LinkProviderCallback

func (s *ProjectService) LinkProviderCallback(ctx context.Context, provider, uuid string) (*http.Response, error)

LinkProviderCallback handles provider link callback.

func (*ProjectService) LinkProviderWithRedirect added in v0.11.0

func (s *ProjectService) LinkProviderWithRedirect(ctx context.Context, provider string, req *LinkProviderRequest) (*LinkProviderResponse, *http.Response, error)

LinkProviderWithRedirect initiates linking a Git provider with a frontend redirect path.

func (*ProjectService) List

List lists all projects.

func (*ProjectService) ListDeploymentHistory added in v0.12.0

ListDeploymentHistory lists deployment history for a project.

func (*ProjectService) ListDeployments added in v0.12.0

ListDeployments lists build or git deployments for a project.

func (*ProjectService) ListNetworkPolicies

func (s *ProjectService) ListNetworkPolicies(ctx context.Context, projectUUID string) (*NetworkPoliciesResponse, *http.Response, error)

ListNetworkPolicies lists network policies for a project.

func (*ProjectService) ListProviderBranches added in v0.11.0

ListProviderBranches retrieves branches for a repository in a VCS provider.

func (*ProjectService) ListProviderOrganizationRepos added in v0.11.0

ListProviderOrganizationRepos retrieves repositories for a VCS provider organization or user profile.

func (*ProjectService) ListProviderOrganizations added in v0.11.0

func (s *ProjectService) ListProviderOrganizations(ctx context.Context, provider string) (*ProviderCollectionResponse, *http.Response, error)

ListProviderOrganizations retrieves organizations for a VCS provider.

func (*ProjectService) MigrateProject

func (s *ProjectService) MigrateProject(ctx context.Context, projectUUID, serverUUID, workspaceUUID string) (*http.Response, error)

MigrateProject migrates a project to different server/workspace.

func (*ProjectService) Restart

func (s *ProjectService) Restart(ctx context.Context, projectUUID string, opts ...*ProjectDeployOptions) (*http.Response, error)

Restart restarts a project by triggering a thin redeploy (no rebuild flags). Control plane has no POST /project/:uuid/restart route; redeploy rolls pods.

func (*ProjectService) SearchLogs

func (s *ProjectService) SearchLogs(ctx context.Context, projectUUID string, opts *LogsOptions) (*LogsResponse, *http.Response, error)

SearchLogs searches logs for a project. Deprecated: Use GetLogs with Search field in LogsOptions instead.

func (*ProjectService) SearchProviderRepositories added in v0.11.0

SearchProviderRepositories searches repositories for a VCS provider organization or user profile.

func (*ProjectService) SearchRepos

SearchRepos searches for repositories.

func (*ProjectService) SetProjectDomainName

func (s *ProjectService) SetProjectDomainName(ctx context.Context, projectUUID string, req *DomainRequest) (*http.Response, error)

SetProjectDomainName sets the project domain name.

func (*ProjectService) Stop

func (s *ProjectService) Stop(ctx context.Context, projectUUID string) (*http.Response, error)

Stop stops a project by scaling replicas to 0 (dashboard pause semantics). Control plane has no POST /project/:uuid/stop route.

func (*ProjectService) TailLogs

func (s *ProjectService) TailLogs(ctx context.Context, projectUUID string, opts *LogsOptions) (*LogsResponse, *http.Response, error)

TailLogs tails logs for a project (streams recent logs). Deprecated: Use GetLogs with appropriate LogsOptions instead.

func (*ProjectService) Update

Update updates project name/port via the control-plane settings endpoints. There is no PUT /project/:uuid route; the dashboard uses settings/name for rename and port updates. Description is not stored by the API today.

func (*ProjectService) UpdateDeploySettings added in v0.15.3

func (s *ProjectService) UpdateDeploySettings(ctx context.Context, projectUUID string, req *DeploySettingsRequest) (*DeploySettingsResponse, *http.Response, error)

UpdateDeploySettings updates source-control / auto-deploy flags via POST /project/settings/deploy/:uuid. Prefer-client: only send fields you want to change (e.g. only AutoDeployEnabled); the control plane fills branch, repository, username, and omitted auto flags from the project.

func (*ProjectService) UpdateDomain

func (s *ProjectService) UpdateDomain(ctx context.Context, projectUUID string, req *DomainRequest) (*DomainResponse, *http.Response, error)

UpdateDomain updates the domain for a project.

func (*ProjectService) UpdateEnvVariables

func (s *ProjectService) UpdateEnvVariables(ctx context.Context, projectUUID string, req *EnvVariablesRequest) (*EnvVariablesResponse, *http.Response, error)

UpdateEnvVariables updates environment variables for a project via POST /project/settings/env/:uuid. Prefer-client on the control plane: client-provided keys win; with Merge=true existing keys not in the request are preserved; PORT is injected from network when missing.

func (*ProjectService) UpdateNetworkPolicy

func (s *ProjectService) UpdateNetworkPolicy(ctx context.Context, projectUUID, policyUUID string, req *NetworkPolicyRequest) (*NetworkPolicyResponse, *http.Response, error)

UpdateNetworkPolicy updates a network policy.

func (*ProjectService) UpdateNetworkingPort

func (s *ProjectService) UpdateNetworkingPort(ctx context.Context, projectUUID string, req *NetworkSettingsRequest) (*NetworkSettingsResponse, *http.Response, error)

UpdateNetworkingPort updates the networking port for a project.

func (*ProjectService) UpdateSecurityPolicy added in v0.15.3

func (s *ProjectService) UpdateSecurityPolicy(ctx context.Context, projectUUID string, req *SecurityPolicyRequest) (*SecurityPolicyResponse, *http.Response, error)

UpdateSecurityPolicy updates image-scan gate settings via PUT /project/settings/security-policy/:uuid. Prefer-client partial updates: only set the fields you want to change; omitted keys keep stored values.

func (*ProjectService) ValidatePort

func (s *ProjectService) ValidatePort(ctx context.Context, environment, port string) (*http.Response, error)

ValidatePort validates if a port is available.

type ProjectsResponse

type ProjectsResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Projects []Project `json:"projects"`
	} `json:"data"`
}

ProjectsResponse represents a list of projects response.

type ProviderBranchesOptions added in v0.11.0

type ProviderBranchesOptions struct {
	Search string `url:"search,omitempty"`
}

ProviderBranchesOptions specifies optional query parameters for provider branch endpoints.

type ProviderBranchesRequest added in v0.11.0

type ProviderBranchesRequest struct {
	RepoFullname string `json:"repo_fullname"`
	Visibility   string `json:"visibility,omitempty"`
}

ProviderBranchesRequest represents a provider repository branches request.

type ProviderCollectionOptions added in v0.11.0

type ProviderCollectionOptions struct {
	Page int `url:"page,omitempty"`
}

ProviderCollectionOptions specifies optional paging parameters for provider collection endpoints.

type ProviderCollectionResponse added in v0.11.0

type ProviderCollectionResponse struct {
	Status   string                   `json:"status,omitempty"`
	Success  bool                     `json:"success,omitempty"`
	Message  string                   `json:"message,omitempty"`
	Data     []map[string]interface{} `json:"data"`
	MetaData map[string]interface{}   `json:"meta_data,omitempty"`
}

ProviderCollectionResponse represents a provider collection response.

type ProviderOrganizationReposRequest added in v0.11.0

type ProviderOrganizationReposRequest struct {
	OrgName string `json:"org_name"`
}

ProviderOrganizationReposRequest represents a provider organization repositories request.

type ProviderRepoSearchRequest added in v0.11.0

type ProviderRepoSearchRequest struct {
	RepositoryName string `json:"repository_name"`
	OrgName        string `json:"org_name"`
}

ProviderRepoSearchRequest represents a provider repository search request.

type RateLimitError added in v0.2.0

type RateLimitError struct {
	Response   *http.Response
	RetryAfter time.Duration
	Limit      int
	Remaining  int
	Reset      time.Time
}

RateLimitError represents a rate limit error from the API.

func (*RateLimitError) Error added in v0.2.0

func (e *RateLimitError) Error() string

type RedeployProjectGroupAppsResponse added in v0.15.0

type RedeployProjectGroupAppsResponse struct {
	Queued  []string `json:"queued,omitempty"`
	Failed  []string `json:"failed,omitempty"`
	Message string   `json:"message,omitempty"`
}

RedeployProjectGroupAppsResponse is bulk app redeploy result.

type RefundRequest

type RefundRequest struct {
	InvoiceUUID string  `json:"invoice_uuid"`
	Amount      float64 `json:"amount,omitempty"`
	Reason      string  `json:"reason,omitempty"`
}

RefundRequest represents a refund request.

type RemountVolumeRequest added in v0.14.0

type RemountVolumeRequest struct {
	TargetType string `json:"target_type"` // project | addon
	TargetUUID string `json:"target_uuid"`
	MountPath  string `json:"mount_path,omitempty"`
}

RemountVolumeRequest remounts an unattached volume onto a live resource.

type RemountVolumeResponse added in v0.14.0

type RemountVolumeResponse struct {
	Success bool   `json:"success,omitempty"`
	Message string `json:"message,omitempty"`
	Data    struct {
		Volume  Volume `json:"volume"`
		Message string `json:"message,omitempty"`
	} `json:"data"`
}

RemountVolumeResponse is POST /volumes/:uuid/remount.

type RepoSearchRequest

type RepoSearchRequest struct {
	Query          string `json:"query,omitempty"`
	RepositoryName string `json:"repository_name,omitempty"`
	OrgName        string `json:"org_name,omitempty"`
}

RepoSearchRequest represents repository search request.

type RepoSearchResponse

type RepoSearchResponse struct {
	Status  string `json:"status"`
	Success bool   `json:"success,omitempty"`
	Message string `json:"message"`
	Data    struct {
		Repos []map[string]interface{} `json:"repos"`
	} `json:"data"`
}

RepoSearchResponse represents repository search response.

type ResetPasswordRequest

type ResetPasswordRequest struct {
	Token       string `json:"token"`
	NewPassword string `json:"new_password"`
}

ResetPasswordRequest represents a password reset request.

type ResolveProjectGroupResponse added in v0.15.0

type ResolveProjectGroupResponse struct {
	GroupUUID  string `json:"group_uuid,omitempty"`
	MemberType string `json:"member_type,omitempty"`
	MemberUUID string `json:"member_uuid,omitempty"`
}

ResolveProjectGroupResponse maps a service id to its group.

type RetryConfig added in v0.2.0

type RetryConfig struct {
	MaxRetries   int
	RetryWaitMin time.Duration
	RetryWaitMax time.Duration
	RetryPolicy  RetryPolicy
}

RetryConfig configures retry behavior for failed requests.

type RetryPolicy added in v0.2.0

type RetryPolicy func(ctx context.Context, resp *http.Response, err error) (bool, error)

RetryPolicy determines if a request should be retried.

type ReviewAddOnRequest

type ReviewAddOnRequest struct {
	Status   string `json:"status"` // "approved" or "rejected"
	Comments string `json:"comments,omitempty"`
}

ReviewAddOnRequest represents an add-on review request.

type RexecBinding added in v0.18.0

type RexecBinding struct {
	WorkspaceUUID string     `json:"workspace_uuid,omitempty"`
	BaseURL       string     `json:"base_url,omitempty"`
	TokenPrefix   string     `json:"token_prefix,omitempty"`
	Enabled       bool       `json:"enabled"`
	Configured    bool       `json:"configured"`
	LastUsedAt    *Timestamp `json:"last_used_at,omitempty"`
	UpdatedAt     *Timestamp `json:"updated_at,omitempty"`
	Source        string     `json:"source,omitempty"` // workspace | platform
}

RexecBinding is a safe view of workspace Rexec credentials (no secret).

type RexecBindingResponse added in v0.18.0

type RexecBindingResponse struct {
	Success bool         `json:"success,omitempty"`
	Message string       `json:"message,omitempty"`
	Data    RexecBinding `json:"data"`
}

RexecBindingResponse is GET/PUT .../rexec-binding.

type RuntimeLogsResponse

type RuntimeLogsResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Logs []string `json:"logs"`
	} `json:"data"`
}

RuntimeLogsResponse represents runtime logs response.

type Sandbox added in v0.18.0

type Sandbox struct {
	ID        string            `json:"id,omitempty"`
	UUID      string            `json:"uuid,omitempty"`
	Name      string            `json:"name,omitempty"`
	Image     string            `json:"image,omitempty"`
	Role      string            `json:"role,omitempty"`
	Status    string            `json:"status,omitempty"`
	CreatedAt *Timestamp        `json:"created_at,omitempty"`
	UpdatedAt *Timestamp        `json:"updated_at,omitempty"`
	Labels    map[string]string `json:"labels,omitempty"`
}

Sandbox is a Rexec container as returned by the BFF.

func (*Sandbox) UnmarshalJSON added in v0.18.0

func (s *Sandbox) UnmarshalJSON(data []byte) error

UnmarshalJSON accepts snake_case and PascalCase field aliases from the BFF.

type SandboxFileContent added in v0.18.1

type SandboxFileContent struct {
	SandboxID string `json:"sandbox_id,omitempty"`
	Path      string `json:"path,omitempty"`
	Content   string `json:"content,omitempty"`
	Encoding  string `json:"encoding,omitempty"`
	Size      int    `json:"size"`
	Truncated bool   `json:"truncated,omitempty"`
}

SandboxFileContent is GET /api/v1/sandboxes/:id/files/content data. Encoding is "utf-8" for text or "base64" for binary.

type SandboxFileContentResponse added in v0.18.1

type SandboxFileContentResponse struct {
	Success bool               `json:"success,omitempty"`
	Message string             `json:"message,omitempty"`
	Data    SandboxFileContent `json:"data"`
}

SandboxFileContentResponse is the BFF envelope for read file.

type SandboxFileInfo added in v0.18.1

type SandboxFileInfo struct {
	Name  string `json:"name,omitempty"`
	Path  string `json:"path,omitempty"`
	Size  int64  `json:"size,omitempty"`
	Mode  string `json:"mode,omitempty"`
	IsDir bool   `json:"is_dir"`
}

SandboxFileInfo is one directory entry from ListFiles.

type SandboxFileList added in v0.18.1

type SandboxFileList struct {
	SandboxID string            `json:"sandbox_id,omitempty"`
	Path      string            `json:"path,omitempty"`
	Files     []SandboxFileInfo `json:"files"`
	Count     int               `json:"count"`
}

SandboxFileList is GET /api/v1/sandboxes/:id/files data.

type SandboxFileListResponse added in v0.18.1

type SandboxFileListResponse struct {
	Success bool            `json:"success,omitempty"`
	Message string          `json:"message,omitempty"`
	Data    SandboxFileList `json:"data"`
}

SandboxFileListResponse is the BFF envelope for list files.

type SandboxListResponse added in v0.18.0

type SandboxListResponse struct {
	Success bool      `json:"success,omitempty"`
	Message string    `json:"message,omitempty"`
	Data    []Sandbox `json:"data"`
	Meta    struct {
		Count int `json:"count"`
	} `json:"meta"`
}

SandboxListResponse is GET /api/v1/sandboxes.

type SandboxResponse added in v0.18.0

type SandboxResponse struct {
	Success bool    `json:"success,omitempty"`
	Message string  `json:"message,omitempty"`
	Data    Sandbox `json:"data"`
}

SandboxResponse is GET/POST single-sandbox envelopes.

type SandboxService added in v0.18.0

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

SandboxService talks to the PipeOps sandboxes BFF (Rexec proxy).

Controller mounts the same handlers at /sandboxes and /api/v1/sandboxes. This client uses /api/v1/sandboxes (SDK-oriented alias).

Auth: user JWT session or workspace service account (sat_*) with api:read/write or preset "sandbox". Workspace is required for multi-tenant correctness (query workspace_uuid / workspace, or SA-bound workspace).

This is not a direct Rexec client — PipeOps proxies with workspace/platform credentials. Use MintAPIToken only when you need a raw rexec_* for external tools.

func (*SandboxService) Create added in v0.18.0

Create creates a sandbox. Empty req is allowed (server defaults). POST /api/v1/sandboxes?workspace_uuid=

func (*SandboxService) CreateSession added in v0.18.0

CreateSession mints a short-lived terminal/session grant for a sandbox. POST /api/v1/sandboxes/:id/session?workspace_uuid=

func (*SandboxService) Delete added in v0.18.0

Delete deletes a sandbox. DELETE /api/v1/sandboxes/:id?workspace_uuid=

func (*SandboxService) DeleteRexecBinding added in v0.18.0

DeleteRexecBinding removes the workspace Rexec binding. DELETE /api/v1/sandboxes/rexec-binding?workspace_uuid=

func (*SandboxService) Exec added in v0.18.1

Exec runs a non-interactive command inside a running sandbox. POST /api/v1/sandboxes/:id/exec?workspace_uuid= Body requires Command (shell string) and/or Cmd (argv).

func (*SandboxService) Get added in v0.18.0

Get returns one sandbox by id. GET /api/v1/sandboxes/:id?workspace_uuid=

func (*SandboxService) GetRexecBinding added in v0.18.0

GetRexecBinding returns workspace Rexec credential status (no secret). GET /api/v1/sandboxes/rexec-binding?workspace_uuid=

func (*SandboxService) List added in v0.18.0

List lists sandboxes for a workspace. GET /api/v1/sandboxes?workspace_uuid=

func (*SandboxService) ListFiles added in v0.18.1

func (s *SandboxService) ListFiles(ctx context.Context, sandboxID, path string, opts *SandboxWorkspaceOptions) (*SandboxFileListResponse, *http.Response, error)

ListFiles lists a directory inside a running sandbox. GET /api/v1/sandboxes/:id/files?workspace_uuid=&path= Empty path defaults to /home/user on the server.

func (*SandboxService) MintAPIToken added in v0.18.0

MintAPIToken mints a long-lived Rexec API token (rexec_*). Shown once. POST /api/v1/sandboxes/api-token?workspace_uuid=

func (*SandboxService) ReadFile added in v0.18.1

ReadFile reads a file from a running sandbox (UTF-8 text or base64). GET /api/v1/sandboxes/:id/files/content?workspace_uuid=&path=

func (*SandboxService) Restart added in v0.18.0

Restart stops then starts a sandbox (dashboard convenience).

func (*SandboxService) Start added in v0.18.0

Start starts a stopped sandbox. POST /api/v1/sandboxes/:id/start?workspace_uuid=

func (*SandboxService) Stop added in v0.18.0

Stop stops a running sandbox. POST /api/v1/sandboxes/:id/stop?workspace_uuid=

func (*SandboxService) UpsertRexecBinding added in v0.18.0

UpsertRexecBinding sets a workspace-owned Rexec API token (BYOS). PUT /api/v1/sandboxes/rexec-binding?workspace_uuid=

func (*SandboxService) UsageDaily added in v0.18.0

UsageDaily returns usage rollups for a workspace day range (inclusive). GET /api/v1/sandboxes/usage/daily?workspace_uuid=&from=&to= from/to use YYYY-MM-DD. Zero times omit the corresponding query param.

type SandboxSession added in v0.18.0

type SandboxSession struct {
	ContainerID string `json:"container_id,omitempty"`
	Token       string `json:"token,omitempty"`
	BaseURL     string `json:"base_url,omitempty"`
	ExpiresIn   int    `json:"expires_in_seconds,omitempty"`
	TokenSource string `json:"token_source,omitempty"` // ephemeral | workspace | platform
	GrantID     string `json:"grant_id,omitempty"`
}

SandboxSession is a short-lived terminal/embed grant from POST .../session.

func (*SandboxSession) UnmarshalJSON added in v0.18.0

func (s *SandboxSession) UnmarshalJSON(data []byte) error

UnmarshalJSON also accepts Token PascalCase alias from the BFF.

type SandboxSessionResponse added in v0.18.0

type SandboxSessionResponse struct {
	Success bool           `json:"success,omitempty"`
	Message string         `json:"message,omitempty"`
	Data    SandboxSession `json:"data"`
}

SandboxSessionResponse is POST .../session.

type SandboxUsageDaily added in v0.18.0

type SandboxUsageDaily struct {
	WorkspaceUUID        string     `json:"workspace_uuid,omitempty"`
	Day                  *Timestamp `json:"day,omitempty"`
	CreatedCount         int64      `json:"created_count,omitempty"`
	StartedCount         int64      `json:"started_count,omitempty"`
	StoppedCount         int64      `json:"stopped_count,omitempty"`
	DeletedCount         int64      `json:"deleted_count,omitempty"`
	SessionCount         int64      `json:"session_count,omitempty"`
	TotalDurationSeconds int64      `json:"total_duration_seconds,omitempty"`
	UniqueContainers     int64      `json:"unique_containers,omitempty"`
}

SandboxUsageDaily is a billing rollup row for a workspace day.

type SandboxUsageDailyResponse added in v0.18.0

type SandboxUsageDailyResponse struct {
	Success bool                `json:"success,omitempty"`
	Message string              `json:"message,omitempty"`
	Data    []SandboxUsageDaily `json:"data"`
}

SandboxUsageDailyResponse is GET .../usage/daily.

type SandboxWorkspaceOptions added in v0.18.0

type SandboxWorkspaceOptions struct {
	WorkspaceUUID string `url:"workspace_uuid,omitempty"`
	Workspace     string `url:"workspace,omitempty"`
}

SandboxWorkspaceOptions scopes sandbox calls to a workspace. Prefer WorkspaceUUID; Workspace is accepted as a controller alias.

type ScanResult

type ScanResult struct {
	ID              string     `json:"id,omitempty"`
	UUID            string     `json:"uuid,omitempty"`
	ProjectID       string     `json:"project_id,omitempty"`
	Severity        string     `json:"severity,omitempty"`
	Vulnerabilities int        `json:"vulnerabilities,omitempty"`
	Status          string     `json:"status,omitempty"`
	ScannedAt       *Timestamp `json:"scanned_at,omitempty"`
}

ScanResult represents a security scan result.

type ScanResultsResponse

type ScanResultsResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Results []ScanResult `json:"results"`
	} `json:"data"`
}

ScanResultsResponse represents scan results response.

type SecurityPolicyRequest added in v0.15.3

type SecurityPolicyRequest struct {
	Enabled       *bool    `json:"enabled,omitempty"`
	MaxCritical   *int     `json:"maxCritical,omitempty"`
	MaxHigh       *int     `json:"maxHigh,omitempty"`
	MaxMedium     *int     `json:"maxMedium,omitempty"`
	MaxCvssScore  *float64 `json:"maxCvssScore,omitempty"`
	MaxTotalVulns *int     `json:"maxTotalVulns,omitempty"`
	FailOnSecrets *bool    `json:"failOnSecrets,omitempty"`
	// WorkspaceUUID scopes the request when multi-workspace tokens are used.
	WorkspaceUUID string `json:"-"`
}

SecurityPolicyRequest is a partial prefer-client body for PUT /project/settings/security-policy/:uuid. Nil pointers are omitted so the control plane keeps existing policy fields; non-nil values (including false/0) win.

type SecurityPolicyResponse added in v0.15.3

type SecurityPolicyResponse struct {
	Success bool   `json:"success"`
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		SecurityPolicy map[string]interface{} `json:"securityPolicy"`
	} `json:"data"`
}

SecurityPolicyResponse is the control-plane response for security policy update.

type SecurityScanService

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

SecurityScanService handles security scanning related methods.

func (*SecurityScanService) GetScanResults

func (s *SecurityScanService) GetScanResults(ctx context.Context, projectUUID string) (*ScanResultsResponse, *http.Response, error)

GetScanResults retrieves scan results for a project.

func (*SecurityScanService) ScanProject

func (s *SecurityScanService) ScanProject(ctx context.Context, projectUUID string) (*http.Response, error)

ScanProject initiates a security scan for a project.

type Server

type Server struct {
	ID          string     `json:"id,omitempty"`
	UUID        string     `json:"uuid,omitempty"`
	Name        string     `json:"name,omitempty"`
	Provider    string     `json:"provider,omitempty"`
	Region      string     `json:"region,omitempty"`
	Status      string     `json:"status,omitempty"`
	WorkspaceID string     `json:"workspace_id,omitempty"`
	CreatedAt   *Timestamp `json:"created_at,omitempty"`
	UpdatedAt   *Timestamp `json:"updated_at,omitempty"`
}

Server represents a PipeOps server.

type ServerResponse

type ServerResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Server Server `json:"server"`
	} `json:"data"`
}

ServerResponse represents a single server response.

type ServerService

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

ServerService handles communication with the server related methods of the PipeOps API.

func (*ServerService) AgentHeartbeat

func (s *ServerService) AgentHeartbeat(ctx context.Context, clusterUUID string, req *AgentHeartbeatRequest) (*http.Response, error)

AgentHeartbeat sends a heartbeat for an agent.

func (*ServerService) Create

func (s *ServerService) Create(ctx context.Context, clusterUUID string, req *CreateServerRequest) (*ServerResponse, *http.Response, error)

Create creates a new server in a cluster.

func (*ServerService) CreateServiceToken

CreateServiceToken creates a new service account token.

func (*ServerService) Delete

func (s *ServerService) Delete(ctx context.Context, clusterUUID, serverUUID string) (*http.Response, error)

Delete deletes a server from a cluster.

func (*ServerService) DeregisterAgent

func (s *ServerService) DeregisterAgent(ctx context.Context, clusterUUID string) (*http.Response, error)

DeregisterAgent deregisters an agent.

func (*ServerService) Get

func (s *ServerService) Get(ctx context.Context, clusterUUID, workspaceUUID string) (*ServerResponse, *http.Response, error)

Get fetches a server by UUID.

func (*ServerService) GetAgentConfig

func (s *ServerService) GetAgentConfig(ctx context.Context, clusterUUID string) (*http.Response, error)

GetAgentConfig retrieves agent configuration.

func (*ServerService) GetAgentLogs

func (s *ServerService) GetAgentLogs(ctx context.Context, clusterUUID string) (*http.Response, error)

GetAgentLogs retrieves agent logs.

func (*ServerService) GetAgentMetrics

func (s *ServerService) GetAgentMetrics(ctx context.Context, clusterUUID string) (*http.Response, error)

GetAgentMetrics retrieves agent metrics.

func (*ServerService) GetAgentTunnelStatus

func (s *ServerService) GetAgentTunnelStatus(ctx context.Context, agentID string) (*http.Response, error)

GetAgentTunnelStatus gets the tunnel status for an agent.

func (*ServerService) GetClusterConnection

func (s *ServerService) GetClusterConnection(ctx context.Context, clusterUUID string) (*ClusterConnectionResponse, *http.Response, error)

GetClusterConnection gets connection information for a cluster.

func (*ServerService) GetClusterCostAllocation

func (s *ServerService) GetClusterCostAllocation(ctx context.Context, clusterUUID string) (*CostAllocationResponse, *http.Response, error)

GetClusterCostAllocation gets cost allocation for a cluster.

func (*ServerService) GetServiceToken

func (s *ServerService) GetServiceToken(ctx context.Context, tokenUUID string) (*ServiceTokenResponse, *http.Response, error)

GetServiceToken gets a service token by UUID.

func (*ServerService) GetTunnelInfo

func (s *ServerService) GetTunnelInfo(ctx context.Context, clusterUUID string) (*TunnelInfoResponse, *http.Response, error)

GetTunnelInfo gets tunnel information for a cluster.

func (*ServerService) List

func (s *ServerService) List(ctx context.Context, workspaceUUID string) (*ServersResponse, *http.Response, error)

List lists all servers in a cluster.

func (*ServerService) ListServiceTokens

func (s *ServerService) ListServiceTokens(ctx context.Context) (*ServiceTokensResponse, *http.Response, error)

ListServiceTokens lists all service account tokens.

func (*ServerService) PollAgent

func (s *ServerService) PollAgent(ctx context.Context, clusterUUID string) (*http.Response, error)

PollAgent polls for agent tasks.

func (*ServerService) RegisterAgent

RegisterAgent registers a new agent/cluster.

func (*ServerService) RevokeServiceToken

func (s *ServerService) RevokeServiceToken(ctx context.Context, tokenUUID string) (*http.Response, error)

RevokeServiceToken revokes a service token.

func (*ServerService) SyncAgentConfig

func (s *ServerService) SyncAgentConfig(ctx context.Context, clusterUUID string) (*http.Response, error)

SyncAgentConfig syncs agent configuration.

func (*ServerService) UpdateAgentStatus

func (s *ServerService) UpdateAgentStatus(ctx context.Context, clusterUUID string, req *UpdateAgentStatusRequest) (*http.Response, error)

UpdateAgentStatus updates agent status.

func (*ServerService) UpdateServiceToken

func (s *ServerService) UpdateServiceToken(ctx context.Context, tokenUUID string, req *UpdateServiceTokenRequest) (*ServiceTokenResponse, *http.Response, error)

UpdateServiceToken updates a service token.

type ServersResponse

type ServersResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Servers []Server `json:"servers"`
	} `json:"data"`
}

ServersResponse represents a list of servers response.

type ServiceAccountToken

type ServiceAccountToken struct {
	UUID        string     `json:"uuid,omitempty"`
	Name        string     `json:"name,omitempty"`
	Description string     `json:"description,omitempty"`
	Token       string     `json:"token,omitempty"`
	TokenPrefix string     `json:"token_prefix,omitempty"`
	WorkspaceID string     `json:"workspace_id,omitempty"`
	Permissions []string   `json:"permissions,omitempty"`
	Scopes      []string   `json:"scopes,omitempty"`
	ExpiresAt   *Timestamp `json:"expires_at,omitempty"`
	CreatedAt   *Timestamp `json:"created_at,omitempty"`
	UpdatedAt   *Timestamp `json:"updated_at,omitempty"`
	LastUsedAt  *Timestamp `json:"last_used_at,omitempty"`
	IsActive    bool       `json:"is_active,omitempty"`
}

ServiceAccountToken represents a service account token.

type ServiceAccountTokenListResponse

type ServiceAccountTokenListResponse struct {
	Success bool   `json:"success,omitempty"`
	Status  string `json:"status,omitempty"`
	Message string `json:"message,omitempty"`
	Data    struct {
		Tokens []ServiceAccountToken `json:"tokens,omitempty"`
		Total  int                   `json:"total,omitempty"`
	} `json:"data"`
}

ServiceAccountTokenListResponse represents a list of service account tokens.

type ServiceAccountTokenRequest

type ServiceAccountTokenRequest struct {
	Name          string   `json:"name"`
	Description   string   `json:"description,omitempty"`
	Permissions   []string `json:"permissions,omitempty"`
	ExpiresAt     string   `json:"expires_at,omitempty"`
	WorkspaceUUID string   `json:"workspace_uuid,omitempty"` // required by controller
	Preset        string   `json:"preset,omitempty"`         // e.g. sandbox, mcp, sdk
}

ServiceAccountTokenRequest represents a request to create a service account token.

type ServiceAccountTokenResponse

type ServiceAccountTokenResponse struct {
	Success bool   `json:"success,omitempty"`
	Status  string `json:"status,omitempty"`
	Message string `json:"message,omitempty"`
	Data    struct {
		Token ServiceAccountToken `json:"token,omitempty"`
	} `json:"data"`
}

ServiceAccountTokenResponse represents the response from service token operations. Create returns a flat data object with token as a string; get/list nest under token.

func (*ServiceAccountTokenResponse) UnmarshalJSON added in v0.18.3

func (r *ServiceAccountTokenResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON accepts both create (flat data.token string) and get (data.token object) shapes.

type ServiceAccountTokenUpdateRequest

type ServiceAccountTokenUpdateRequest struct {
	Name        string   `json:"name,omitempty"`
	Description string   `json:"description,omitempty"`
	Permissions []string `json:"permissions,omitempty"`
	IsActive    *bool    `json:"is_active,omitempty"`
}

ServiceAccountTokenUpdateRequest represents a request to update a service account token.

type ServiceService

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

ServiceService handles service related methods of the PipeOps API.

func (*ServiceService) CreateDatabase

func (s *ServiceService) CreateDatabase(ctx context.Context, req *CreateDatabaseRequest) (*http.Response, error)

CreateDatabase creates a new database service.

type ServiceToken

type ServiceToken struct {
	ID          string     `json:"id,omitempty"`
	UUID        string     `json:"uuid,omitempty"`
	Name        string     `json:"name,omitempty"`
	Token       string     `json:"token,omitempty"`
	Description string     `json:"description,omitempty"`
	ExpiresAt   *Timestamp `json:"expires_at,omitempty"`
	CreatedAt   *Timestamp `json:"created_at,omitempty"`
}

ServiceToken represents a service account token.

type ServiceTokenRequest

type ServiceTokenRequest struct {
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	ExpiresIn   int    `json:"expires_in,omitempty"` // in days
}

ServiceTokenRequest represents a request to create a service token.

type ServiceTokenResponse

type ServiceTokenResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Token ServiceToken `json:"token"`
	} `json:"data"`
}

ServiceTokenResponse represents a service token response.

type ServiceTokenService

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

ServiceTokenService handles communication with service account token related methods of the PipeOps API.

func (*ServiceTokenService) CreateServiceAccountToken

CreateServiceAccountToken creates a new service account token. Controller requires workspace_uuid on the body (and often on the query).

func (*ServiceTokenService) GetServiceAccountToken

GetServiceAccountToken gets details of a specific service account token.

func (*ServiceTokenService) ListServiceAccountTokens

ListServiceAccountTokens lists service account tokens for a workspace.

func (*ServiceTokenService) RevokeServiceAccountToken

func (s *ServiceTokenService) RevokeServiceAccountToken(ctx context.Context, tokenUUID string, opts *ServiceTokenWorkspaceOptions) (*http.Response, error)

RevokeServiceAccountToken revokes (deletes) a service account token.

func (*ServiceTokenService) UpdateServiceAccountToken

UpdateServiceAccountToken updates a service account token.

type ServiceTokenWorkspaceOptions added in v0.18.3

type ServiceTokenWorkspaceOptions struct {
	WorkspaceUUID string `url:"workspace_uuid,omitempty"`
}

ServiceTokenWorkspaceOptions scopes service-account-token routes. CheckWorkspaceIntegrationsAccess requires workspace or workspace_uuid.

type ServiceTokensResponse

type ServiceTokensResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Tokens []ServiceToken `json:"tokens"`
	} `json:"data"`
}

ServiceTokensResponse represents a list of service tokens response.

type SetActiveCardRequest

type SetActiveCardRequest struct {
	CardUUID string `json:"card_uuid"`
}

SetActiveCardRequest represents a request to set active billing card.

type SetBillingEmailRequest

type SetBillingEmailRequest struct {
	Email string `json:"BillingEmail"`
}

SetBillingEmailRequest represents a request to set billing email. Control plane binds json:"BillingEmail" (PascalCase), not "email".

type SetEnvironmentVariablesRequest

type SetEnvironmentVariablesRequest struct {
	EnvVariables []EnvVariable `json:"env_variables"`
}

SetEnvironmentVariablesRequest represents a request to set environment variables.

type SignupRequest

type SignupRequest struct {
	Email     string `json:"email"`
	Password  string `json:"password"`
	FirstName string `json:"first_name,omitempty"`
	LastName  string `json:"last_name,omitempty"`
}

SignupRequest represents a signup request.

type SignupResponse

type SignupResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		User User `json:"user"`
	} `json:"data"`
}

SignupResponse represents a signup response.

type StartTrialRequest

type StartTrialRequest struct {
	PlanID string `json:"plan_id"`
}

StartTrialRequest represents a request to start a trial.

type SubscribeRequest

type SubscribeRequest struct {
	PlanID string `json:"plan_id"`
}

SubscribeRequest represents a subscription request.

type Subscription

type Subscription struct {
	ID            string     `json:"id,omitempty"`
	UUID          string     `json:"uuid,omitempty"`
	PlanID        string     `json:"plan_id,omitempty"`
	PlanName      string     `json:"plan_name,omitempty"`
	PlanTier      string     `json:"plan_tier,omitempty"`
	Status        string     `json:"status,omitempty"`
	BillingType   string     `json:"billing_type,omitempty"`
	BillingStatus string     `json:"billing_status,omitempty"`
	PaymentMethod string     `json:"payment_method,omitempty"`
	PlanPeriod    string     `json:"plan_period,omitempty"`
	Provider      string     `json:"provider,omitempty"`
	Description   string     `json:"description,omitempty"`
	Quantity      int        `json:"quantity,omitempty"`
	StartDate     *Timestamp `json:"start_date,omitempty"`
	EndDate       *Timestamp `json:"end_date,omitempty"`
	Date          *Timestamp `json:"date,omitempty"`
	Amount        float64    `json:"amount,omitempty"`
	Currency      string     `json:"currency,omitempty"`
	CreatedAt     *Timestamp `json:"created_at,omitempty"`
	UpdatedAt     *Timestamp `json:"updated_at,omitempty"`
}

Subscription represents a billing subscription.

func (*Subscription) UnmarshalJSON added in v0.10.3

func (s *Subscription) UnmarshalJSON(data []byte) error

type SubscriptionResponse

type SubscriptionResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Subscription  Subscription   `json:"subscription"`
		Subscriptions []Subscription `json:"subscriptions,omitempty"`
		CheckoutURL   string         `json:"checkout_url,omitempty"`
		Message       string         `json:"message,omitempty"`
	} `json:"data"`
}

SubscriptionResponse represents a single subscription response.

func (*SubscriptionResponse) UnmarshalJSON added in v0.10.3

func (r *SubscriptionResponse) UnmarshalJSON(data []byte) error

type SubscriptionsResponse

type SubscriptionsResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Subscriptions []Subscription `json:"subscriptions"`
	} `json:"data"`
}

SubscriptionsResponse represents a list of subscriptions response.

func (*SubscriptionsResponse) UnmarshalJSON added in v0.10.3

func (r *SubscriptionsResponse) UnmarshalJSON(data []byte) error

type Survey

type Survey struct {
	ID        string     `json:"id,omitempty"`
	UUID      string     `json:"uuid,omitempty"`
	RoleID    string     `json:"role_id,omitempty"`
	Answers   []string   `json:"answers,omitempty"`
	CreatedAt *Timestamp `json:"created_at,omitempty"`
}

Survey represents a survey.

type SurveyDiscoveriesResponse

type SurveyDiscoveriesResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Discoveries []string `json:"discoveries"`
	} `json:"data"`
}

SurveyDiscoveriesResponse represents survey discoveries response.

type SurveyQuestionsResponse

type SurveyQuestionsResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Questions []map[string]interface{} `json:"questions"`
	} `json:"data"`
}

SurveyQuestionsResponse represents survey questions response.

type SurveyResponse

type SurveyResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Survey Survey `json:"survey"`
	} `json:"data"`
}

SurveyResponse represents a survey response.

type SurveyRolesResponse

type SurveyRolesResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Roles []map[string]interface{} `json:"roles"`
	} `json:"data"`
}

SurveyRolesResponse represents survey roles response.

type SurveyService

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

SurveyService handles communication with the survey related methods of the PipeOps API.

func (*SurveyService) CreateSurvey

CreateSurvey creates an onboarding survey.

func (*SurveyService) GetRoleQuestions

func (s *SurveyService) GetRoleQuestions(ctx context.Context, roleID string) (*SurveyQuestionsResponse, *http.Response, error)

GetRoleQuestions gets questions for a survey role.

func (*SurveyService) GetSurveyDiscoveries

func (s *SurveyService) GetSurveyDiscoveries(ctx context.Context) (*SurveyDiscoveriesResponse, *http.Response, error)

GetSurveyDiscoveries gets survey discovery options.

func (*SurveyService) GetSurveyRoles

func (s *SurveyService) GetSurveyRoles(ctx context.Context) (*SurveyRolesResponse, *http.Response, error)

GetSurveyRoles gets available survey roles.

type Team

type Team struct {
	ID          string     `json:"id,omitempty"`
	UUID        string     `json:"uuid,omitempty"`
	Name        string     `json:"name,omitempty"`
	Description string     `json:"description,omitempty"`
	OwnerID     string     `json:"owner_id,omitempty"`
	CreatedAt   *Timestamp `json:"created_at,omitempty"`
	UpdatedAt   *Timestamp `json:"updated_at,omitempty"`
}

Team represents a PipeOps team.

type TeamMember

type TeamMember struct {
	ID          string     `json:"id,omitempty"`
	UUID        string     `json:"uuid,omitempty"`
	Email       string     `json:"email,omitempty"`
	Role        string     `json:"role,omitempty"`
	Permissions []string   `json:"permissions,omitempty"`
	JoinedAt    *Timestamp `json:"joined_at,omitempty"`
}

TeamMember represents a team member.

type TeamMembersResponse

type TeamMembersResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Members []TeamMember `json:"members"`
	} `json:"data"`
}

TeamMembersResponse represents team members response.

type TeamResponse

type TeamResponse struct {
	Status  string `json:"status"`
	Success bool   `json:"success"`
	Message string `json:"message"`
	Data    struct {
		Team Team   `json:"-"`
		UUID string `json:"uuid,omitempty"`
	} `json:"data"`
}

TeamResponse represents a single team response. Controller uses success/status interchangeably; Update returns data.team as a name string.

func (*TeamResponse) UnmarshalJSON added in v0.18.1

func (r *TeamResponse) UnmarshalJSON(b []byte) error

UnmarshalJSON accepts data.team as either a Team object (fetch) or a name string (update).

type TeamService

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

TeamService handles communication with the team related methods of the PipeOps API.

func (*TeamService) AcceptInvitation

func (s *TeamService) AcceptInvitation(ctx context.Context, inviteToken string) (*http.Response, error)

AcceptInvitation accepts a team invitation.

func (*TeamService) Create

Create creates a new team.

func (*TeamService) Delete

func (s *TeamService) Delete(ctx context.Context, teamUUID string) (*http.Response, error)

Delete deletes a team.

func (*TeamService) Get

func (s *TeamService) Get(ctx context.Context, teamUUID string) (*TeamResponse, *http.Response, error)

Get fetches a team by UUID.

func (*TeamService) InviteMember

InviteMember invites a new member to the team.

func (*TeamService) List

List lists all teams for the authenticated user.

func (*TeamService) ListMembers

func (s *TeamService) ListMembers(ctx context.Context, teamUUID string) (*TeamMembersResponse, *http.Response, error)

ListMembers lists members of a team. Controller has no GET /team/:uuid/members; members are embedded in GET /team/fetch/:uuid.

func (*TeamService) RejectInvitation

func (s *TeamService) RejectInvitation(ctx context.Context, inviteToken string) (*http.Response, error)

RejectInvitation rejects a team invitation.

func (*TeamService) RemoveMember

func (s *TeamService) RemoveMember(ctx context.Context, teamUUID, memberUserUUID string) (*http.Response, error)

RemoveMember removes a member from a team. Controller: DELETE /team/:uuid/delete-member/:member_user_uuid memberUUID must be the member's user UUID (not email).

func (*TeamService) Update

func (s *TeamService) Update(ctx context.Context, teamUUID string, req *UpdateTeamRequest) (*TeamResponse, *http.Response, error)

Update updates a team.

func (*TeamService) UpdateMemberRole

func (s *TeamService) UpdateMemberRole(ctx context.Context, teamUUID, memberUserUUID string, req *UpdateMemberRoleRequest) (*http.Response, error)

UpdateMemberRole updates a team member's role. Controller: PUT /team/:uuid/update-member-permissions/:member_user_uuid memberUUID must be the member's user UUID (not email).

type TeamsResponse

type TeamsResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Teams []Team `json:"teams"`
	} `json:"data"`
}

TeamsResponse represents a list of teams response.

type Template

type Template struct {
	ID          string `json:"id,omitempty"`
	UUID        string `json:"uuid,omitempty"`
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
	Framework   string `json:"framework,omitempty"`
	Repository  string `json:"repository,omitempty"`
}

Template represents a project template.

type TemplateService

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

TemplateService handles template related methods.

func (*TemplateService) GetTemplate

func (s *TemplateService) GetTemplate(ctx context.Context, templateUUID string) (*TemplatesResponse, *http.Response, error)

GetTemplate gets a template by UUID.

func (*TemplateService) ListTemplates

func (s *TemplateService) ListTemplates(ctx context.Context) (*TemplatesResponse, *http.Response, error)

ListTemplates lists available project templates.

type TemplatesResponse

type TemplatesResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Templates []Template `json:"templates"`
	} `json:"data"`
}

TemplatesResponse represents templates response.

type Timestamp

type Timestamp struct {
	time.Time
}

Timestamp represents a time that can be unmarshalled from a JSON string

func (*Timestamp) UnmarshalJSON

func (t *Timestamp) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

type ToggleEventRequest

type ToggleEventRequest struct {
	Enabled bool `json:"enabled"`
}

ToggleEventRequest represents a request to toggle an event.

type TokenRequest

type TokenRequest struct {
	GrantType    string `json:"grant_type"`     // "authorization_code" or "refresh_token"
	Code         string `json:"code,omitempty"` // authorization code from callback
	RedirectURI  string `json:"redirect_uri,omitempty"`
	ClientID     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
	RefreshToken string `json:"refresh_token,omitempty"` // for refresh token grant
}

TokenRequest represents an OAuth token exchange request.

type TokenResponse

type TokenResponse struct {
	AccessToken  string `json:"access_token"`
	TokenType    string `json:"token_type"`
	ExpiresIn    int    `json:"expires_in"`
	RefreshToken string `json:"refresh_token,omitempty"`
	Scope        string `json:"scope,omitempty"`
}

TokenResponse represents an OAuth token response.

type TriggerGitOpsSyncRequest added in v0.15.0

type TriggerGitOpsSyncRequest struct {
	Revision string `json:"revision,omitempty"`
	Prune    bool   `json:"prune,omitempty"`
	DryRun   bool   `json:"dry_run,omitempty"`
}

TriggerGitOpsSyncRequest is POST /api/v1/gitops/applications/:uuid/sync.

type TunnelInfoResponse

type TunnelInfoResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		TunnelInfo map[string]interface{} `json:"tunnel_info"`
	} `json:"data"`
}

TunnelInfoResponse represents tunnel information response.

type UpdateAgentStatusRequest

type UpdateAgentStatusRequest struct {
	Status string `json:"status"`
}

UpdateAgentStatusRequest represents agent status update.

type UpdateDeploymentRequest

type UpdateDeploymentRequest struct {
	Config map[string]interface{} `json:"config,omitempty"`
	Status string                 `json:"status,omitempty"`
}

UpdateDeploymentRequest represents a request to update an add-on deployment.

type UpdateEnvironmentRequest

type UpdateEnvironmentRequest struct {
	Name string `json:"name,omitempty"`
}

UpdateEnvironmentRequest represents a request to update an environment.

type UpdateGitOpsConfigRequest added in v0.15.0

type UpdateGitOpsConfigRequest struct {
	Name           string `json:"name,omitempty"`
	Branch         string `json:"branch,omitempty"`
	Path           string `json:"path,omitempty"`
	TargetRevision string `json:"target_revision,omitempty"`

	SyncPolicy *GitOpsSyncPolicyRequest `json:"sync_policy,omitempty"`

	HealthCheckEnabled  *bool `json:"health_check_enabled,omitempty"`
	HealthCheckInterval *int  `json:"health_check_interval,omitempty"`
}

UpdateGitOpsConfigRequest is PUT /api/v1/gitops/applications/:uuid.

type UpdateMemberRoleRequest

type UpdateMemberRoleRequest struct {
	Role        string   `json:"role"`
	Permissions []string `json:"permissions,omitempty"` // not sent as-is; kept for MCP compat
	// AccessLevel optional: "workspace" | "resource"
	AccessLevel string `json:"access_level,omitempty"`
}

UpdateMemberRoleRequest represents a request to update member role. Matches controller UpdateMemberPermissionInput (role + optional resource permissions).

type UpdateNotificationSettingsRequest

type UpdateNotificationSettingsRequest struct {
	Email       *bool `json:"email,omitempty"`
	Push        *bool `json:"push,omitempty"`
	Deployments *bool `json:"deployments,omitempty"`
	Billing     *bool `json:"billing,omitempty"`
	Security    *bool `json:"security,omitempty"`
}

UpdateNotificationSettingsRequest represents a request to update notification settings.

type UpdatePartnerRequest

type UpdatePartnerRequest struct {
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
}

UpdatePartnerRequest represents a request to update a partner.

type UpdatePaymentMethodRequest

type UpdatePaymentMethodRequest struct {
	CardUUID string `json:"card_uuid"`
}

UpdatePaymentMethod updates the default payment method.

type UpdateProfileRequest

type UpdateProfileRequest struct {
	FirstName string `json:"first_name,omitempty"`
	LastName  string `json:"last_name,omitempty"`
	Avatar    string `json:"avatar,omitempty"`
	Bio       string `json:"bio,omitempty"`
}

UpdateProfileRequest represents a request to update user profile.

type UpdateProjectGroupRequest added in v0.15.0

type UpdateProjectGroupRequest struct {
	Name                   *string `json:"name,omitempty"`
	DefaultClusterUUID     *string `json:"default_cluster_uuid,omitempty"`
	DefaultEnvironmentUUID *string `json:"default_environment_uuid,omitempty"`
}

UpdateProjectGroupRequest patches group metadata.

type UpdateProjectRequest

type UpdateProjectRequest struct {
	Name         string `json:"name,omitempty"`
	Description  string `json:"description,omitempty"`
	BuildCommand string `json:"build_command,omitempty"`
	StartCommand string `json:"start_command,omitempty"`
	Port         int    `json:"port,omitempty"`
}

UpdateProjectRequest represents a request to update a project.

type UpdateResourceEventRequest

type UpdateResourceEventRequest struct {
	Enabled   bool   `json:"enabled"`
	Threshold int    `json:"threshold,omitempty"`
	EventType string `json:"event_type,omitempty"`
}

UpdateResourceEventRequest represents a request to update resource event settings.

type UpdateServiceTokenRequest

type UpdateServiceTokenRequest struct {
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
}

UpdateServiceTokenRequest represents a request to update a service token.

type UpdateSettingsRequest

type UpdateSettingsRequest struct {
	Notifications *NotificationSettings `json:"notifications,omitempty"`
	Preferences   *UserPreferences      `json:"preferences,omitempty"`
}

UpdateSettingsRequest represents a request to update user settings.

type UpdateTeamRequest

type UpdateTeamRequest struct {
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
}

UpdateTeamRequest represents a request to update a team.

type UpdateWebhookRequest

type UpdateWebhookRequest struct {
	URL         string   `json:"url,omitempty"`
	Events      []string `json:"events,omitempty"`
	Active      *bool    `json:"active,omitempty"`
	Description string   `json:"description,omitempty"`
}

UpdateWebhookRequest represents a request to update a webhook.

type UpdateWorkspaceRequest

type UpdateWorkspaceRequest struct {
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
}

UpdateWorkspaceRequest represents a request to update a workspace.

type UpsertProjectGroupSharedEnvRequest added in v0.15.0

type UpsertProjectGroupSharedEnvRequest struct {
	Variables      []ProjectGroupSharedEnvVar `json:"variables"`
	Inject         bool                       `json:"inject,omitempty"`
	Overwrite      bool                       `json:"overwrite,omitempty"`
	Redeploy       bool                       `json:"redeploy,omitempty"`
	KeepReferences bool                       `json:"keep_references,omitempty"`
}

UpsertProjectGroupSharedEnvRequest replaces the group shared env set.

type UpsertRexecBindingRequest added in v0.18.0

type UpsertRexecBindingRequest struct {
	Token   string `json:"token"`
	BaseURL string `json:"base_url,omitempty"`
	Enabled *bool  `json:"enabled,omitempty"`
}

UpsertRexecBindingRequest sets an optional workspace-owned Rexec API token.

type Usage

type Usage struct {
	ResourceType string  `json:"resource_type,omitempty"`
	Amount       float64 `json:"amount,omitempty"`
	Unit         string  `json:"unit,omitempty"`
	Cost         float64 `json:"cost,omitempty"`
	Period       string  `json:"period,omitempty"`
}

Usage represents billing usage information.

type UsageResponse

type UsageResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Usage []Usage `json:"usage"`
		Total float64 `json:"total,omitempty"`
	} `json:"data"`
}

UsageResponse represents usage information response.

type User

type User struct {
	ID                       string     `json:"id,omitempty"`
	UUID                     string     `json:"uuid,omitempty"`
	Email                    string     `json:"email,omitempty"`
	FirstName                string     `json:"first_name,omitempty"`
	LastName                 string     `json:"last_name,omitempty"`
	FullName                 string     `json:"full_name,omitempty"`
	AvatarURL                string     `json:"avatar_url,omitempty"`
	IsActive                 bool       `json:"is_active,omitempty"`
	EmailVerified            bool       `json:"email_verified,omitempty"`
	PasswordChangedDate      *Timestamp `json:"password_changed_date,omitempty"`
	OAuthUser                string     `json:"oauth_user,omitempty"`
	TempPlanID               int        `json:"temp_plan_id,omitempty"`
	PaymentMethod            bool       `json:"payment_method,omitempty"`
	ChargeFailed             bool       `json:"charge_failed,omitempty"`
	IsSubscriptionActive     bool       `json:"is_subscription_active,omitempty"`
	IsSubscriptionActiveDate *Timestamp `json:"is_subscription_active_date,omitempty"`
	Namespace                string     `json:"namespace,omitempty"`
	CreatedAt                *Timestamp `json:"created_at,omitempty"`
	UpdatedAt                *Timestamp `json:"updated_at,omitempty"`
}

User represents a PipeOps user.

type UserInfo

type UserInfo struct {
	Sub           string `json:"sub"`
	Email         string `json:"email,omitempty"`
	EmailVerified bool   `json:"email_verified,omitempty"`
	Name          string `json:"name,omitempty"`
	GivenName     string `json:"given_name,omitempty"`
	FamilyName    string `json:"family_name,omitempty"`
	Picture       string `json:"picture,omitempty"`
}

UserInfo represents OAuth user information.

type UserInfoResponse

type UserInfoResponse struct {
	Status  string   `json:"status"`
	Message string   `json:"message"`
	Data    UserInfo `json:"data"`
}

UserInfoResponse represents the OAuth userinfo response.

type UserPreferences

type UserPreferences struct {
	Theme    string `json:"theme,omitempty"`
	Language string `json:"language,omitempty"`
	Timezone string `json:"timezone,omitempty"`
}

UserPreferences represents user preferences.

type UserService

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

UserService handles communication with the user settings related methods of the PipeOps API.

func (*UserService) CancelProfileDeletion

func (s *UserService) CancelProfileDeletion(ctx context.Context) (*http.Response, error)

CancelProfileDeletion cancels a pending profile deletion request.

func (*UserService) DeleteProfile

func (s *UserService) DeleteProfile(ctx context.Context) (*http.Response, error)

DeleteProfile initiates user profile deletion.

func (*UserService) GetProfile

func (s *UserService) GetProfile(ctx context.Context) (*ProfileResponse, *http.Response, error)

GetProfile retrieves the current user's profile.

func (*UserService) GetSettings

GetSettings retrieves user settings.

func (*UserService) ResetSecretToken

func (s *UserService) ResetSecretToken(ctx context.Context) (*http.Response, error)

ResetSecretToken resets the user's secret token (DEPRECATED).

func (*UserService) UpdateNotificationSettings

UpdateNotificationSettings updates notification settings.

func (*UserService) UpdateProfile

UpdateProfile updates the current user's profile.

func (*UserService) UpdateSettings

UpdateSettings updates user settings.

type UserSettings

type UserSettings struct {
	Notifications NotificationSettings `json:"notifications,omitempty"`
	Preferences   UserPreferences      `json:"preferences,omitempty"`
}

UserSettings represents user settings.

type UserSettingsResponse

type UserSettingsResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Settings UserSettings `json:"settings"`
	} `json:"data"`
}

UserSettingsResponse represents user settings response.

type VerifyCodeResponse

type VerifyCodeResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Valid bool `json:"valid"`
	} `json:"data"`
}

VerifyCodeResponse represents verification code response.

type VerifyLoginRequest

type VerifyLoginRequest struct {
	Email string `json:"email"`
	Code  string `json:"code"`
}

VerifyLoginRequest represents a login verification request.

type ViewDeploymentConfigsOptions added in v0.17.8

type ViewDeploymentConfigsOptions struct {
	WorkspaceUUID string `url:"workspace,omitempty"`
}

ViewDeploymentConfigsOptions scopes config view to a workspace (required by AddonPermissionMiddleware: query "workspace").

type Volume added in v0.14.0

type Volume struct {
	UUID                   string   `json:"uuid,omitempty"`
	DisplayName            string   `json:"display_name,omitempty"`
	PVCName                string   `json:"pvc_name,omitempty"`
	MountPath              string   `json:"mount_path,omitempty"`
	SizeGB                 float32  `json:"size_gb,omitempty"`
	Status                 string   `json:"status,omitempty"`
	ClusterUUID            string   `json:"cluster_uuid,omitempty"`
	ClusterName            string   `json:"cluster_name,omitempty"`
	Namespace              string   `json:"namespace,omitempty"`
	OwnerType              string   `json:"owner_type,omitempty"`
	OwnerUUID              string   `json:"owner_uuid,omitempty"`
	OwnerName              string   `json:"owner_name,omitempty"`
	OwnerSessionID         string   `json:"owner_session_id,omitempty"`
	OwnerHref              string   `json:"owner_href,omitempty"`
	RetainedFromOwnerUUID  string   `json:"retained_from_owner_uuid,omitempty"`
	RetainedFromOwnerName  string   `json:"retained_from_owner_name,omitempty"`
	RetainedFromOwnerType  string   `json:"retained_from_owner_type,omitempty"`
	RetainedUntil          *string  `json:"retained_until,omitempty"`
	OriginalDeploymentName string   `json:"original_deployment_name,omitempty"`
	ExportStatus           string   `json:"export_status,omitempty"`
	ExportURL              string   `json:"export_url,omitempty"`
	ExportError            string   `json:"export_error,omitempty"`
	ExportFilename         string   `json:"export_filename,omitempty"`
	Actions                []string `json:"actions,omitempty"`
	CreatedAt              string   `json:"created_at,omitempty"`
	UpdatedAt              string   `json:"updated_at,omitempty"`
}

Volume is the API representation of a workspace volume.

type VolumeExportResponse added in v0.14.0

type VolumeExportResponse struct {
	Success bool   `json:"success,omitempty"`
	Message string `json:"message,omitempty"`
	Data    struct {
		UUID        string `json:"uuid,omitempty"`
		Status      string `json:"status,omitempty"`
		DownloadURL string `json:"download_url,omitempty"`
		Filename    string `json:"filename,omitempty"`
		Error       string `json:"error,omitempty"`
		Message     string `json:"message,omitempty"`
	} `json:"data"`
}

VolumeExportResponse tracks async export status.

type VolumeListOptions added in v0.14.0

type VolumeListOptions struct {
	WorkspaceUUID string `url:"workspace_uuid,omitempty"`
	// Workspace is accepted as an alias by the controller.
	Workspace   string `url:"workspace,omitempty"`
	Status      string `url:"status,omitempty"`
	ClusterUUID string `url:"cluster_uuid,omitempty"`
	Limit       int    `url:"limit,omitempty"`
	Offset      int    `url:"offset,omitempty"`
}

VolumeListOptions filters and paginates volume list.

type VolumeListResponse added in v0.14.0

type VolumeListResponse struct {
	Success bool   `json:"success,omitempty"`
	Message string `json:"message,omitempty"`
	Data    struct {
		Volumes []Volume      `json:"volumes"`
		Summary VolumeSummary `json:"summary"`
		Total   int64         `json:"total"`
		Limit   int           `json:"limit"`
		Offset  int           `json:"offset"`
	} `json:"data"`
}

VolumeListResponse is GET /volumes.

type VolumeResponse added in v0.14.0

type VolumeResponse struct {
	Success bool   `json:"success,omitempty"`
	Message string `json:"message,omitempty"`
	Data    Volume `json:"data"`
}

VolumeResponse is GET /volumes/:uuid.

type VolumeService added in v0.14.0

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

VolumeService handles workspace volume inventory and recovery APIs.

Controller routes (JWT + team access; dual-auth SA may follow later):

GET    /volumes
GET    /volumes/:uuid
POST   /volumes/:uuid/remount
DELETE /volumes/:uuid
POST   /volumes/:uuid/export
GET    /volumes/:uuid/export

func (*VolumeService) Delete added in v0.14.0

func (s *VolumeService) Delete(ctx context.Context, volumeUUID string, opts *VolumeListOptions) (*http.Response, error)

Delete permanently deletes a volume. DELETE /volumes/:uuid?workspace_uuid=

func (*VolumeService) Get added in v0.14.0

func (s *VolumeService) Get(ctx context.Context, volumeUUID string, opts *VolumeListOptions) (*VolumeResponse, *http.Response, error)

Get returns one volume by UUID. GET /volumes/:uuid?workspace_uuid=

func (*VolumeService) GetExport added in v0.14.0

func (s *VolumeService) GetExport(ctx context.Context, volumeUUID string, opts *VolumeListOptions) (*VolumeExportResponse, *http.Response, error)

GetExport polls export status for a volume. GET /volumes/:uuid/export?workspace_uuid=

func (*VolumeService) List added in v0.14.0

List returns workspace volumes. GET /volumes?workspace_uuid=

func (*VolumeService) Remount added in v0.14.0

Remount schedules remounting an unattached volume onto a project or addon. POST /volumes/:uuid/remount?workspace_uuid=

func (*VolumeService) StartExport added in v0.14.0

func (s *VolumeService) StartExport(ctx context.Context, volumeUUID string, opts *VolumeListOptions) (*VolumeExportResponse, *http.Response, error)

StartExport starts an async volume export. POST /volumes/:uuid/export?workspace_uuid=

type VolumeSummary added in v0.14.0

type VolumeSummary struct {
	Mounted    int64 `json:"mounted"`
	Unattached int64 `json:"unattached"`
}

VolumeSummary counts volumes by status.

type Webhook

type Webhook struct {
	ID          string     `json:"id,omitempty"`
	UUID        string     `json:"uuid,omitempty"`
	URL         string     `json:"url,omitempty"`
	Events      []string   `json:"events,omitempty"`
	Secret      string     `json:"secret,omitempty"`
	Active      bool       `json:"active,omitempty"`
	Description string     `json:"description,omitempty"`
	CreatedAt   *Timestamp `json:"created_at,omitempty"`
	UpdatedAt   *Timestamp `json:"updated_at,omitempty"`
}

Webhook represents a webhook configuration.

type WebhookPayload

type WebhookPayload struct {
	Repository string                 `json:"repository,omitempty"`
	Branch     string                 `json:"branch,omitempty"`
	Commit     string                 `json:"commit,omitempty"`
	Author     string                 `json:"author,omitempty"`
	Message    string                 `json:"message,omitempty"`
	Payload    map[string]interface{} `json:"payload,omitempty"`
}

WebhookPayload represents a deployment webhook payload.

type WebhookResponse

type WebhookResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
}

WebhookResponse represents webhook response.

type WebhookService

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

WebhookService handles communication with the webhook related methods of the PipeOps API.

func (*WebhookService) Create

Create creates a new webhook.

func (*WebhookService) Delete

func (s *WebhookService) Delete(ctx context.Context, webhookUUID string) (*http.Response, error)

Delete deletes a webhook.

func (*WebhookService) Get

func (s *WebhookService) Get(ctx context.Context, webhookUUID string) (*WebhookResponse, *http.Response, error)

Get fetches a webhook by UUID.

func (*WebhookService) GetWebhookDeliveries

func (s *WebhookService) GetWebhookDeliveries(ctx context.Context, webhookUUID string) (*http.Response, error)

GetWebhookDeliveries retrieves webhook delivery history.

func (*WebhookService) List

List lists all webhooks.

func (*WebhookService) RetryWebhookDelivery

func (s *WebhookService) RetryWebhookDelivery(ctx context.Context, webhookUUID, deliveryID string) (*http.Response, error)

RetryWebhookDelivery retries a failed webhook delivery.

func (*WebhookService) TestWebhook

func (s *WebhookService) TestWebhook(ctx context.Context, webhookUUID string) (*http.Response, error)

TestWebhook tests a webhook endpoint.

func (*WebhookService) Update

Update updates a webhook.

type WebhooksResponse

type WebhooksResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Webhooks []Webhook `json:"webhooks"`
	} `json:"data"`
}

WebhooksResponse represents a list of webhooks response.

type Workspace

type Workspace struct {
	ID           string     `json:"id,omitempty"`
	UUID         string     `json:"uuid,omitempty"`
	Name         string     `json:"name,omitempty"`
	Description  string     `json:"description,omitempty"`
	BillingEmail string     `json:"billing_email,omitempty"`
	OwnerID      string     `json:"owner_id,omitempty"`
	TeamID       string     `json:"team_id,omitempty"`
	CreatedAt    *Timestamp `json:"created_at,omitempty"`
	UpdatedAt    *Timestamp `json:"updated_at,omitempty"`
}

Workspace represents a PipeOps workspace.

func (*Workspace) UnmarshalJSON added in v0.6.1

func (w *Workspace) UnmarshalJSON(data []byte) error

type WorkspaceAuditLogListOptions added in v0.18.5

type WorkspaceAuditLogListOptions struct {
	WorkspaceUUID string `url:"workspace_uuid,omitempty"`
	// ProjectUUID optionally narrows the workspace feed to one project.
	ProjectUUID   string `url:"project_uuid,omitempty"`
	Action        string `url:"action,omitempty"`
	ActorUserUUID string `url:"actor_user_uuid,omitempty"`
	ActorType     string `url:"actor_type,omitempty"`
	Category      string `url:"category,omitempty"`
	Search        string `url:"search,omitempty"`
	From          string `url:"from,omitempty"`
	To            string `url:"to,omitempty"`
	Limit         int    `url:"limit,omitempty"`
	Offset        int    `url:"offset,omitempty"`
}

WorkspaceAuditLogListOptions filters GET /project/workspace-audit-logs. WorkspaceUUID is required by the controller (unless workspace is already in session context).

type WorkspaceAuditLogListResponse added in v0.18.5

type WorkspaceAuditLogListResponse struct {
	Success    bool               `json:"success,omitempty"`
	Message    string             `json:"message,omitempty"`
	Data       []ProjectAuditLog  `json:"data"`
	Pagination AuditLogPagination `json:"pagination"`
}

WorkspaceAuditLogListResponse is GET /project/workspace-audit-logs.

type WorkspaceResponse

type WorkspaceResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Workspace Workspace `json:"workspace"`
	} `json:"data"`
}

WorkspaceResponse represents a single workspace response.

type WorkspaceService

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

WorkspaceService handles communication with the workspace related methods of the PipeOps API.

func (*WorkspaceService) Create

Create creates a new workspace.

func (*WorkspaceService) Delete

func (s *WorkspaceService) Delete(ctx context.Context, workspaceUUID string) (*http.Response, error)

Delete deletes a workspace.

func (*WorkspaceService) Get

func (s *WorkspaceService) Get(ctx context.Context, workspaceUUID string) (*WorkspaceResponse, *http.Response, error)

Get fetches a workspace by UUID.

func (*WorkspaceService) List

List lists all workspaces for the authenticated user.

func (*WorkspaceService) SetBillingEmail

func (s *WorkspaceService) SetBillingEmail(ctx context.Context, workspaceUUID string, req *SetBillingEmailRequest) (*http.Response, error)

SetBillingEmail sets the billing email for a workspace.

func (*WorkspaceService) Update

Update updates a workspace.

type WorkspacesResponse

type WorkspacesResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Workspaces []Workspace `json:"workspaces"`
	} `json:"data"`
}

WorkspacesResponse represents a list of workspaces response.

Jump to

Keyboard shortcuts

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