gcppubsubevents

package
v0.5.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	RealtimeSyncEventType = "sync-event"
	ImportEventType       = "import-event"

	InventoryEventStorageType  = "storage.googleapis.com/Bucket"
	InventoryEventFunctionType = "run.googleapis.com/Service"
)

Variables

View Source
var (
	ErrMalformedEvent = errors.New("malformed event")
)

Functions

func NewInventoryEventBuilder

func NewInventoryEventBuilder[T IInventoryEvent]() entities.EventBuilder

Types

type IInventoryEvent

type IInventoryEvent interface {
	Name() string
	AssetType() string
	Ancestors() []string
	Operation() entities.Operation
	EventType() string
}

type InventoryEvent

type InventoryEvent struct {
	Asset           InventoryEventAsset  `json:"asset"`
	PriorAsset      InventoryEventAsset  `json:"priorAsset"`
	PriorAssetState string               `json:"priorAssetState"`
	Window          InventoryEventWindow `json:"window"`
	Deleted         bool                 `json:"deleted"`
}

func (InventoryEvent) Ancestors

func (e InventoryEvent) Ancestors() []string

func (InventoryEvent) AssetType

func (e InventoryEvent) AssetType() string

func (InventoryEvent) EventType

func (e InventoryEvent) EventType() string

func (InventoryEvent) Name

func (e InventoryEvent) Name() string

func (InventoryEvent) Operation

func (e InventoryEvent) Operation() entities.Operation

type InventoryEventAsset

type InventoryEventAsset struct {
	Ancestors  []string               `json:"ancestors"`
	AssetType  string                 `json:"assetType"`
	Name       string                 `json:"name"`
	Resource   map[string]interface{} `json:"resource"`
	UpdateTime string                 `json:"updateTime"`
}

type InventoryEventBuilder

type InventoryEventBuilder[T IInventoryEvent] struct{}

func (*InventoryEventBuilder[T]) GetPipelineEvent

func (b *InventoryEventBuilder[T]) GetPipelineEvent(_ context.Context, data []byte) (entities.PipelineEvent, error)

type InventoryEventWindow

type InventoryEventWindow struct {
	StartTime string `json:"startTime"`
}

type InventoryImportEvent

type InventoryImportEvent struct {
	AssetName string
	Type      string
}

func (InventoryImportEvent) Ancestors

func (e InventoryImportEvent) Ancestors() []string

func (InventoryImportEvent) AssetType

func (e InventoryImportEvent) AssetType() string

func (InventoryImportEvent) EventType

func (e InventoryImportEvent) EventType() string

func (InventoryImportEvent) Name

func (e InventoryImportEvent) Name() string

func (InventoryImportEvent) Operation

func (e InventoryImportEvent) Operation() entities.Operation

Jump to

Keyboard shortcuts

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