projects

package
v2.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 16 Imported by: 3 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const RegionNameUsSva2 = shared.RegionNameUsSva2

Equals "us-sva-2"

View Source
const RegionNameUsWdc1 = shared.RegionNameUsWdc1

Equals "us-wdc-1"

View Source
const ResourceStatusCreating = shared.ResourceStatusCreating

Equals "creating"

View Source
const ResourceStatusDeleted = shared.ResourceStatusDeleted

Equals "deleted"

View Source
const ResourceStatusDeleting = shared.ResourceStatusDeleting

Equals "deleting"

View Source
const ResourceStatusError = shared.ResourceStatusError

Equals "error"

View Source
const ResourceStatusPending = shared.ResourceStatusPending

Equals "pending"

View Source
const ResourceStatusReady = shared.ResourceStatusReady

Equals "ready"

View Source
const ResourceStatusUpdating = shared.ResourceStatusUpdating

Equals "updating"

View Source
const VMMetricUnitBytes = shared.VMMetricUnitBytes

Equals "bytes"

View Source
const VMMetricUnitBytesPerSecond = shared.VMMetricUnitBytesPerSecond

Equals "bytes_per_second"

View Source
const VMMetricUnitCores = shared.VMMetricUnitCores

Equals "cores"

View Source
const VMMetricUnitOperationsPerSecond = shared.VMMetricUnitOperationsPerSecond

Equals "operations_per_second"

View Source
const VMMetricUnitRatio = shared.VMMetricUnitRatio

Equals "ratio"

Variables

This section is empty.

Functions

This section is empty.

Types

type CostQuote

type CostQuote = shared.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 Error

type Error = apierror.Error

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 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"`
	// What manages the resource, or null when nothing does. A managed resource can be
	// read but not changed.
	ManagedBy ProjectManagedBy `json:"managed_by" api:"required"`
	// 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
		ManagedBy   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) RawJSON

func (r Project) RawJSON() string

Returns the unmodified JSON received from the API

func (*Project) UnmarshalJSON

func (r *Project) UnmarshalJSON(data []byte) error

type ProjectBlockchainResources

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

func (r ProjectBlockchainResources) RawJSON() string

Returns the unmodified JSON received from the API

func (*ProjectBlockchainResources) UnmarshalJSON

func (r *ProjectBlockchainResources) UnmarshalJSON(data []byte) error

type ProjectCloudResources

type ProjectCloudResources struct {
	// 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 {
		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

func (r ProjectCloudResources) RawJSON() string

Returns the unmodified JSON received from the API

func (*ProjectCloudResources) UnmarshalJSON

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. Only valid for the same
	// filters and sort order.
	Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
	// Maximum number of items to return
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Filter by a case-insensitive substring of the Project name
	Name param.Opt[string] `query:"name,omitzero" json:"-"`
	// Comma-separated sort terms in precedence order, each field:asc or field:desc.
	// Fields: created_at, updated_at, name
	Sort param.Opt[string] `query:"sort,omitzero" json:"-"`
	// Filter by tags. Repeat the parameter to require several tags; a Project must
	// carry all of them.
	Tags []string `query:"tags,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 ProjectManagedBy added in v2.2.1

type ProjectManagedBy struct {
	// ID of the thing managing the resource.
	ID string `json:"id" api:"required"`
	// Kind of thing managing the resource: a sandbox cluster, or managed_sandboxes for
	// the project that holds an organization's sandbox clusters, identified by the
	// organization ID.
	//
	// Any of "sandbox_cluster", "managed_sandboxes".
	Type string `json:"type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

What manages the resource, or null when nothing does. A managed resource can be read but not changed.

func (ProjectManagedBy) RawJSON added in v2.2.1

func (r ProjectManagedBy) RawJSON() string

Returns the unmodified JSON received from the API

func (*ProjectManagedBy) UnmarshalJSON added in v2.2.1

func (r *ProjectManagedBy) UnmarshalJSON(data []byte) error

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

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

func (r ProjectResources) RawJSON() string

Returns the unmodified JSON received from the API

func (*ProjectResources) UnmarshalJSON

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

List all projects

func (*ProjectService) ListAutoPaging

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL