projects

package
v1.30.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const RegionNameApSeo1 = shared.RegionNameApSeo1

Equals "ap-seo-1"

View Source
const RegionNameApSin1 = shared.RegionNameApSin1

Equals "ap-sin-1"

View Source
const RegionNameApTyo1 = shared.RegionNameApTyo1

Equals "ap-tyo-1"

View Source
const RegionNameEuFrk1 = shared.RegionNameEuFrk1

Equals "eu-frk-1"

View Source
const RegionNameUsChi1 = shared.RegionNameUsChi1

Equals "us-chi-1"

View Source
const RegionNameUsSea1 = shared.RegionNameUsSea1

Equals "us-sea-1"

View Source
const RegionNameUsSva1 = shared.RegionNameUsSva1

Equals "us-sva-1"

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"

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error = apierror.Error

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,required"`
	// When the Project was created.
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// Project name.
	Name string `json:"name,required"`
	// Tags attached to the Project.
	Tags []string `json:"tags,required"`
	// When the Project was updated.
	UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
	// User ID that owns the project.
	UserID string `json:"user_id,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CreatedAt   respjson.Field
		Name        respjson.Field
		Tags        respjson.Field
		UpdatedAt   respjson.Field
		UserID      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 ProjectList

type ProjectList struct {
	Items []Project `json:"items,required"`
	// Pagination response details.
	Pagination shared.Pagination `json:"pagination,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,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 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 for the authenticated user

func (*ProjectService) ListAutoPaging

List all projects for the authenticated user

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.

Jump to

Keyboard shortcuts

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