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 InstanceType
- type InstanceTypeGetParamsRegion
- type InstanceTypeList
- type InstanceTypeListParams
- type InstanceTypeService
- func (r *InstanceTypeService) Get(ctx context.Context, region InstanceTypeGetParamsRegion, name string, ...) (res *InstanceType, err error)
- func (r *InstanceTypeService) List(ctx context.Context, query InstanceTypeListParams, ...) (res *pagination.Cursor[InstanceType], err error)
- func (r *InstanceTypeService) ListAutoPaging(ctx context.Context, query InstanceTypeListParams, ...) *pagination.CursorAutoPager[InstanceType]
- type Pagination
- type RegionName
- type ResourceStatus
- type SourceIPRuleParam
- type SourceIPRuleResponse
Constants ¶
const RegionNameUsSva2 = shared.RegionNameUsSva2
Equals "us-sva-2"
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"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CostQuote ¶ added in v1.88.6
Cost quote returned by POST /cost.
This is an alias to an internal type.
type CostQuoteUpdate ¶ added in v1.88.6
type CostQuoteUpdate = shared.CostQuoteUpdate
Cost quote returned by PATCH /:id/cost: the current-state quote, the post-update quote, and the signed diff.
This is an alias to an internal type.
type CostQuoteUpdateAfter ¶ added in v1.88.6
type CostQuoteUpdateAfter = shared.CostQuoteUpdateAfter
Quote for the proposed (post-update) resource state.
This is an alias to an internal type.
type CostQuoteUpdateAfterUsageDimension ¶ added in v1.88.6
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 ¶ added in v1.88.6
type CostQuoteUpdateBefore = shared.CostQuoteUpdateBefore
Quote for the proposed (post-update) resource state.
This is an alias to an internal type.
type CostQuoteUpdateBeforeUsageDimension ¶ added in v1.88.6
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 ¶ added in v1.88.6
type CostQuoteUpdateDiff = shared.CostQuoteUpdateDiff
Per-dimension and total deltas: after minus before.
This is an alias to an internal type.
type CostQuoteUpdateDiffUsageDimension ¶ added in v1.88.6
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 ¶ added in v1.88.6
type CostQuoteUpdateDiffUsageDimensionAfter = shared.CostQuoteUpdateDiffUsageDimensionAfter
Priced row after the update. Always present.
This is an alias to an internal type.
type CostQuoteUpdateDiffUsageDimensionBefore ¶ added in v1.88.6
type CostQuoteUpdateDiffUsageDimensionBefore = shared.CostQuoteUpdateDiffUsageDimensionBefore
Priced row after the update. Always present.
This is an alias to an internal type.
type CostQuoteUsageDimension ¶ added in v1.88.6
type CostQuoteUsageDimension = shared.CostQuoteUsageDimension
Priced row for a single usage dimension emitted by a resource.
This is an alias to an internal type.
type InstanceType ¶ added in v1.64.0
type InstanceType struct {
Chipset string `json:"chipset" api:"required"`
// When the Instance Type was created.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
Family string `json:"family" api:"required"`
MemoryGB int64 `json:"memory_gb" api:"required"`
Name string `json:"name" api:"required"`
// Network bandwidth in Gbps.
NetworkBandwidthGbps float64 `json:"network_bandwidth_gbps" api:"required"`
// Region the resource is in.
//
// Any of "us-sva-2".
Region shared.RegionName `json:"region" api:"required"`
Series string `json:"series" api:"required"`
// When the Instance Type was updated.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
Vcpu int64 `json:"vcpu" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Chipset respjson.Field
CreatedAt respjson.Field
Family respjson.Field
MemoryGB respjson.Field
Name respjson.Field
NetworkBandwidthGbps respjson.Field
Region respjson.Field
Series respjson.Field
UpdatedAt respjson.Field
Vcpu respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Instance type.
func (InstanceType) RawJSON ¶ added in v1.64.0
func (r InstanceType) RawJSON() string
Returns the unmodified JSON received from the API
func (*InstanceType) UnmarshalJSON ¶ added in v1.64.0
func (r *InstanceType) UnmarshalJSON(data []byte) error
type InstanceTypeGetParamsRegion ¶ added in v1.64.0
type InstanceTypeGetParamsRegion string
const (
InstanceTypeGetParamsRegionUsSva2 InstanceTypeGetParamsRegion = "us-sva-2"
)
type InstanceTypeList ¶
type InstanceTypeList struct {
Items []InstanceType `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 (InstanceTypeList) RawJSON ¶
func (r InstanceTypeList) RawJSON() string
Returns the unmodified JSON received from the API
func (*InstanceTypeList) UnmarshalJSON ¶
func (r *InstanceTypeList) UnmarshalJSON(data []byte) error
type InstanceTypeListParams ¶
type InstanceTypeListParams struct {
// Pagination cursor returned by a previous request
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of items to return
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (InstanceTypeListParams) URLQuery ¶
func (r InstanceTypeListParams) URLQuery() (v url.Values, err error)
URLQuery serializes InstanceTypeListParams's query parameters as `url.Values`.
type InstanceTypeService ¶
type InstanceTypeService struct {
Options []option.RequestOption
}
InstanceTypeService 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 NewInstanceTypeService method instead.
func NewInstanceTypeService ¶
func NewInstanceTypeService(opts ...option.RequestOption) (r InstanceTypeService)
NewInstanceTypeService 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 (*InstanceTypeService) Get ¶ added in v1.64.0
func (r *InstanceTypeService) Get(ctx context.Context, region InstanceTypeGetParamsRegion, name string, opts ...option.RequestOption) (res *InstanceType, err error)
Get an instance type by region and name
func (*InstanceTypeService) List ¶
func (r *InstanceTypeService) List(ctx context.Context, query InstanceTypeListParams, opts ...option.RequestOption) (res *pagination.Cursor[InstanceType], err error)
List instance types
func (*InstanceTypeService) ListAutoPaging ¶
func (r *InstanceTypeService) ListAutoPaging(ctx context.Context, query InstanceTypeListParams, opts ...option.RequestOption) *pagination.CursorAutoPager[InstanceType]
List instance types
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 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.