Documentation
¶
Overview ¶
Package raff provides a Go client library for the Raff Cloud API.
Usage:
client := raff.NewFromToken("raff_pub_xxx")
projects, _, err := client.Projects.List(ctx, nil)
The library is a thin idiomatic wrapper over types and an HTTP client generated from the public OpenAPI spec at docs/api-reference/openapi.yaml. Run `make generate` after editing the spec.
Index ¶
- Constants
- func Bool(v bool) *bool
- func BoolValue(p *bool) bool
- func Int(v int) *int
- func IntValue(p *int) int
- func String(v string) *string
- func StringValue(p *string) string
- type APIKey
- type APIKeyListOptions
- type APIKeyService
- type APIKeyServiceOp
- func (s *APIKeyServiceOp) Create(ctx context.Context, req *CreateAPIKeyRequest) (*APIKeyWithSecret, *Response, error)
- func (s *APIKeyServiceOp) Get(ctx context.Context, keyID string) (*APIKey, *Response, error)
- func (s *APIKeyServiceOp) List(ctx context.Context, opts *APIKeyListOptions) ([]APIKey, *Response, error)
- func (s *APIKeyServiceOp) Regenerate(ctx context.Context, keyID string) (*APIKeyWithSecret, *Response, error)
- func (s *APIKeyServiceOp) Revoke(ctx context.Context, keyID string) (*Response, error)
- func (s *APIKeyServiceOp) Update(ctx context.Context, keyID string, req *UpdateAPIKeyRequest) (*APIKey, *Response, error)
- type APIKeyWithSecret
- type AddAppCustomDomainRequest
- type AddK8sNodePoolRequest
- type AddMemberRequest
- type AddProjectMemberRequest
- type AddVMTagRequest
- type AppBuildLogLine
- type AppCustomDomain
- type AppDeployment
- type AppEnvVar
- type AppJobRun
- type AppLogLine
- type AppLogOptions
- type AppMetricSeries
- type AppService
- type AppServiceService
- type AppServiceServiceOp
- func (s *AppServiceServiceOp) AddCustomDomain(ctx context.Context, ref string, req *AddAppCustomDomainRequest) (*AppCustomDomain, *Response, error)
- func (s *AppServiceServiceOp) BulkSetEnvVars(ctx context.Context, ref string, req *BulkSetAppEnvVarsRequest) ([]AppEnvVar, *Response, error)
- func (s *AppServiceServiceOp) CancelJobRun(ctx context.Context, runID string) (*AppJobRun, *Response, error)
- func (s *AppServiceServiceOp) Create(ctx context.Context, req *CreateAppServiceRequest) (*AppService, *Response, error)
- func (s *AppServiceServiceOp) CreateDeployment(ctx context.Context, ref string, req *CreateAppDeploymentRequest) (*AppDeployment, *Response, error)
- func (s *AppServiceServiceOp) Delete(ctx context.Context, ref string) (*Response, error)
- func (s *AppServiceServiceOp) DeleteCustomDomain(ctx context.Context, domainID string) (*Response, error)
- func (s *AppServiceServiceOp) DeleteEnvVar(ctx context.Context, ref, key string) ([]AppEnvVar, *Response, error)
- func (s *AppServiceServiceOp) Get(ctx context.Context, ref string) (*AppService, *Response, error)
- func (s *AppServiceServiceOp) GetDeployment(ctx context.Context, deploymentID string) (*AppDeployment, *Response, error)
- func (s *AppServiceServiceOp) GetDeploymentLogs(ctx context.Context, deploymentID string) ([]AppBuildLogLine, bool, *Response, error)
- func (s *AppServiceServiceOp) GetMetrics(ctx context.Context, ref, window string) ([]AppMetricSeries, *Response, error)
- func (s *AppServiceServiceOp) GetSpendSettings(ctx context.Context) (*AppSpendSettings, *Response, error)
- func (s *AppServiceServiceOp) GetUsage(ctx context.Context, ref string) (*AppUsage, *Response, error)
- func (s *AppServiceServiceOp) List(ctx context.Context) ([]AppService, *Response, error)
- func (s *AppServiceServiceOp) ListCustomDomains(ctx context.Context, ref string) ([]AppCustomDomain, *Response, error)
- func (s *AppServiceServiceOp) ListDeployments(ctx context.Context, ref string, limit int) ([]AppDeployment, *Response, error)
- func (s *AppServiceServiceOp) ListEnvVars(ctx context.Context, ref string, reveal bool) ([]AppEnvVar, *Response, error)
- func (s *AppServiceServiceOp) ListJobRuns(ctx context.Context, ref string) ([]AppJobRun, *Response, error)
- func (s *AppServiceServiceOp) ListLogs(ctx context.Context, ref string, opts *AppLogOptions) ([]AppLogLine, *Response, error)
- func (s *AppServiceServiceOp) ListTiers(ctx context.Context) ([]AppTier, *Response, error)
- func (s *AppServiceServiceOp) Pause(ctx context.Context, ref string) (*AppService, *Response, error)
- func (s *AppServiceServiceOp) RequestSourceUpload(ctx context.Context, ref string) (*AppSourceUpload, *Response, error)
- func (s *AppServiceServiceOp) Resume(ctx context.Context, ref string) (*AppService, *Response, error)
- func (s *AppServiceServiceOp) RetryDomainVerification(ctx context.Context, domainID string) (*AppCustomDomain, *Response, error)
- func (s *AppServiceServiceOp) Rollback(ctx context.Context, ref string, req *RollbackAppServiceRequest) (*AppDeployment, *Response, error)
- func (s *AppServiceServiceOp) RunJob(ctx context.Context, ref string) (*AppJobRun, *Response, error)
- func (s *AppServiceServiceOp) Scale(ctx context.Context, ref string, req *ScaleAppServiceRequest) (*AppService, *Response, error)
- func (s *AppServiceServiceOp) SetEnvVar(ctx context.Context, ref string, req *SetAppEnvVarRequest) ([]AppEnvVar, *Response, error)
- func (s *AppServiceServiceOp) UpdateSpendSettings(ctx context.Context, req *UpdateAppSpendSettingsRequest) (*AppSpendSettings, *Response, error)
- func (s *AppServiceServiceOp) UploadSource(ctx context.Context, uploadURL string, tarData []byte) error
- type AppServiceUsage
- type AppSourceUpload
- type AppSpendSettings
- type AppTier
- type AppUsage
- type AttachIPRequest
- type AttachIPResponse
- type AttachSecurityGroupRequest
- type AttachVPCRequest
- type AttachVolumeRequest
- type Backup
- type BackupListOptions
- type BackupPricingListOptions
- type BackupSchedule
- type BackupScheduleListOptions
- type BackupScheduleService
- type BackupScheduleServiceOp
- func (s *BackupScheduleServiceOp) Create(ctx context.Context, req *CreateBackupScheduleRequest) (*BackupSchedule, *Response, error)
- func (s *BackupScheduleServiceOp) Delete(ctx context.Context, scheduleID int) (*Response, error)
- func (s *BackupScheduleServiceOp) Get(ctx context.Context, scheduleID int) (*BackupSchedule, *Response, error)
- func (s *BackupScheduleServiceOp) List(ctx context.Context, opts *BackupScheduleListOptions) ([]BackupSchedule, *Response, error)
- func (s *BackupScheduleServiceOp) Update(ctx context.Context, scheduleID int, req *UpdateBackupScheduleRequest) (*BackupSchedule, *Response, error)
- type BackupService
- type BackupServiceOp
- func (s *BackupServiceOp) Create(ctx context.Context, req *CreateBackupRequest) (*Backup, *Response, error)
- func (s *BackupServiceOp) Delete(ctx context.Context, backupID string) (*Response, error)
- func (s *BackupServiceOp) DeleteSeries(ctx context.Context, backupID string) (*Response, error)
- func (s *BackupServiceOp) Get(ctx context.Context, backupID string) (*Backup, *Response, error)
- func (s *BackupServiceOp) List(ctx context.Context, opts *BackupListOptions) ([]Backup, *Response, error)
- func (s *BackupServiceOp) ResetSeries(ctx context.Context, vmID string) (*Response, error)
- func (s *BackupServiceOp) Restore(ctx context.Context, backupID string) (*Backup, *Response, error)
- type BulkDeleteVMItemResult
- type BulkDeleteVMsRequest
- type BulkDeleteVMsResult
- type BulkSetAppEnvVarsRequest
- type CIDRSuggestion
- type CIDRSuggestionsResponse
- type ChangeIPResponse
- type Client
- type ClientOpt
- type ConvertLambdaRequest
- type ConvertLambdaResult
- type CreateAPIKeyRequest
- type CreateAppDeploymentRequest
- type CreateAppServiceRequest
- type CreateBackupRequest
- type CreateBackupScheduleRequest
- type CreateFunctionDeploymentRequest
- type CreateFunctionRequest
- type CreateInvitationRequest
- type CreateK8sClusterRequest
- type CreateK8sClusterStorageNodeCount
- type CreateProjectRequest
- type CreateRoleRequest
- type CreateSSHKeyRequest
- type CreateSecurityGroupRequest
- type CreateSnapshotRequest
- type CreateVMRequest
- type CreateVPCRequest
- type CreateVolumeRequest
- type DeleteVMRequest
- type ErrorResponse
- type FloatingIP
- type Function
- type FunctionBuildLogLine
- type FunctionDeployment
- type FunctionEnvVar
- type FunctionService
- type FunctionServiceOp
- func (s *FunctionServiceOp) ConvertLambda(ctx context.Context, req *ConvertLambdaRequest) (*ConvertLambdaResult, *Response, error)
- func (s *FunctionServiceOp) Create(ctx context.Context, req *CreateFunctionRequest) (*Function, *Response, error)
- func (s *FunctionServiceOp) CreateDeployment(ctx context.Context, ref string, req *CreateFunctionDeploymentRequest) (*FunctionDeployment, *Response, error)
- func (s *FunctionServiceOp) Delete(ctx context.Context, ref string) (*Response, error)
- func (s *FunctionServiceOp) Get(ctx context.Context, ref string) (*Function, *Response, error)
- func (s *FunctionServiceOp) GetDeployment(ctx context.Context, ref, deploymentID string) (*FunctionDeployment, *Response, error)
- func (s *FunctionServiceOp) GetDeploymentLogs(ctx context.Context, ref, deploymentID string) ([]FunctionBuildLogLine, bool, *Response, error)
- func (s *FunctionServiceOp) List(ctx context.Context) ([]Function, *Response, error)
- func (s *FunctionServiceOp) ListEnvVars(ctx context.Context, ref string, reveal bool) ([]FunctionEnvVar, *Response, error)
- func (s *FunctionServiceOp) RequestSourceUpload(ctx context.Context, ref string) (*FunctionSourceUpload, *Response, error)
- func (s *FunctionServiceOp) SetEnvVar(ctx context.Context, ref string, req *SetFunctionEnvVarRequest) (*Response, error)
- func (s *FunctionServiceOp) Update(ctx context.Context, ref string, req *UpdateFunctionRequest) (*Function, *Response, error)
- func (s *FunctionServiceOp) UploadSource(ctx context.Context, uploadURL string, zipData []byte) error
- type FunctionSourceUpload
- type GetVMNotesOptions
- type IPListOptions
- type IPPricing
- type IPService
- type IPServiceOp
- func (s *IPServiceOp) Change(ctx context.Context, ipID string) (*ChangeIPResponse, *Response, error)
- func (s *IPServiceOp) Get(ctx context.Context, ipID string) (*FloatingIP, *Response, error)
- func (s *IPServiceOp) List(ctx context.Context, opts *IPListOptions) ([]FloatingIP, *Response, error)
- func (s *IPServiceOp) Release(ctx context.Context, ipID string) (*Response, error)
- func (s *IPServiceOp) Reserve(ctx context.Context, req *ReserveIPRequest) (*FloatingIP, *Response, error)
- type Invitation
- type InvitationService
- type InvitationServiceOp
- func (s *InvitationServiceOp) Cancel(ctx context.Context, invitationID string) (*Response, error)
- func (s *InvitationServiceOp) CreateAccount(ctx context.Context, req *CreateInvitationRequest) (*Invitation, *Response, error)
- func (s *InvitationServiceOp) CreateProject(ctx context.Context, projectID string, req *CreateInvitationRequest) (*Invitation, *Response, error)
- type K8sAvailableUpgrade
- type K8sCluster
- type K8sClusterEvent
- type K8sClusterListOptions
- type K8sClusterNode
- type K8sClusterStatus
- type K8sKubeconfig
- type K8sNodePlan
- type K8sNodePlans
- type K8sNodePool
- type K8sNodePoolInput
- type K8sUpgradeInfo
- type K8sVersion
- type KubernetesService
- type KubernetesServiceOp
- func (s *KubernetesServiceOp) AddNodePool(ctx context.Context, clusterID string, req *AddK8sNodePoolRequest) (*K8sNodePool, *Response, error)
- func (s *KubernetesServiceOp) Create(ctx context.Context, req *CreateK8sClusterRequest, idempotencyKey string) (*K8sCluster, *Response, error)
- func (s *KubernetesServiceOp) Delete(ctx context.Context, clusterID string) (*Response, error)
- func (s *KubernetesServiceOp) DeleteNodePool(ctx context.Context, clusterID, poolID string) (*Response, error)
- func (s *KubernetesServiceOp) Get(ctx context.Context, clusterID string) (*K8sCluster, *Response, error)
- func (s *KubernetesServiceOp) Kubeconfig(ctx context.Context, clusterID string) (*K8sKubeconfig, *Response, error)
- func (s *KubernetesServiceOp) KubeconfigWithTTL(ctx context.Context, clusterID string, ttlSeconds int) (*K8sKubeconfig, *Response, error)
- func (s *KubernetesServiceOp) List(ctx context.Context, opts *K8sClusterListOptions) ([]K8sCluster, *Response, error)
- func (s *KubernetesServiceOp) ListEvents(ctx context.Context, clusterID string) ([]K8sClusterEvent, *Response, error)
- func (s *KubernetesServiceOp) ListNodePlans(ctx context.Context) (*K8sNodePlans, *Response, error)
- func (s *KubernetesServiceOp) ListNodePools(ctx context.Context, clusterID string) ([]K8sNodePool, *Response, error)
- func (s *KubernetesServiceOp) ListNodes(ctx context.Context, clusterID string) ([]K8sClusterNode, *Response, error)
- func (s *KubernetesServiceOp) ListVersions(ctx context.Context) ([]K8sVersion, *Response, error)
- func (s *KubernetesServiceOp) Rename(ctx context.Context, clusterID, name string) (*Response, error)
- func (s *KubernetesServiceOp) RotateKubeconfigAccess(ctx context.Context, clusterID string) (*Response, error)
- func (s *KubernetesServiceOp) ScaleNodePool(ctx context.Context, clusterID, poolID string, nodeCount int) (*Response, error)
- func (s *KubernetesServiceOp) SetMaintenance(ctx context.Context, clusterID, mode string, day, startHour *int) (*Response, error)
- func (s *KubernetesServiceOp) UpdateNodePool(ctx context.Context, clusterID, poolID string, req *UpdateK8sNodePoolRequest) (*K8sNodePool, *Response, error)
- func (s *KubernetesServiceOp) Upgrade(ctx context.Context, clusterID string, versionID int, confirmSingleMaster bool) (*Response, error)
- func (s *KubernetesServiceOp) UpgradeHA(ctx context.Context, clusterID string) (*Response, error)
- func (s *KubernetesServiceOp) Upgrades(ctx context.Context, clusterID string) (*K8sUpgradeInfo, *Response, error)
- func (s *KubernetesServiceOp) WaitForDeleted(ctx context.Context, clusterID string) error
- func (s *KubernetesServiceOp) WaitForStatus(ctx context.Context, clusterID string, target K8sClusterStatus) (*K8sCluster, error)
- type ListVMNetworksOptions
- type Member
- type MemberListOptions
- type MemberService
- type MemberServiceOp
- func (s *MemberServiceOp) Add(ctx context.Context, req *AddMemberRequest) (*Member, *Response, error)
- func (s *MemberServiceOp) Get(ctx context.Context, memberID string) (*Member, *Response, error)
- func (s *MemberServiceOp) List(ctx context.Context, opts *MemberListOptions) ([]Member, *Response, error)
- func (s *MemberServiceOp) Remove(ctx context.Context, memberID string) (*Response, error)
- func (s *MemberServiceOp) Update(ctx context.Context, memberID string, req *UpdateMemberRequest) (*Member, *Response, error)
- type MetadataService
- type MetadataServiceOp
- type Permission
- type PermissionListOptions
- type PermissionService
- type PermissionServiceOp
- type PricingService
- type PricingServiceOp
- func (s *PricingServiceOp) ListBackup(ctx context.Context, opts *BackupPricingListOptions) (*StoragePricing, *Response, error)
- func (s *PricingServiceOp) ListIP(ctx context.Context) (*IPPricing, *Response, error)
- func (s *PricingServiceOp) ListSnapshot(ctx context.Context, opts *SnapshotPricingListOptions) (*StoragePricing, *Response, error)
- func (s *PricingServiceOp) ListVM(ctx context.Context, opts *VMPricingListOptions) ([]VMPricingPlan, *Response, error)
- func (s *PricingServiceOp) ListVolume(ctx context.Context, opts *VolumePricingListOptions) (*StoragePricing, *Response, error)
- type Project
- type ProjectListOptions
- type ProjectMember
- type ProjectMemberListOptions
- type ProjectMemberService
- type ProjectMemberServiceOp
- func (s *ProjectMemberServiceOp) Add(ctx context.Context, projectID string, req *AddProjectMemberRequest) (*ProjectMember, *Response, error)
- func (s *ProjectMemberServiceOp) Get(ctx context.Context, projectID, memberID string) (*ProjectMember, *Response, error)
- func (s *ProjectMemberServiceOp) List(ctx context.Context, projectID string, opts *ProjectMemberListOptions) ([]ProjectMember, *Response, error)
- func (s *ProjectMemberServiceOp) Remove(ctx context.Context, projectID, memberID string) (*Response, error)
- func (s *ProjectMemberServiceOp) Update(ctx context.Context, projectID, memberID string, ...) (*ProjectMember, *Response, error)
- type ProjectService
- type ProjectServiceOp
- func (s *ProjectServiceOp) Create(ctx context.Context, req *CreateProjectRequest) (*Project, *Response, error)
- func (s *ProjectServiceOp) Delete(ctx context.Context, projectID string) (*Response, error)
- func (s *ProjectServiceOp) Get(ctx context.Context, projectID string) (*Project, *Response, error)
- func (s *ProjectServiceOp) List(ctx context.Context, opts *ProjectListOptions) ([]Project, *Response, error)
- func (s *ProjectServiceOp) Update(ctx context.Context, projectID string, req *UpdateProjectRequest) (*Project, *Response, error)
- type Region
- type ReinstallVMRequest
- type RenameSnapshotRequest
- type RenameVMRequest
- type ReserveIPRequest
- type ResizeResponse
- type ResizeVMDiskRequest
- type ResizeVMRequest
- type ResizeVolumeRequest
- type Response
- type Role
- type RoleListOptions
- type RoleService
- type RoleServiceOp
- func (s *RoleServiceOp) Create(ctx context.Context, req *CreateRoleRequest) (*Role, *Response, error)
- func (s *RoleServiceOp) Delete(ctx context.Context, roleID string) (*Response, error)
- func (s *RoleServiceOp) Get(ctx context.Context, roleID string) (*Role, *Response, error)
- func (s *RoleServiceOp) List(ctx context.Context, opts *RoleListOptions) ([]Role, *Response, error)
- func (s *RoleServiceOp) Update(ctx context.Context, roleID string, req *UpdateRoleRequest) (*Role, *Response, error)
- type RollbackAppServiceRequest
- type SSHKey
- type SSHKeyService
- type SSHKeyServiceOp
- func (s *SSHKeyServiceOp) Create(ctx context.Context, req *CreateSSHKeyRequest) (*SSHKey, *Response, error)
- func (s *SSHKeyServiceOp) Delete(ctx context.Context, keyID string) (*Response, error)
- func (s *SSHKeyServiceOp) Get(ctx context.Context, keyID string) (*SSHKey, *Response, error)
- func (s *SSHKeyServiceOp) List(ctx context.Context) ([]SSHKey, *Response, error)
- func (s *SSHKeyServiceOp) Update(ctx context.Context, keyID string, req *UpdateSSHKeyRequest) (*SSHKey, *Response, error)
- type SaveImageRequest
- type ScaleAppServiceRequest
- type SecurityGroup
- type SecurityGroupListOptions
- type SecurityGroupRule
- type SecurityGroupService
- type SecurityGroupServiceOp
- func (s *SecurityGroupServiceOp) Create(ctx context.Context, req *CreateSecurityGroupRequest) (*SecurityGroup, *Response, error)
- func (s *SecurityGroupServiceOp) Delete(ctx context.Context, sgID string) (*Response, error)
- func (s *SecurityGroupServiceOp) Get(ctx context.Context, sgID string) (*SecurityGroup, *Response, error)
- func (s *SecurityGroupServiceOp) List(ctx context.Context, opts *SecurityGroupListOptions) ([]SecurityGroup, *Response, error)
- func (s *SecurityGroupServiceOp) Templates(ctx context.Context) ([]SecurityGroupTemplate, *Response, error)
- func (s *SecurityGroupServiceOp) Update(ctx context.Context, sgID string, req *UpdateSecurityGroupRequest) (*SecurityGroup, *Response, error)
- type SecurityGroupTemplate
- type SetAppEnvVarRequest
- type SetFunctionEnvVarRequest
- type Snapshot
- type SnapshotListOptions
- type SnapshotPricingListOptions
- type SnapshotService
- type SnapshotServiceOp
- func (s *SnapshotServiceOp) Create(ctx context.Context, req *CreateSnapshotRequest) (*Snapshot, *Response, error)
- func (s *SnapshotServiceOp) Delete(ctx context.Context, snapshotID int) (*Response, error)
- func (s *SnapshotServiceOp) Get(ctx context.Context, snapshotID int) (*Snapshot, *Response, error)
- func (s *SnapshotServiceOp) List(ctx context.Context, opts *SnapshotListOptions) ([]Snapshot, *Response, error)
- func (s *SnapshotServiceOp) Rename(ctx context.Context, snapshotID int, req *RenameSnapshotRequest) (*Snapshot, *Response, error)
- func (s *SnapshotServiceOp) Restore(ctx context.Context, snapshotID int) (*Response, error)
- type SourceFile
- type StoragePricing
- type Template
- type TemplateListOptions
- type UpdateAPIKeyRequest
- type UpdateAppSpendSettingsRequest
- type UpdateBackupScheduleRequest
- type UpdateFunctionRequest
- type UpdateK8sNodePoolRequest
- type UpdateMemberRequest
- type UpdateProjectMemberRequest
- type UpdateProjectRequest
- type UpdateRoleRequest
- type UpdateSSHKeyRequest
- type UpdateSecurityGroupRequest
- type UpdateVMTagRequest
- type UpdateVPCRequest
- type UpsertVMNoteRequest
- type VM
- type VMImage
- type VMListOptions
- type VMNetwork
- type VMNetworkType
- type VMNote
- type VMNoteType
- type VMNotesFilterType
- type VMNotesResponse
- type VMPricingListOptions
- type VMPricingPlan
- type VMService
- type VMServiceOp
- func (s *VMServiceOp) AddTag(ctx context.Context, vmID string, req *AddVMTagRequest) ([]VMTag, *Response, error)
- func (s *VMServiceOp) AppendNote(ctx context.Context, vmID string, noteType VMNoteType, ...) (*VMNote, *Response, error)
- func (s *VMServiceOp) AttachIP(ctx context.Context, vmID string, req *AttachIPRequest) (*AttachIPResponse, *Response, error)
- func (s *VMServiceOp) AttachSecurityGroup(ctx context.Context, vmID string, req *AttachSecurityGroupRequest) (*Response, error)
- func (s *VMServiceOp) AttachVPC(ctx context.Context, vmID string, req *AttachVPCRequest) (*Response, error)
- func (s *VMServiceOp) BulkDelete(ctx context.Context, req *BulkDeleteVMsRequest) (*BulkDeleteVMsResult, *Response, error)
- func (s *VMServiceOp) Create(ctx context.Context, req *CreateVMRequest) (*VM, *Response, error)
- func (s *VMServiceOp) Delete(ctx context.Context, vmID string, req *DeleteVMRequest) (*Response, error)
- func (s *VMServiceOp) DetachIP(ctx context.Context, vmID string, nicID int) (*Response, error)
- func (s *VMServiceOp) DetachSecurityGroup(ctx context.Context, vmID, securityGroupID string, nicID int) (*Response, error)
- func (s *VMServiceOp) DetachVPC(ctx context.Context, vmID string, nicID int) (*Response, error)
- func (s *VMServiceOp) FactoryReset(ctx context.Context, vmID string) (*Response, error)
- func (s *VMServiceOp) Get(ctx context.Context, vmID string) (*VM, *Response, error)
- func (s *VMServiceOp) GetNotes(ctx context.Context, vmID string, opts *GetVMNotesOptions) (*VMNotesResponse, *Response, error)
- func (s *VMServiceOp) HardReboot(ctx context.Context, vmID string) (*Response, error)
- func (s *VMServiceOp) List(ctx context.Context, opts *VMListOptions) ([]VM, *Response, error)
- func (s *VMServiceOp) ListNetworks(ctx context.Context, vmID string, opts *ListVMNetworksOptions) ([]VMNetwork, *Response, error)
- func (s *VMServiceOp) Reboot(ctx context.Context, vmID string) (*Response, error)
- func (s *VMServiceOp) Reinstall(ctx context.Context, vmID string, req *ReinstallVMRequest) (*Response, error)
- func (s *VMServiceOp) RemoveTag(ctx context.Context, vmID, tagID string) ([]VMTag, *Response, error)
- func (s *VMServiceOp) Rename(ctx context.Context, vmID string, req *RenameVMRequest) (*Response, error)
- func (s *VMServiceOp) ResetPassword(ctx context.Context, vmID string) (*Response, error)
- func (s *VMServiceOp) Resize(ctx context.Context, vmID string, req *ResizeVMRequest) (*ResizeResponse, *Response, error)
- func (s *VMServiceOp) ResizeDisk(ctx context.Context, vmID string, req *ResizeVMDiskRequest) (*ResizeResponse, *Response, error)
- func (s *VMServiceOp) SaveImage(ctx context.Context, vmID string, req *SaveImageRequest) (*VMImage, *Response, error)
- func (s *VMServiceOp) Start(ctx context.Context, vmID string) (*Response, error)
- func (s *VMServiceOp) Stop(ctx context.Context, vmID string) (*Response, error)
- func (s *VMServiceOp) UpdateNote(ctx context.Context, vmID string, noteType VMNoteType, ...) (*VMNote, *Response, error)
- func (s *VMServiceOp) UpdateTag(ctx context.Context, vmID, tagID string, req *UpdateVMTagRequest) ([]VMTag, *Response, error)
- func (s *VMServiceOp) UpsertNote(ctx context.Context, vmID string, noteType VMNoteType, ...) (*VMNote, *Response, error)
- type VMTag
- type VMTagsResponse
- type VPC
- type VPCDetail
- type VPCLease
- type VPCListOptions
- type VPCService
- type VPCServiceOp
- func (s *VPCServiceOp) CIDRSuggestions(ctx context.Context) (*CIDRSuggestionsResponse, *Response, error)
- func (s *VPCServiceOp) Create(ctx context.Context, req *CreateVPCRequest) (*VPC, *Response, error)
- func (s *VPCServiceOp) Delete(ctx context.Context, vpcID string) (*Response, error)
- func (s *VPCServiceOp) Get(ctx context.Context, vpcID string) (*VPC, *Response, error)
- func (s *VPCServiceOp) GetDetail(ctx context.Context, vpcID string) (*VPCDetail, *Response, error)
- func (s *VPCServiceOp) List(ctx context.Context, opts *VPCListOptions) ([]VPC, *Response, error)
- func (s *VPCServiceOp) Update(ctx context.Context, vpcID string, req *UpdateVPCRequest) (*VPC, *Response, error)
- type Volume
- type VolumeListOptions
- type VolumePricingListOptions
- type VolumeService
- type VolumeServiceOp
- func (s *VolumeServiceOp) Attach(ctx context.Context, volumeID int, req *AttachVolumeRequest) (*Volume, *Response, error)
- func (s *VolumeServiceOp) Create(ctx context.Context, req *CreateVolumeRequest) (*Volume, *Response, error)
- func (s *VolumeServiceOp) Delete(ctx context.Context, volumeID int) (*Response, error)
- func (s *VolumeServiceOp) Detach(ctx context.Context, volumeID int) (*Response, error)
- func (s *VolumeServiceOp) Get(ctx context.Context, volumeID int) (*Volume, *Response, error)
- func (s *VolumeServiceOp) List(ctx context.Context, opts *VolumeListOptions) ([]Volume, *Response, error)
- func (s *VolumeServiceOp) Resize(ctx context.Context, volumeID int, req *ResizeVolumeRequest) (*ResizeResponse, *Response, error)
Constants ¶
const ( K8sClusterStatusPending = spec.K8SClusterStatusPending K8sClusterStatusDeploying = spec.K8SClusterStatusDeploying K8sClusterStatusRunning = spec.K8SClusterStatusRunning K8sClusterStatusWarning = spec.K8SClusterStatusWarning K8sClusterStatusFailed = spec.K8SClusterStatusFailed K8sClusterStatusDeleting = spec.K8SClusterStatusDeleting K8sClusterStatusDeleteFailed = spec.K8SClusterStatusDeleteFailed K8sClusterStatusDeleted = spec.K8SClusterStatusDeleted )
Cluster lifecycle statuses.
const (
// Version is the client library version.
Version = "0.3.2"
)
Variables ¶
This section is empty.
Functions ¶
func Bool ¶
Bool returns a pointer to v. Use it when constructing request types that have optional bool fields.
func Int ¶
Int returns a pointer to v. Use it when constructing request types that have optional int fields.
func String ¶
String returns a pointer to v. Use it when constructing request types that have optional string fields.
func StringValue ¶
StringValue dereferences p, returning "" if nil.
Types ¶
type APIKeyListOptions ¶ added in v0.2.0
type APIKeyListOptions = spec.ListAPIKeysParams
APIKeyListOptions are the query parameters for listing API keys.
type APIKeyService ¶ added in v0.2.0
type APIKeyService interface {
List(ctx context.Context, opts *APIKeyListOptions) ([]APIKey, *Response, error)
Get(ctx context.Context, keyID string) (*APIKey, *Response, error)
Create(ctx context.Context, req *CreateAPIKeyRequest) (*APIKeyWithSecret, *Response, error)
Update(ctx context.Context, keyID string, req *UpdateAPIKeyRequest) (*APIKey, *Response, error)
Regenerate(ctx context.Context, keyID string) (*APIKeyWithSecret, *Response, error)
Revoke(ctx context.Context, keyID string) (*Response, error)
}
APIKeyService handles communication with the API key endpoints.
API keys are scoped to the account.
type APIKeyServiceOp ¶ added in v0.2.0
type APIKeyServiceOp struct {
// contains filtered or unexported fields
}
APIKeyServiceOp implements APIKeyService.
func (*APIKeyServiceOp) Create ¶ added in v0.2.0
func (s *APIKeyServiceOp) Create(ctx context.Context, req *CreateAPIKeyRequest) (*APIKeyWithSecret, *Response, error)
func (*APIKeyServiceOp) List ¶ added in v0.2.0
func (s *APIKeyServiceOp) List(ctx context.Context, opts *APIKeyListOptions) ([]APIKey, *Response, error)
func (*APIKeyServiceOp) Regenerate ¶ added in v0.2.0
func (s *APIKeyServiceOp) Regenerate(ctx context.Context, keyID string) (*APIKeyWithSecret, *Response, error)
func (*APIKeyServiceOp) Update ¶ added in v0.2.0
func (s *APIKeyServiceOp) Update(ctx context.Context, keyID string, req *UpdateAPIKeyRequest) (*APIKey, *Response, error)
type APIKeyWithSecret ¶ added in v0.2.0
type APIKeyWithSecret = spec.APIKeyWithSecret
APIKeyWithSecret is the create/regenerate response — includes the plaintext secret, which is only returned once.
type AddAppCustomDomainRequest ¶ added in v0.4.1
type AddAppCustomDomainRequest struct {
Domain string `json:"domain"`
}
AddAppCustomDomainRequest attaches a custom domain to a web app service.
type AddK8sNodePoolRequest ¶ added in v0.4.0
type AddK8sNodePoolRequest = spec.AddK8SNodePoolJSONRequestBody
AddK8sNodePoolRequest is the request body for adding a node pool.
type AddMemberRequest ¶ added in v0.2.0
type AddMemberRequest = spec.AddMemberRequest
AddMemberRequest is the request body for adding a member to the account.
type AddProjectMemberRequest ¶ added in v0.2.0
type AddProjectMemberRequest = spec.AddProjectMemberRequest
AddProjectMemberRequest is the request body for adding a project member.
type AddVMTagRequest ¶
type AddVMTagRequest = spec.AddVMTagRequest
AddVMTagRequest is the request body for adding a tag to a VM.
type AppBuildLogLine ¶ added in v0.4.1
type AppBuildLogLine struct {
Timestamp string `json:"timestamp"`
Message string `json:"message"`
Component string `json:"component"`
Stream string `json:"stream"`
}
AppBuildLogLine is one line of deployment build output.
type AppCustomDomain ¶ added in v0.4.1
type AppCustomDomain struct {
ID string `json:"id"`
ServiceID string `json:"service_id"`
Domain string `json:"domain"`
Status string `json:"status"`
StatusMessage string `json:"status_message"`
CNAMETarget string `json:"cname_target"`
VerificationTXTName string `json:"verification_txt_name"`
VerificationTXTValue string `json:"verification_txt_value"`
CreatedAt string `json:"created_at"`
LastCheckedAt string `json:"last_checked_at"`
}
AppCustomDomain is a custom hostname attached to a web app service.
type AppDeployment ¶ added in v0.4.1
type AppDeployment struct {
ID string `json:"id"`
ServiceID string `json:"service_id"`
DeploymentNumber int `json:"deployment_number"`
Channel string `json:"channel"`
Status string `json:"status"`
RollbackOf string `json:"rollback_of"`
ImageDigest string `json:"image_digest"`
CommitSHA string `json:"commit_sha"`
CommitMessage string `json:"commit_message"`
Error string `json:"error"`
BuildDurationMS int `json:"build_duration_ms"`
StartedAt string `json:"started_at"`
FinishedAt string `json:"finished_at"`
CreatedAt string `json:"created_at"`
}
AppDeployment represents one build+rollout of an app service.
type AppEnvVar ¶ added in v0.4.1
type AppEnvVar struct {
Key string `json:"key"`
Value string `json:"value"`
IsSecret bool `json:"is_secret"`
IsSystem bool `json:"is_system"`
}
AppEnvVar is one environment variable on an app service.
type AppJobRun ¶ added in v0.4.1
type AppJobRun struct {
ID string `json:"id"`
ServiceID string `json:"service_id"`
DeploymentID string `json:"deployment_id"`
Trigger string `json:"trigger"`
Status string `json:"status"`
ExitCode int `json:"exit_code"`
Error string `json:"error"`
ScheduledFor string `json:"scheduled_for"`
StartedAt string `json:"started_at"`
FinishedAt string `json:"finished_at"`
}
AppJobRun is one run of a cron or one-off job service.
type AppLogLine ¶ added in v0.4.1
type AppLogLine struct {
Timestamp string `json:"timestamp"`
Level string `json:"level"`
Message string `json:"message"`
Stream string `json:"stream"`
Component string `json:"component"`
}
AppLogLine is one runtime log line.
type AppLogOptions ¶ added in v0.4.1
AppLogOptions filters a runtime log query.
type AppMetricSeries ¶ added in v0.4.1
type AppMetricSeries struct {
Name string `json:"name"`
Values []float64 `json:"values"`
Timestamps []string `json:"timestamps"`
}
AppMetricSeries is one named metric series (values aligned to timestamps).
type AppService ¶ added in v0.4.1
type AppService struct {
ID string `json:"id"`
ServiceID string `json:"service_id"`
ProjectID string `json:"project_id"`
Name string `json:"name"`
Slug string `json:"slug"`
Description string `json:"description"`
ServiceType string `json:"service_type"`
SourceType string `json:"source_type"`
Builder string `json:"builder"`
RepoFullName string `json:"repo_full_name"`
RepoBranch string `json:"repo_branch"`
RepoRootDir string `json:"repo_root_dir"`
DockerfilePath string `json:"dockerfile_path"`
ImageRef string `json:"image_ref"`
StartCommand string `json:"start_command"`
TierID int `json:"tier_id"`
TierName string `json:"tier_name"`
Replicas int `json:"replicas"`
AutoscalingEnabled bool `json:"autoscaling_enabled"`
MinReplicas int `json:"min_replicas"`
MaxReplicas int `json:"max_replicas"`
AutoscalingMetric string `json:"autoscaling_metric"`
AutoscalingTarget int `json:"autoscaling_target"`
ScaleToZero bool `json:"scale_to_zero"`
HTTPPort int `json:"http_port"`
HealthCheckPath string `json:"health_check_path"`
CronSchedule string `json:"cron_schedule"`
CronTimezone string `json:"cron_timezone"`
Region string `json:"region"`
URL string `json:"url"`
InternalHost string `json:"internal_host"`
Status string `json:"status"`
StatusMessage string `json:"status_message"`
PausedByCap bool `json:"paused_by_cap"`
BillingType string `json:"billing_type"`
CurrentDeploymentID string `json:"current_deployment_id"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
AppService represents a deployed app service (web, private, worker, cron, or job) on Raff Apps.
type AppServiceService ¶ added in v0.4.1
type AppServiceService interface {
ListTiers(ctx context.Context) ([]AppTier, *Response, error)
List(ctx context.Context) ([]AppService, *Response, error)
Get(ctx context.Context, ref string) (*AppService, *Response, error)
Create(ctx context.Context, req *CreateAppServiceRequest) (*AppService, *Response, error)
Delete(ctx context.Context, ref string) (*Response, error)
Pause(ctx context.Context, ref string) (*AppService, *Response, error)
Resume(ctx context.Context, ref string) (*AppService, *Response, error)
Scale(ctx context.Context, ref string, req *ScaleAppServiceRequest) (*AppService, *Response, error)
RequestSourceUpload(ctx context.Context, ref string) (*AppSourceUpload, *Response, error)
UploadSource(ctx context.Context, uploadURL string, tarData []byte) error
ListDeployments(ctx context.Context, ref string, limit int) ([]AppDeployment, *Response, error)
GetDeployment(ctx context.Context, deploymentID string) (*AppDeployment, *Response, error)
CreateDeployment(ctx context.Context, ref string, req *CreateAppDeploymentRequest) (*AppDeployment, *Response, error)
Rollback(ctx context.Context, ref string, req *RollbackAppServiceRequest) (*AppDeployment, *Response, error)
GetDeploymentLogs(ctx context.Context, deploymentID string) ([]AppBuildLogLine, bool, *Response, error)
ListLogs(ctx context.Context, ref string, opts *AppLogOptions) ([]AppLogLine, *Response, error)
GetMetrics(ctx context.Context, ref, window string) ([]AppMetricSeries, *Response, error)
ListEnvVars(ctx context.Context, ref string, reveal bool) ([]AppEnvVar, *Response, error)
SetEnvVar(ctx context.Context, ref string, req *SetAppEnvVarRequest) ([]AppEnvVar, *Response, error)
BulkSetEnvVars(ctx context.Context, ref string, req *BulkSetAppEnvVarsRequest) ([]AppEnvVar, *Response, error)
DeleteEnvVar(ctx context.Context, ref, key string) ([]AppEnvVar, *Response, error)
ListCustomDomains(ctx context.Context, ref string) ([]AppCustomDomain, *Response, error)
AddCustomDomain(ctx context.Context, ref string, req *AddAppCustomDomainRequest) (*AppCustomDomain, *Response, error)
DeleteCustomDomain(ctx context.Context, domainID string) (*Response, error)
RetryDomainVerification(ctx context.Context, domainID string) (*AppCustomDomain, *Response, error)
RunJob(ctx context.Context, ref string) (*AppJobRun, *Response, error)
ListJobRuns(ctx context.Context, ref string) ([]AppJobRun, *Response, error)
CancelJobRun(ctx context.Context, runID string) (*AppJobRun, *Response, error)
GetUsage(ctx context.Context, ref string) (*AppUsage, *Response, error)
GetSpendSettings(ctx context.Context) (*AppSpendSettings, *Response, error)
UpdateSpendSettings(ctx context.Context, req *UpdateAppSpendSettingsRequest) (*AppSpendSettings, *Response, error)
}
AppServiceService handles communication with the Raff Apps endpoints.
type AppServiceServiceOp ¶ added in v0.4.1
type AppServiceServiceOp struct {
// contains filtered or unexported fields
}
AppServiceServiceOp implements AppServiceService.
func (*AppServiceServiceOp) AddCustomDomain ¶ added in v0.4.1
func (s *AppServiceServiceOp) AddCustomDomain(ctx context.Context, ref string, req *AddAppCustomDomainRequest) (*AppCustomDomain, *Response, error)
AddCustomDomain attaches a custom domain to a web app service. The returned domain carries the DNS records to create (CNAME target and verification TXT).
func (*AppServiceServiceOp) BulkSetEnvVars ¶ added in v0.4.1
func (s *AppServiceServiceOp) BulkSetEnvVars(ctx context.Context, ref string, req *BulkSetAppEnvVarsRequest) ([]AppEnvVar, *Response, error)
func (*AppServiceServiceOp) CancelJobRun ¶ added in v0.4.1
func (*AppServiceServiceOp) Create ¶ added in v0.4.1
func (s *AppServiceServiceOp) Create(ctx context.Context, req *CreateAppServiceRequest) (*AppService, *Response, error)
func (*AppServiceServiceOp) CreateDeployment ¶ added in v0.4.1
func (s *AppServiceServiceOp) CreateDeployment(ctx context.Context, ref string, req *CreateAppDeploymentRequest) (*AppDeployment, *Response, error)
func (*AppServiceServiceOp) Delete ¶ added in v0.4.1
Delete removes an app service (asynchronous; the name and URL are released once deletion completes).
func (*AppServiceServiceOp) DeleteCustomDomain ¶ added in v0.4.1
func (*AppServiceServiceOp) DeleteEnvVar ¶ added in v0.4.1
func (*AppServiceServiceOp) Get ¶ added in v0.4.1
func (s *AppServiceServiceOp) Get(ctx context.Context, ref string) (*AppService, *Response, error)
func (*AppServiceServiceOp) GetDeployment ¶ added in v0.4.1
func (s *AppServiceServiceOp) GetDeployment(ctx context.Context, deploymentID string) (*AppDeployment, *Response, error)
func (*AppServiceServiceOp) GetDeploymentLogs ¶ added in v0.4.1
func (s *AppServiceServiceOp) GetDeploymentLogs(ctx context.Context, deploymentID string) ([]AppBuildLogLine, bool, *Response, error)
func (*AppServiceServiceOp) GetMetrics ¶ added in v0.4.1
func (s *AppServiceServiceOp) GetMetrics(ctx context.Context, ref, window string) ([]AppMetricSeries, *Response, error)
GetMetrics returns per-service metric series over the given window (e.g. "1h", "24h"). An empty window uses the server default.
func (*AppServiceServiceOp) GetSpendSettings ¶ added in v0.4.1
func (s *AppServiceServiceOp) GetSpendSettings(ctx context.Context) (*AppSpendSettings, *Response, error)
func (*AppServiceServiceOp) GetUsage ¶ added in v0.4.1
func (s *AppServiceServiceOp) GetUsage(ctx context.Context, ref string) (*AppUsage, *Response, error)
GetUsage returns the account's month-to-date Apps usage and estimated charge. Pass an empty ref for all services, or a service ref to scope it.
func (*AppServiceServiceOp) List ¶ added in v0.4.1
func (s *AppServiceServiceOp) List(ctx context.Context) ([]AppService, *Response, error)
func (*AppServiceServiceOp) ListCustomDomains ¶ added in v0.4.1
func (s *AppServiceServiceOp) ListCustomDomains(ctx context.Context, ref string) ([]AppCustomDomain, *Response, error)
func (*AppServiceServiceOp) ListDeployments ¶ added in v0.4.1
func (s *AppServiceServiceOp) ListDeployments(ctx context.Context, ref string, limit int) ([]AppDeployment, *Response, error)
func (*AppServiceServiceOp) ListEnvVars ¶ added in v0.4.1
func (s *AppServiceServiceOp) ListEnvVars(ctx context.Context, ref string, reveal bool) ([]AppEnvVar, *Response, error)
ListEnvVars lists a service's environment variables. Secret values are masked unless reveal is true (which requires elevated permission).
func (*AppServiceServiceOp) ListJobRuns ¶ added in v0.4.1
func (*AppServiceServiceOp) ListLogs ¶ added in v0.4.1
func (s *AppServiceServiceOp) ListLogs(ctx context.Context, ref string, opts *AppLogOptions) ([]AppLogLine, *Response, error)
func (*AppServiceServiceOp) ListTiers ¶ added in v0.4.1
ListTiers returns the public Apps pricing catalog (no auth needed).
func (*AppServiceServiceOp) Pause ¶ added in v0.4.1
func (s *AppServiceServiceOp) Pause(ctx context.Context, ref string) (*AppService, *Response, error)
func (*AppServiceServiceOp) RequestSourceUpload ¶ added in v0.4.1
func (s *AppServiceServiceOp) RequestSourceUpload(ctx context.Context, ref string) (*AppSourceUpload, *Response, error)
func (*AppServiceServiceOp) Resume ¶ added in v0.4.1
func (s *AppServiceServiceOp) Resume(ctx context.Context, ref string) (*AppService, *Response, error)
func (*AppServiceServiceOp) RetryDomainVerification ¶ added in v0.4.1
func (s *AppServiceServiceOp) RetryDomainVerification(ctx context.Context, domainID string) (*AppCustomDomain, *Response, error)
func (*AppServiceServiceOp) Rollback ¶ added in v0.4.1
func (s *AppServiceServiceOp) Rollback(ctx context.Context, ref string, req *RollbackAppServiceRequest) (*AppDeployment, *Response, error)
Rollback pins a service back to an older deployment's image (creates a new deployment from the target's digest and config snapshot).
func (*AppServiceServiceOp) RunJob ¶ added in v0.4.1
func (s *AppServiceServiceOp) RunJob(ctx context.Context, ref string) (*AppJobRun, *Response, error)
RunJob triggers a manual run of a cron or one-off job service.
func (*AppServiceServiceOp) Scale ¶ added in v0.4.1
func (s *AppServiceServiceOp) Scale(ctx context.Context, ref string, req *ScaleAppServiceRequest) (*AppService, *Response, error)
func (*AppServiceServiceOp) SetEnvVar ¶ added in v0.4.1
func (s *AppServiceServiceOp) SetEnvVar(ctx context.Context, ref string, req *SetAppEnvVarRequest) ([]AppEnvVar, *Response, error)
func (*AppServiceServiceOp) UpdateSpendSettings ¶ added in v0.4.1
func (s *AppServiceServiceOp) UpdateSpendSettings(ctx context.Context, req *UpdateAppSpendSettingsRequest) (*AppSpendSettings, *Response, error)
func (*AppServiceServiceOp) UploadSource ¶ added in v0.4.1
func (s *AppServiceServiceOp) UploadSource(ctx context.Context, uploadURL string, tarData []byte) error
UploadSource PUTs the source tarball to a presigned URL (no API auth involved).
type AppServiceUsage ¶ added in v0.4.1
type AppServiceUsage struct {
ServiceID string `json:"service_id"`
ServiceName string `json:"service_name"`
TierID int `json:"tier_id"`
ReplicaHours float64 `json:"replica_hours"`
EstimatedCostUSD float64 `json:"estimated_cost_usd"`
}
AppServiceUsage is one service's month-to-date usage and estimated charge.
type AppSourceUpload ¶ added in v0.4.1
type AppSourceUpload struct {
UploadURL string `json:"upload_url"`
BlobKey string `json:"blob_key"`
ExpiresInSeconds int `json:"expires_in_seconds"`
}
AppSourceUpload is a presigned upload slot for a source tarball.
type AppSpendSettings ¶ added in v0.4.1
type AppSpendSettings struct {
Enabled bool `json:"enabled"`
MonthlyCapUSD float64 `json:"monthly_cap_usd"`
CapAction string `json:"cap_action"`
PausedByCap bool `json:"paused_by_cap"`
}
AppSpendSettings is the account's Apps spend cap.
type AppTier ¶ added in v0.4.1
type AppTier struct {
ID int `json:"id"`
Name string `json:"name"`
VCPU float64 `json:"vcpu"`
MemoryMiB int `json:"memory_mib"`
EphemeralGiB int `json:"ephemeral_gib"`
PricePerHour float64 `json:"price_per_hour"`
PricePerMonth float64 `json:"price_per_month"`
YearlyPrice float64 `json:"yearly_price"`
Region string `json:"region"`
}
AppTier is one Apps pricing tier (compute size + price).
type AppUsage ¶ added in v0.4.1
type AppUsage struct {
Services []AppServiceUsage `json:"services"`
TotalEstimatedCostUSD float64 `json:"total_estimated_cost_usd"`
PeriodStart string `json:"period_start"`
PeriodEnd string `json:"period_end"`
}
AppUsage is the account's Apps usage for a billing period.
type AttachIPRequest ¶
type AttachIPRequest = spec.AttachIPRequest
AttachIPRequest is the request body for attaching a floating IP to a VM.
type AttachIPResponse ¶
type AttachIPResponse = spec.AttachIPResponse
AttachIPResponse is the response from attaching a floating IP.
type AttachSecurityGroupRequest ¶
type AttachSecurityGroupRequest = spec.AttachSecurityGroupRequest
AttachSecurityGroupRequest is the request body for attaching a security group.
type AttachVPCRequest ¶
type AttachVPCRequest = spec.AttachVPCRequest
AttachVPCRequest is the request body for attaching a VM to a VPC.
type AttachVolumeRequest ¶ added in v0.3.0
type AttachVolumeRequest = spec.AttachVolumeRequest
AttachVolumeRequest is the request body for attaching a volume to a VM.
type BackupListOptions ¶ added in v0.3.0
type BackupListOptions = spec.ListBackupsParams
BackupListOptions are the query parameters for listing backups.
type BackupPricingListOptions ¶ added in v0.3.0
type BackupPricingListOptions = spec.ListBackupPricingParams
BackupPricingListOptions filters backup pricing by region.
type BackupSchedule ¶ added in v0.3.0
type BackupSchedule = spec.BackupSchedule
BackupSchedule defines a recurring backup policy.
type BackupScheduleListOptions ¶ added in v0.3.0
type BackupScheduleListOptions = spec.ListBackupSchedulesParams
BackupScheduleListOptions are the query parameters for listing schedules.
type BackupScheduleService ¶ added in v0.3.0
type BackupScheduleService interface {
List(ctx context.Context, opts *BackupScheduleListOptions) ([]BackupSchedule, *Response, error)
Get(ctx context.Context, scheduleID int) (*BackupSchedule, *Response, error)
Create(ctx context.Context, req *CreateBackupScheduleRequest) (*BackupSchedule, *Response, error)
Update(ctx context.Context, scheduleID int, req *UpdateBackupScheduleRequest) (*BackupSchedule, *Response, error)
Delete(ctx context.Context, scheduleID int) (*Response, error)
}
BackupScheduleService handles backup schedule CRUD.
type BackupScheduleServiceOp ¶ added in v0.3.0
type BackupScheduleServiceOp struct {
// contains filtered or unexported fields
}
BackupScheduleServiceOp implements BackupScheduleService.
func (*BackupScheduleServiceOp) Create ¶ added in v0.3.0
func (s *BackupScheduleServiceOp) Create(ctx context.Context, req *CreateBackupScheduleRequest) (*BackupSchedule, *Response, error)
func (*BackupScheduleServiceOp) Get ¶ added in v0.3.0
func (s *BackupScheduleServiceOp) Get(ctx context.Context, scheduleID int) (*BackupSchedule, *Response, error)
func (*BackupScheduleServiceOp) List ¶ added in v0.3.0
func (s *BackupScheduleServiceOp) List(ctx context.Context, opts *BackupScheduleListOptions) ([]BackupSchedule, *Response, error)
func (*BackupScheduleServiceOp) Update ¶ added in v0.3.0
func (s *BackupScheduleServiceOp) Update(ctx context.Context, scheduleID int, req *UpdateBackupScheduleRequest) (*BackupSchedule, *Response, error)
type BackupService ¶ added in v0.3.0
type BackupService interface {
List(ctx context.Context, opts *BackupListOptions) ([]Backup, *Response, error)
Get(ctx context.Context, backupID string) (*Backup, *Response, error)
Create(ctx context.Context, req *CreateBackupRequest) (*Backup, *Response, error)
Restore(ctx context.Context, backupID string) (*Backup, *Response, error)
Delete(ctx context.Context, backupID string) (*Response, error)
// DeleteSeries removes every restore point in the series that the
// given backup belongs to. Use when a single restore point can't be
// removed on its own because it has older points it depends on.
DeleteSeries(ctx context.Context, backupID string) (*Response, error)
// ResetSeries closes the active backup series for the VM so the next
// backup creates a fresh independent baseline. Existing restore
// points stay restorable until explicitly deleted.
ResetSeries(ctx context.Context, vmID string) (*Response, error)
}
BackupService handles communication with the backup endpoints. Restore is asynchronous and returns the in-progress backup record (HTTP 202).
type BackupServiceOp ¶ added in v0.3.0
type BackupServiceOp struct {
// contains filtered or unexported fields
}
BackupServiceOp implements BackupService.
func (*BackupServiceOp) Create ¶ added in v0.3.0
func (s *BackupServiceOp) Create(ctx context.Context, req *CreateBackupRequest) (*Backup, *Response, error)
func (*BackupServiceOp) DeleteSeries ¶ added in v0.3.4
func (*BackupServiceOp) List ¶ added in v0.3.0
func (s *BackupServiceOp) List(ctx context.Context, opts *BackupListOptions) ([]Backup, *Response, error)
func (*BackupServiceOp) ResetSeries ¶ added in v0.3.4
type BulkDeleteVMItemResult ¶
type BulkDeleteVMItemResult = spec.BulkDeleteVMItemResult
BulkDeleteVMItemResult is the result for a single VM in bulk delete.
type BulkDeleteVMsRequest ¶
type BulkDeleteVMsRequest = spec.DeleteVMsBulkRequest
BulkDeleteVMsRequest is the request body for bulk-deleting VMs.
type BulkDeleteVMsResult ¶
type BulkDeleteVMsResult = spec.BulkDeleteVMsResult
BulkDeleteVMsResult is the per-VM result envelope from bulk delete.
type BulkSetAppEnvVarsRequest ¶ added in v0.4.1
type BulkSetAppEnvVarsRequest struct {
Vars []SetAppEnvVarRequest `json:"vars"`
Redeploy *bool `json:"redeploy,omitempty"`
}
BulkSetAppEnvVarsRequest upserts many environment variables at once.
type CIDRSuggestion ¶
type CIDRSuggestion = spec.CIDRSuggestion
CIDRSuggestion is a single CIDR suggestion entry.
type CIDRSuggestionsResponse ¶
type CIDRSuggestionsResponse = spec.CIDRSuggestionsResponse
CIDRSuggestionsResponse contains a recommended CIDR and alternatives.
type ChangeIPResponse ¶
type ChangeIPResponse struct {
Success bool `json:"success"`
OldIP *FloatingIP `json:"old_ip,omitempty"`
NewIP *FloatingIP `json:"new_ip,omitempty"`
}
ChangeIPResponse is the response shape for swapping a reserved IP.
type Client ¶
type Client struct {
// Services
Projects ProjectService
VMs VMService
VPCs VPCService
IPs IPService
SecurityGroups SecurityGroupService
SSHKeys SSHKeyService
APIKeys APIKeyService
Members MemberService
ProjectMembers ProjectMemberService
Roles RoleService
Permissions PermissionService
Invitations InvitationService
Volumes VolumeService
Snapshots SnapshotService
Backups BackupService
BackupSchedules BackupScheduleService
Metadata MetadataService
Pricing PricingService
Functions FunctionService
AppServices AppServiceService
Kubernetes KubernetesService
// contains filtered or unexported fields
}
Client manages communication with the Raff Cloud API.
func NewFromToken ¶
NewFromToken creates a new Raff API client with the given API key.
type ClientOpt ¶
type ClientOpt func(*clientConfig, *Client)
ClientOpt is a functional option for configuring the client.
func SetProjectID ¶
SetProjectID sets the default project ID sent via X-Project-ID header for mutating operations. Each service method may override it per call.
type ConvertLambdaRequest ¶ added in v0.4.1
type ConvertLambdaRequest struct {
LambdaRuntime string `json:"lambda_runtime"`
Files []SourceFile `json:"files"`
Handler string `json:"handler,omitempty"`
MemoryMB int `json:"memory_mb,omitempty"`
TimeoutSeconds int `json:"timeout_seconds,omitempty"`
EnvVars map[string]string `json:"env_vars,omitempty"`
TriggerConfigJSON string `json:"trigger_config_json,omitempty"`
// Mode: "rewrite" (AI, default) or "adapter" (run as-is, no AI).
Mode string `json:"mode,omitempty"`
}
ConvertLambdaRequest is the Lambda import request (stateless conversion).
type ConvertLambdaResult ¶ added in v0.4.1
type ConvertLambdaResult struct {
Runtime string `json:"runtime"`
ConvertedFiles []SourceFile `json:"converted_files"`
RaffToml string `json:"raff_toml"`
ProposedTriggers []string `json:"proposed_triggers"`
Warnings []string `json:"warnings"`
OutOfScope []string `json:"out_of_scope"`
}
ConvertLambdaResult is the conversion output — review before deploying.
type CreateAPIKeyRequest ¶ added in v0.2.0
type CreateAPIKeyRequest = spec.CreateAPIKeyRequest
CreateAPIKeyRequest is the request body for creating an API key.
type CreateAppDeploymentRequest ¶ added in v0.4.1
type CreateAppDeploymentRequest struct {
Channel string `json:"channel,omitempty"`
SourceBlobKey string `json:"source_blob_key,omitempty"`
ImageRef string `json:"image_ref,omitempty"`
}
CreateAppDeploymentRequest starts a deployment from staged source or a prebuilt image.
type CreateAppServiceRequest ¶ added in v0.4.1
type CreateAppServiceRequest struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
ServiceType string `json:"service_type"`
SourceType string `json:"source_type,omitempty"`
Builder string `json:"builder,omitempty"`
ImageRef string `json:"image_ref,omitempty"`
RepoFullName string `json:"repo_full_name,omitempty"`
RepoBranch string `json:"repo_branch,omitempty"`
RepoRootDir string `json:"repo_root_dir,omitempty"`
DockerfilePath string `json:"dockerfile_path,omitempty"`
StartCommand string `json:"start_command,omitempty"`
TierID int `json:"tier_id,omitempty"`
Replicas int `json:"replicas,omitempty"`
Autoscaling bool `json:"autoscaling_enabled,omitempty"`
MinReplicas int `json:"min_replicas,omitempty"`
MaxReplicas int `json:"max_replicas,omitempty"`
ScaleToZero bool `json:"scale_to_zero,omitempty"`
HTTPPort int `json:"http_port,omitempty"`
HealthCheckPath string `json:"health_check_path,omitempty"`
CronSchedule string `json:"cron_schedule,omitempty"`
CronTimezone string `json:"cron_timezone,omitempty"`
Region string `json:"region,omitempty"`
// DeployNow immediately queues a build+rollout for prebuilt-image
// services. Source-based services deploy after their source is uploaded.
DeployNow bool `json:"deploy_now,omitempty"`
}
CreateAppServiceRequest is the request body for creating an app service.
type CreateBackupRequest ¶ added in v0.3.0
type CreateBackupRequest = spec.CreateBackupRequest
CreateBackupRequest is the request body for taking an on-demand backup.
type CreateBackupScheduleRequest ¶ added in v0.3.0
type CreateBackupScheduleRequest = spec.CreateBackupScheduleRequest
CreateBackupScheduleRequest is the request body for creating a schedule.
type CreateFunctionDeploymentRequest ¶ added in v0.4.1
type CreateFunctionDeploymentRequest struct {
Channel string `json:"channel,omitempty"`
SourceBlobKey string `json:"source_blob_key,omitempty"`
Template string `json:"template,omitempty"`
Message string `json:"message,omitempty"`
}
CreateFunctionDeploymentRequest starts a deployment from staged source.
type CreateFunctionRequest ¶ added in v0.4.1
type CreateFunctionRequest struct {
Name string `json:"name"`
Slug string `json:"slug,omitempty"`
Description string `json:"description,omitempty"`
Runtime string `json:"runtime"`
Region string `json:"region,omitempty"`
MemoryMB int `json:"memory_mb,omitempty"`
TimeoutSeconds int `json:"timeout_seconds,omitempty"`
MinScale int `json:"min_scale,omitempty"`
MaxScale int `json:"max_scale,omitempty"`
SourceType string `json:"source_type,omitempty"`
// ExtendedTimeout opts into timeouts above 3600s (max 86400s / 24h).
ExtendedTimeout bool `json:"extended_timeout,omitempty"`
}
CreateFunctionRequest is the request body for creating a function.
type CreateInvitationRequest ¶ added in v0.2.0
type CreateInvitationRequest = spec.CreateInvitationRequest
CreateInvitationRequest is the request body for both account and project invitations — same shape (email + role_id).
type CreateK8sClusterRequest ¶ added in v0.4.0
type CreateK8sClusterRequest = spec.CreateK8SClusterJSONRequestBody
CreateK8sClusterRequest is the request body for creating a cluster.
type CreateK8sClusterStorageNodeCount ¶ added in v0.4.0
type CreateK8sClusterStorageNodeCount = spec.CreateK8SClusterRequestStorageNodeCount
CreateK8sClusterStorageNodeCount is the storage-node count in a create request.
type CreateProjectRequest ¶
type CreateProjectRequest = spec.CreateProjectRequest
CreateProjectRequest is the request body for creating a project.
type CreateRoleRequest ¶ added in v0.2.0
type CreateRoleRequest = spec.CreateRoleRequest
CreateRoleRequest is the request body for creating a custom role.
type CreateSSHKeyRequest ¶ added in v0.2.0
type CreateSSHKeyRequest = spec.CreateSSHKeyRequest
CreateSSHKeyRequest is the request body for registering an SSH key.
type CreateSecurityGroupRequest ¶
type CreateSecurityGroupRequest = spec.CreateSecurityGroupRequest
CreateSecurityGroupRequest is the request body for creating a security group.
type CreateSnapshotRequest ¶ added in v0.3.0
type CreateSnapshotRequest = spec.CreateSnapshotRequest
CreateSnapshotRequest is the request body for creating a snapshot.
type CreateVMRequest ¶
type CreateVMRequest = spec.CreateVMRequest
CreateVMRequest is the request body for creating a VM.
type CreateVPCRequest ¶
type CreateVPCRequest = spec.CreateVPCRequest
CreateVPCRequest is the request body for creating a VPC.
type CreateVolumeRequest ¶ added in v0.3.0
type CreateVolumeRequest = spec.CreateVolumeRequest
CreateVolumeRequest is the request body for creating a volume.
type DeleteVMRequest ¶
type DeleteVMRequest = spec.DeleteVMRequest
DeleteVMRequest is the optional request body for deleting a VM.
type ErrorResponse ¶
ErrorResponse is returned when the API returns a non-2xx status code.
func (*ErrorResponse) Error ¶
func (e *ErrorResponse) Error() string
type FloatingIP ¶
type FloatingIP = spec.FloatingIP
FloatingIP represents a floating public IP address.
type Function ¶ added in v0.4.1
type Function struct {
ID string `json:"id"`
FunctionID string `json:"function_id"`
Name string `json:"name"`
Slug string `json:"slug"`
Description string `json:"description"`
Runtime string `json:"runtime"`
Region string `json:"region"`
MemoryMB int `json:"memory_mb"`
TimeoutSeconds int `json:"timeout_seconds"`
ExtendedTimeout bool `json:"extended_timeout"`
MinScale int `json:"min_scale"`
MaxScale int `json:"max_scale"`
SourceType string `json:"source_type"`
RepoFullName string `json:"repo_full_name"`
RepoBranch string `json:"repo_branch"`
RepoRootDir string `json:"repo_root_dir"`
URL string `json:"url"`
Status string `json:"status"`
StatusMessage string `json:"status_message"`
CurrentRevisionNumber int `json:"current_revision_number"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
Function represents a deployed serverless function.
type FunctionBuildLogLine ¶ added in v0.4.1
type FunctionBuildLogLine struct {
Timestamp string `json:"timestamp"`
Step string `json:"step"`
Message string `json:"message"`
}
FunctionBuildLogLine is one line of build output.
type FunctionDeployment ¶ added in v0.4.1
type FunctionDeployment struct {
ID string `json:"id"`
Channel string `json:"channel"`
Status string `json:"status"`
CommitSHA string `json:"commit_sha"`
Error string `json:"error"`
BuildDurationMS int `json:"build_duration_ms"`
CreatedAt string `json:"created_at"`
FinishedAt string `json:"finished_at"`
}
FunctionDeployment represents one build+rollout of a function.
type FunctionEnvVar ¶ added in v0.4.1
type FunctionEnvVar struct {
Key string `json:"key"`
Value string `json:"value"`
IsSecret bool `json:"is_secret"`
IsSystem bool `json:"is_system"`
}
FunctionEnvVar is one environment variable on a function.
type FunctionService ¶ added in v0.4.1
type FunctionService interface {
List(ctx context.Context) ([]Function, *Response, error)
Get(ctx context.Context, ref string) (*Function, *Response, error)
Create(ctx context.Context, req *CreateFunctionRequest) (*Function, *Response, error)
Update(ctx context.Context, ref string, req *UpdateFunctionRequest) (*Function, *Response, error)
Delete(ctx context.Context, ref string) (*Response, error)
RequestSourceUpload(ctx context.Context, ref string) (*FunctionSourceUpload, *Response, error)
UploadSource(ctx context.Context, uploadURL string, zipData []byte) error
CreateDeployment(ctx context.Context, ref string, req *CreateFunctionDeploymentRequest) (*FunctionDeployment, *Response, error)
GetDeployment(ctx context.Context, ref, deploymentID string) (*FunctionDeployment, *Response, error)
GetDeploymentLogs(ctx context.Context, ref, deploymentID string) ([]FunctionBuildLogLine, bool, *Response, error)
ListEnvVars(ctx context.Context, ref string, reveal bool) ([]FunctionEnvVar, *Response, error)
SetEnvVar(ctx context.Context, ref string, req *SetFunctionEnvVarRequest) (*Response, error)
ConvertLambda(ctx context.Context, req *ConvertLambdaRequest) (*ConvertLambdaResult, *Response, error)
}
FunctionService handles communication with the Functions endpoints.
type FunctionServiceOp ¶ added in v0.4.1
type FunctionServiceOp struct {
// contains filtered or unexported fields
}
FunctionServiceOp implements FunctionService.
func (*FunctionServiceOp) ConvertLambda ¶ added in v0.4.1
func (s *FunctionServiceOp) ConvertLambda(ctx context.Context, req *ConvertLambdaRequest) (*ConvertLambdaResult, *Response, error)
ConvertLambda converts AWS Lambda source to a portable Raff handler. Stateless — nothing is stored; review the output, then deploy it.
func (*FunctionServiceOp) Create ¶ added in v0.4.1
func (s *FunctionServiceOp) Create(ctx context.Context, req *CreateFunctionRequest) (*Function, *Response, error)
func (*FunctionServiceOp) CreateDeployment ¶ added in v0.4.1
func (s *FunctionServiceOp) CreateDeployment(ctx context.Context, ref string, req *CreateFunctionDeploymentRequest) (*FunctionDeployment, *Response, error)
func (*FunctionServiceOp) Delete ¶ added in v0.4.1
Delete removes a function and all revisions (asynchronous; the name and URL are released once deletion completes).
func (*FunctionServiceOp) GetDeployment ¶ added in v0.4.1
func (s *FunctionServiceOp) GetDeployment(ctx context.Context, ref, deploymentID string) (*FunctionDeployment, *Response, error)
func (*FunctionServiceOp) GetDeploymentLogs ¶ added in v0.4.1
func (s *FunctionServiceOp) GetDeploymentLogs(ctx context.Context, ref, deploymentID string) ([]FunctionBuildLogLine, bool, *Response, error)
func (*FunctionServiceOp) ListEnvVars ¶ added in v0.4.1
func (s *FunctionServiceOp) ListEnvVars(ctx context.Context, ref string, reveal bool) ([]FunctionEnvVar, *Response, error)
func (*FunctionServiceOp) RequestSourceUpload ¶ added in v0.4.1
func (s *FunctionServiceOp) RequestSourceUpload(ctx context.Context, ref string) (*FunctionSourceUpload, *Response, error)
func (*FunctionServiceOp) SetEnvVar ¶ added in v0.4.1
func (s *FunctionServiceOp) SetEnvVar(ctx context.Context, ref string, req *SetFunctionEnvVarRequest) (*Response, error)
func (*FunctionServiceOp) Update ¶ added in v0.4.1
func (s *FunctionServiceOp) Update(ctx context.Context, ref string, req *UpdateFunctionRequest) (*Function, *Response, error)
Update partially updates function settings; live functions get a zero-downtime config redeploy.
func (*FunctionServiceOp) UploadSource ¶ added in v0.4.1
func (s *FunctionServiceOp) UploadSource(ctx context.Context, uploadURL string, zipData []byte) error
UploadSource PUTs the source zip to a presigned URL (no API auth involved).
type FunctionSourceUpload ¶ added in v0.4.1
type FunctionSourceUpload struct {
UploadURL string `json:"upload_url"`
SourceBlobKey string `json:"source_blob_key"`
ExpiresInSeconds int `json:"expires_in_seconds"`
}
FunctionSourceUpload is a presigned upload slot for a source zip.
type GetVMNotesOptions ¶
type GetVMNotesOptions = spec.GetVMNotesParams
GetVMNotesOptions are the optional filters for listing notes.
type IPListOptions ¶
type IPListOptions = spec.ListIPsParams
IPListOptions are the query parameters for listing floating IPs.
type IPService ¶
type IPService interface {
List(ctx context.Context, opts *IPListOptions) ([]FloatingIP, *Response, error)
Get(ctx context.Context, ipID string) (*FloatingIP, *Response, error)
Reserve(ctx context.Context, req *ReserveIPRequest) (*FloatingIP, *Response, error)
Release(ctx context.Context, ipID string) (*Response, error)
Change(ctx context.Context, ipID string) (*ChangeIPResponse, *Response, error)
}
IPService handles communication with the floating IP endpoints.
type IPServiceOp ¶
type IPServiceOp struct {
// contains filtered or unexported fields
}
IPServiceOp implements IPService.
func (*IPServiceOp) Change ¶
func (s *IPServiceOp) Change(ctx context.Context, ipID string) (*ChangeIPResponse, *Response, error)
func (*IPServiceOp) Get ¶
func (s *IPServiceOp) Get(ctx context.Context, ipID string) (*FloatingIP, *Response, error)
func (*IPServiceOp) List ¶
func (s *IPServiceOp) List(ctx context.Context, opts *IPListOptions) ([]FloatingIP, *Response, error)
func (*IPServiceOp) Reserve ¶
func (s *IPServiceOp) Reserve(ctx context.Context, req *ReserveIPRequest) (*FloatingIP, *Response, error)
type Invitation ¶ added in v0.2.0
type Invitation = spec.Invitation
Invitation represents a pending invite to join an account or project.
type InvitationService ¶ added in v0.2.0
type InvitationService interface {
CreateAccount(ctx context.Context, req *CreateInvitationRequest) (*Invitation, *Response, error)
CreateProject(ctx context.Context, projectID string, req *CreateInvitationRequest) (*Invitation, *Response, error)
Cancel(ctx context.Context, invitationID string) (*Response, error)
}
InvitationService handles communication with the invitation endpoints.
The public spec exposes Create (account-scoped or project-scoped) and Cancel. There is no List endpoint — invitations are observed via the invited member appearing in the relevant Members or ProjectMembers list with status "pending".
type InvitationServiceOp ¶ added in v0.2.0
type InvitationServiceOp struct {
// contains filtered or unexported fields
}
InvitationServiceOp implements InvitationService.
func (*InvitationServiceOp) CreateAccount ¶ added in v0.2.0
func (s *InvitationServiceOp) CreateAccount(ctx context.Context, req *CreateInvitationRequest) (*Invitation, *Response, error)
func (*InvitationServiceOp) CreateProject ¶ added in v0.2.0
func (s *InvitationServiceOp) CreateProject(ctx context.Context, projectID string, req *CreateInvitationRequest) (*Invitation, *Response, error)
type K8sAvailableUpgrade ¶ added in v0.4.0
type K8sAvailableUpgrade struct {
VersionID int
Version string
RKE2Version string
IsMinor bool
IsDefault bool
}
K8sAvailableUpgrade is one version a cluster can upgrade to.
type K8sCluster ¶ added in v0.4.0
type K8sCluster = spec.K8SCluster
K8sCluster represents a managed Kubernetes cluster.
type K8sClusterEvent ¶ added in v0.4.0
type K8sClusterEvent = spec.K8SClusterEvent
K8sClusterEvent is one lifecycle event of a cluster.
type K8sClusterListOptions ¶ added in v0.4.0
type K8sClusterListOptions = spec.ListK8SClustersParams
K8sClusterListOptions are the query parameters for listing clusters.
type K8sClusterNode ¶ added in v0.4.0
type K8sClusterNode = spec.K8SClusterNode
K8sClusterNode is one node of a cluster with live kubelet state.
type K8sClusterStatus ¶ added in v0.4.0
type K8sClusterStatus = spec.K8SClusterStatus
K8sClusterStatus is a cluster lifecycle status.
type K8sKubeconfig ¶ added in v0.4.0
K8sKubeconfig is a cluster's kubeconfig with its API endpoint.
type K8sNodePlan ¶ added in v0.4.0
type K8sNodePlan = spec.K8SNodePlan
K8sNodePlan is a worker node plan with pricing.
type K8sNodePlans ¶ added in v0.4.0
type K8sNodePlans struct {
Plans []K8sNodePlan
HAPricing *spec.K8SHAPricing
StoragePricing *spec.K8SStoragePricing
}
K8sNodePlans bundles worker plans with HA and storage pricing.
type K8sNodePool ¶ added in v0.4.0
type K8sNodePool = spec.K8SNodePool
K8sNodePool represents a group of identical worker nodes.
type K8sNodePoolInput ¶ added in v0.4.0
type K8sNodePoolInput = spec.K8SNodePoolInput
K8sNodePoolInput describes a node pool in a cluster create request.
type K8sUpgradeInfo ¶ added in v0.4.0
type K8sUpgradeInfo struct {
CurrentVersion string
UpgradeStatus string
TargetVersion string
UpgradeMode string
MaintenanceDay *int
MaintenanceStart *int
Available []K8sAvailableUpgrade
}
K8sUpgradeInfo is a cluster's upgrade and maintenance state.
type K8sVersion ¶ added in v0.4.0
type K8sVersion = spec.K8SVersion
K8sVersion is an available Kubernetes version.
type KubernetesService ¶ added in v0.4.0
type KubernetesService interface {
List(ctx context.Context, opts *K8sClusterListOptions) ([]K8sCluster, *Response, error)
Get(ctx context.Context, clusterID string) (*K8sCluster, *Response, error)
// Create provisions a cluster. idempotencyKey (optional, max 128 chars)
// makes retries safe: the same key returns the same cluster instead of
// creating a second one.
Create(ctx context.Context, req *CreateK8sClusterRequest, idempotencyKey string) (*K8sCluster, *Response, error)
Rename(ctx context.Context, clusterID, name string) (*Response, error)
Delete(ctx context.Context, clusterID string) (*Response, error)
Kubeconfig(ctx context.Context, clusterID string) (*K8sKubeconfig, *Response, error)
KubeconfigWithTTL(ctx context.Context, clusterID string, ttlSeconds int) (*K8sKubeconfig, *Response, error)
RotateKubeconfigAccess(ctx context.Context, clusterID string) (*Response, error)
UpgradeHA(ctx context.Context, clusterID string) (*Response, error)
ListNodePools(ctx context.Context, clusterID string) ([]K8sNodePool, *Response, error)
AddNodePool(ctx context.Context, clusterID string, req *AddK8sNodePoolRequest) (*K8sNodePool, *Response, error)
UpdateNodePool(ctx context.Context, clusterID, poolID string, req *UpdateK8sNodePoolRequest) (*K8sNodePool, *Response, error)
ScaleNodePool(ctx context.Context, clusterID, poolID string, nodeCount int) (*Response, error)
DeleteNodePool(ctx context.Context, clusterID, poolID string) (*Response, error)
ListNodes(ctx context.Context, clusterID string) ([]K8sClusterNode, *Response, error)
ListEvents(ctx context.Context, clusterID string) ([]K8sClusterEvent, *Response, error)
Upgrades(ctx context.Context, clusterID string) (*K8sUpgradeInfo, *Response, error)
Upgrade(ctx context.Context, clusterID string, versionID int, confirmSingleMaster bool) (*Response, error)
SetMaintenance(ctx context.Context, clusterID, mode string, day, startHour *int) (*Response, error)
ListVersions(ctx context.Context) ([]K8sVersion, *Response, error)
ListNodePlans(ctx context.Context) (*K8sNodePlans, *Response, error)
// WaitForStatus polls the cluster until it reaches the target status,
// the cluster enters failed/delete_failed, or ctx is done. Poll interval
// is 10 seconds. Returns the cluster in its final observed state.
WaitForStatus(ctx context.Context, clusterID string, target K8sClusterStatus) (*K8sCluster, error)
// WaitForDeleted polls until Get returns 404 or ctx is done.
WaitForDeleted(ctx context.Context, clusterID string) error
}
KubernetesService handles communication with the managed Kubernetes endpoints.
type KubernetesServiceOp ¶ added in v0.4.0
type KubernetesServiceOp struct {
// contains filtered or unexported fields
}
KubernetesServiceOp implements KubernetesService.
func (*KubernetesServiceOp) AddNodePool ¶ added in v0.4.0
func (s *KubernetesServiceOp) AddNodePool(ctx context.Context, clusterID string, req *AddK8sNodePoolRequest) (*K8sNodePool, *Response, error)
func (*KubernetesServiceOp) Create ¶ added in v0.4.0
func (s *KubernetesServiceOp) Create(ctx context.Context, req *CreateK8sClusterRequest, idempotencyKey string) (*K8sCluster, *Response, error)
func (*KubernetesServiceOp) DeleteNodePool ¶ added in v0.4.0
func (*KubernetesServiceOp) Get ¶ added in v0.4.0
func (s *KubernetesServiceOp) Get(ctx context.Context, clusterID string) (*K8sCluster, *Response, error)
func (*KubernetesServiceOp) Kubeconfig ¶ added in v0.4.0
func (s *KubernetesServiceOp) Kubeconfig(ctx context.Context, clusterID string) (*K8sKubeconfig, *Response, error)
func (*KubernetesServiceOp) KubeconfigWithTTL ¶ added in v0.5.0
func (s *KubernetesServiceOp) KubeconfigWithTTL(ctx context.Context, clusterID string, ttlSeconds int) (*K8sKubeconfig, *Response, error)
KubeconfigWithTTL returns a SHORT-LIVED kubeconfig: a bound token with the given time-to-live (10 minutes to 30 days). It expires on its own; RotateKubeconfigAccess invalidates all previously issued ones at once.
func (*KubernetesServiceOp) List ¶ added in v0.4.0
func (s *KubernetesServiceOp) List(ctx context.Context, opts *K8sClusterListOptions) ([]K8sCluster, *Response, error)
func (*KubernetesServiceOp) ListEvents ¶ added in v0.4.0
func (s *KubernetesServiceOp) ListEvents(ctx context.Context, clusterID string) ([]K8sClusterEvent, *Response, error)
func (*KubernetesServiceOp) ListNodePlans ¶ added in v0.4.0
func (s *KubernetesServiceOp) ListNodePlans(ctx context.Context) (*K8sNodePlans, *Response, error)
func (*KubernetesServiceOp) ListNodePools ¶ added in v0.4.0
func (s *KubernetesServiceOp) ListNodePools(ctx context.Context, clusterID string) ([]K8sNodePool, *Response, error)
func (*KubernetesServiceOp) ListNodes ¶ added in v0.4.0
func (s *KubernetesServiceOp) ListNodes(ctx context.Context, clusterID string) ([]K8sClusterNode, *Response, error)
func (*KubernetesServiceOp) ListVersions ¶ added in v0.4.0
func (s *KubernetesServiceOp) ListVersions(ctx context.Context) ([]K8sVersion, *Response, error)
func (*KubernetesServiceOp) RotateKubeconfigAccess ¶ added in v0.5.0
func (s *KubernetesServiceOp) RotateKubeconfigAccess(ctx context.Context, clusterID string) (*Response, error)
RotateKubeconfigAccess invalidates every previously issued short-lived kubeconfig for the cluster, immediately. The admin kubeconfig is unaffected.
func (*KubernetesServiceOp) ScaleNodePool ¶ added in v0.4.0
func (*KubernetesServiceOp) SetMaintenance ¶ added in v0.4.0
func (s *KubernetesServiceOp) SetMaintenance(ctx context.Context, clusterID, mode string, day, startHour *int) (*Response, error)
SetMaintenance sets the upgrade mode (manual, auto_patch, auto_minor) and optionally the weekly 4-hour maintenance window.
func (*KubernetesServiceOp) UpdateNodePool ¶ added in v0.4.0
func (s *KubernetesServiceOp) UpdateNodePool(ctx context.Context, clusterID, poolID string, req *UpdateK8sNodePoolRequest) (*K8sNodePool, *Response, error)
func (*KubernetesServiceOp) Upgrade ¶ added in v0.4.0
func (s *KubernetesServiceOp) Upgrade(ctx context.Context, clusterID string, versionID int, confirmSingleMaster bool) (*Response, error)
Upgrade starts an in-place Kubernetes version upgrade. confirmSingleMaster must be true on non-HA clusters (brief API interruption).
func (*KubernetesServiceOp) Upgrades ¶ added in v0.4.0
func (s *KubernetesServiceOp) Upgrades(ctx context.Context, clusterID string) (*K8sUpgradeInfo, *Response, error)
Upgrades lists the versions a cluster can upgrade to plus its upgrade state.
func (*KubernetesServiceOp) WaitForDeleted ¶ added in v0.4.0
func (s *KubernetesServiceOp) WaitForDeleted(ctx context.Context, clusterID string) error
func (*KubernetesServiceOp) WaitForStatus ¶ added in v0.4.0
func (s *KubernetesServiceOp) WaitForStatus(ctx context.Context, clusterID string, target K8sClusterStatus) (*K8sCluster, error)
type ListVMNetworksOptions ¶
type ListVMNetworksOptions = spec.ListVMNetworksParams
ListVMNetworksOptions are the optional filters for listing VM networks.
type MemberListOptions ¶ added in v0.2.0
type MemberListOptions = spec.ListMembersParams
MemberListOptions are the query parameters for listing account members.
type MemberService ¶ added in v0.2.0
type MemberService interface {
List(ctx context.Context, opts *MemberListOptions) ([]Member, *Response, error)
Get(ctx context.Context, memberID string) (*Member, *Response, error)
Add(ctx context.Context, req *AddMemberRequest) (*Member, *Response, error)
Update(ctx context.Context, memberID string, req *UpdateMemberRequest) (*Member, *Response, error)
Remove(ctx context.Context, memberID string) (*Response, error)
}
MemberService handles communication with the account-level member endpoints.
type MemberServiceOp ¶ added in v0.2.0
type MemberServiceOp struct {
// contains filtered or unexported fields
}
MemberServiceOp implements MemberService.
func (*MemberServiceOp) Add ¶ added in v0.2.0
func (s *MemberServiceOp) Add(ctx context.Context, req *AddMemberRequest) (*Member, *Response, error)
func (*MemberServiceOp) List ¶ added in v0.2.0
func (s *MemberServiceOp) List(ctx context.Context, opts *MemberListOptions) ([]Member, *Response, error)
func (*MemberServiceOp) Update ¶ added in v0.2.0
func (s *MemberServiceOp) Update(ctx context.Context, memberID string, req *UpdateMemberRequest) (*Member, *Response, error)
type MetadataService ¶ added in v0.3.0
type MetadataService interface {
ListRegions(ctx context.Context) ([]Region, *Response, error)
ListTemplates(ctx context.Context, opts *TemplateListOptions) ([]Template, *Response, error)
}
MetadataService exposes read-only catalog endpoints (templates, regions) that don't fit any one resource. They power VM/volume creation flows and the public docs.
type MetadataServiceOp ¶ added in v0.3.0
type MetadataServiceOp struct {
// contains filtered or unexported fields
}
MetadataServiceOp implements MetadataService.
func (*MetadataServiceOp) ListRegions ¶ added in v0.3.0
func (*MetadataServiceOp) ListTemplates ¶ added in v0.3.0
func (s *MetadataServiceOp) ListTemplates(ctx context.Context, opts *TemplateListOptions) ([]Template, *Response, error)
type Permission ¶ added in v0.2.0
type Permission = spec.Permission
Permission represents a single permission identifier (e.g. "vm.create") along with its description and applicable scope.
type PermissionListOptions ¶ added in v0.2.0
type PermissionListOptions = spec.ListPermissionsParams
PermissionListOptions are the query parameters for listing permissions.
type PermissionService ¶ added in v0.2.0
type PermissionService interface {
List(ctx context.Context, opts *PermissionListOptions) ([]Permission, *Response, error)
}
PermissionService handles communication with the permissions catalog endpoint. Permissions themselves are read-only — they're built into the platform; only roles bind a set of permissions to members.
type PermissionServiceOp ¶ added in v0.2.0
type PermissionServiceOp struct {
// contains filtered or unexported fields
}
PermissionServiceOp implements PermissionService.
func (*PermissionServiceOp) List ¶ added in v0.2.0
func (s *PermissionServiceOp) List(ctx context.Context, opts *PermissionListOptions) ([]Permission, *Response, error)
type PricingService ¶ added in v0.3.0
type PricingService interface {
ListVM(ctx context.Context, opts *VMPricingListOptions) ([]VMPricingPlan, *Response, error)
ListVolume(ctx context.Context, opts *VolumePricingListOptions) (*StoragePricing, *Response, error)
ListBackup(ctx context.Context, opts *BackupPricingListOptions) (*StoragePricing, *Response, error)
ListSnapshot(ctx context.Context, opts *SnapshotPricingListOptions) (*StoragePricing, *Response, error)
ListIP(ctx context.Context) (*IPPricing, *Response, error)
}
PricingService exposes the public pricing catalog. All endpoints are read-only and do not require an API key — they back the marketing pricing pages and `vm create` size pickers.
type PricingServiceOp ¶ added in v0.3.0
type PricingServiceOp struct {
// contains filtered or unexported fields
}
PricingServiceOp implements PricingService.
func (*PricingServiceOp) ListBackup ¶ added in v0.3.0
func (s *PricingServiceOp) ListBackup(ctx context.Context, opts *BackupPricingListOptions) (*StoragePricing, *Response, error)
func (*PricingServiceOp) ListSnapshot ¶ added in v0.3.0
func (s *PricingServiceOp) ListSnapshot(ctx context.Context, opts *SnapshotPricingListOptions) (*StoragePricing, *Response, error)
func (*PricingServiceOp) ListVM ¶ added in v0.3.0
func (s *PricingServiceOp) ListVM(ctx context.Context, opts *VMPricingListOptions) ([]VMPricingPlan, *Response, error)
func (*PricingServiceOp) ListVolume ¶ added in v0.3.0
func (s *PricingServiceOp) ListVolume(ctx context.Context, opts *VolumePricingListOptions) (*StoragePricing, *Response, error)
type Project ¶
Project represents a Raff project. Aliased to the generated spec type so new fields propagate automatically when the OpenAPI spec changes.
type ProjectListOptions ¶
type ProjectListOptions = spec.ListProjectsParams
ProjectListOptions are the query parameters for listing projects.
type ProjectMember ¶ added in v0.2.0
type ProjectMember = spec.ProjectMember
ProjectMember represents a project-level member.
type ProjectMemberListOptions ¶ added in v0.2.0
type ProjectMemberListOptions = spec.ListProjectMembersParams
ProjectMemberListOptions are the query parameters for listing project members.
type ProjectMemberService ¶ added in v0.2.0
type ProjectMemberService interface {
List(ctx context.Context, projectID string, opts *ProjectMemberListOptions) ([]ProjectMember, *Response, error)
Get(ctx context.Context, projectID, memberID string) (*ProjectMember, *Response, error)
Add(ctx context.Context, projectID string, req *AddProjectMemberRequest) (*ProjectMember, *Response, error)
Update(ctx context.Context, projectID, memberID string, req *UpdateProjectMemberRequest) (*ProjectMember, *Response, error)
Remove(ctx context.Context, projectID, memberID string) (*Response, error)
}
ProjectMemberService handles communication with the project member endpoints.
All operations require a project ID — these are project-scoped, not account-scoped.
type ProjectMemberServiceOp ¶ added in v0.2.0
type ProjectMemberServiceOp struct {
// contains filtered or unexported fields
}
ProjectMemberServiceOp implements ProjectMemberService.
func (*ProjectMemberServiceOp) Add ¶ added in v0.2.0
func (s *ProjectMemberServiceOp) Add(ctx context.Context, projectID string, req *AddProjectMemberRequest) (*ProjectMember, *Response, error)
func (*ProjectMemberServiceOp) Get ¶ added in v0.2.0
func (s *ProjectMemberServiceOp) Get(ctx context.Context, projectID, memberID string) (*ProjectMember, *Response, error)
func (*ProjectMemberServiceOp) List ¶ added in v0.2.0
func (s *ProjectMemberServiceOp) List(ctx context.Context, projectID string, opts *ProjectMemberListOptions) ([]ProjectMember, *Response, error)
func (*ProjectMemberServiceOp) Update ¶ added in v0.2.0
func (s *ProjectMemberServiceOp) Update(ctx context.Context, projectID, memberID string, req *UpdateProjectMemberRequest) (*ProjectMember, *Response, error)
type ProjectService ¶
type ProjectService interface {
List(ctx context.Context, opts *ProjectListOptions) ([]Project, *Response, error)
Get(ctx context.Context, projectID string) (*Project, *Response, error)
Create(ctx context.Context, req *CreateProjectRequest) (*Project, *Response, error)
Update(ctx context.Context, projectID string, req *UpdateProjectRequest) (*Project, *Response, error)
Delete(ctx context.Context, projectID string) (*Response, error)
}
ProjectService handles communication with the project endpoints.
type ProjectServiceOp ¶
type ProjectServiceOp struct {
// contains filtered or unexported fields
}
ProjectServiceOp implements ProjectService.
func (*ProjectServiceOp) Create ¶
func (s *ProjectServiceOp) Create(ctx context.Context, req *CreateProjectRequest) (*Project, *Response, error)
Create creates a new project.
func (*ProjectServiceOp) List ¶
func (s *ProjectServiceOp) List(ctx context.Context, opts *ProjectListOptions) ([]Project, *Response, error)
List returns all projects for the authenticated account.
func (*ProjectServiceOp) Update ¶
func (s *ProjectServiceOp) Update(ctx context.Context, projectID string, req *UpdateProjectRequest) (*Project, *Response, error)
Update updates an existing project.
type ReinstallVMRequest ¶
type ReinstallVMRequest = spec.ReinstallVMRequest
ReinstallVMRequest is the request body for reinstalling a VM.
type RenameSnapshotRequest ¶ added in v0.3.0
type RenameSnapshotRequest = spec.RenameSnapshotRequest
RenameSnapshotRequest is the request body for renaming a snapshot.
type RenameVMRequest ¶
type RenameVMRequest = spec.RenameVMRequest
RenameVMRequest is the request body for renaming a VM.
type ReserveIPRequest ¶
type ReserveIPRequest = spec.ReserveIPRequest
ReserveIPRequest is the request body for reserving a floating IP.
type ResizeResponse ¶
type ResizeResponse = spec.ResizeResponse
ResizeResponse is the response from a resize operation, including billing.
type ResizeVMDiskRequest ¶
type ResizeVMDiskRequest = spec.ResizeVMDiskRequest
ResizeVMDiskRequest is the request body for resizing a VM's disk.
type ResizeVMRequest ¶
type ResizeVMRequest = spec.ResizeVMRequest
ResizeVMRequest is the request body for resizing a VM.
type ResizeVolumeRequest ¶ added in v0.3.0
type ResizeVolumeRequest = spec.ResizeVolumeRequest
ResizeVolumeRequest is the request body for resizing a volume.
type Response ¶
Response wraps the underlying http.Response for callers that need access to status codes, headers, or pagination metadata.
type RoleListOptions ¶ added in v0.2.0
type RoleListOptions = spec.ListRolesParams
RoleListOptions are the query parameters for listing roles.
type RoleService ¶ added in v0.2.0
type RoleService interface {
List(ctx context.Context, opts *RoleListOptions) ([]Role, *Response, error)
Get(ctx context.Context, roleID string) (*Role, *Response, error)
Create(ctx context.Context, req *CreateRoleRequest) (*Role, *Response, error)
Update(ctx context.Context, roleID string, req *UpdateRoleRequest) (*Role, *Response, error)
Delete(ctx context.Context, roleID string) (*Response, error)
}
RoleService handles communication with the role endpoints.
System roles (Owner, Admin, Member, etc.) are immutable and cannot be updated or deleted; the Update / Delete methods will return an error from the API for system roles.
type RoleServiceOp ¶ added in v0.2.0
type RoleServiceOp struct {
// contains filtered or unexported fields
}
RoleServiceOp implements RoleService.
func (*RoleServiceOp) Create ¶ added in v0.2.0
func (s *RoleServiceOp) Create(ctx context.Context, req *CreateRoleRequest) (*Role, *Response, error)
func (*RoleServiceOp) List ¶ added in v0.2.0
func (s *RoleServiceOp) List(ctx context.Context, opts *RoleListOptions) ([]Role, *Response, error)
func (*RoleServiceOp) Update ¶ added in v0.2.0
func (s *RoleServiceOp) Update(ctx context.Context, roleID string, req *UpdateRoleRequest) (*Role, *Response, error)
type RollbackAppServiceRequest ¶ added in v0.4.1
type RollbackAppServiceRequest struct {
TargetDeploymentID string `json:"target_deployment_id"`
}
RollbackAppServiceRequest pins a service back to an older deployment's image.
type SSHKeyService ¶ added in v0.2.0
type SSHKeyService interface {
List(ctx context.Context) ([]SSHKey, *Response, error)
Get(ctx context.Context, keyID string) (*SSHKey, *Response, error)
Create(ctx context.Context, req *CreateSSHKeyRequest) (*SSHKey, *Response, error)
Update(ctx context.Context, keyID string, req *UpdateSSHKeyRequest) (*SSHKey, *Response, error)
Delete(ctx context.Context, keyID string) (*Response, error)
}
SSHKeyService handles communication with the SSH key endpoints.
SSH keys are scoped to the account, not to a project — list returns every key the API key's account can see.
type SSHKeyServiceOp ¶ added in v0.2.0
type SSHKeyServiceOp struct {
// contains filtered or unexported fields
}
SSHKeyServiceOp implements SSHKeyService.
func (*SSHKeyServiceOp) Create ¶ added in v0.2.0
func (s *SSHKeyServiceOp) Create(ctx context.Context, req *CreateSSHKeyRequest) (*SSHKey, *Response, error)
func (*SSHKeyServiceOp) Update ¶ added in v0.2.0
func (s *SSHKeyServiceOp) Update(ctx context.Context, keyID string, req *UpdateSSHKeyRequest) (*SSHKey, *Response, error)
type SaveImageRequest ¶
type SaveImageRequest = spec.SaveImageRequest
SaveImageRequest is the request body for saving a VM disk as a custom image.
type ScaleAppServiceRequest ¶ added in v0.4.1
type ScaleAppServiceRequest struct {
Replicas int `json:"replicas,omitempty"`
AutoscalingSet bool `json:"autoscaling_set,omitempty"`
Autoscaling bool `json:"autoscaling_enabled,omitempty"`
MinReplicas int `json:"min_replicas,omitempty"`
MaxReplicas int `json:"max_replicas,omitempty"`
AutoscalingMetric string `json:"autoscaling_metric,omitempty"`
AutoscalingTarget int `json:"autoscaling_target,omitempty"`
ScaleToZero bool `json:"scale_to_zero,omitempty"`
}
ScaleAppServiceRequest updates replicas / autoscaling / scale-to-zero.
type SecurityGroup ¶
type SecurityGroup = spec.SecurityGroup
SecurityGroup represents a named set of network rules.
type SecurityGroupListOptions ¶
type SecurityGroupListOptions = spec.ListSecurityGroupsParams
SecurityGroupListOptions are query params for listing security groups.
type SecurityGroupRule ¶
type SecurityGroupRule = spec.SecurityGroupRule
SecurityGroupRule is a single inbound or outbound rule.
type SecurityGroupService ¶
type SecurityGroupService interface {
List(ctx context.Context, opts *SecurityGroupListOptions) ([]SecurityGroup, *Response, error)
Templates(ctx context.Context) ([]SecurityGroupTemplate, *Response, error)
Get(ctx context.Context, sgID string) (*SecurityGroup, *Response, error)
Create(ctx context.Context, req *CreateSecurityGroupRequest) (*SecurityGroup, *Response, error)
Update(ctx context.Context, sgID string, req *UpdateSecurityGroupRequest) (*SecurityGroup, *Response, error)
Delete(ctx context.Context, sgID string) (*Response, error)
}
SecurityGroupService handles communication with the security group endpoints.
type SecurityGroupServiceOp ¶
type SecurityGroupServiceOp struct {
// contains filtered or unexported fields
}
SecurityGroupServiceOp implements SecurityGroupService.
func (*SecurityGroupServiceOp) Create ¶
func (s *SecurityGroupServiceOp) Create(ctx context.Context, req *CreateSecurityGroupRequest) (*SecurityGroup, *Response, error)
func (*SecurityGroupServiceOp) Get ¶
func (s *SecurityGroupServiceOp) Get(ctx context.Context, sgID string) (*SecurityGroup, *Response, error)
func (*SecurityGroupServiceOp) List ¶
func (s *SecurityGroupServiceOp) List(ctx context.Context, opts *SecurityGroupListOptions) ([]SecurityGroup, *Response, error)
func (*SecurityGroupServiceOp) Templates ¶
func (s *SecurityGroupServiceOp) Templates(ctx context.Context) ([]SecurityGroupTemplate, *Response, error)
func (*SecurityGroupServiceOp) Update ¶
func (s *SecurityGroupServiceOp) Update(ctx context.Context, sgID string, req *UpdateSecurityGroupRequest) (*SecurityGroup, *Response, error)
type SecurityGroupTemplate ¶
type SecurityGroupTemplate = spec.SecurityGroupTemplate
SecurityGroupTemplate is a pre-built rule set you can clone when creating a group.
type SetAppEnvVarRequest ¶ added in v0.4.1
type SetAppEnvVarRequest struct {
Key string `json:"key"`
Value string `json:"value"`
IsSecret bool `json:"is_secret,omitempty"`
Redeploy *bool `json:"redeploy,omitempty"`
}
SetAppEnvVarRequest sets one environment variable. Redeploy defaults to true (nil) — env changes roll out to running replicas.
type SetFunctionEnvVarRequest ¶ added in v0.4.1
type SetFunctionEnvVarRequest struct {
Key string `json:"key"`
Value string `json:"value"`
IsSecret bool `json:"is_secret,omitempty"`
}
SetFunctionEnvVarRequest sets one environment variable.
type Snapshot ¶ added in v0.3.0
Snapshot represents a point-in-time snapshot of a VM disk or volume.
type SnapshotListOptions ¶ added in v0.3.0
type SnapshotListOptions = spec.ListSnapshotsParams
SnapshotListOptions are the query parameters for listing snapshots.
type SnapshotPricingListOptions ¶ added in v0.3.0
type SnapshotPricingListOptions = spec.ListSnapshotPricingParams
SnapshotPricingListOptions filters snapshot pricing by region.
type SnapshotService ¶ added in v0.3.0
type SnapshotService interface {
List(ctx context.Context, opts *SnapshotListOptions) ([]Snapshot, *Response, error)
Get(ctx context.Context, snapshotID int) (*Snapshot, *Response, error)
Create(ctx context.Context, req *CreateSnapshotRequest) (*Snapshot, *Response, error)
Rename(ctx context.Context, snapshotID int, req *RenameSnapshotRequest) (*Snapshot, *Response, error)
Restore(ctx context.Context, snapshotID int) (*Response, error)
Delete(ctx context.Context, snapshotID int) (*Response, error)
}
SnapshotService handles communication with the snapshot endpoints.
type SnapshotServiceOp ¶ added in v0.3.0
type SnapshotServiceOp struct {
// contains filtered or unexported fields
}
SnapshotServiceOp implements SnapshotService.
func (*SnapshotServiceOp) Create ¶ added in v0.3.0
func (s *SnapshotServiceOp) Create(ctx context.Context, req *CreateSnapshotRequest) (*Snapshot, *Response, error)
func (*SnapshotServiceOp) List ¶ added in v0.3.0
func (s *SnapshotServiceOp) List(ctx context.Context, opts *SnapshotListOptions) ([]Snapshot, *Response, error)
func (*SnapshotServiceOp) Rename ¶ added in v0.3.0
func (s *SnapshotServiceOp) Rename(ctx context.Context, snapshotID int, req *RenameSnapshotRequest) (*Snapshot, *Response, error)
type SourceFile ¶ added in v0.4.1
SourceFile is one source file (input or converted output).
type StoragePricing ¶ added in v0.3.0
type StoragePricing = spec.StoragePricing
StoragePricing is the per-GB storage pricing shape used by volume, backup, and snapshot pricing endpoints.
type TemplateListOptions ¶ added in v0.3.0
type TemplateListOptions = spec.ListTemplatesParams
TemplateListOptions are the query parameters for filtering templates.
type UpdateAPIKeyRequest ¶ added in v0.2.0
type UpdateAPIKeyRequest = spec.UpdateAPIKeyRequest
UpdateAPIKeyRequest is the request body for updating an API key.
type UpdateAppSpendSettingsRequest ¶ added in v0.4.1
type UpdateAppSpendSettingsRequest struct {
Enabled bool `json:"enabled"`
MonthlyCapUSD float64 `json:"monthly_cap_usd"`
CapAction string `json:"cap_action,omitempty"`
}
UpdateAppSpendSettingsRequest saves the account's Apps spend cap.
type UpdateBackupScheduleRequest ¶ added in v0.3.0
type UpdateBackupScheduleRequest = spec.UpdateBackupScheduleRequest
UpdateBackupScheduleRequest is the request body for updating a schedule.
type UpdateFunctionRequest ¶ added in v0.4.1
type UpdateFunctionRequest struct {
Description *string `json:"description,omitempty"`
MemoryMB *int `json:"memory_mb,omitempty"`
TimeoutSeconds *int `json:"timeout_seconds,omitempty"`
ExtendedTimeout *bool `json:"extended_timeout,omitempty"`
MinScale *int `json:"min_scale,omitempty"`
MaxScale *int `json:"max_scale,omitempty"`
}
UpdateFunctionRequest partially updates runtime settings (nil = keep). Live functions roll changes out as a zero-downtime config redeploy.
type UpdateK8sNodePoolRequest ¶ added in v0.4.0
type UpdateK8sNodePoolRequest = spec.UpdateK8SNodePoolJSONRequestBody
UpdateK8sNodePoolRequest is the request body for updating a node pool.
type UpdateMemberRequest ¶ added in v0.2.0
type UpdateMemberRequest = spec.UpdateMemberRequest
UpdateMemberRequest is the request body for updating a member's role/status.
type UpdateProjectMemberRequest ¶ added in v0.2.0
type UpdateProjectMemberRequest = spec.UpdateMemberRequest
UpdateProjectMemberRequest is the request body for updating a project member. The spec reuses UpdateMemberRequest for both account and project member updates — same fields (role, status).
type UpdateProjectRequest ¶
type UpdateProjectRequest = spec.UpdateProjectRequest
UpdateProjectRequest is the request body for updating a project.
type UpdateRoleRequest ¶ added in v0.2.0
type UpdateRoleRequest = spec.UpdateRoleRequest
UpdateRoleRequest is the request body for updating a custom role.
type UpdateSSHKeyRequest ¶ added in v0.2.0
type UpdateSSHKeyRequest = spec.UpdateSSHKeyRequest
UpdateSSHKeyRequest is the request body for renaming an SSH key.
type UpdateSecurityGroupRequest ¶
type UpdateSecurityGroupRequest = spec.UpdateSecurityGroupRequest
UpdateSecurityGroupRequest is the request body for updating a security group.
type UpdateVMTagRequest ¶
type UpdateVMTagRequest = spec.UpdateVMTagRequest
UpdateVMTagRequest is the request body for updating a tag.
type UpdateVPCRequest ¶
type UpdateVPCRequest = spec.UpdateVPCRequest
UpdateVPCRequest is the request body for updating a VPC.
type UpsertVMNoteRequest ¶
type UpsertVMNoteRequest = spec.UpsertVMNoteRequest
UpsertVMNoteRequest is the request body for creating or updating a note.
type VM ¶
VM represents a virtual machine. Aliased to the generated spec type so new fields propagate automatically when the OpenAPI spec changes.
type VMListOptions ¶
type VMListOptions = spec.ListVMsParams
VMListOptions are the query parameters for listing VMs.
type VMNetworkType ¶
type VMNetworkType = spec.ListVMNetworksParamsType
VMNetworkType is "public", "vpc", or "ipv6", used by ListVMNetworksOptions.Type.
type VMNoteType ¶
type VMNoteType = spec.UpsertVMNoteParamsType
VMNoteType is "personal" or "account".
type VMNotesFilterType ¶
type VMNotesFilterType = spec.GetVMNotesParamsType
VMNotesFilterType is "personal" or "account" used by GetVMNotesOptions.Type.
type VMNotesResponse ¶
type VMNotesResponse = spec.VMNotesResponse
VMNotesResponse holds personal and account notes for a VM.
type VMPricingListOptions ¶ added in v0.3.0
type VMPricingListOptions = spec.ListVMPricingParams
VMPricingListOptions filters VM pricing by region / type.
type VMPricingPlan ¶ added in v0.3.0
type VMPricingPlan = spec.VMPricingPlan
VMPricingPlan represents a single VM size/plan with pricing.
type VMService ¶
type VMService interface {
List(ctx context.Context, opts *VMListOptions) ([]VM, *Response, error)
Get(ctx context.Context, vmID string) (*VM, *Response, error)
Create(ctx context.Context, req *CreateVMRequest) (*VM, *Response, error)
Delete(ctx context.Context, vmID string, req *DeleteVMRequest) (*Response, error)
BulkDelete(ctx context.Context, req *BulkDeleteVMsRequest) (*BulkDeleteVMsResult, *Response, error)
Start(ctx context.Context, vmID string) (*Response, error)
Stop(ctx context.Context, vmID string) (*Response, error)
Reboot(ctx context.Context, vmID string) (*Response, error)
Rename(ctx context.Context, vmID string, req *RenameVMRequest) (*Response, error)
ResetPassword(ctx context.Context, vmID string) (*Response, error)
Reinstall(ctx context.Context, vmID string, req *ReinstallVMRequest) (*Response, error)
FactoryReset(ctx context.Context, vmID string) (*Response, error)
Resize(ctx context.Context, vmID string, req *ResizeVMRequest) (*ResizeResponse, *Response, error)
ResizeDisk(ctx context.Context, vmID string, req *ResizeVMDiskRequest) (*ResizeResponse, *Response, error)
HardReboot(ctx context.Context, vmID string) (*Response, error)
SaveImage(ctx context.Context, vmID string, req *SaveImageRequest) (*VMImage, *Response, error)
ListNetworks(ctx context.Context, vmID string, opts *ListVMNetworksOptions) ([]VMNetwork, *Response, error)
AttachVPC(ctx context.Context, vmID string, req *AttachVPCRequest) (*Response, error)
DetachVPC(ctx context.Context, vmID string, nicID int) (*Response, error)
AttachIP(ctx context.Context, vmID string, req *AttachIPRequest) (*AttachIPResponse, *Response, error)
DetachIP(ctx context.Context, vmID string, nicID int) (*Response, error)
AttachSecurityGroup(ctx context.Context, vmID string, req *AttachSecurityGroupRequest) (*Response, error)
DetachSecurityGroup(ctx context.Context, vmID, securityGroupID string, nicID int) (*Response, error)
AddTag(ctx context.Context, vmID string, req *AddVMTagRequest) ([]VMTag, *Response, error)
UpdateTag(ctx context.Context, vmID, tagID string, req *UpdateVMTagRequest) ([]VMTag, *Response, error)
RemoveTag(ctx context.Context, vmID, tagID string) ([]VMTag, *Response, error)
GetNotes(ctx context.Context, vmID string, opts *GetVMNotesOptions) (*VMNotesResponse, *Response, error)
UpsertNote(ctx context.Context, vmID string, noteType VMNoteType, req *UpsertVMNoteRequest) (*VMNote, *Response, error)
UpdateNote(ctx context.Context, vmID string, noteType VMNoteType, req *UpsertVMNoteRequest) (*VMNote, *Response, error)
AppendNote(ctx context.Context, vmID string, noteType VMNoteType, req *UpsertVMNoteRequest) (*VMNote, *Response, error)
}
VMService handles communication with the VM endpoints.
type VMServiceOp ¶
type VMServiceOp struct {
// contains filtered or unexported fields
}
VMServiceOp implements VMService.
func (*VMServiceOp) AddTag ¶
func (s *VMServiceOp) AddTag(ctx context.Context, vmID string, req *AddVMTagRequest) ([]VMTag, *Response, error)
func (*VMServiceOp) AppendNote ¶
func (s *VMServiceOp) AppendNote(ctx context.Context, vmID string, noteType VMNoteType, req *UpsertVMNoteRequest) (*VMNote, *Response, error)
func (*VMServiceOp) AttachIP ¶
func (s *VMServiceOp) AttachIP(ctx context.Context, vmID string, req *AttachIPRequest) (*AttachIPResponse, *Response, error)
func (*VMServiceOp) AttachSecurityGroup ¶
func (s *VMServiceOp) AttachSecurityGroup(ctx context.Context, vmID string, req *AttachSecurityGroupRequest) (*Response, error)
func (*VMServiceOp) AttachVPC ¶
func (s *VMServiceOp) AttachVPC(ctx context.Context, vmID string, req *AttachVPCRequest) (*Response, error)
func (*VMServiceOp) BulkDelete ¶
func (s *VMServiceOp) BulkDelete(ctx context.Context, req *BulkDeleteVMsRequest) (*BulkDeleteVMsResult, *Response, error)
func (*VMServiceOp) Create ¶
func (s *VMServiceOp) Create(ctx context.Context, req *CreateVMRequest) (*VM, *Response, error)
func (*VMServiceOp) Delete ¶
func (s *VMServiceOp) Delete(ctx context.Context, vmID string, req *DeleteVMRequest) (*Response, error)
func (*VMServiceOp) DetachSecurityGroup ¶
func (*VMServiceOp) FactoryReset ¶
func (*VMServiceOp) GetNotes ¶
func (s *VMServiceOp) GetNotes(ctx context.Context, vmID string, opts *GetVMNotesOptions) (*VMNotesResponse, *Response, error)
func (*VMServiceOp) HardReboot ¶
func (*VMServiceOp) List ¶
func (s *VMServiceOp) List(ctx context.Context, opts *VMListOptions) ([]VM, *Response, error)
func (*VMServiceOp) ListNetworks ¶
func (s *VMServiceOp) ListNetworks(ctx context.Context, vmID string, opts *ListVMNetworksOptions) ([]VMNetwork, *Response, error)
func (*VMServiceOp) Reinstall ¶
func (s *VMServiceOp) Reinstall(ctx context.Context, vmID string, req *ReinstallVMRequest) (*Response, error)
func (*VMServiceOp) Rename ¶
func (s *VMServiceOp) Rename(ctx context.Context, vmID string, req *RenameVMRequest) (*Response, error)
func (*VMServiceOp) ResetPassword ¶
func (*VMServiceOp) Resize ¶
func (s *VMServiceOp) Resize(ctx context.Context, vmID string, req *ResizeVMRequest) (*ResizeResponse, *Response, error)
func (*VMServiceOp) ResizeDisk ¶
func (s *VMServiceOp) ResizeDisk(ctx context.Context, vmID string, req *ResizeVMDiskRequest) (*ResizeResponse, *Response, error)
func (*VMServiceOp) SaveImage ¶
func (s *VMServiceOp) SaveImage(ctx context.Context, vmID string, req *SaveImageRequest) (*VMImage, *Response, error)
func (*VMServiceOp) UpdateNote ¶
func (s *VMServiceOp) UpdateNote(ctx context.Context, vmID string, noteType VMNoteType, req *UpsertVMNoteRequest) (*VMNote, *Response, error)
func (*VMServiceOp) UpdateTag ¶
func (s *VMServiceOp) UpdateTag(ctx context.Context, vmID, tagID string, req *UpdateVMTagRequest) ([]VMTag, *Response, error)
func (*VMServiceOp) UpsertNote ¶
func (s *VMServiceOp) UpsertNote(ctx context.Context, vmID string, noteType VMNoteType, req *UpsertVMNoteRequest) (*VMNote, *Response, error)
type VMTagsResponse ¶
type VMTagsResponse = spec.VMTagsResponse
VMTagsResponse is the response shape for tag mutations — returns the full updated tag list for the VM.
type VPCDetail ¶
VPCDetail is the richer response returned by GET /api/v1/vpcs/{id}: the VPC plus its allocatable IP range and the active leases on attached NICs.
type VPCListOptions ¶
type VPCListOptions = spec.ListVPCsParams
VPCListOptions are the query parameters for listing VPCs.
type VPCService ¶
type VPCService interface {
List(ctx context.Context, opts *VPCListOptions) ([]VPC, *Response, error)
Get(ctx context.Context, vpcID string) (*VPC, *Response, error)
GetDetail(ctx context.Context, vpcID string) (*VPCDetail, *Response, error)
Create(ctx context.Context, req *CreateVPCRequest) (*VPC, *Response, error)
Update(ctx context.Context, vpcID string, req *UpdateVPCRequest) (*VPC, *Response, error)
Delete(ctx context.Context, vpcID string) (*Response, error)
CIDRSuggestions(ctx context.Context) (*CIDRSuggestionsResponse, *Response, error)
}
VPCService handles communication with the VPC endpoints.
type VPCServiceOp ¶
type VPCServiceOp struct {
// contains filtered or unexported fields
}
VPCServiceOp implements VPCService.
func (*VPCServiceOp) CIDRSuggestions ¶
func (s *VPCServiceOp) CIDRSuggestions(ctx context.Context) (*CIDRSuggestionsResponse, *Response, error)
func (*VPCServiceOp) Create ¶
func (s *VPCServiceOp) Create(ctx context.Context, req *CreateVPCRequest) (*VPC, *Response, error)
func (*VPCServiceOp) List ¶
func (s *VPCServiceOp) List(ctx context.Context, opts *VPCListOptions) ([]VPC, *Response, error)
func (*VPCServiceOp) Update ¶
func (s *VPCServiceOp) Update(ctx context.Context, vpcID string, req *UpdateVPCRequest) (*VPC, *Response, error)
type VolumeListOptions ¶ added in v0.3.0
type VolumeListOptions = spec.ListVolumesParams
VolumeListOptions are the query parameters for listing volumes.
type VolumePricingListOptions ¶ added in v0.3.0
type VolumePricingListOptions = spec.ListVolumePricingParams
VolumePricingListOptions filters volume pricing by region.
type VolumeService ¶ added in v0.3.0
type VolumeService interface {
List(ctx context.Context, opts *VolumeListOptions) ([]Volume, *Response, error)
Get(ctx context.Context, volumeID int) (*Volume, *Response, error)
Create(ctx context.Context, req *CreateVolumeRequest) (*Volume, *Response, error)
Delete(ctx context.Context, volumeID int) (*Response, error)
Resize(ctx context.Context, volumeID int, req *ResizeVolumeRequest) (*ResizeResponse, *Response, error)
Attach(ctx context.Context, volumeID int, req *AttachVolumeRequest) (*Volume, *Response, error)
Detach(ctx context.Context, volumeID int) (*Response, error)
}
VolumeService handles communication with the volume endpoints.
type VolumeServiceOp ¶ added in v0.3.0
type VolumeServiceOp struct {
// contains filtered or unexported fields
}
VolumeServiceOp implements VolumeService.
func (*VolumeServiceOp) Attach ¶ added in v0.3.0
func (s *VolumeServiceOp) Attach(ctx context.Context, volumeID int, req *AttachVolumeRequest) (*Volume, *Response, error)
func (*VolumeServiceOp) Create ¶ added in v0.3.0
func (s *VolumeServiceOp) Create(ctx context.Context, req *CreateVolumeRequest) (*Volume, *Response, error)
func (*VolumeServiceOp) List ¶ added in v0.3.0
func (s *VolumeServiceOp) List(ctx context.Context, opts *VolumeListOptions) ([]Volume, *Response, error)
func (*VolumeServiceOp) Resize ¶ added in v0.3.0
func (s *VolumeServiceOp) Resize(ctx context.Context, volumeID int, req *ResizeVolumeRequest) (*ResizeResponse, *Response, error)