model

package
v0.0.0-...-cb52b78 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteResourceEvent

type DeleteResourceEvent struct {
	UID string `json:"uid,omitempty"`
}

DeleteResourceEvent - Contains the information needed to delete an existing resource.

type Edge

type Edge struct {
	SourceUID, DestUID   string
	EdgeType             string
	SourceKind, DestKind string
}

Describes a relationship between resources

type Resource

type Resource struct {
	Kind           string `json:"kind,omitempty"`
	UID            string `json:"uid,omitempty"`
	ResourceString string `json:"resourceString,omitempty"`
	Properties     map[string]interface{}
}

Resource - Describes a resource (node)

type SyncError

type SyncError struct {
	ResourceUID string
	Message     string // Often comes out of a golang error using .Error()
}

SyncError is used to respond with errors.

type SyncEvent

type SyncEvent struct {
	ClearAll bool `json:"clearAll,omitempty"`

	AddResources    []Resource
	UpdateResources []Resource
	DeleteResources []DeleteResourceEvent

	AddEdges    []Edge
	DeleteEdges []Edge
	RequestId   int
}

SyncEvent - Object sent by the collector with the resources to change.

type SyncResponse

type SyncResponse struct {
	TotalAdded        int
	TotalUpdated      int
	TotalDeleted      int
	TotalResources    int
	TotalEdgesAdded   int
	TotalEdgesDeleted int
	TotalEdges        int
	AddErrors         []SyncError
	UpdateErrors      []SyncError
	DeleteErrors      []SyncError
	AddEdgeErrors     []SyncError
	DeleteEdgeErrors  []SyncError
	Version           string
	RequestId         int
}

SyncResponse - Response to a SyncEvent

Jump to

Keyboard shortcuts

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