pipeops

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2025 License: MIT Imports: 11 Imported by: 0

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 CheckResponse

func CheckResponse(r *http.Response) error

CheckResponse checks the API response for errors.

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 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"`
	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"`
	Status      string     `json:"status,omitempty"`
	CreatedAt   *Timestamp `json:"created_at,omitempty"`
	UpdatedAt   *Timestamp `json:"updated_at,omitempty"`
}

AddOn represents a PipeOps add-on.

type AddOnCategoriesResponse

type AddOnCategoriesResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Categories []AddOnCategory `json:"categories"`
	} `json:"data"`
}

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 {
	ID        string                 `json:"id,omitempty"`
	UUID      string                 `json:"uuid,omitempty"`
	AddOnID   string                 `json:"addon_id,omitempty"`
	AddOnName string                 `json:"addon_name,omitempty"`
	ProjectID string                 `json:"project_id,omitempty"`
	ServerID  string                 `json:"server_id,omitempty"`
	Status    string                 `json:"status,omitempty"`
	Config    map[string]interface{} `json:"config,omitempty"`
	CreatedAt *Timestamp             `json:"created_at,omitempty"`
	UpdatedAt *Timestamp             `json:"updated_at,omitempty"`
}

AddOnDeployment represents a deployed add-on instance.

type AddOnDeploymentResponse

type AddOnDeploymentResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Deployment AddOnDeployment `json:"deployment"`
	} `json:"data"`
}

AddOnDeploymentResponse represents a single add-on deployment response.

type AddOnDeploymentsResponse

type AddOnDeploymentsResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Deployments []AddOnDeployment `json:"deployments"`
	} `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    struct {
		AddOn AddOn `json:"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.

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.

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

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

GetDeployment fetches an add-on deployment by UUID.

func (*AddOnService) GetDeploymentOverview

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

GetDeploymentOverview retrieves deployment overview.

func (*AddOnService) GetDeploymentSession

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

GetDeploymentSession retrieves deployment session information.

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

func (*AddOnService) List

List lists all available add-ons.

func (*AddOnService) ListCategories

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

ListCategories lists all add-on categories.

func (*AddOnService) ListDeployments

func (s *AddOnService) ListDeployments(ctx context.Context) (*AddOnDeploymentsResponse, *http.Response, error)

ListDeployments lists all add-on deployments.

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) 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) 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) (*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    struct {
		AddOns []AddOn `json:"addons"`
	} `json:"data"`
}

AddOnsResponse represents a list of add-ons response.

type AdminListUsersOptions

type AdminListUsersOptions struct {
	Page   int    `url:"page,omitempty"`
	Limit  int    `url:"limit,omitempty"`
	Role   string `url:"role,omitempty"`
	Active *bool  `url:"active,omitempty"`
}

AdminListUsersOptions specifies options for listing users.

type AdminService

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

AdminService handles communication with the admin related methods of the PipeOps API.

func (*AdminService) BroadcastMessage

func (s *AdminService) BroadcastMessage(ctx context.Context, req *BroadcastRequest) (*http.Response, error)

BroadcastMessage broadcasts a message to users (admin only).

func (*AdminService) BulkAddToWaitlist

func (s *AdminService) BulkAddToWaitlist(ctx context.Context, req *BulkAddWaitlistRequest) (*http.Response, error)

BulkAddToWaitlist adds multiple users to a waitlist (admin only).

func (*AdminService) BulkExtendSubscription

func (s *AdminService) BulkExtendSubscription(ctx context.Context, req *BulkExtendSubscriptionRequest) (*http.Response, error)

BulkExtendSubscription extends subscriptions for multiple users (admin only).

func (*AdminService) BulkRemoveFromWaitlist

func (s *AdminService) BulkRemoveFromWaitlist(ctx context.Context, req *BulkAddWaitlistRequest) (*http.Response, error)

BulkRemoveFromWaitlist removes multiple users from a waitlist (admin only).

func (*AdminService) CreatePlan

func (s *AdminService) CreatePlan(ctx context.Context, req *CreatePlanRequest) (*http.Response, error)

