user

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: 10 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 added in v1.21.0

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 User

type User struct {
	// Unique identifier for the User.
	ID string `json:"id,required"`
	// Email address of the user.
	Email string `json:"email,required"`
	// Services that the User has access to.
	Services UserServices `json:"services,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Email       respjson.Field
		Services    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

User details.

func (User) RawJSON added in v1.1.0

func (r User) RawJSON() string

Returns the unmodified JSON received from the API

func (*User) UnmarshalJSON

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

type UserService

type UserService struct {
	Options []option.RequestOption
}

UserService 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 NewUserService method instead.

func NewUserService

func NewUserService(opts ...option.RequestOption) (r UserService)

NewUserService 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 (*UserService) Get

func (r *UserService) Get(ctx context.Context, opts ...option.RequestOption) (res *User, err error)

Get details about an authenticated user

type UserServices

type UserServices struct {
	Cloud bool `json:"cloud"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Cloud       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Services that the User has access to.

func (UserServices) RawJSON added in v1.1.0

func (r UserServices) RawJSON() string

Returns the unmodified JSON received from the API

func (*UserServices) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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