Documentation
¶
Index ¶
- Constants
- Variables
- func IsBadRequest(err error) bool
- func IsConflict(err error) bool
- func IsForbidden(err error) bool
- func IsNotFound(err error) bool
- func IsUnauthorized(err error) bool
- type APIError
- type AcceptTOURequest
- type AddKeyRequest
- type AddKeyResponse
- type AgentService
- func (s *AgentService) Create(ctx context.Context, org string, a *agent.Agent) (*agent.Agent, error)
- func (s *AgentService) Delete(ctx context.Context, org, name string) error
- func (s *AgentService) Get(ctx context.Context, org, name string) (*agent.Agent, error)
- func (s *AgentService) List(ctx context.Context, org string) iter.Seq2[agent.Agent, error]
- func (s *AgentService) ListAll(ctx context.Context, org string) ([]agent.Agent, error)
- func (s *AgentService) ListPage(ctx context.Context, org, cursor string) (*ListResponse[agent.Agent], error)
- func (s *AgentService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[agent.Agent, error]
- func (s *AgentService) QueryAll(ctx context.Context, org string, q *query.Query) ([]agent.Agent, error)
- func (s *AgentService) QueryPage(ctx context.Context, org string, q *query.Query) (*QueryResponse[agent.Agent], error)
- func (s *AgentService) Update(ctx context.Context, org, name string, a *agent.Agent) (*agent.Agent, error)
- type AuditContextService
- func (s *AuditContextService) Create(ctx context.Context, org string, a *auditctx.AuditContext) (*auditctx.AuditContext, error)
- func (s *AuditContextService) Delete(ctx context.Context, org, name string) error
- func (s *AuditContextService) Get(ctx context.Context, org, name string) (*auditctx.AuditContext, error)
- func (s *AuditContextService) List(ctx context.Context, org string) iter.Seq2[auditctx.AuditContext, error]
- func (s *AuditContextService) ListAll(ctx context.Context, org string) ([]auditctx.AuditContext, error)
- func (s *AuditContextService) ListPage(ctx context.Context, org, cursor string) (*ListResponse[auditctx.AuditContext], error)
- func (s *AuditContextService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[auditctx.AuditContext, error]
- func (s *AuditContextService) QueryAll(ctx context.Context, org string, q *query.Query) ([]auditctx.AuditContext, error)
- func (s *AuditContextService) QueryPage(ctx context.Context, org string, q *query.Query) (*QueryResponse[auditctx.AuditContext], error)
- func (s *AuditContextService) Update(ctx context.Context, org, name string, a *auditctx.AuditContext) (*auditctx.AuditContext, error)
- type BillingAccount
- type BillingAccountInput
- type BillingAddress
- type BillingOrg
- type BillingService
- func (s *BillingService) AcceptTOU(ctx context.Context, accountID string, req *AcceptTOURequest) error
- func (s *BillingService) CreateAccount(ctx context.Context, req *CreateAccountRequest) (*CreateAccountResponse, error)
- func (s *BillingService) CreateOrg(ctx context.Context, accountID string, req *CreateOrgRequest) (*CreateOrgResponse, error)
- func (s *BillingService) GetAccount(ctx context.Context, accountID string) (*BillingAccount, error)
- func (s *BillingService) GetInvoiceJSON(ctx context.Context, accountID, invoiceID string) (*Invoice, error)
- func (s *BillingService) GetInvoicePDF(ctx context.Context, accountID, invoiceID string) ([]byte, error)
- func (s *BillingService) GetOrg(ctx context.Context, orgName string) (*BillingOrg, error)
- func (s *BillingService) GetOrgAccount(ctx context.Context, orgName string) (*BillingAccount, error)
- func (s *BillingService) ListInvoices(ctx context.Context, accountID string, start, end *time.Time) ([]Invoice, error)
- func (s *BillingService) QueryChargesByAccount(ctx context.Context, accountID string, req *ChargeQueryRequest) (*ChargeQueryResponse, error)
- func (s *BillingService) QueryChargesByOrg(ctx context.Context, orgName string, req *ChargeQueryRequest) (*ChargeQueryResponse, error)
- type ChargePeriod
- type ChargeQueryRequest
- type ChargeQueryResponse
- type Client
- func (c *Client) Agents() *AgentService
- func (c *Client) AuditContexts() *AuditContextService
- func (c *Client) Billing() *BillingService
- func (c *Client) CloudAccounts() *CloudAccountService
- func (c *Client) Deployments() *DeploymentService
- func (c *Client) Domains() *DomainService
- func (c *Client) GVCs() *GVCService
- func (c *Client) GetRaw(ctx context.Context, path string, result any) error
- func (c *Client) Groups() *GroupService
- func (c *Client) IPSets() *IPSetService
- func (c *Client) Identities() *IdentityService
- func (c *Client) Images() *ImageService
- func (c *Client) Locations() *LocationService
- func (c *Client) Mk8s() *Mk8sService
- func (c *Client) Org() string
- func (c *Client) Orgs() *OrgService
- func (c *Client) PatchRaw(ctx context.Context, path string, body any) error
- func (c *Client) PatchRawWithResult(ctx context.Context, path string, body, result any) error
- func (c *Client) Policies() *PolicyService
- func (c *Client) Quotas() *QuotaService
- func (c *Client) Secrets() *SecretService
- func (c *Client) ServiceAccounts() *ServiceAccountService
- func (c *Client) SetOrg(org string)
- func (c *Client) SetToken(token string)
- func (c *Client) Tasks() *TaskService
- func (c *Client) Users() *UserService
- func (c *Client) VolumeSets() *VolumeSetService
- func (c *Client) Workloads() *WorkloadService
- type CloudAccountService
- func (s *CloudAccountService) Create(ctx context.Context, org string, ca *cloudaccount.CloudAccount) (*cloudaccount.CloudAccount, error)
- func (s *CloudAccountService) Delete(ctx context.Context, org, name string) error
- func (s *CloudAccountService) Get(ctx context.Context, org, name string) (*cloudaccount.CloudAccount, error)
- func (s *CloudAccountService) List(ctx context.Context, org string) iter.Seq2[cloudaccount.CloudAccount, error]
- func (s *CloudAccountService) ListAll(ctx context.Context, org string) ([]cloudaccount.CloudAccount, error)
- func (s *CloudAccountService) ListPage(ctx context.Context, org, cursor string) (*ListResponse[cloudaccount.CloudAccount], error)
- func (s *CloudAccountService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[cloudaccount.CloudAccount, error]
- func (s *CloudAccountService) QueryAll(ctx context.Context, org string, q *query.Query) ([]cloudaccount.CloudAccount, error)
- func (s *CloudAccountService) QueryPage(ctx context.Context, org string, q *query.Query) (*QueryResponse[cloudaccount.CloudAccount], error)
- func (s *CloudAccountService) Update(ctx context.Context, org, name string, ca *cloudaccount.CloudAccount) (*cloudaccount.CloudAccount, error)
- type CreateAccountRequest
- type CreateAccountResponse
- type CreateOrgRequest
- type CreateOrgResponse
- type CreateVolumeSnapshotRequest
- type CronStartRequest
- type DeleteVolumeRequest
- type DeleteVolumeSnapshotRequest
- type DeploymentService
- func (s *DeploymentService) Get(ctx context.Context, org, gvc, workloadName, name string) (*deployment.Deployment, error)
- func (s *DeploymentService) List(ctx context.Context, org, gvc, workloadName string) iter.Seq2[deployment.Deployment, error]
- func (s *DeploymentService) ListAll(ctx context.Context, org, gvc, workloadName string) ([]deployment.Deployment, error)
- func (s *DeploymentService) ListPage(ctx context.Context, org, gvc, workloadName, cursor string) (*ListResponse[deployment.Deployment], error)
- type DomainService
- func (s *DomainService) Create(ctx context.Context, org string, d *domain.Domain) (*domain.Domain, error)
- func (s *DomainService) Delete(ctx context.Context, org, name string) error
- func (s *DomainService) Get(ctx context.Context, org, name string) (*domain.Domain, error)
- func (s *DomainService) List(ctx context.Context, org string) iter.Seq2[domain.Domain, error]
- func (s *DomainService) ListAll(ctx context.Context, org string) ([]domain.Domain, error)
- func (s *DomainService) ListPage(ctx context.Context, org, cursor string) (*ListResponse[domain.Domain], error)
- func (s *DomainService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[domain.Domain, error]
- func (s *DomainService) QueryAll(ctx context.Context, org string, q *query.Query) ([]domain.Domain, error)
- func (s *DomainService) QueryPage(ctx context.Context, org string, q *query.Query) (*QueryResponse[domain.Domain], error)
- func (s *DomainService) Update(ctx context.Context, org, name string, d *domain.Domain) (*domain.Domain, error)
- type ExpandVolumeRequest
- type GVCService
- func (s *GVCService) Create(ctx context.Context, org string, g *gvc.Gvc) (*gvc.Gvc, error)
- func (s *GVCService) Delete(ctx context.Context, org, name string) error
- func (s *GVCService) Get(ctx context.Context, org, name string) (*gvc.Gvc, error)
- func (s *GVCService) List(ctx context.Context, org string) iter.Seq2[gvc.Gvc, error]
- func (s *GVCService) ListAll(ctx context.Context, org string) ([]gvc.Gvc, error)
- func (s *GVCService) ListPage(ctx context.Context, org, cursor string) (*ListResponse[gvc.Gvc], error)
- func (s *GVCService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[gvc.Gvc, error]
- func (s *GVCService) QueryAll(ctx context.Context, org string, q *query.Query) ([]gvc.Gvc, error)
- func (s *GVCService) QueryPage(ctx context.Context, org string, q *query.Query) (*QueryResponse[gvc.Gvc], error)
- func (s *GVCService) Update(ctx context.Context, org, name string, g *gvc.Gvc) (*gvc.Gvc, error)
- type GroupService
- func (s *GroupService) Create(ctx context.Context, org string, g *group.Group) (*group.Group, error)
- func (s *GroupService) Delete(ctx context.Context, org, name string) error
- func (s *GroupService) Get(ctx context.Context, org, name string) (*group.Group, error)
- func (s *GroupService) List(ctx context.Context, org string) iter.Seq2[group.Group, error]
- func (s *GroupService) ListAll(ctx context.Context, org string) ([]group.Group, error)
- func (s *GroupService) ListPage(ctx context.Context, org, cursor string) (*ListResponse[group.Group], error)
- func (s *GroupService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[group.Group, error]
- func (s *GroupService) QueryAll(ctx context.Context, org string, q *query.Query) ([]group.Group, error)
- func (s *GroupService) QueryPage(ctx context.Context, org string, q *query.Query) (*QueryResponse[group.Group], error)
- func (s *GroupService) Update(ctx context.Context, org, name string, g *group.Group) (*group.Group, error)
- type IPSetService
- func (s *IPSetService) Create(ctx context.Context, org string, i *ipSet.IpSet) (*ipSet.IpSet, error)
- func (s *IPSetService) Delete(ctx context.Context, org, name string) error
- func (s *IPSetService) Get(ctx context.Context, org, name string) (*ipSet.IpSet, error)
- func (s *IPSetService) List(ctx context.Context, org string) iter.Seq2[ipSet.IpSet, error]
- func (s *IPSetService) ListAll(ctx context.Context, org string) ([]ipSet.IpSet, error)
- func (s *IPSetService) ListPage(ctx context.Context, org, cursor string) (*ListResponse[ipSet.IpSet], error)
- func (s *IPSetService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[ipSet.IpSet, error]
- func (s *IPSetService) QueryAll(ctx context.Context, org string, q *query.Query) ([]ipSet.IpSet, error)
- func (s *IPSetService) QueryPage(ctx context.Context, org string, q *query.Query) (*QueryResponse[ipSet.IpSet], error)
- func (s *IPSetService) Update(ctx context.Context, org, name string, i *ipSet.IpSet) (*ipSet.IpSet, error)
- type IdentityService
- func (s *IdentityService) Create(ctx context.Context, org, gvc string, i *identity.Identity) (*identity.Identity, error)
- func (s *IdentityService) Delete(ctx context.Context, org, gvc, name string) error
- func (s *IdentityService) Get(ctx context.Context, org, gvc, name string) (*identity.Identity, error)
- func (s *IdentityService) List(ctx context.Context, org, gvc string) iter.Seq2[identity.Identity, error]
- func (s *IdentityService) ListAll(ctx context.Context, org, gvc string) ([]identity.Identity, error)
- func (s *IdentityService) ListPage(ctx context.Context, org, gvc, cursor string) (*ListResponse[identity.Identity], error)
- func (s *IdentityService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[identity.Identity, error]
- func (s *IdentityService) QueryAll(ctx context.Context, org string, q *query.Query) ([]identity.Identity, error)
- func (s *IdentityService) QueryPage(ctx context.Context, org string, q *query.Query) (*QueryResponse[identity.Identity], error)
- func (s *IdentityService) Update(ctx context.Context, org, gvc, name string, i *identity.Identity) (*identity.Identity, error)
- type ImageService
- func (s *ImageService) Delete(ctx context.Context, org, name string) error
- func (s *ImageService) Get(ctx context.Context, org, name string) (*image.Image, error)
- func (s *ImageService) List(ctx context.Context, org string) iter.Seq2[image.Image, error]
- func (s *ImageService) ListAll(ctx context.Context, org string) ([]image.Image, error)
- func (s *ImageService) ListPage(ctx context.Context, org, cursor string) (*ListResponse[image.Image], error)
- func (s *ImageService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[image.Image, error]
- func (s *ImageService) QueryAll(ctx context.Context, org string, q *query.Query) ([]image.Image, error)
- func (s *ImageService) QueryPage(ctx context.Context, org string, q *query.Query) (*QueryResponse[image.Image], error)
- type InviteRequest
- type Invoice
- type ListOption
- type ListResponse
- type LocationService
- func (s *LocationService) Get(ctx context.Context, org, name string) (*location.Location, error)
- func (s *LocationService) List(ctx context.Context, org string) iter.Seq2[location.Location, error]
- func (s *LocationService) ListAll(ctx context.Context, org string) ([]location.Location, error)
- func (s *LocationService) ListPage(ctx context.Context, org, cursor string) (*ListResponse[location.Location], error)
- func (s *LocationService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[location.Location, error]
- func (s *LocationService) QueryAll(ctx context.Context, org string, q *query.Query) ([]location.Location, error)
- func (s *LocationService) QueryPage(ctx context.Context, org string, q *query.Query) (*QueryResponse[location.Location], error)
- type Mk8sService
- func (s *Mk8sService) Create(ctx context.Context, org string, m *mk8s.Mk8sCluster) (*mk8s.Mk8sCluster, error)
- func (s *Mk8sService) Delete(ctx context.Context, org, name string) error
- func (s *Mk8sService) Get(ctx context.Context, org, name string) (*mk8s.Mk8sCluster, error)
- func (s *Mk8sService) List(ctx context.Context, org string) iter.Seq2[mk8s.Mk8sCluster, error]
- func (s *Mk8sService) ListAll(ctx context.Context, org string) ([]mk8s.Mk8sCluster, error)
- func (s *Mk8sService) ListPage(ctx context.Context, org, cursor string) (*ListResponse[mk8s.Mk8sCluster], error)
- func (s *Mk8sService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[mk8s.Mk8sCluster, error]
- func (s *Mk8sService) QueryAll(ctx context.Context, org string, q *query.Query) ([]mk8s.Mk8sCluster, error)
- func (s *Mk8sService) QueryPage(ctx context.Context, org string, q *query.Query) (*QueryResponse[mk8s.Mk8sCluster], error)
- func (s *Mk8sService) Update(ctx context.Context, org, name string, m *mk8s.Mk8sCluster) (*mk8s.Mk8sCluster, error)
- type Option
- type OrgService
- func (s *OrgService) Get(ctx context.Context, name string) (*org.Org, error)
- func (s *OrgService) List(ctx context.Context) iter.Seq2[org.Org, error]
- func (s *OrgService) ListAll(ctx context.Context) ([]org.Org, error)
- func (s *OrgService) ListPage(ctx context.Context, cursor string) (*ListResponse[org.Org], error)
- func (s *OrgService) Query(ctx context.Context, q *query.Query) iter.Seq2[org.Org, error]
- func (s *OrgService) QueryAll(ctx context.Context, q *query.Query) ([]org.Org, error)
- func (s *OrgService) QueryPage(ctx context.Context, q *query.Query) (*QueryResponse[org.Org], error)
- func (s *OrgService) Update(ctx context.Context, name string, o *org.Org) (*org.Org, error)
- type PolicyService
- func (s *PolicyService) Create(ctx context.Context, org string, p *policy.Policy) (*policy.Policy, error)
- func (s *PolicyService) Delete(ctx context.Context, org, name string) error
- func (s *PolicyService) Get(ctx context.Context, org, name string) (*policy.Policy, error)
- func (s *PolicyService) List(ctx context.Context, org string) iter.Seq2[policy.Policy, error]
- func (s *PolicyService) ListAll(ctx context.Context, org string) ([]policy.Policy, error)
- func (s *PolicyService) ListPage(ctx context.Context, org, cursor string) (*ListResponse[policy.Policy], error)
- func (s *PolicyService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[policy.Policy, error]
- func (s *PolicyService) QueryAll(ctx context.Context, org string, q *query.Query) ([]policy.Policy, error)
- func (s *PolicyService) QueryPage(ctx context.Context, org string, q *query.Query) (*QueryResponse[policy.Policy], error)
- func (s *PolicyService) Update(ctx context.Context, org, name string, p *policy.Policy) (*policy.Policy, error)
- type QueryResponse
- type QuotaService
- func (s *QuotaService) Create(ctx context.Context, org string, q *quota.Quota) (*quota.Quota, error)
- func (s *QuotaService) Delete(ctx context.Context, org, name string) error
- func (s *QuotaService) Get(ctx context.Context, org, name string) (*quota.Quota, error)
- func (s *QuotaService) List(ctx context.Context, org string) iter.Seq2[quota.Quota, error]
- func (s *QuotaService) ListAll(ctx context.Context, org string) ([]quota.Quota, error)
- func (s *QuotaService) ListPage(ctx context.Context, org, cursor string) (*ListResponse[quota.Quota], error)
- func (s *QuotaService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[quota.Quota, error]
- func (s *QuotaService) QueryAll(ctx context.Context, org string, q *query.Query) ([]quota.Quota, error)
- func (s *QuotaService) QueryPage(ctx context.Context, org string, q *query.Query) (*QueryResponse[quota.Quota], error)
- func (s *QuotaService) Update(ctx context.Context, org, name string, q *quota.Quota) (*quota.Quota, error)
- type RestoreVolumeRequest
- type SecretService
- func (s *SecretService) Create(ctx context.Context, org string, sec *secret.Secret) (*secret.Secret, error)
- func (s *SecretService) Delete(ctx context.Context, org, name string) error
- func (s *SecretService) Get(ctx context.Context, org, name string) (*secret.Secret, error)
- func (s *SecretService) List(ctx context.Context, org string) iter.Seq2[secret.Secret, error]
- func (s *SecretService) ListAll(ctx context.Context, org string) ([]secret.Secret, error)
- func (s *SecretService) ListPage(ctx context.Context, org, cursor string) (*ListResponse[secret.Secret], error)
- func (s *SecretService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[secret.Secret, error]
- func (s *SecretService) QueryAll(ctx context.Context, org string, q *query.Query) ([]secret.Secret, error)
- func (s *SecretService) QueryPage(ctx context.Context, org string, q *query.Query) (*QueryResponse[secret.Secret], error)
- func (s *SecretService) Reveal(ctx context.Context, org, name string) (*secret.Secret, error)
- func (s *SecretService) Update(ctx context.Context, org, name string, sec *secret.Secret) (*secret.Secret, error)
- type ServiceAccountService
- func (s *ServiceAccountService) AddKey(ctx context.Context, org, name string, req *AddKeyRequest) (*AddKeyResponse, error)
- func (s *ServiceAccountService) Create(ctx context.Context, org string, sa *serviceaccount.ServiceAccount) (*serviceaccount.ServiceAccount, error)
- func (s *ServiceAccountService) Delete(ctx context.Context, org, name string) error
- func (s *ServiceAccountService) Get(ctx context.Context, org, name string) (*serviceaccount.ServiceAccount, error)
- func (s *ServiceAccountService) List(ctx context.Context, org string) iter.Seq2[serviceaccount.ServiceAccount, error]
- func (s *ServiceAccountService) ListAll(ctx context.Context, org string) ([]serviceaccount.ServiceAccount, error)
- func (s *ServiceAccountService) ListPage(ctx context.Context, org, cursor string) (*ListResponse[serviceaccount.ServiceAccount], error)
- func (s *ServiceAccountService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[serviceaccount.ServiceAccount, error]
- func (s *ServiceAccountService) QueryAll(ctx context.Context, org string, q *query.Query) ([]serviceaccount.ServiceAccount, error)
- func (s *ServiceAccountService) QueryPage(ctx context.Context, org string, q *query.Query) (*QueryResponse[serviceaccount.ServiceAccount], error)
- func (s *ServiceAccountService) Update(ctx context.Context, org, name string, sa *serviceaccount.ServiceAccount) (*serviceaccount.ServiceAccount, error)
- type TOUInput
- type TaskService
- func (s *TaskService) Get(ctx context.Context, org, name string) (*task.Task, error)
- func (s *TaskService) List(ctx context.Context, org string) iter.Seq2[task.Task, error]
- func (s *TaskService) ListAll(ctx context.Context, org string) ([]task.Task, error)
- func (s *TaskService) ListPage(ctx context.Context, org, cursor string) (*ListResponse[task.Task], error)
- func (s *TaskService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[task.Task, error]
- func (s *TaskService) QueryAll(ctx context.Context, org string, q *query.Query) ([]task.Task, error)
- func (s *TaskService) QueryPage(ctx context.Context, org string, q *query.Query) (*QueryResponse[task.Task], error)
- type UserService
- func (s *UserService) Delete(ctx context.Context, org, name string) error
- func (s *UserService) Get(ctx context.Context, org, name string) (*user.User, error)
- func (s *UserService) Invite(ctx context.Context, org string, req *InviteRequest) error
- func (s *UserService) List(ctx context.Context, org string) iter.Seq2[user.User, error]
- func (s *UserService) ListAll(ctx context.Context, org string) ([]user.User, error)
- func (s *UserService) ListPage(ctx context.Context, org, cursor string) (*ListResponse[user.User], error)
- func (s *UserService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[user.User, error]
- func (s *UserService) QueryAll(ctx context.Context, org string, q *query.Query) ([]user.User, error)
- func (s *UserService) QueryPage(ctx context.Context, org string, q *query.Query) (*QueryResponse[user.User], error)
- type VolumeSetService
- func (s *VolumeSetService) Create(ctx context.Context, org, gvc string, v *volumeSet.VolumeSet) (*volumeSet.VolumeSet, error)
- func (s *VolumeSetService) CreateCommand(ctx context.Context, org, gvc, volumeSetName string, cmd *command.Command) (*command.Command, error)
- func (s *VolumeSetService) CreateVolumeSnapshot(ctx context.Context, org, gvc, volumeSetName string, ...) (*command.Command, error)
- func (s *VolumeSetService) Delete(ctx context.Context, org, gvc, name string) error
- func (s *VolumeSetService) DeleteCommand(ctx context.Context, org, gvc, volumeSetName, commandID string) error
- func (s *VolumeSetService) DeleteVolume(ctx context.Context, org, gvc, volumeSetName string, req *DeleteVolumeRequest) (*command.Command, error)
- func (s *VolumeSetService) DeleteVolumeSnapshot(ctx context.Context, org, gvc, volumeSetName string, ...) (*command.Command, error)
- func (s *VolumeSetService) ExpandVolume(ctx context.Context, org, gvc, volumeSetName string, req *ExpandVolumeRequest) (*command.Command, error)
- func (s *VolumeSetService) Get(ctx context.Context, org, gvc, name string) (*volumeSet.VolumeSet, error)
- func (s *VolumeSetService) GetCommand(ctx context.Context, org, gvc, volumeSetName, commandID string) (*command.Command, error)
- func (s *VolumeSetService) List(ctx context.Context, org, gvc string) iter.Seq2[volumeSet.VolumeSet, error]
- func (s *VolumeSetService) ListAll(ctx context.Context, org, gvc string) ([]volumeSet.VolumeSet, error)
- func (s *VolumeSetService) ListCommands(ctx context.Context, org, gvc, volumeSetName string) iter.Seq2[command.Command, error]
- func (s *VolumeSetService) ListCommandsAll(ctx context.Context, org, gvc, volumeSetName string) ([]command.Command, error)
- func (s *VolumeSetService) ListPage(ctx context.Context, org, gvc, cursor string) (*ListResponse[volumeSet.VolumeSet], error)
- func (s *VolumeSetService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[volumeSet.VolumeSet, error]
- func (s *VolumeSetService) QueryAll(ctx context.Context, org string, q *query.Query) ([]volumeSet.VolumeSet, error)
- func (s *VolumeSetService) QueryCommands(ctx context.Context, org, gvc, volumeSetName string, q *query.Query) iter.Seq2[command.Command, error]
- func (s *VolumeSetService) QueryCommandsAll(ctx context.Context, org, gvc, volumeSetName string, q *query.Query) ([]command.Command, error)
- func (s *VolumeSetService) QueryCommandsPage(ctx context.Context, org, gvc, volumeSetName string, q *query.Query) (*QueryResponse[command.Command], error)
- func (s *VolumeSetService) QueryPage(ctx context.Context, org string, q *query.Query) (*QueryResponse[volumeSet.VolumeSet], error)
- func (s *VolumeSetService) RestoreVolume(ctx context.Context, org, gvc, volumeSetName string, req *RestoreVolumeRequest) (*command.Command, error)
- func (s *VolumeSetService) Update(ctx context.Context, org, gvc, name string, v *volumeSet.VolumeSet) (*volumeSet.VolumeSet, error)
- func (s *VolumeSetService) UpdateCommand(ctx context.Context, org, gvc, volumeSetName, commandID string, ...) (*command.Command, error)
- type WorkloadService
- func (s *WorkloadService) Create(ctx context.Context, org, gvc string, w *workload.Workload) (*workload.Workload, error)
- func (s *WorkloadService) CreateCommand(ctx context.Context, org, gvc, workloadName string, cmd *command.Command) (*command.Command, error)
- func (s *WorkloadService) CronStart(ctx context.Context, org, gvc, name string, req *CronStartRequest) (*command.Command, error)
- func (s *WorkloadService) Delete(ctx context.Context, org, gvc, name string) error
- func (s *WorkloadService) DeleteCommand(ctx context.Context, org, gvc, workloadName, commandID string) error
- func (s *WorkloadService) ForceRedeploy(ctx context.Context, org, gvc, name string) error
- func (s *WorkloadService) Get(ctx context.Context, org, gvc, name string) (*workload.Workload, error)
- func (s *WorkloadService) GetCommand(ctx context.Context, org, gvc, workloadName, commandID string) (*command.Command, error)
- func (s *WorkloadService) List(ctx context.Context, org, gvc string) iter.Seq2[workload.Workload, error]
- func (s *WorkloadService) ListAll(ctx context.Context, org, gvc string) ([]workload.Workload, error)
- func (s *WorkloadService) ListCommands(ctx context.Context, org, gvc, workloadName string) iter.Seq2[command.Command, error]
- func (s *WorkloadService) ListCommandsAll(ctx context.Context, org, gvc, workloadName string) ([]command.Command, error)
- func (s *WorkloadService) ListPage(ctx context.Context, org, gvc, cursor string) (*ListResponse[workload.Workload], error)
- func (s *WorkloadService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[workload.Workload, error]
- func (s *WorkloadService) QueryAll(ctx context.Context, org string, q *query.Query) ([]workload.Workload, error)
- func (s *WorkloadService) QueryCommands(ctx context.Context, org, gvc, workloadName string, q *query.Query) iter.Seq2[command.Command, error]
- func (s *WorkloadService) QueryCommandsAll(ctx context.Context, org, gvc, workloadName string, q *query.Query) ([]command.Command, error)
- func (s *WorkloadService) QueryCommandsPage(ctx context.Context, org, gvc, workloadName string, q *query.Query) (*QueryResponse[command.Command], error)
- func (s *WorkloadService) QueryPage(ctx context.Context, org string, q *query.Query) (*QueryResponse[workload.Workload], error)
- func (s *WorkloadService) RunCronWorkload(ctx context.Context, org, gvc, workloadName string, ...) (*command.Command, error)
- func (s *WorkloadService) StopReplica(ctx context.Context, org, gvc, workloadName string, ...) (*command.Command, error)
- func (s *WorkloadService) Update(ctx context.Context, org, gvc, name string, w *workload.Workload) (*workload.Workload, error)
- func (s *WorkloadService) UpdateCommand(ctx context.Context, org, gvc, workloadName, commandID string, ...) (*command.Command, error)
Constants ¶
const ( // DefaultBaseURL is the default Control Plane API base URL. DefaultBaseURL = "https://api.cpln.io" // DefaultBillingURL is the default billing service URL. DefaultBillingURL = "https://billing-ng.cpln.io" // DefaultTimeout is the default HTTP client timeout. DefaultTimeout = 30 * time.Second )
Variables ¶
var ( ErrNotFound = errors.New("resource not found") ErrForbidden = errors.New("forbidden") ErrConflict = errors.New("resource conflict") ErrBadRequest = errors.New("bad request") ErrInternalError = errors.New("internal server error") )
Common errors returned by the API client.
Functions ¶
func IsBadRequest ¶
IsBadRequest returns true if the error is a 400 Bad Request error.
func IsConflict ¶
IsConflict returns true if the error is a 409 Conflict error.
func IsForbidden ¶
IsForbidden returns true if the error is a 403 Forbidden error.
func IsNotFound ¶
IsNotFound returns true if the error is a 404 Not Found error.
func IsUnauthorized ¶
IsUnauthorized returns true if the error is a 401 Unauthorized error.
Types ¶
type APIError ¶
type APIError struct {
Status int `json:"status"`
Message string `json:"message,omitempty"`
Code string `json:"code,omitempty"`
Details any `json:"details,omitempty"`
ID string `json:"id,omitempty"`
}
APIError represents an error response from the Control Plane API.
type AcceptTOURequest ¶
type AcceptTOURequest struct {
TOU *TOUInput `json:"tou"`
}
AcceptTOURequest is the request body for accepting Terms of Use.
type AddKeyRequest ¶
type AddKeyRequest struct {
Description string `json:"description,omitempty"`
}
AddKeyRequest is the request body for adding a key to a service account.
type AddKeyResponse ¶
type AddKeyResponse struct {
Key string `json:"key"`
}
AddKeyResponse is the response from adding a key to a service account.
type AgentService ¶
type AgentService struct {
// contains filtered or unexported fields
}
AgentService handles operations on agents.
func (*AgentService) Create ¶
func (s *AgentService) Create(ctx context.Context, org string, a *agent.Agent) (*agent.Agent, error)
Create creates a new agent.
func (*AgentService) Delete ¶
func (s *AgentService) Delete(ctx context.Context, org, name string) error
Delete deletes an agent by name.
func (*AgentService) ListPage ¶
func (s *AgentService) ListPage(ctx context.Context, org, cursor string) (*ListResponse[agent.Agent], error)
ListPage returns a single page of agents.
func (*AgentService) Query ¶
func (s *AgentService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[agent.Agent, error]
Query returns an iterator over agents matching the query.
func (*AgentService) QueryAll ¶
func (s *AgentService) QueryAll(ctx context.Context, org string, q *query.Query) ([]agent.Agent, error)
QueryAll returns all agents matching the query.
type AuditContextService ¶
type AuditContextService struct {
// contains filtered or unexported fields
}
AuditContextService handles operations on audit contexts.
func (*AuditContextService) Create ¶
func (s *AuditContextService) Create(ctx context.Context, org string, a *auditctx.AuditContext) (*auditctx.AuditContext, error)
Create creates a new audit context.
func (*AuditContextService) Delete ¶
func (s *AuditContextService) Delete(ctx context.Context, org, name string) error
Delete deletes an audit context by name.
func (*AuditContextService) Get ¶
func (s *AuditContextService) Get(ctx context.Context, org, name string) (*auditctx.AuditContext, error)
Get returns an audit context by name.
func (*AuditContextService) List ¶
func (s *AuditContextService) List(ctx context.Context, org string) iter.Seq2[auditctx.AuditContext, error]
List returns an iterator over all audit contexts in the organization.
func (*AuditContextService) ListAll ¶
func (s *AuditContextService) ListAll(ctx context.Context, org string) ([]auditctx.AuditContext, error)
ListAll returns all audit contexts in the organization.
func (*AuditContextService) ListPage ¶
func (s *AuditContextService) ListPage(ctx context.Context, org, cursor string) (*ListResponse[auditctx.AuditContext], error)
ListPage returns a single page of audit contexts.
func (*AuditContextService) Query ¶
func (s *AuditContextService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[auditctx.AuditContext, error]
Query returns an iterator over audit contexts matching the query.
func (*AuditContextService) QueryAll ¶
func (s *AuditContextService) QueryAll(ctx context.Context, org string, q *query.Query) ([]auditctx.AuditContext, error)
QueryAll returns all audit contexts matching the query.
func (*AuditContextService) QueryPage ¶
func (s *AuditContextService) QueryPage(ctx context.Context, org string, q *query.Query) (*QueryResponse[auditctx.AuditContext], error)
QueryPage returns a single page of audit contexts matching the query.
func (*AuditContextService) Update ¶
func (s *AuditContextService) Update(ctx context.Context, org, name string, a *auditctx.AuditContext) (*auditctx.AuditContext, error)
Update updates an existing audit context.
type BillingAccount ¶
type BillingAccount struct {
ID string `json:"id,omitempty"`
AccountName string `json:"fullName,omitempty"`
Description string `json:"accountName,omitempty"`
Email string `json:"email,omitempty"`
Enabled bool `json:"enabled"`
MainOrg string `json:"mainOrg,omitempty"`
OrgQuota int `json:"orgQuota,omitempty"`
Created *time.Time `json:"created,omitempty"`
ExtraInfo map[string]string `json:"extraInfo,omitempty"`
}
BillingAccount represents a billing account.
type BillingAccountInput ¶
type BillingAccountInput struct {
AccountName string `json:"fullName,omitempty"`
Description string `json:"accountName,omitempty"`
Email string `json:"email,omitempty"`
Phone string `json:"phone,omitempty"`
Address *BillingAddress `json:"address,omitempty"`
ExtraInfo map[string]string `json:"extraInfo,omitempty"`
}
BillingAccountInput is the input for creating/updating a billing account.
type BillingAddress ¶
type BillingAddress struct {
Name string `json:"name,omitempty"`
Address1 string `json:"address1,omitempty"`
Address2 string `json:"address2,omitempty"`
City string `json:"city,omitempty"`
Country string `json:"country,omitempty"`
PostalCode string `json:"postalCode,omitempty"`
State string `json:"state,omitempty"`
}
BillingAddress represents a billing address.
type BillingOrg ¶
type BillingOrg struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Tags map[string]string `json:"tags,omitempty"`
AccountID string `json:"accountId,omitempty"`
Created time.Time `json:"created,omitempty"`
}
BillingOrg represents an organization in the billing system.
type BillingService ¶
type BillingService struct {
// contains filtered or unexported fields
}
BillingService handles billing operations via billing-ng.
func (*BillingService) AcceptTOU ¶
func (s *BillingService) AcceptTOU(ctx context.Context, accountID string, req *AcceptTOURequest) error
AcceptTOU accepts the Terms of Use for an account.
func (*BillingService) CreateAccount ¶
func (s *BillingService) CreateAccount(ctx context.Context, req *CreateAccountRequest) (*CreateAccountResponse, error)
CreateAccount creates a new billing account.
func (*BillingService) CreateOrg ¶
func (s *BillingService) CreateOrg(ctx context.Context, accountID string, req *CreateOrgRequest) (*CreateOrgResponse, error)
CreateOrg creates a new organization in the specified account.
func (*BillingService) GetAccount ¶
func (s *BillingService) GetAccount(ctx context.Context, accountID string) (*BillingAccount, error)
GetAccount returns account details by ID.
func (*BillingService) GetInvoiceJSON ¶
func (s *BillingService) GetInvoiceJSON(ctx context.Context, accountID, invoiceID string) (*Invoice, error)
GetInvoiceJSON returns a specific invoice as JSON.
func (*BillingService) GetInvoicePDF ¶
func (s *BillingService) GetInvoicePDF(ctx context.Context, accountID, invoiceID string) ([]byte, error)
GetInvoicePDF returns a specific invoice as PDF bytes.
func (*BillingService) GetOrg ¶
func (s *BillingService) GetOrg(ctx context.Context, orgName string) (*BillingOrg, error)
GetOrg returns organization details by name.
func (*BillingService) GetOrgAccount ¶
func (s *BillingService) GetOrgAccount(ctx context.Context, orgName string) (*BillingAccount, error)
GetOrgAccount returns the billing account for an organization.
func (*BillingService) ListInvoices ¶
func (s *BillingService) ListInvoices(ctx context.Context, accountID string, start, end *time.Time) ([]Invoice, error)
ListInvoices returns invoices for an account.
func (*BillingService) QueryChargesByAccount ¶
func (s *BillingService) QueryChargesByAccount(ctx context.Context, accountID string, req *ChargeQueryRequest) (*ChargeQueryResponse, error)
QueryChargesByAccount queries charges for an account.
func (*BillingService) QueryChargesByOrg ¶
func (s *BillingService) QueryChargesByOrg(ctx context.Context, orgName string, req *ChargeQueryRequest) (*ChargeQueryResponse, error)
QueryChargesByOrg queries charges for an organization.
type ChargePeriod ¶
type ChargePeriod struct {
StartTime time.Time `json:"startTime"`
EndTime time.Time `json:"endTime"`
Groups []any `json:"groups,omitempty"`
}
ChargePeriod represents charges for a time period.
type ChargeQueryRequest ¶
type ChargeQueryRequest struct {
StartTime time.Time `json:"startTime"`
EndTime time.Time `json:"endTime"`
TimeStep string `json:"timeStep,omitempty"` // hour, day, week, month
Orgs []string `json:"orgs,omitempty"`
Detailed bool `json:"detailed,omitempty"`
}
ChargeQueryRequest is the request for querying charges.
type ChargeQueryResponse ¶
type ChargeQueryResponse struct {
Periods []ChargePeriod `json:"periods,omitempty"`
DetailedResults []any `json:"detailedResults,omitempty"`
}
ChargeQueryResponse is the response from a charge query.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the Control Plane API client.
func NewWithBaseURL ¶
NewWithBaseURL creates a new Control Plane API client with a custom base URL.
func (*Client) Agents ¶
func (c *Client) Agents() *AgentService
Agents returns the AgentService for managing agents.
func (*Client) AuditContexts ¶
func (c *Client) AuditContexts() *AuditContextService
AuditContexts returns the AuditContextService for managing audit contexts.
func (*Client) Billing ¶
func (c *Client) Billing() *BillingService
Billing returns the BillingService for billing operations via billing-ng.
func (*Client) CloudAccounts ¶
func (c *Client) CloudAccounts() *CloudAccountService
CloudAccounts returns the CloudAccountService for managing cloud accounts.
func (*Client) Deployments ¶
func (c *Client) Deployments() *DeploymentService
Deployments returns the DeploymentService for managing deployments.
func (*Client) Domains ¶
func (c *Client) Domains() *DomainService
Domains returns the DomainService for managing domains.
func (*Client) GVCs ¶
func (c *Client) GVCs() *GVCService
GVCs returns the GVCService for managing GVCs.
func (*Client) GetRaw ¶
GetRaw allows you to filter an API response to only the fields you care about
func (*Client) Groups ¶
func (c *Client) Groups() *GroupService
Groups returns the GroupService for managing groups.
func (*Client) IPSets ¶
func (c *Client) IPSets() *IPSetService
IPSets returns the IPSetService for managing IP sets.
func (*Client) Identities ¶
func (c *Client) Identities() *IdentityService
Identities returns the IdentityService for managing identities.
func (*Client) Images ¶
func (c *Client) Images() *ImageService
Images returns the ImageService for managing images.
func (*Client) Locations ¶
func (c *Client) Locations() *LocationService
Locations returns the LocationService for managing locations.
func (*Client) Mk8s ¶
func (c *Client) Mk8s() *Mk8sService
Mk8s returns the Mk8sService for managing managed Kubernetes clusters.
func (*Client) Orgs ¶
func (c *Client) Orgs() *OrgService
Orgs returns the OrgService for managing organizations.
func (*Client) PatchRaw ¶
PatchRaw sends a raw PATCH request with arbitrary JSON body (for $drop, $append operators). This is useful when you need to send special operators that aren't part of typed structs.
func (*Client) PatchRawWithResult ¶
PatchRawWithResult sends a raw PATCH request with arbitrary JSON body and unmarshals the result.
func (*Client) Policies ¶
func (c *Client) Policies() *PolicyService
Policies returns the PolicyService for managing policies.
func (*Client) Quotas ¶
func (c *Client) Quotas() *QuotaService
Quotas returns the QuotaService for managing quotas.
func (*Client) Secrets ¶
func (c *Client) Secrets() *SecretService
Secrets returns the SecretService for managing secrets.
func (*Client) ServiceAccounts ¶
func (c *Client) ServiceAccounts() *ServiceAccountService
ServiceAccounts returns the ServiceAccountService for managing service accounts.
func (*Client) Tasks ¶
func (c *Client) Tasks() *TaskService
Tasks returns the TaskService for managing tasks.
func (*Client) Users ¶
func (c *Client) Users() *UserService
Users returns the UserService for managing users.
func (*Client) VolumeSets ¶
func (c *Client) VolumeSets() *VolumeSetService
VolumeSets returns the VolumeSetService for managing volume sets.
func (*Client) Workloads ¶
func (c *Client) Workloads() *WorkloadService
Workloads returns the WorkloadService for managing workloads.
type CloudAccountService ¶
type CloudAccountService struct {
// contains filtered or unexported fields
}
CloudAccountService handles operations on cloud accounts.
func (*CloudAccountService) Create ¶
func (s *CloudAccountService) Create(ctx context.Context, org string, ca *cloudaccount.CloudAccount) (*cloudaccount.CloudAccount, error)
Create creates a new cloud account.
func (*CloudAccountService) Delete ¶
func (s *CloudAccountService) Delete(ctx context.Context, org, name string) error
Delete deletes a cloud account by name.
func (*CloudAccountService) Get ¶
func (s *CloudAccountService) Get(ctx context.Context, org, name string) (*cloudaccount.CloudAccount, error)
Get returns a cloud account by name.
func (*CloudAccountService) List ¶
func (s *CloudAccountService) List(ctx context.Context, org string) iter.Seq2[cloudaccount.CloudAccount, error]
List returns an iterator over all cloud accounts in the organization.
func (*CloudAccountService) ListAll ¶
func (s *CloudAccountService) ListAll(ctx context.Context, org string) ([]cloudaccount.CloudAccount, error)
ListAll returns all cloud accounts in the organization.
func (*CloudAccountService) ListPage ¶
func (s *CloudAccountService) ListPage(ctx context.Context, org, cursor string) (*ListResponse[cloudaccount.CloudAccount], error)
ListPage returns a single page of cloud accounts.
func (*CloudAccountService) Query ¶
func (s *CloudAccountService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[cloudaccount.CloudAccount, error]
Query returns an iterator over cloud accounts matching the query.
func (*CloudAccountService) QueryAll ¶
func (s *CloudAccountService) QueryAll(ctx context.Context, org string, q *query.Query) ([]cloudaccount.CloudAccount, error)
QueryAll returns all cloud accounts matching the query.
func (*CloudAccountService) QueryPage ¶
func (s *CloudAccountService) QueryPage(ctx context.Context, org string, q *query.Query) (*QueryResponse[cloudaccount.CloudAccount], error)
QueryPage returns a single page of cloud accounts matching the query.
func (*CloudAccountService) Update ¶
func (s *CloudAccountService) Update(ctx context.Context, org, name string, ca *cloudaccount.CloudAccount) (*cloudaccount.CloudAccount, error)
Update updates an existing cloud account.
type CreateAccountRequest ¶
type CreateAccountRequest struct {
Account *BillingAccountInput `json:"account"`
Type string `json:"type"`
}
CreateAccountRequest is the request body for creating a billing account.
type CreateAccountResponse ¶
type CreateAccountResponse struct {
BillingAccount
}
CreateAccountResponse is the response from creating an account.
type CreateOrgRequest ¶
type CreateOrgRequest struct {
Org *BillingOrg `json:"org"`
Invitees []string `json:"invitees,omitempty"`
}
CreateOrgRequest is the request body for creating an org via billing-ng.
type CreateOrgResponse ¶
type CreateOrgResponse struct {
BillingOrg
WasCreated bool `json:"Created,omitempty"` // Whether the org was newly created (vs already existed)
}
CreateOrgResponse is the response from creating an org. Note: The API embeds the Org type, so "created" is actually a timestamp, not a boolean. The boolean "Created" field from billing-ng is serialized with capital C.
type CreateVolumeSnapshotRequest ¶
type CreateVolumeSnapshotRequest struct {
Location string `json:"location"`
VolumeIndex float32 `json:"volumeIndex"`
SnapshotName string `json:"snapshotName"`
SnapshotExpirationDate string `json:"snapshotExpirationDate,omitempty"`
SnapshotTags []map[string]string `json:"snapshotTags,omitempty"`
}
CreateVolumeSnapshotRequest is the request for creating a volume snapshot.
type CronStartRequest ¶
type CronStartRequest struct {
Location string `json:"location"`
ContainerOverrides []workload.ContainerOverride `json:"containerOverrides,omitempty"`
}
CronStartRequest is the request body for starting a cron workload job.
type DeleteVolumeRequest ¶
type DeleteVolumeRequest struct {
Location string `json:"location"`
VolumeIndex float32 `json:"volumeIndex"`
}
DeleteVolumeRequest is the request for deleting a volume.
type DeleteVolumeSnapshotRequest ¶
type DeleteVolumeSnapshotRequest struct {
Location string `json:"location"`
VolumeIndex float32 `json:"volumeIndex"`
SnapshotName string `json:"snapshotName"`
}
DeleteVolumeSnapshotRequest is the request for deleting a volume snapshot.
type DeploymentService ¶
type DeploymentService struct {
// contains filtered or unexported fields
}
DeploymentService handles operations on deployments. Deployments are read-only resources that represent the deployment state of workloads.
func (*DeploymentService) Get ¶
func (s *DeploymentService) Get(ctx context.Context, org, gvc, workloadName, name string) (*deployment.Deployment, error)
Get returns a deployment by name.
func (*DeploymentService) List ¶
func (s *DeploymentService) List(ctx context.Context, org, gvc, workloadName string) iter.Seq2[deployment.Deployment, error]
List returns an iterator over all deployments for a workload.
func (*DeploymentService) ListAll ¶
func (s *DeploymentService) ListAll(ctx context.Context, org, gvc, workloadName string) ([]deployment.Deployment, error)
ListAll returns all deployments for a workload.
func (*DeploymentService) ListPage ¶
func (s *DeploymentService) ListPage(ctx context.Context, org, gvc, workloadName, cursor string) (*ListResponse[deployment.Deployment], error)
ListPage returns a single page of deployments.
type DomainService ¶
type DomainService struct {
// contains filtered or unexported fields
}
DomainService handles operations on domains.
func (*DomainService) Create ¶
func (s *DomainService) Create(ctx context.Context, org string, d *domain.Domain) (*domain.Domain, error)
Create creates a new domain.
func (*DomainService) Delete ¶
func (s *DomainService) Delete(ctx context.Context, org, name string) error
Delete deletes a domain by name.
func (*DomainService) ListPage ¶
func (s *DomainService) ListPage(ctx context.Context, org, cursor string) (*ListResponse[domain.Domain], error)
ListPage returns a single page of domains.
func (*DomainService) Query ¶
func (s *DomainService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[domain.Domain, error]
Query returns an iterator over domains matching the query.
func (*DomainService) QueryAll ¶
func (s *DomainService) QueryAll(ctx context.Context, org string, q *query.Query) ([]domain.Domain, error)
QueryAll returns all domains matching the query.
type ExpandVolumeRequest ¶
type ExpandVolumeRequest struct {
Location string `json:"location"`
VolumeIndex float32 `json:"volumeIndex"`
NewStorageCapacity float32 `json:"newStorageCapacity"`
TimeoutSeconds float32 `json:"timeoutSeconds,omitempty"`
}
ExpandVolumeRequest is the request for expanding a volume.
type GVCService ¶
type GVCService struct {
// contains filtered or unexported fields
}
GVCService handles operations on GVCs.
func (*GVCService) Delete ¶
func (s *GVCService) Delete(ctx context.Context, org, name string) error
Delete deletes a GVC by name.
func (*GVCService) ListPage ¶
func (s *GVCService) ListPage(ctx context.Context, org, cursor string) (*ListResponse[gvc.Gvc], error)
ListPage returns a single page of GVCs.
func (*GVCService) Query ¶
func (s *GVCService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[gvc.Gvc, error]
Query returns an iterator over GVCs matching the query.
type GroupService ¶
type GroupService struct {
// contains filtered or unexported fields
}
GroupService handles operations on groups.
func (*GroupService) Create ¶
func (s *GroupService) Create(ctx context.Context, org string, g *group.Group) (*group.Group, error)
Create creates a new group.
func (*GroupService) Delete ¶
func (s *GroupService) Delete(ctx context.Context, org, name string) error
Delete deletes a group by name.
func (*GroupService) ListPage ¶
func (s *GroupService) ListPage(ctx context.Context, org, cursor string) (*ListResponse[group.Group], error)
ListPage returns a single page of groups.
func (*GroupService) Query ¶
func (s *GroupService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[group.Group, error]
Query returns an iterator over groups matching the query.
func (*GroupService) QueryAll ¶
func (s *GroupService) QueryAll(ctx context.Context, org string, q *query.Query) ([]group.Group, error)
QueryAll returns all groups matching the query.
type IPSetService ¶
type IPSetService struct {
// contains filtered or unexported fields
}
IPSetService handles operations on IP sets.
func (*IPSetService) Create ¶
func (s *IPSetService) Create(ctx context.Context, org string, i *ipSet.IpSet) (*ipSet.IpSet, error)
Create creates a new IP set.
func (*IPSetService) Delete ¶
func (s *IPSetService) Delete(ctx context.Context, org, name string) error
Delete deletes an IP set by name.
func (*IPSetService) ListPage ¶
func (s *IPSetService) ListPage(ctx context.Context, org, cursor string) (*ListResponse[ipSet.IpSet], error)
ListPage returns a single page of IP sets.
func (*IPSetService) Query ¶
func (s *IPSetService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[ipSet.IpSet, error]
Query returns an iterator over IP sets matching the query.
func (*IPSetService) QueryAll ¶
func (s *IPSetService) QueryAll(ctx context.Context, org string, q *query.Query) ([]ipSet.IpSet, error)
QueryAll returns all IP sets matching the query.
type IdentityService ¶
type IdentityService struct {
// contains filtered or unexported fields
}
IdentityService handles operations on identities.
func (*IdentityService) Create ¶
func (s *IdentityService) Create(ctx context.Context, org, gvc string, i *identity.Identity) (*identity.Identity, error)
Create creates a new identity.
func (*IdentityService) Delete ¶
func (s *IdentityService) Delete(ctx context.Context, org, gvc, name string) error
Delete deletes an identity by name.
func (*IdentityService) Get ¶
func (s *IdentityService) Get(ctx context.Context, org, gvc, name string) (*identity.Identity, error)
Get returns an identity by name.
func (*IdentityService) List ¶
func (s *IdentityService) List(ctx context.Context, org, gvc string) iter.Seq2[identity.Identity, error]
List returns an iterator over all identities in the GVC.
func (*IdentityService) ListAll ¶
func (s *IdentityService) ListAll(ctx context.Context, org, gvc string) ([]identity.Identity, error)
ListAll returns all identities in the GVC.
func (*IdentityService) ListPage ¶
func (s *IdentityService) ListPage(ctx context.Context, org, gvc, cursor string) (*ListResponse[identity.Identity], error)
ListPage returns a single page of identities.
func (*IdentityService) Query ¶
func (s *IdentityService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[identity.Identity, error]
Query returns an iterator over identities matching the query. Note: Identity queries are org-level, not GVC-scoped.
func (*IdentityService) QueryAll ¶
func (s *IdentityService) QueryAll(ctx context.Context, org string, q *query.Query) ([]identity.Identity, error)
QueryAll returns all identities matching the query. Note: Identity queries are org-level, not GVC-scoped.
type ImageService ¶
type ImageService struct {
// contains filtered or unexported fields
}
ImageService handles operations on images.
func (*ImageService) Delete ¶
func (s *ImageService) Delete(ctx context.Context, org, name string) error
Delete deletes an image by name.
func (*ImageService) ListPage ¶
func (s *ImageService) ListPage(ctx context.Context, org, cursor string) (*ListResponse[image.Image], error)
ListPage returns a single page of images.
func (*ImageService) Query ¶
func (s *ImageService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[image.Image, error]
Query returns an iterator over images matching the query.
type InviteRequest ¶
type InviteRequest struct {
Email string `json:"email"`
}
InviteRequest is the request body for inviting a user.
type Invoice ¶
type Invoice struct {
ID string `json:"id,omitempty"`
AccountID string `json:"accountId,omitempty"`
Status string `json:"status,omitempty"`
Total float64 `json:"total,omitempty"`
StartTime *time.Time `json:"startTime,omitempty"`
EndTime *time.Time `json:"endTime,omitempty"`
Created *time.Time `json:"created,omitempty"`
}
Invoice represents a billing invoice.
type ListOption ¶
type ListOption func(*listOptions)
ListOption is a functional option for list operations.
func WithLimit ¶
func WithLimit(limit int) ListOption
WithLimit sets the maximum number of items to return per page.
type ListResponse ¶
type ListResponse[T any] struct { Kind string `json:"kind"` ItemKind string `json:"itemKind"` Items []T `json:"items"` Links []base.Link `json:"links"` // contains filtered or unexported fields }
ListResponse represents a paginated list response from the API.
func (*ListResponse[T]) HasNext ¶
func (r *ListResponse[T]) HasNext() bool
HasNext returns true if there are more pages available.
func (*ListResponse[T]) NextLink ¶
func (r *ListResponse[T]) NextLink() string
NextLink returns the URL for the next page, or empty string if no more pages.
func (*ListResponse[T]) NextPage ¶
func (r *ListResponse[T]) NextPage(ctx context.Context) (*ListResponse[T], error)
NextPage fetches the next page of results. Returns nil, nil if there are no more pages.
type LocationService ¶
type LocationService struct {
// contains filtered or unexported fields
}
LocationService handles operations on locations.
func (*LocationService) ListPage ¶
func (s *LocationService) ListPage(ctx context.Context, org, cursor string) (*ListResponse[location.Location], error)
ListPage returns a single page of locations.
func (*LocationService) Query ¶
func (s *LocationService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[location.Location, error]
Query returns an iterator over locations matching the query.
type Mk8sService ¶
type Mk8sService struct {
// contains filtered or unexported fields
}
Mk8sService handles operations on managed Kubernetes clusters.
func (*Mk8sService) Create ¶
func (s *Mk8sService) Create(ctx context.Context, org string, m *mk8s.Mk8sCluster) (*mk8s.Mk8sCluster, error)
Create creates a new managed Kubernetes cluster.
func (*Mk8sService) Delete ¶
func (s *Mk8sService) Delete(ctx context.Context, org, name string) error
Delete deletes a managed Kubernetes cluster by name.
func (*Mk8sService) Get ¶
func (s *Mk8sService) Get(ctx context.Context, org, name string) (*mk8s.Mk8sCluster, error)
Get returns a managed Kubernetes cluster by name.
func (*Mk8sService) List ¶
func (s *Mk8sService) List(ctx context.Context, org string) iter.Seq2[mk8s.Mk8sCluster, error]
List returns an iterator over all managed Kubernetes clusters in the organization.
func (*Mk8sService) ListAll ¶
func (s *Mk8sService) ListAll(ctx context.Context, org string) ([]mk8s.Mk8sCluster, error)
ListAll returns all managed Kubernetes clusters in the organization.
func (*Mk8sService) ListPage ¶
func (s *Mk8sService) ListPage(ctx context.Context, org, cursor string) (*ListResponse[mk8s.Mk8sCluster], error)
ListPage returns a single page of managed Kubernetes clusters.
func (*Mk8sService) Query ¶
func (s *Mk8sService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[mk8s.Mk8sCluster, error]
Query returns an iterator over managed Kubernetes clusters matching the query.
func (*Mk8sService) QueryAll ¶
func (s *Mk8sService) QueryAll(ctx context.Context, org string, q *query.Query) ([]mk8s.Mk8sCluster, error)
QueryAll returns all managed Kubernetes clusters matching the query.
func (*Mk8sService) QueryPage ¶
func (s *Mk8sService) QueryPage(ctx context.Context, org string, q *query.Query) (*QueryResponse[mk8s.Mk8sCluster], error)
QueryPage returns a single page of managed Kubernetes clusters matching the query.
func (*Mk8sService) Update ¶
func (s *Mk8sService) Update(ctx context.Context, org, name string, m *mk8s.Mk8sCluster) (*mk8s.Mk8sCluster, error)
Update updates an existing managed Kubernetes cluster.
type Option ¶
type Option func(*Client)
Option is a functional option for configuring the Client.
func WithBillingURL ¶
WithBillingURL overrides the default billing service URL (billing-ng). This is typically only needed for local development or testing.
func WithHTTPClient ¶
WithHTTPClient sets a custom HTTP client.
func WithHeader ¶
WithHeader adds a custom header to all requests.
func WithHeaders ¶
WithHeaders sets multiple custom headers for all requests.
func WithTimeout ¶
WithTimeout sets the HTTP client timeout.
func WithUserAgent ¶
WithUserAgent sets a custom User-Agent header.
type OrgService ¶
type OrgService struct {
// contains filtered or unexported fields
}
OrgService handles operations on organizations.
func (*OrgService) ListPage ¶
func (s *OrgService) ListPage(ctx context.Context, cursor string) (*ListResponse[org.Org], error)
ListPage returns a single page of organizations.
type PolicyService ¶
type PolicyService struct {
// contains filtered or unexported fields
}
PolicyService handles operations on policies.
func (*PolicyService) Create ¶
func (s *PolicyService) Create(ctx context.Context, org string, p *policy.Policy) (*policy.Policy, error)
Create creates a new policy.
func (*PolicyService) Delete ¶
func (s *PolicyService) Delete(ctx context.Context, org, name string) error
Delete deletes a policy by name.
func (*PolicyService) ListPage ¶
func (s *PolicyService) ListPage(ctx context.Context, org, cursor string) (*ListResponse[policy.Policy], error)
ListPage returns a single page of policies.
func (*PolicyService) Query ¶
func (s *PolicyService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[policy.Policy, error]
Query returns an iterator over policies matching the query.
func (*PolicyService) QueryAll ¶
func (s *PolicyService) QueryAll(ctx context.Context, org string, q *query.Query) ([]policy.Policy, error)
QueryAll returns all policies matching the query.
type QueryResponse ¶
type QueryResponse[T any] struct { Kind query.QueryResultKind `json:"kind,omitempty"` ItemKind base.Kind `json:"itemKind,omitempty"` Items []T `json:"items"` Links []base.Link `json:"links"` Query query.Query `json:"query,omitempty"` // contains filtered or unexported fields }
QueryResponse represents a query result with typed items.
func (*QueryResponse[T]) HasNext ¶
func (r *QueryResponse[T]) HasNext() bool
HasNext returns true if there are more pages available.
func (*QueryResponse[T]) NextLink ¶
func (r *QueryResponse[T]) NextLink() string
NextLink returns the URL for the next page, or empty string if no more pages.
func (*QueryResponse[T]) NextPage ¶
func (r *QueryResponse[T]) NextPage(ctx context.Context) (*QueryResponse[T], error)
NextPage fetches the next page of query results. Returns nil, nil if there are no more pages. Note: Subsequent pages use GET (not POST), so the original query is not re-sent.
type QuotaService ¶
type QuotaService struct {
// contains filtered or unexported fields
}
QuotaService handles operations on quotas.
func (*QuotaService) Create ¶
func (s *QuotaService) Create(ctx context.Context, org string, q *quota.Quota) (*quota.Quota, error)
Create creates a new quota.
func (*QuotaService) Delete ¶
func (s *QuotaService) Delete(ctx context.Context, org, name string) error
Delete deletes a quota by name.
func (*QuotaService) ListPage ¶
func (s *QuotaService) ListPage(ctx context.Context, org, cursor string) (*ListResponse[quota.Quota], error)
ListPage returns a single page of quotas.
func (*QuotaService) Query ¶
func (s *QuotaService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[quota.Quota, error]
Query returns an iterator over quotas matching the query.
func (*QuotaService) QueryAll ¶
func (s *QuotaService) QueryAll(ctx context.Context, org string, q *query.Query) ([]quota.Quota, error)
QueryAll returns all quotas matching the query.
type RestoreVolumeRequest ¶
type RestoreVolumeRequest struct {
Location string `json:"location"`
VolumeIndex float32 `json:"volumeIndex"`
SnapshotName string `json:"snapshotName"`
Zone string `json:"zone,omitempty"`
}
RestoreVolumeRequest is the request for restoring a volume from a snapshot.
type SecretService ¶
type SecretService struct {
// contains filtered or unexported fields
}
SecretService handles operations on secrets.
func (*SecretService) Create ¶
func (s *SecretService) Create(ctx context.Context, org string, sec *secret.Secret) (*secret.Secret, error)
Create creates a new secret.
func (*SecretService) Delete ¶
func (s *SecretService) Delete(ctx context.Context, org, name string) error
Delete deletes a secret by name.
func (*SecretService) ListPage ¶
func (s *SecretService) ListPage(ctx context.Context, org, cursor string) (*ListResponse[secret.Secret], error)
ListPage returns a single page of secrets.
func (*SecretService) Query ¶
func (s *SecretService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[secret.Secret, error]
Query returns an iterator over secrets matching the query.
func (*SecretService) QueryAll ¶
func (s *SecretService) QueryAll(ctx context.Context, org string, q *query.Query) ([]secret.Secret, error)
QueryAll returns all secrets matching the query.
func (*SecretService) QueryPage ¶
func (s *SecretService) QueryPage(ctx context.Context, org string, q *query.Query) (*QueryResponse[secret.Secret], error)
QueryPage returns a single page of secrets matching the query.
type ServiceAccountService ¶
type ServiceAccountService struct {
// contains filtered or unexported fields
}
ServiceAccountService handles operations on service accounts.
func (*ServiceAccountService) AddKey ¶
func (s *ServiceAccountService) AddKey(ctx context.Context, org, name string, req *AddKeyRequest) (*AddKeyResponse, error)
AddKey adds a new key to a service account.
func (*ServiceAccountService) Create ¶
func (s *ServiceAccountService) Create(ctx context.Context, org string, sa *serviceaccount.ServiceAccount) (*serviceaccount.ServiceAccount, error)
Create creates a new service account.
func (*ServiceAccountService) Delete ¶
func (s *ServiceAccountService) Delete(ctx context.Context, org, name string) error
Delete deletes a service account by name.
func (*ServiceAccountService) Get ¶
func (s *ServiceAccountService) Get(ctx context.Context, org, name string) (*serviceaccount.ServiceAccount, error)
Get returns a service account by name.
func (*ServiceAccountService) List ¶
func (s *ServiceAccountService) List(ctx context.Context, org string) iter.Seq2[serviceaccount.ServiceAccount, error]
List returns an iterator over all service accounts in the organization.
func (*ServiceAccountService) ListAll ¶
func (s *ServiceAccountService) ListAll(ctx context.Context, org string) ([]serviceaccount.ServiceAccount, error)
ListAll returns all service accounts in the organization.
func (*ServiceAccountService) ListPage ¶
func (s *ServiceAccountService) ListPage(ctx context.Context, org, cursor string) (*ListResponse[serviceaccount.ServiceAccount], error)
ListPage returns a single page of service accounts.
func (*ServiceAccountService) Query ¶
func (s *ServiceAccountService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[serviceaccount.ServiceAccount, error]
Query returns an iterator over service accounts matching the query.
func (*ServiceAccountService) QueryAll ¶
func (s *ServiceAccountService) QueryAll(ctx context.Context, org string, q *query.Query) ([]serviceaccount.ServiceAccount, error)
QueryAll returns all service accounts matching the query.
func (*ServiceAccountService) QueryPage ¶
func (s *ServiceAccountService) QueryPage(ctx context.Context, org string, q *query.Query) (*QueryResponse[serviceaccount.ServiceAccount], error)
QueryPage returns a single page of service accounts matching the query.
func (*ServiceAccountService) Update ¶
func (s *ServiceAccountService) Update(ctx context.Context, org, name string, sa *serviceaccount.ServiceAccount) (*serviceaccount.ServiceAccount, error)
Update updates an existing service account.
type TaskService ¶
type TaskService struct {
// contains filtered or unexported fields
}
TaskService handles operations on tasks.
func (*TaskService) ListPage ¶
func (s *TaskService) ListPage(ctx context.Context, org, cursor string) (*ListResponse[task.Task], error)
ListPage returns a single page of tasks.
func (*TaskService) Query ¶
func (s *TaskService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[task.Task, error]
Query returns an iterator over tasks matching the query.
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
UserService handles operations on users.
func (*UserService) Delete ¶
func (s *UserService) Delete(ctx context.Context, org, name string) error
Delete removes a user from the organization.
func (*UserService) Invite ¶
func (s *UserService) Invite(ctx context.Context, org string, req *InviteRequest) error
Invite invites a user to the organization.
func (*UserService) ListPage ¶
func (s *UserService) ListPage(ctx context.Context, org, cursor string) (*ListResponse[user.User], error)
ListPage returns a single page of users.
func (*UserService) Query ¶
func (s *UserService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[user.User, error]
Query returns an iterator over users matching the query.
type VolumeSetService ¶
type VolumeSetService struct {
// contains filtered or unexported fields
}
VolumeSetService handles operations on volume sets.
func (*VolumeSetService) Create ¶
func (s *VolumeSetService) Create(ctx context.Context, org, gvc string, v *volumeSet.VolumeSet) (*volumeSet.VolumeSet, error)
Create creates a new volume set.
func (*VolumeSetService) CreateCommand ¶
func (s *VolumeSetService) CreateCommand(ctx context.Context, org, gvc, volumeSetName string, cmd *command.Command) (*command.Command, error)
CreateCommand creates a new command for a volume set.
func (*VolumeSetService) CreateVolumeSnapshot ¶
func (s *VolumeSetService) CreateVolumeSnapshot(ctx context.Context, org, gvc, volumeSetName string, req *CreateVolumeSnapshotRequest) (*command.Command, error)
CreateVolumeSnapshot creates a createVolumeSnapshot command.
func (*VolumeSetService) Delete ¶
func (s *VolumeSetService) Delete(ctx context.Context, org, gvc, name string) error
Delete deletes a volume set by name.
func (*VolumeSetService) DeleteCommand ¶
func (s *VolumeSetService) DeleteCommand(ctx context.Context, org, gvc, volumeSetName, commandID string) error
DeleteCommand deletes a command by ID.
func (*VolumeSetService) DeleteVolume ¶
func (s *VolumeSetService) DeleteVolume(ctx context.Context, org, gvc, volumeSetName string, req *DeleteVolumeRequest) (*command.Command, error)
DeleteVolume creates a deleteVolume command to delete a volume.
func (*VolumeSetService) DeleteVolumeSnapshot ¶
func (s *VolumeSetService) DeleteVolumeSnapshot(ctx context.Context, org, gvc, volumeSetName string, req *DeleteVolumeSnapshotRequest) (*command.Command, error)
DeleteVolumeSnapshot creates a deleteVolumeSnapshot command to delete a volume snapshot.
func (*VolumeSetService) ExpandVolume ¶
func (s *VolumeSetService) ExpandVolume(ctx context.Context, org, gvc, volumeSetName string, req *ExpandVolumeRequest) (*command.Command, error)
ExpandVolume creates an expandVolume command to increase volume capacity.
func (*VolumeSetService) Get ¶
func (s *VolumeSetService) Get(ctx context.Context, org, gvc, name string) (*volumeSet.VolumeSet, error)
Get returns a volume set by name.
func (*VolumeSetService) GetCommand ¶
func (s *VolumeSetService) GetCommand(ctx context.Context, org, gvc, volumeSetName, commandID string) (*command.Command, error)
GetCommand returns a command by ID.
func (*VolumeSetService) List ¶
func (s *VolumeSetService) List(ctx context.Context, org, gvc string) iter.Seq2[volumeSet.VolumeSet, error]
List returns an iterator over all volume sets in the GVC.
func (*VolumeSetService) ListAll ¶
func (s *VolumeSetService) ListAll(ctx context.Context, org, gvc string) ([]volumeSet.VolumeSet, error)
ListAll returns all volume sets in the GVC.
func (*VolumeSetService) ListCommands ¶
func (s *VolumeSetService) ListCommands(ctx context.Context, org, gvc, volumeSetName string) iter.Seq2[command.Command, error]
ListCommands returns an iterator over all commands for a volume set.
func (*VolumeSetService) ListCommandsAll ¶
func (s *VolumeSetService) ListCommandsAll(ctx context.Context, org, gvc, volumeSetName string) ([]command.Command, error)
ListCommandsAll returns all commands for a volume set.
func (*VolumeSetService) ListPage ¶
func (s *VolumeSetService) ListPage(ctx context.Context, org, gvc, cursor string) (*ListResponse[volumeSet.VolumeSet], error)
ListPage returns a single page of volume sets.
func (*VolumeSetService) Query ¶
func (s *VolumeSetService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[volumeSet.VolumeSet, error]
Query returns an iterator over volume sets matching the query. Note: VolumeSet queries are org-level, not GVC-scoped.
func (*VolumeSetService) QueryAll ¶
func (s *VolumeSetService) QueryAll(ctx context.Context, org string, q *query.Query) ([]volumeSet.VolumeSet, error)
QueryAll returns all volume sets matching the query. Note: VolumeSet queries are org-level, not GVC-scoped.
func (*VolumeSetService) QueryCommands ¶
func (s *VolumeSetService) QueryCommands(ctx context.Context, org, gvc, volumeSetName string, q *query.Query) iter.Seq2[command.Command, error]
QueryCommands returns an iterator over commands for a volume set matching the query.
func (*VolumeSetService) QueryCommandsAll ¶
func (s *VolumeSetService) QueryCommandsAll(ctx context.Context, org, gvc, volumeSetName string, q *query.Query) ([]command.Command, error)
QueryCommandsAll returns all commands for a volume set matching the query.
func (*VolumeSetService) QueryCommandsPage ¶
func (s *VolumeSetService) QueryCommandsPage(ctx context.Context, org, gvc, volumeSetName string, q *query.Query) (*QueryResponse[command.Command], error)
QueryCommandsPage returns a single page of commands for a volume set matching the query.
func (*VolumeSetService) QueryPage ¶
func (s *VolumeSetService) QueryPage(ctx context.Context, org string, q *query.Query) (*QueryResponse[volumeSet.VolumeSet], error)
QueryPage returns a single page of volume sets matching the query. Note: VolumeSet queries are org-level, not GVC-scoped.
func (*VolumeSetService) RestoreVolume ¶
func (s *VolumeSetService) RestoreVolume(ctx context.Context, org, gvc, volumeSetName string, req *RestoreVolumeRequest) (*command.Command, error)
RestoreVolume creates a restoreVolume command to restore a volume from a snapshot.
type WorkloadService ¶
type WorkloadService struct {
// contains filtered or unexported fields
}
WorkloadService handles operations on workloads.
func (*WorkloadService) Create ¶
func (s *WorkloadService) Create(ctx context.Context, org, gvc string, w *workload.Workload) (*workload.Workload, error)
Create creates a new workload.
func (*WorkloadService) CreateCommand ¶
func (s *WorkloadService) CreateCommand(ctx context.Context, org, gvc, workloadName string, cmd *command.Command) (*command.Command, error)
CreateCommand creates a new command for a workload.
func (*WorkloadService) CronStart ¶
func (s *WorkloadService) CronStart(ctx context.Context, org, gvc, name string, req *CronStartRequest) (*command.Command, error)
CronStart manually triggers a cron workload job by creating a runCronWorkload command.
func (*WorkloadService) Delete ¶
func (s *WorkloadService) Delete(ctx context.Context, org, gvc, name string) error
Delete deletes a workload by name.
func (*WorkloadService) DeleteCommand ¶
func (s *WorkloadService) DeleteCommand(ctx context.Context, org, gvc, workloadName, commandID string) error
DeleteCommand deletes a command by ID.
func (*WorkloadService) ForceRedeploy ¶
func (s *WorkloadService) ForceRedeploy(ctx context.Context, org, gvc, name string) error
ForceRedeploy forces a workload to redeploy by setting the cpln/deployTimestamp tag.
func (*WorkloadService) Get ¶
func (s *WorkloadService) Get(ctx context.Context, org, gvc, name string) (*workload.Workload, error)
Get returns a workload by name.
func (*WorkloadService) GetCommand ¶
func (s *WorkloadService) GetCommand(ctx context.Context, org, gvc, workloadName, commandID string) (*command.Command, error)
GetCommand returns a command by ID.
func (*WorkloadService) List ¶
func (s *WorkloadService) List(ctx context.Context, org, gvc string) iter.Seq2[workload.Workload, error]
List returns an iterator over all workloads in the GVC.
func (*WorkloadService) ListAll ¶
func (s *WorkloadService) ListAll(ctx context.Context, org, gvc string) ([]workload.Workload, error)
ListAll returns all workloads in the GVC.
func (*WorkloadService) ListCommands ¶
func (s *WorkloadService) ListCommands(ctx context.Context, org, gvc, workloadName string) iter.Seq2[command.Command, error]
ListCommands returns an iterator over all commands for a workload.
func (*WorkloadService) ListCommandsAll ¶
func (s *WorkloadService) ListCommandsAll(ctx context.Context, org, gvc, workloadName string) ([]command.Command, error)
ListCommandsAll returns all commands for a workload.
func (*WorkloadService) ListPage ¶
func (s *WorkloadService) ListPage(ctx context.Context, org, gvc, cursor string) (*ListResponse[workload.Workload], error)
ListPage returns a single page of workloads.
func (*WorkloadService) Query ¶
func (s *WorkloadService) Query(ctx context.Context, org string, q *query.Query) iter.Seq2[workload.Workload, error]
Query returns an iterator over workloads matching the query. Note: Workload queries are org-level, not GVC-scoped.
func (*WorkloadService) QueryAll ¶
func (s *WorkloadService) QueryAll(ctx context.Context, org string, q *query.Query) ([]workload.Workload, error)
QueryAll returns all workloads matching the query. Note: Workload queries are org-level, not GVC-scoped.
func (*WorkloadService) QueryCommands ¶
func (s *WorkloadService) QueryCommands(ctx context.Context, org, gvc, workloadName string, q *query.Query) iter.Seq2[command.Command, error]
QueryCommands returns an iterator over commands for a workload matching the query.
func (*WorkloadService) QueryCommandsAll ¶
func (s *WorkloadService) QueryCommandsAll(ctx context.Context, org, gvc, workloadName string, q *query.Query) ([]command.Command, error)
QueryCommandsAll returns all commands for a workload matching the query.
func (*WorkloadService) QueryCommandsPage ¶
func (s *WorkloadService) QueryCommandsPage(ctx context.Context, org, gvc, workloadName string, q *query.Query) (*QueryResponse[command.Command], error)
QueryCommandsPage returns a single page of commands for a workload matching the query.
func (*WorkloadService) QueryPage ¶
func (s *WorkloadService) QueryPage(ctx context.Context, org string, q *query.Query) (*QueryResponse[workload.Workload], error)
QueryPage returns a single page of workloads matching the query. Note: Workload queries are org-level, not GVC-scoped.
func (*WorkloadService) RunCronWorkload ¶
func (s *WorkloadService) RunCronWorkload(ctx context.Context, org, gvc, workloadName string, spec *command.RunCronWorkloadSpec) (*command.Command, error)
RunCronWorkload creates a runCronWorkload command to manually trigger a cron workload.
func (*WorkloadService) StopReplica ¶
func (s *WorkloadService) StopReplica(ctx context.Context, org, gvc, workloadName string, spec *command.StopReplicaSpec) (*command.Command, error)
StopReplica creates a stopReplica command to stop a specific replica.