CreatePlan creates a new plan (admin only).

func (*AdminService) CreateWaitlistProgram

CreateWaitlistProgram creates a waitlist program (admin only).

func (*AdminService) DeletePlan

func (s *AdminService) DeletePlan(ctx context.Context, planID string) (*http.Response, error)

DeletePlan deletes a plan (admin only).

func (*AdminService) DeleteUser

func (s *AdminService) DeleteUser(ctx context.Context, userUUID string) (*http.Response, error)

DeleteUser deletes a user (admin only).

func (*AdminService) GetAuditLogs

func (s *AdminService) GetAuditLogs(ctx context.Context) (*http.Response, error)

GetAuditLogs retrieves audit logs (admin only).

func (*AdminService) GetProgramParticipants

func (s *AdminService) GetProgramParticipants(ctx context.Context, programUID string) (*ProgramParticipantsResponse, *http.Response, error)

GetProgramParticipants gets all participants in a program (admin only).

func (*AdminService) GetStats

GetStats retrieves admin dashboard statistics.

func (*AdminService) GetSystemHealth

func (s *AdminService) GetSystemHealth(ctx context.Context) (*http.Response, error)

GetSystemHealth retrieves system health status (admin only).

func (*AdminService) GetUser

func (s *AdminService) GetUser(ctx context.Context, userUUID string) (*AdminUserResponse, *http.Response, error)

GetUser gets a user by UUID (admin only).

func (*AdminService) ImpersonateUser

func (s *AdminService) ImpersonateUser(ctx context.Context, req *ImpersonateUserRequest) (*http.Response, error)

ImpersonateUser impersonates a user (admin only).

func (*AdminService) ListPlans

func (s *AdminService) ListPlans(ctx context.Context) (*PlansResponse, *http.Response, error)

ListPlans lists all subscription plans (admin only).

func (*AdminService) ListUsers

ListUsers lists all users (admin only).

func (*AdminService) PauseSubscription

func (s *AdminService) PauseSubscription(ctx context.Context, subID string, req *PauseSubscriptionRequest) (*http.Response, error)

PauseSubscription pauses a subscription (admin only).

func (*AdminService) SubscribeUser

func (s *AdminService) SubscribeUser(ctx context.Context, req *SubscribeUserRequest) (*http.Response, error)

SubscribeUser creates a subscription for a user (admin only).

func (*AdminService) UpdatePlan

func (s *AdminService) UpdatePlan(ctx context.Context, planUUID string, req *UpdatePlanRequest) (*http.Response, error)

UpdatePlan updates a plan (admin only).

func (*AdminService) UpdateUser

func (s *AdminService) UpdateUser(ctx context.Context, userUUID string, req *UpdateUserRequest) (*AdminUserResponse, *http.Response, error)

UpdateUser updates a user (admin only).

type AdminStats

type AdminStats struct {
	TotalUsers       int     `json:"total_users,omitempty"`
	ActiveUsers      int     `json:"active_users,omitempty"`
	TotalProjects    int     `json:"total_projects,omitempty"`
	TotalDeployments int     `json:"total_deployments,omitempty"`
	TotalRevenue     float64 `json:"total_revenue,omitempty"`
	MonthlyRevenue   float64 `json:"monthly_revenue,omitempty"`
}

AdminStats represents admin dashboard statistics.

type AdminStatsResponse

type AdminStatsResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Stats AdminStats `json:"stats"`
	} `json:"data"`
}

AdminStatsResponse represents admin statistics response.

type AdminUser

type AdminUser 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"`
	IsActive      bool       `json:"is_active,omitempty"`
	EmailVerified bool       `json:"email_verified,omitempty"`
	Role          string     `json:"role,omitempty"`
	CreatedAt     *Timestamp `json:"created_at,omitempty"`
	UpdatedAt     *Timestamp `json:"updated_at,omitempty"`
}

AdminUser represents a user in admin context.

type AdminUserResponse

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

AdminUserResponse represents a single user in admin context.

type AdminUsersResponse

type AdminUsersResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Users []AdminUser `json:"users"`
		Total int         `json:"total,omitempty"`
	} `json:"data"`
}

