Documentation
¶
Index ¶
Constants ¶
const RegionNameUsChi1 = shared.RegionNameUsChi1
Equals "us-chi-1"
const RegionNameUsSva1 = shared.RegionNameUsSva1
Equals "us-sva-1"
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 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 shared.SourceIPRuleParam `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 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.
type User ¶
type User struct {
// Unique identifier for the User.
ID string `json:"id" api:"required"`
// Email address of the user.
Email string `json:"email" api:"required"`
// First name of the user.
FirstName string `json:"first_name" api:"required"`
// Last name of the user.
LastName string `json:"last_name" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Email respjson.Field
FirstName respjson.Field
LastName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
User details.
func (*User) UnmarshalJSON ¶
type UserSecurity ¶ added in v1.31.0
type UserSecurity struct {
// IP filter rules.
SourceIPRule shared.SourceIPRuleResponse `json:"source_ip_rule" api:"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 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