models

package
v0.82.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Actor

type Actor struct {
	ID       string            `json:"id"`
	Type     string            `json:"type"`
	Name     string            `json:"name"`
	Title    string            `json:"title"`
	Metadata metadata.Metadata `json:"metadata"`
}

type AuditRecord

type AuditRecord struct {
	ID             string            `json:"id,omitempty"`
	Event          auditrecord.Event `json:"event"`
	Actor          Actor             `json:"actor"`
	Resource       Resource          `json:"resource"`
	Target         *Target           `json:"target"`
	OccurredAt     time.Time         `json:"occurred_at"`
	OrgID          string            `json:"org_id"`
	OrgName        string            `json:"org_name"`
	RequestID      *string           `json:"request_id"`
	CreatedAt      time.Time         `json:"created_at,omitempty"`
	Metadata       metadata.Metadata `json:"metadata"`
	IdempotencyKey string            `json:"idempotency_key"`
}

type AuditRecordRQLSchema

type AuditRecordRQLSchema struct {
	ID             string    `rql:"name=id,type=string"`
	Event          string    `rql:"name=event,type=string"`
	ActorID        string    `rql:"name=actor_id,type=string"`
	ActorType      string    `rql:"name=actor_type,type=string"`
	ActorName      string    `rql:"name=actor_name,type=string"`
	ActorTitle     string    `rql:"name=actor_title,type=string"`
	ResourceID     string    `rql:"name=resource_id,type=string"`
	ResourceType   string    `rql:"name=resource_type,type=string"`
	ResourceName   string    `rql:"name=resource_name,type=string"`
	TargetID       string    `rql:"name=target_id,type=string"`
	TargetType     string    `rql:"name=target_type,type=string"`
	TargetName     string    `rql:"name=target_name,type=string"`
	OccurredAt     time.Time `rql:"name=occurred_at,type=datetime"`
	OrgID          string    `rql:"name=org_id,type=string"`
	OrgName        string    `rql:"name=org_name,type=string"`
	RequestID      string    `rql:"name=request_id,type=string"`
	CreatedAt      time.Time `rql:"name=created_at,type=datetime"`
	IdempotencyKey string    `rql:"name=idempotency_key,type=string"`
}

AuditRecordRQLSchema is the schema for audit record RQL queries. This is a flattened version of the AuditRecord struct. This is needed because the RQL parser does not support nested structs.

type AuditRecordsList

type AuditRecordsList struct {
	AuditRecords []AuditRecord
	Group        *utils.Group
	Page         utils.Page
}

type Resource

type Resource struct {
	ID       string                 `json:"id"`
	Type     auditrecord.EntityType `json:"type"`
	Name     string                 `json:"name"`
	Metadata metadata.Metadata      `json:"metadata"`
}

type Target

type Target struct {
	ID       string                 `json:"id"`
	Type     auditrecord.EntityType `json:"type"`
	Name     string                 `json:"name"`
	Metadata metadata.Metadata      `json:"metadata"`
}

Jump to

Keyboard shortcuts

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