AdminUsersResponse represents a list of users in admin context.

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 AuditLog

type AuditLog struct {
	ID        string     `json:"id,omitempty"`
	UUID      string     `json:"uuid,omitempty"`
	UserID    string     `json:"user_id,omitempty"`
	Action    string     `json:"action,omitempty"`
	Resource  string     `json:"resource,omitempty"`
	IPAddress string     `json:"ip_address,omitempty"`
	CreatedAt *Timestamp `json:"created_at,omitempty"`
}

AuditLog represents an audit log entry.

type AuditLogService

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

AuditLogService handles audit log related methods.

func (*AuditLogService) GetAuditLog

func (s *AuditLogService) GetAuditLog(ctx context.Context, logUUID string) (*http.Response, error)

GetAuditLog gets a specific audit log entry.

func (*AuditLogService) ListAuditLogs

func (s *AuditLogService) ListAuditLogs(ctx context.Context) (*AuditLogsResponse, *http.Response, error)

ListAuditLogs lists audit logs.

type AuditLogsResponse

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

AuditLogsResponse represents audit logs response.

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

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 represents a backup.

type BackupService

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

BackupService handles backup and restore related methods.

func (*BackupService) CreateBackup

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

CreateBackup creates a new backup.

func (*BackupService) DeleteBackup

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

DeleteBackup deletes a backup.

func (*BackupService) ListBackups

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

ListBackups lists all backups for a project.

func (*BackupService) RestoreBackup

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

RestoreBackup restores a backup.

type BackupsResponse

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

BackupsResponse represents backups response.

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.

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

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 BroadcastRequest

type BroadcastRequest struct {
	Message string   `json:"message"`
	Users   []string `json:"users,omitempty"`
}

BroadcastRequest represents a broadcast message request.

type BulkAddWaitlistRequest

type BulkAddWaitlistRequest struct {
	Emails     []string `json:"emails"`
	ProgramUID string   `json:"program_uid"`
}

BulkAddWaitlistRequest represents a request to bulk add users to waitlist.

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 BulkExtendSubscriptionRequest

type BulkExtendSubscriptionRequest struct {
	UserUIDs []string `json:"user_uids"`
	Days     int      `json:"days"`
}

BulkExtendSubscriptionRequest represents a request to extend subscriptions.

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"`
	Last4     string     `json:"last4,omitempty"`
	Brand     string     `json:"brand,omitempty"`
	ExpMonth  int        `json:"exp_month,omitempty"`
	ExpYear   int        `json:"exp_year,omitempty"`
	IsDefault bool       `json:"is_default,omitempty"`
	CreatedAt *Timestamp `json:"created_at,omitempty"`
}

Card represents a billing card.

type CardResponse

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

CardResponse represents a single card response.

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.

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
	Admin               *AdminService
	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
	// contains filtered or unexported fields
}

Client manages communication with the PipeOps API.

func MustNewClient added in v0.1.2

func MustNewClient(baseURL string) *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) (*Client, error)

NewClient returns a new PipeOps API client. 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{}) (resp *http.Response, err error)

Do sends an API request and returns the API response.

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

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

UploadGCPCredential uploads GCP service account credentials.

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 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"`
	EnvVariables []EnvVariable `json:"env_variables,omitempty"`
}

CreateEnvironmentRequest represents a request to create an environment.

type CreateFreeServerRequest

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

CreateFreeServerRequest represents a request to create a free server.

type CreatePartnerRequest

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

CreatePartnerRequest represents a request to create a partner.

type CreatePlanRequest

type CreatePlanRequest struct {
	Name        string   `json:"name"`
	Description string   `json:"description,omitempty"`
	Price       float64  `json:"price"`
	Currency    string   `json:"currency"`
	Interval    string   `json:"interval"`
	Features    []string `json:"features,omitempty"`
}

CreatePlanRequest represents a request to create a plan.

type CreateProjectRequest

