user

package
v1.32.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2026 License: Apache-2.0 Imports: 11 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 SecurityService added in v1.31.0

type SecurityService struct {
	Options []option.RequestOption
}

SecurityService 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 NewSecurityService method instead.

func NewSecurityService added in v1.31.0

func NewSecurityService(opts ...option.RequestOption) (r SecurityService)

NewSecurityService 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 (*SecurityService) Get added in v1.31.0

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

Get the current user's security settings

func (*SecurityService) Update added in v1.31.0

func (r *SecurityService) Update(ctx context.Context, body SecurityUpdateParams, opts ...option.RequestOption) (res *UserSecurity, err error)

Update the current user's security settings

type SecurityUpdateParams added in v1.31.0

type SecurityUpdateParams struct {
	// IP filter rules.
	SourceIPRule SecurityUpdateParamsSourceIPRule `json:"source_ip_rule,omitzero"`
	// contains filtered or unexported fields
}

func (SecurityUpdateParams) MarshalJSON added in v1.31.0

func (r SecurityUpdateParams) MarshalJSON() (data []byte, err error)

func (*SecurityUpdateParams) UnmarshalJSON added in v1.31.0

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

type SecurityUpdateParamsSourceIPRule added in v1.31.0

type SecurityUpdateParamsSourceIPRule struct {
	// List of IPv4 CIDR addresses to allow.
	Allowed []string `json:"allowed,omitzero"`
	// List of IPv4 CIDR addresses to deny.
	Blocked []string `json:"blocked,omitzero"`
	// contains filtered or unexported fields
}

IP filter rules.

func (SecurityUpdateParamsSourceIPRule) MarshalJSON added in v1.31.0

func (r SecurityUpdateParamsSourceIPRule) MarshalJSON() (data []byte, err error)

func (*SecurityUpdateParamsSourceIPRule) UnmarshalJSON added in v1.31.0

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

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 UserSecurity added in v1.31.0

type UserSecurity struct {
	// IP filter rules.
	SourceIPRule UserSecuritySourceIPRule `json:"source_ip_rule,required"`
	// When the user security settings were created.
	CreatedAt time.Time `json:"created_at" format:"date-time"`
	// When the user security settings were updated.
	UpdatedAt time.Time `json:"updated_at" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		SourceIPRule respjson.Field
		CreatedAt    respjson.Field
		UpdatedAt    respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

User security settings response.

func (UserSecurity) RawJSON added in v1.31.0

func (r UserSecurity) RawJSON() string

Returns the unmodified JSON received from the API

func (*UserSecurity) UnmarshalJSON added in v1.31.0

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

type UserSecuritySourceIPRule added in v1.31.0

type UserSecuritySourceIPRule struct {
	// List of IPv4 CIDR addresses to allow.
	Allowed []string `json:"allowed,required"`
	// List of IPv4 CIDR addresses to deny.
	Blocked []string `json:"blocked,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Allowed     respjson.Field
		Blocked     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

IP filter rules.

func (UserSecuritySourceIPRule) RawJSON added in v1.31.0

func (r UserSecuritySourceIPRule) RawJSON() string

Returns the unmodified JSON received from the API

func (*UserSecuritySourceIPRule) UnmarshalJSON added in v1.31.0

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

type UserService

type UserService struct {
	Options  []option.RequestOption
	Security SecurityService
}

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