models

package
v0.13.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DerivedFromEdge added in v0.13.0

func DerivedFromEdge(entityURN, dependencyURN, source string) *meteorv1beta1.Edge

DerivedFromEdge creates a derived_from edge: entityURN is derived from dependencyURN. Use when an entity reads from or depends on another (e.g. view from table, dashboard from datasource, job from upstream).

func EntityToJSON added in v0.13.0

func EntityToJSON(entity *meteorv1beta1.Entity) ([]byte, error)

EntityToJSON serializes an entity to JSON.

func GeneratesEdge added in v0.13.0

func GeneratesEdge(entityURN, outputURN, source string) *meteorv1beta1.Edge

GeneratesEdge creates a generates edge: entityURN generates outputURN. Use when an entity produces or writes to another (e.g. job writes to downstream table, application produces output).

func NewEntity added in v0.13.0

func NewEntity(urn, typ, name, source string, props map[string]any) *meteorv1beta1.Entity

NewEntity creates an entity with properties from a map. Values in props are sanitized to be compatible with structpb.NewStruct: map[string]string is converted to map[string]interface{}, etc.

func NewURN

func NewURN(service, scope, kind, id string) string

NewURN builds a URN string: "urn:{service}:{scope}:{type}:{id}"

func OwnerEdge added in v0.13.0

func OwnerEdge(entityURN, ownerURN, source string) *meteorv1beta1.Edge

OwnerEdge creates an owned_by edge from entityURN to an owner.

func RecordToJSON added in v0.13.0

func RecordToJSON(r Record) ([]byte, error)

RecordToJSON serializes a record (entity + edges) to JSON.

func ReferencesEdge added in v0.13.0

func ReferencesEdge(sourceURN, targetURN, source string) *meteorv1beta1.Edge

ReferencesEdge creates a references edge from sourceURN to targetURN. Use this for structural relationships like foreign keys, where one entity references another but data does not necessarily flow between them.

Types

type Record

type Record struct {
	// contains filtered or unexported fields
}

Record is the unit of metadata that flows through Meteor's pipeline. An extractor emits one Record per discovered resource.

func NewRecord

func NewRecord(entity *meteorv1beta1.Entity, edges ...*meteorv1beta1.Edge) Record

NewRecord creates a new record with an entity and optional edges.

func (Record) Edges added in v0.13.0

func (r Record) Edges() []*meteorv1beta1.Edge

Edges returns the edges in this record.

func (Record) Entity added in v0.13.0

func (r Record) Entity() *meteorv1beta1.Entity

Entity returns the entity in this record.

Directories

Path Synopsis
raystack

Jump to

Keyboard shortcuts

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