Documentation
¶
Index ¶
- Constants
- type AuditLog
- type AuditLogActor
- type AuditLogList
- type AuditLogListParams
- type AuditLogService
- func (r *AuditLogService) Get(ctx context.Context, auditLogID string, opts ...option.RequestOption) (res *AuditLog, err error)
- func (r *AuditLogService) List(ctx context.Context, query AuditLogListParams, opts ...option.RequestOption) (res *pagination.Cursor[AuditLog], err error)
- func (r *AuditLogService) ListAutoPaging(ctx context.Context, query AuditLogListParams, opts ...option.RequestOption) *pagination.CursorAutoPager[AuditLog]
- type AuditLogTarget
- type AuditLogType
- type CostQuote
- type CostQuoteUpdate
- type CostQuoteUpdateAfter
- type CostQuoteUpdateAfterUsageDimension
- type CostQuoteUpdateBefore
- type CostQuoteUpdateBeforeUsageDimension
- type CostQuoteUpdateDiff
- type CostQuoteUpdateDiffUsageDimension
- type CostQuoteUpdateDiffUsageDimensionAfter
- type CostQuoteUpdateDiffUsageDimensionBefore
- type CostQuoteUsageDimension
- type Error
- type Pagination
- type RegionName
- type ResourceStatus
- type SourceIPRuleParam
- type SourceIPRuleResponse
Constants ¶
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 AuditLog ¶ added in v1.51.0
type AuditLog struct {
// Unique identifier for the audit log entry.
ID string `json:"id" api:"required"`
// The action that was performed.
Action string `json:"action" api:"required"`
// The entity that performed the action.
Actor AuditLogActor `json:"actor" api:"required"`
// Client IP address.
ClientIP string `json:"client_ip" api:"required"`
// When the action occurred.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// HTTP method of the request.
Method string `json:"method" api:"required"`
// Request path.
Path string `json:"path" api:"required"`
// HTTP status code of the response.
StatusCode int64 `json:"status_code" api:"required"`
// User agent string.
UserAgent string `json:"user_agent" api:"required"`
// The target resource of the action.
Target AuditLogTarget `json:"target" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Action respjson.Field
Actor respjson.Field
ClientIP respjson.Field
CreatedAt respjson.Field
Method respjson.Field
Path respjson.Field
StatusCode respjson.Field
UserAgent respjson.Field
Target respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Audit log entry.
func (*AuditLog) UnmarshalJSON ¶ added in v1.51.0
type AuditLogActor ¶ added in v1.51.0
type AuditLogActor struct {
// Unique identifier for the actor.
ID string `json:"id" api:"required"`
// Display name of the actor.
Name string `json:"name" api:"required"`
// Type of actor.
//
// Any of "user", "api_key".
Type AuditLogType `json:"type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The entity that performed the action.
func (AuditLogActor) RawJSON ¶ added in v1.51.0
func (r AuditLogActor) RawJSON() string
Returns the unmodified JSON received from the API
func (*AuditLogActor) UnmarshalJSON ¶ added in v1.51.0
func (r *AuditLogActor) UnmarshalJSON(data []byte) error
type AuditLogList ¶
type AuditLogList struct {
Items []AuditLog `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 (AuditLogList) RawJSON ¶
func (r AuditLogList) RawJSON() string
Returns the unmodified JSON received from the API
func (*AuditLogList) UnmarshalJSON ¶
func (r *AuditLogList) UnmarshalJSON(data []byte) error
type AuditLogListParams ¶
type AuditLogListParams 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 (AuditLogListParams) URLQuery ¶
func (r AuditLogListParams) URLQuery() (v url.Values, err error)
URLQuery serializes AuditLogListParams's query parameters as `url.Values`.
type AuditLogService ¶
type AuditLogService struct {
Options []option.RequestOption
}
AuditLogService 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 NewAuditLogService method instead.
func NewAuditLogService ¶
func NewAuditLogService(opts ...option.RequestOption) (r AuditLogService)
NewAuditLogService 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 (*AuditLogService) Get ¶
func (r *AuditLogService) Get(ctx context.Context, auditLogID string, opts ...option.RequestOption) (res *AuditLog, err error)
Get an Audit Log entry
func (*AuditLogService) List ¶
func (r *AuditLogService) List(ctx context.Context, query AuditLogListParams, opts ...option.RequestOption) (res *pagination.Cursor[AuditLog], err error)
List Audit Log entries for an organization
func (*AuditLogService) ListAutoPaging ¶
func (r *AuditLogService) ListAutoPaging(ctx context.Context, query AuditLogListParams, opts ...option.RequestOption) *pagination.CursorAutoPager[AuditLog]
List Audit Log entries for an organization
type AuditLogTarget ¶ added in v1.58.0
type AuditLogTarget struct {
// Unique identifier for the target resource.
ID string `json:"id" api:"required"`
// Type of the target resource.
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:"-"`
}
The target resource of the action.
func (AuditLogTarget) RawJSON ¶ added in v1.58.0
func (r AuditLogTarget) RawJSON() string
Returns the unmodified JSON received from the API
func (*AuditLogTarget) UnmarshalJSON ¶ added in v1.58.0
func (r *AuditLogTarget) UnmarshalJSON(data []byte) error
type AuditLogType ¶ added in v1.51.0
type AuditLogType string
Type of actor.
const ( AuditLogTypeUser AuditLogType = "user" AuditLogTypeAPIKey AuditLogType = "api_key" )
type CostQuote ¶ added in v1.88.6
Cost quote returned by POST /cost.
This is an alias to an internal type.
type CostQuoteUpdate ¶ added in v1.88.6
type CostQuoteUpdate = shared.CostQuoteUpdate
Cost quote returned by PATCH /:id/cost: the current-state quote, the post-update quote, and the signed diff.
This is an alias to an internal type.
type CostQuoteUpdateAfter ¶ added in v1.88.6
type CostQuoteUpdateAfter = shared.CostQuoteUpdateAfter
Quote for the proposed (post-update) resource state.
This is an alias to an internal type.
type CostQuoteUpdateAfterUsageDimension ¶ added in v1.88.6
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 ¶ added in v1.88.6
type CostQuoteUpdateBefore = shared.CostQuoteUpdateBefore
Quote for the proposed (post-update) resource state.
This is an alias to an internal type.
type CostQuoteUpdateBeforeUsageDimension ¶ added in v1.88.6
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 ¶ added in v1.88.6
type CostQuoteUpdateDiff = shared.CostQuoteUpdateDiff
Per-dimension and total deltas: after minus before.
This is an alias to an internal type.
type CostQuoteUpdateDiffUsageDimension ¶ added in v1.88.6
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 ¶ added in v1.88.6
type CostQuoteUpdateDiffUsageDimensionAfter = shared.CostQuoteUpdateDiffUsageDimensionAfter
Priced row after the update. Always present.
This is an alias to an internal type.
type CostQuoteUpdateDiffUsageDimensionBefore ¶ added in v1.88.6
type CostQuoteUpdateDiffUsageDimensionBefore = shared.CostQuoteUpdateDiffUsageDimensionBefore
Priced row after the update. Always present.
This is an alias to an internal type.
type CostQuoteUsageDimension ¶ added in v1.88.6
type CostQuoteUsageDimension = shared.CostQuoteUsageDimension
Priced row for a single usage dimension emitted by a resource.
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 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 ¶ added in v1.54.0
type SourceIPRuleResponse = shared.SourceIPRuleResponse
IP filter rules.
This is an alias to an internal type.