Documentation
¶
Index ¶
- Constants
- type CostQuote
- type CostQuoteUpdate
- type CostQuoteUpdateAfter
- type CostQuoteUpdateAfterUsageDimension
- type CostQuoteUpdateBefore
- type CostQuoteUpdateBeforeUsageDimension
- type CostQuoteUpdateDiff
- type CostQuoteUpdateDiffUsageDimension
- type CostQuoteUpdateDiffUsageDimensionAfter
- type CostQuoteUpdateDiffUsageDimensionBefore
- type CostQuoteUsageDimension
- type Error
- type OrganizationBillingSummary
- type Pagination
- type RegionName
- type ResourceStatus
- type SandboxCluster
- type SandboxClusterDisableParamsRegion
- type SandboxClusterEnableParams
- type SandboxClusterEnableParamsRegion
- type SandboxClusterGetParamsRegion
- type SandboxClusterList
- type SandboxClusterListParams
- type SandboxClusterService
- func (r *SandboxClusterService) Disable(ctx context.Context, region SandboxClusterDisableParamsRegion, ...) (res *operations.Operation, err error)
- func (r *SandboxClusterService) Enable(ctx context.Context, region SandboxClusterEnableParamsRegion, ...) (res *operations.Operation, err error)
- func (r *SandboxClusterService) Get(ctx context.Context, region SandboxClusterGetParamsRegion, ...) (res *SandboxCluster, err error)
- func (r *SandboxClusterService) List(ctx context.Context, query SandboxClusterListParams, ...) (res *pagination.Cursor[SandboxCluster], err error)
- func (r *SandboxClusterService) ListAutoPaging(ctx context.Context, query SandboxClusterListParams, ...) *pagination.CursorAutoPager[SandboxCluster]
- type SourceIPRuleParam
- type SourceIPRuleResponse
- type VMMetricUnit
Constants ¶
const RegionNameUsSva2 = shared.RegionNameUsSva2
Equals "us-sva-2"
const RegionNameUsWdc1 = shared.RegionNameUsWdc1
Equals "us-wdc-1"
const ResourceStatusCreating = shared.ResourceStatusCreating
Equals "creating"
const ResourceStatusDeleted = shared.ResourceStatusDeleted
Equals "deleted"
const ResourceStatusDeleting = shared.ResourceStatusDeleting
Equals "deleting"
const ResourceStatusError = shared.ResourceStatusError
Equals "error"
const ResourceStatusPending = shared.ResourceStatusPending
Equals "pending"
const ResourceStatusReady = shared.ResourceStatusReady
Equals "ready"
const ResourceStatusUpdating = shared.ResourceStatusUpdating
Equals "updating"
const VMMetricUnitBytes = shared.VMMetricUnitBytes
Equals "bytes"
const VMMetricUnitBytesPerSecond = shared.VMMetricUnitBytesPerSecond
Equals "bytes_per_second"
const VMMetricUnitCores = shared.VMMetricUnitCores
Equals "cores"
const VMMetricUnitOperationsPerSecond = shared.VMMetricUnitOperationsPerSecond
Equals "operations_per_second"
const VMMetricUnitRatio = shared.VMMetricUnitRatio
Equals "ratio"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CostQuote ¶
Cost quote returned by POST /cost. current_summary and updated_summary hold the org billing summary now and with this resource; omitted when the caller cannot view billing.
This is an alias to an internal type.
type CostQuoteUpdate ¶
type CostQuoteUpdate = shared.CostQuoteUpdate
Cost quote returned by PATCH /:id/cost: current-state quote, post-update quote, and signed diff. current_summary and updated_summary omitted when the caller cannot view billing.
This is an alias to an internal type.
type CostQuoteUpdateAfter ¶
type CostQuoteUpdateAfter = shared.CostQuoteUpdateAfter
Quote for the proposed (post-update) resource state.
This is an alias to an internal type.
type CostQuoteUpdateAfterUsageDimension ¶
type CostQuoteUpdateAfterUsageDimension = shared.CostQuoteUpdateAfterUsageDimension
Priced row for a single usage dimension emitted by a resource.
This is an alias to an internal type.
type CostQuoteUpdateBefore ¶
type CostQuoteUpdateBefore = shared.CostQuoteUpdateBefore
Quote for the proposed (post-update) resource state.
This is an alias to an internal type.
type CostQuoteUpdateBeforeUsageDimension ¶
type CostQuoteUpdateBeforeUsageDimension = shared.CostQuoteUpdateBeforeUsageDimension
Priced row for a single usage dimension emitted by a resource.
This is an alias to an internal type.
type CostQuoteUpdateDiff ¶
type CostQuoteUpdateDiff = shared.CostQuoteUpdateDiff
Per-dimension and total deltas: after minus before.
This is an alias to an internal type.
type CostQuoteUpdateDiffUsageDimension ¶
type CostQuoteUpdateDiffUsageDimension = shared.CostQuoteUpdateDiffUsageDimension
Per-dimension diff entry. Both before and after are always present.
This is an alias to an internal type.
type CostQuoteUpdateDiffUsageDimensionAfter ¶
type CostQuoteUpdateDiffUsageDimensionAfter = shared.CostQuoteUpdateDiffUsageDimensionAfter
Priced row after the update. Always present.
This is an alias to an internal type.
type CostQuoteUpdateDiffUsageDimensionBefore ¶
type CostQuoteUpdateDiffUsageDimensionBefore = shared.CostQuoteUpdateDiffUsageDimensionBefore
Priced row after the update. Always present.
This is an alias to an internal type.
type CostQuoteUsageDimension ¶
type CostQuoteUsageDimension = shared.CostQuoteUsageDimension
Priced row for a single usage dimension emitted by a resource.
This is an alias to an internal type.
type OrganizationBillingSummary ¶
type OrganizationBillingSummary = shared.OrganizationBillingSummary
Forward-looking billing summary for an organization. All costs are run-rate projections from the organization's current active usage ("≈ $X/mo at current usage").
This is an alias to an internal type.
type Pagination ¶
type Pagination = shared.Pagination
Pagination response details.
This is an alias to an internal type.
type RegionName ¶
type RegionName = shared.RegionName
Region the resource is in.
This is an alias to an internal type.
type ResourceStatus ¶
type ResourceStatus = shared.ResourceStatus
Status of the resource.
This is an alias to an internal type.
type SandboxCluster ¶
type SandboxCluster struct {
// Unique identifier for the Sandbox Cluster.
ID string `json:"id" api:"required"`
// Hostname the Sandbox Cluster's sandbox API is served on, over HTTPS. Null until
// it is assigned.
APIHostname string `json:"api_hostname" api:"required"`
// When the Sandbox Cluster was created.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Hostname sandboxes' endpoints are served on, over HTTPS. Null until it is
// assigned.
GatewayHostname string `json:"gateway_hostname" api:"required"`
// Instance type of the nodes the sandboxes run on.
InstanceType string `json:"instance_type" api:"required"`
// Number of nodes the sandboxes run on.
NodeCount int64 `json:"node_count" api:"required"`
// ID of the project that holds the Sandbox Cluster's infrastructure.
ProjectID string `json:"project_id" api:"required"`
// Public IP address sandbox traffic reaches the Sandbox Cluster on. Null until it
// is assigned.
PublicIP string `json:"public_ip" api:"required"`
// Region the resource is in.
//
// Any of "us-sva-2", "us-wdc-1".
Region shared.RegionName `json:"region" api:"required"`
// Status of the resource.
//
// Any of "pending", "creating", "updating", "ready", "deleting", "deleted",
// "error".
Status shared.ResourceStatus `json:"status" api:"required"`
// When the Sandbox Cluster was last updated.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
APIHostname respjson.Field
CreatedAt respjson.Field
GatewayHostname respjson.Field
InstanceType respjson.Field
NodeCount respjson.Field
ProjectID respjson.Field
PublicIP respjson.Field
Region respjson.Field
Status respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An organization's sandboxes in one region, and the infrastructure they run on.
func (SandboxCluster) RawJSON ¶
func (r SandboxCluster) RawJSON() string
Returns the unmodified JSON received from the API
func (*SandboxCluster) UnmarshalJSON ¶
func (r *SandboxCluster) UnmarshalJSON(data []byte) error
type SandboxClusterDisableParamsRegion ¶
type SandboxClusterDisableParamsRegion string
const ( SandboxClusterDisableParamsRegionUsSva2 SandboxClusterDisableParamsRegion = "us-sva-2" SandboxClusterDisableParamsRegionUsWdc1 SandboxClusterDisableParamsRegion = "us-wdc-1" )
type SandboxClusterEnableParams ¶
type SandboxClusterEnableParams struct {
// Instance type of the nodes the sandboxes run on.
InstanceType string `json:"instance_type" api:"required"`
// Number of nodes the sandboxes run on.
NodeCount int64 `json:"node_count" api:"required"`
// contains filtered or unexported fields
}
func (SandboxClusterEnableParams) MarshalJSON ¶
func (r SandboxClusterEnableParams) MarshalJSON() (data []byte, err error)
func (*SandboxClusterEnableParams) UnmarshalJSON ¶
func (r *SandboxClusterEnableParams) UnmarshalJSON(data []byte) error
type SandboxClusterEnableParamsRegion ¶
type SandboxClusterEnableParamsRegion string
const ( SandboxClusterEnableParamsRegionUsSva2 SandboxClusterEnableParamsRegion = "us-sva-2" SandboxClusterEnableParamsRegionUsWdc1 SandboxClusterEnableParamsRegion = "us-wdc-1" )
type SandboxClusterGetParamsRegion ¶
type SandboxClusterGetParamsRegion string
const ( SandboxClusterGetParamsRegionUsSva2 SandboxClusterGetParamsRegion = "us-sva-2" SandboxClusterGetParamsRegionUsWdc1 SandboxClusterGetParamsRegion = "us-wdc-1" )
type SandboxClusterList ¶
type SandboxClusterList struct {
Items []SandboxCluster `json:"items" api:"required"`
// Pagination response details.
Pagination shared.Pagination `json:"pagination" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Items respjson.Field
Pagination respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SandboxClusterList) RawJSON ¶
func (r SandboxClusterList) RawJSON() string
Returns the unmodified JSON received from the API
func (*SandboxClusterList) UnmarshalJSON ¶
func (r *SandboxClusterList) UnmarshalJSON(data []byte) error
type SandboxClusterListParams ¶
type SandboxClusterListParams struct {
// Pagination cursor returned by a previous request. Only valid for the same sort
// order.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of items to return
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Comma-separated sort terms in precedence order, each field:asc or field:desc.
// Fields: created_at, updated_at
Sort param.Opt[string] `query:"sort,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SandboxClusterListParams) URLQuery ¶
func (r SandboxClusterListParams) URLQuery() (v url.Values, err error)
URLQuery serializes SandboxClusterListParams's query parameters as `url.Values`.
type SandboxClusterService ¶
type SandboxClusterService struct {
Options []option.RequestOption
}
SandboxClusterService contains methods and other services that help with interacting with the Nirvana Labs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSandboxClusterService method instead.
func NewSandboxClusterService ¶
func NewSandboxClusterService(opts ...option.RequestOption) (r SandboxClusterService)
NewSandboxClusterService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*SandboxClusterService) Disable ¶
func (r *SandboxClusterService) Disable(ctx context.Context, region SandboxClusterDisableParamsRegion, opts ...option.RequestOption) (res *operations.Operation, err error)
Disable sandboxes in a region. This deletes the sandboxes and the infrastructure they run on.
func (*SandboxClusterService) Enable ¶
func (r *SandboxClusterService) Enable(ctx context.Context, region SandboxClusterEnableParamsRegion, body SandboxClusterEnableParams, opts ...option.RequestOption) (res *operations.Operation, err error)
Enable sandboxes in a region. This provisions the sandbox cluster they run on, in a project the platform manages.
func (*SandboxClusterService) Get ¶
func (r *SandboxClusterService) Get(ctx context.Context, region SandboxClusterGetParamsRegion, opts ...option.RequestOption) (res *SandboxCluster, err error)
Get the sandbox cluster in a region
func (*SandboxClusterService) List ¶
func (r *SandboxClusterService) List(ctx context.Context, query SandboxClusterListParams, opts ...option.RequestOption) (res *pagination.Cursor[SandboxCluster], err error)
List the organization's sandbox clusters, one per region where sandboxes are enabled
func (*SandboxClusterService) ListAutoPaging ¶
func (r *SandboxClusterService) ListAutoPaging(ctx context.Context, query SandboxClusterListParams, opts ...option.RequestOption) *pagination.CursorAutoPager[SandboxCluster]
List the organization's sandbox clusters, one per region where sandboxes are enabled
type SourceIPRuleParam ¶
type SourceIPRuleParam = shared.SourceIPRuleParam
IP filter rules.
This is an alias to an internal type.
type SourceIPRuleResponse ¶
type SourceIPRuleResponse = shared.SourceIPRuleResponse
IP filter rules.
This is an alias to an internal type.
type VMMetricUnit ¶
type VMMetricUnit = shared.VMMetricUnit
Unit the values are expressed in.
This is an alias to an internal type.