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 Pagination
- type Project
- type ProjectBlockchainResources
- type ProjectCloudResources
- type ProjectList
- type ProjectListParams
- type ProjectNewParams
- type ProjectResources
- type ProjectService
- func (r *ProjectService) Delete(ctx context.Context, projectID string, opts ...option.RequestOption) (err error)
- func (r *ProjectService) Get(ctx context.Context, projectID string, opts ...option.RequestOption) (res *Project, err error)
- func (r *ProjectService) List(ctx context.Context, query ProjectListParams, opts ...option.RequestOption) (res *pagination.Cursor[Project], err error)
- func (r *ProjectService) ListAutoPaging(ctx context.Context, query ProjectListParams, opts ...option.RequestOption) *pagination.CursorAutoPager[Project]
- func (r *ProjectService) New(ctx context.Context, body ProjectNewParams, opts ...option.RequestOption) (res *Project, err error)
- func (r *ProjectService) Update(ctx context.Context, projectID string, body ProjectUpdateParams, ...) (res *Project, err error)
- type ProjectUpdateParams
- 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 Pagination ¶
type Pagination = shared.Pagination
Pagination response details.
This is an alias to an internal type.
type Project ¶
type Project struct {
// Project ID.
ID string `json:"id" api:"required"`
// When the Project was created.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Project name.
Name string `json:"name" api:"required"`
// Resource counts for the project.
Resources ProjectResources `json:"resources" api:"required"`
// Tags attached to the Project.
Tags []string `json:"tags" api:"required"`
// When the Project was 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
CreatedAt respjson.Field
Name respjson.Field
Resources respjson.Field
Tags respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Project response.
func (*Project) UnmarshalJSON ¶
type ProjectBlockchainResources ¶ added in v1.54.0
type ProjectBlockchainResources struct {
// Number of dedicated RPC nodes in the project.
RPCNodesDedicated int64 `json:"rpc_nodes_dedicated" api:"required"`
// Number of flex RPC nodes in the project.
RPCNodesFlex int64 `json:"rpc_nodes_flex" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
RPCNodesDedicated respjson.Field
RPCNodesFlex respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Blockchain resources.
func (ProjectBlockchainResources) RawJSON ¶ added in v1.54.0
func (r ProjectBlockchainResources) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProjectBlockchainResources) UnmarshalJSON ¶ added in v1.54.0
func (r *ProjectBlockchainResources) UnmarshalJSON(data []byte) error
type ProjectCloudResources ¶ added in v1.54.0
type ProjectCloudResources struct {
// Number of Connect connections in the project.
ConnectConnections int64 `json:"connect_connections" api:"required"`
// Number of NKS clusters in the project.
NKSClusters int64 `json:"nks_clusters" api:"required"`
// Number of NKS node pools in the project.
NKSNodePools int64 `json:"nks_node_pools" api:"required"`
// Number of VMs in the project.
VMs int64 `json:"vms" api:"required"`
// Number of volumes in the project.
Volumes int64 `json:"volumes" api:"required"`
// Number of VPCs in the project.
VPCs int64 `json:"vpcs" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ConnectConnections respjson.Field
NKSClusters respjson.Field
NKSNodePools respjson.Field
VMs respjson.Field
Volumes respjson.Field
VPCs respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Cloud infrastructure resources.
func (ProjectCloudResources) RawJSON ¶ added in v1.54.0
func (r ProjectCloudResources) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProjectCloudResources) UnmarshalJSON ¶ added in v1.54.0
func (r *ProjectCloudResources) UnmarshalJSON(data []byte) error
type ProjectList ¶
type ProjectList struct {
Items []Project `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 (ProjectList) RawJSON ¶
func (r ProjectList) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProjectList) UnmarshalJSON ¶
func (r *ProjectList) UnmarshalJSON(data []byte) error
type ProjectListParams ¶
type ProjectListParams 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 (ProjectListParams) URLQuery ¶
func (r ProjectListParams) URLQuery() (v url.Values, err error)
URLQuery serializes ProjectListParams's query parameters as `url.Values`.
type ProjectNewParams ¶
type ProjectNewParams struct {
// Project name.
Name string `json:"name" api:"required"`
// Tags to attach to the Project.
Tags []string `json:"tags,omitzero"`
// contains filtered or unexported fields
}
func (ProjectNewParams) MarshalJSON ¶
func (r ProjectNewParams) MarshalJSON() (data []byte, err error)
func (*ProjectNewParams) UnmarshalJSON ¶
func (r *ProjectNewParams) UnmarshalJSON(data []byte) error
type ProjectResources ¶ added in v1.37.0
type ProjectResources struct {
// Blockchain resources.
Blockchain ProjectBlockchainResources `json:"blockchain" api:"required"`
// Cloud infrastructure resources.
Cloud ProjectCloudResources `json:"cloud" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Blockchain respjson.Field
Cloud respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Resource counts for the project.
func (ProjectResources) RawJSON ¶ added in v1.37.0
func (r ProjectResources) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProjectResources) UnmarshalJSON ¶ added in v1.37.0
func (r *ProjectResources) UnmarshalJSON(data []byte) error
type ProjectService ¶
type ProjectService struct {
Options []option.RequestOption
}
ProjectService 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 NewProjectService method instead.
func NewProjectService ¶
func NewProjectService(opts ...option.RequestOption) (r ProjectService)
NewProjectService 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 (*ProjectService) Delete ¶
func (r *ProjectService) Delete(ctx context.Context, projectID string, opts ...option.RequestOption) (err error)
Delete a project
func (*ProjectService) Get ¶
func (r *ProjectService) Get(ctx context.Context, projectID string, opts ...option.RequestOption) (res *Project, err error)
Get details about a project
func (*ProjectService) List ¶
func (r *ProjectService) List(ctx context.Context, query ProjectListParams, opts ...option.RequestOption) (res *pagination.Cursor[Project], err error)
List all projects
func (*ProjectService) ListAutoPaging ¶
func (r *ProjectService) ListAutoPaging(ctx context.Context, query ProjectListParams, opts ...option.RequestOption) *pagination.CursorAutoPager[Project]
List all projects
func (*ProjectService) New ¶
func (r *ProjectService) New(ctx context.Context, body ProjectNewParams, opts ...option.RequestOption) (res *Project, err error)
Create a new project
func (*ProjectService) Update ¶
func (r *ProjectService) Update(ctx context.Context, projectID string, body ProjectUpdateParams, opts ...option.RequestOption) (res *Project, err error)
Update an existing project
type ProjectUpdateParams ¶
type ProjectUpdateParams struct {
// Project name.
Name param.Opt[string] `json:"name,omitzero"`
// Tags to attach to the Project.
Tags []string `json:"tags,omitzero"`
// contains filtered or unexported fields
}
func (ProjectUpdateParams) MarshalJSON ¶
func (r ProjectUpdateParams) MarshalJSON() (data []byte, err error)
func (*ProjectUpdateParams) UnmarshalJSON ¶
func (r *ProjectUpdateParams) UnmarshalJSON(data []byte) error
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 ¶ added in v1.35.0
type SourceIPRuleParam = shared.SourceIPRuleParam
IP filter rules.
This is an alias to an internal type.
type SourceIPRuleResponse ¶ added in v1.54.0
type SourceIPRuleResponse = shared.SourceIPRuleResponse
IP filter rules.
This is an alias to an internal type.