type CreateProjectRequest struct {
	Name          string                 `json:"name"`
	Description   string                 `json:"description,omitempty"`
	ServerID      string                 `json:"server_id"`
	EnvironmentID string                 `json:"environment_id"`
	Repository    string                 `json:"repository"`
	Branch        string                 `json:"branch"`
	BuildCommand  string                 `json:"build_command,omitempty"`
	StartCommand  string                 `json:"start_command,omitempty"`
	Port          int                    `json:"port,omitempty"`
	Framework     string                 `json:"framework,omitempty"`
	EnvVars       map[string]interface{} `json:"env_vars,omitempty"`
}

CreateProjectRequest represents a request to create a project.

type CreateServerRequest

type CreateServerRequest struct {
	Name         string `json:"name"`
	Provider     string `json:"provider"`
	Region       string `json:"region"`
	WorkspaceID  string `json:"workspace_id"`
	InstanceType string `json:"instance_type,omitempty"`
}

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 {
	AddOnUUID string                 `json:"addon_uuid"`
	ProjectID string                 `json:"project_id,omitempty"`
	ServerID  string                 `json:"server_id,omitempty"`
	Config    map[string]interface{} `json:"config,omitempty"`
}

DeployAddOnRequest represents a request to deploy an add-on.

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 {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Session map[string]interface{} `json:"session"`
	} `json:"data"`
}

DeploymentSessionResponse represents deployment session response.

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

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

EnvVariablesRequest represents a request to update environment variables.

type EnvVariablesResponse

type EnvVariablesResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		EnvVariables []EnvVariable `json:"env_variables"`
	} `json:"data"`
}

EnvVariablesResponse represents environment variables response.

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.

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

type GitHubBranchesRequest struct {
	Repository string `json:"repository"`
}

GitHubBranchesRequest represents a request to fetch GitHub branches.

type GitHubBranchesResponse

type GitHubBranchesResponse struct {
	Status  string `json:"status"`
	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"`
	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"`
}

GitLabOrgReposRequest represents GitLab org repos request.

type GitLabReposResponse

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

GitLabReposResponse represents GitLab repos response.

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 ImpersonateUserRequest

type ImpersonateUserRequest struct {
	UserUUID string `json:"user_uuid"`
}

ImpersonateUserRequest represents a user impersonation request.

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"`
	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.

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.

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

type LogsOptions struct {
	StartTime string `url:"start_time,omitempty"`
	EndTime   string `url:"end_time,omitempty"`
	Limit     int    `url:"limit,omitempty"`
	Search    string `url:"search,omitempty"`
}

LogsOptions specifies options for retrieving project logs.

type LogsResponse

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

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 MetricsRequest

type MetricsRequest struct {
	ProjectUUID string `json:"project_uuid"`
	StartTime   string `json:"start_time,omitempty"`
	EndTime     string `json:"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 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"`
	Message string `json:"message"`
	Data    struct {
		Submissions []AddOn `json:"submissions"`
	} `json:"data"`
}

MySubmissionsResponse represents user's add-on submissions response.

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 PauseSubscriptionRequest

type PauseSubscriptionRequest struct {
	Reason string `json:"reason,omitempty"`
}

PauseSubscriptionRequest represents a request to pause a subscription.

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"`
	Features    []string `json:"features,omitempty"`
	Active      bool     `json:"active,omitempty"`
}

Plan represents a subscription plan.

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.

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.

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 ProgramParticipantsResponse

type ProgramParticipantsResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Participants []map[string]interface{} `json:"participants"`
	} `json:"data"`
}

ProgramParticipantsResponse represents program participants response.

type Project

type Project struct {
	ID            string     `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"`
	CreatedAt     *Timestamp `json:"created_at,omitempty"`
	UpdatedAt     *Timestamp `json:"updated_at,omitempty"`
}

Project represents a PipeOps project.

type ProjectListOptions

type ProjectListOptions struct {
	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) Create

Create creates a new project.

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) (*http.Response, error)

Deploy triggers a deployment for a project.

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) (*ProjectResponse, *http.Response, error)

Get fetches a project by UUID.

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) (*EnvVariablesResponse, *http.Response, error)

GetEnvVariables retrieves environment variables for a project.

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

