audit_logs

package
v1.79.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const RegionNameUsChi1 = shared.RegionNameUsChi1

Equals "us-chi-1"

View Source
const RegionNameUsSva1 = shared.RegionNameUsSva1

Equals "us-sva-1"

View Source
const RegionNameUsSva2 = shared.RegionNameUsSva2

Equals "us-sva-2"

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 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) RawJSON added in v1.51.0

func (r AuditLog) RawJSON() string

Returns the unmodified JSON received from the API

func (*AuditLog) UnmarshalJSON added in v1.51.0

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

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

List Audit Log entries for an organization

func (*AuditLogService) ListAutoPaging

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 Error

type Error = apierror.Error

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.

Jump to

Keyboard shortcuts

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