List lists all projects.

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) 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) (*http.Response, error)

Restart restarts a project.

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

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 a 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.

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

type RepoSearchRequest struct {
	Query string `json:"query"`
}

RepoSearchRequest represents repository search request.

type RepoSearchResponse

type RepoSearchResponse struct {
	Status  string `json:"status"`
	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 ReviewAddOnRequest

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

ReviewAddOnRequest represents an add-on review request.

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 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 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/cluster.

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/cluster 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

Create creates a new server.

func (*ServerService) CreateServiceToken

CreateServiceToken creates a new service account token.

func (*ServerService) Delete

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

Delete deletes a server.

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, serverUUID 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

List lists all servers.

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"`
	WorkspaceID string     `json:"workspace_id,omitempty"`
	Permissions []string   `json:"permissions,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 {
	Status  string `json:"status"`
	Message string `json:"message"`
	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"`
}

ServiceAccountTokenRequest represents a request to create a service account token.

type ServiceAccountTokenResponse

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

ServiceAccountTokenResponse represents the response from service token operations.

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.

func (*ServiceTokenService) GetServiceAccountToken

func (s *ServiceTokenService) GetServiceAccountToken(ctx context.Context, tokenUUID string) (*ServiceAccountTokenResponse, *http.Response, error)

GetServiceAccountToken gets details of a specific service account token.

func (*ServiceTokenService) ListServiceAccountTokens

func (s *ServiceTokenService) ListServiceAccountTokens(ctx context.Context) (*ServiceAccountTokenListResponse, *http.Response, error)

ListServiceAccountTokens lists all service account tokens.

func (*ServiceTokenService) RevokeServiceAccountToken

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

RevokeServiceAccountToken revokes (deletes) a service account token.

func (*ServiceTokenService) UpdateServiceAccountToken

UpdateServiceAccountToken updates a service account token.

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:"email"`
}

SetBillingEmailRequest represents a request to set billing 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 SubscribeUserRequest

type SubscribeUserRequest struct {
	UserUUID string `json:"user_uuid"`
	PlanUUID string `json:"plan_uuid"`
}

SubscribeUserRequest represents a request to subscribe a user.

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"`
	Status    string     `json:"status,omitempty"`
	StartDate *Timestamp `json:"start_date,omitempty"`
	EndDate   *Timestamp `json:"end_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.

type SubscriptionResponse

type SubscriptionResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Subscription Subscription `json:"subscription"`
	} `json:"data"`
}

SubscriptionResponse represents a single subscription response.

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.

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"`
	Message string `json:"message"`
	Data    struct {
		Team Team `json:"team"`
	} `json:"data"`
}

TeamResponse represents a single team response.

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 all members of a team.

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, memberUUID string) (*http.Response, error)

RemoveMember removes a member from a team.

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, memberUUID string, req *UpdateMemberRoleRequest) (*http.Response, error)

UpdateMemberRole updates a team member's role.

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

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

UpdateMemberRoleRequest represents a request to update member role.

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 UpdatePlanRequest

type UpdatePlanRequest struct {
	Name        string   `json:"name,omitempty"`
	Description string   `json:"description,omitempty"`
	Price       float64  `json:"price,omitempty"`
	Features    []string `json:"features,omitempty"`
	Active      *bool    `json:"active,omitempty"`
}

UpdatePlanRequest represents a request to update a plan.

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

type UpdateUserRequest struct {
	IsActive      *bool  `json:"is_active,omitempty"`
	EmailVerified *bool  `json:"email_verified,omitempty"`
	Role          string `json:"role,omitempty"`
}

UpdateUserRequest represents a request to update a user (admin).

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 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"`
	IsActive      bool       `json:"is_active,omitempty"`
	EmailVerified bool       `json:"email_verified,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 WaitlistProgramRequest

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

WaitlistProgramRequest represents a request to create a waitlist program.

type WaitlistProgramResponse

type WaitlistProgramResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Data    struct {
		Program map[string]interface{} `json:"program"`
	} `json:"data"`
}

WaitlistProgramResponse represents waitlist program response.

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"`
	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.

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