{"modulePath":"github.com/raystack/meteor","version":"v0.14.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package models\n\n## Functions\n\n```go\nfunc DerivedFromEdge(entityURN, dependencyURN, source string) *meteorv1beta1.Edge\n```\nDerivedFromEdge 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).\n\n```go\nfunc EntityToJSON(entity *meteorv1beta1.Entity) ([]byte, error)\n```\nEntityToJSON serializes an entity to JSON.\n\n```go\nfunc GeneratesEdge(entityURN, outputURN, source string) *meteorv1beta1.Edge\n```\nGeneratesEdge 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).\n\n```go\nfunc NewEntity(urn, typ, name, source string, props map[string]any) *meteorv1beta1.Entity\n```\nNewEntity 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.\n\n```go\nfunc NewURN(service, scope, kind, id string) string\n```\nNewURN builds a URN string: \"urn:{service}:{scope}:{type}:{id}\"\n\n```go\nfunc OwnerEdge(entityURN, ownerURN, source string) *meteorv1beta1.Edge\n```\nOwnerEdge creates an owned\\_by edge from entityURN to an owner.\n\n```go\nfunc RecordToJSON(r Record) ([]byte, error)\n```\nRecordToJSON serializes a record (entity + edges) to JSON.\n\n```go\nfunc ReferencesEdge(sourceURN, targetURN, source string) *meteorv1beta1.Edge\n```\nReferencesEdge 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.\n\n## Types\n\n```go\ntype Record struct {\n\t// contains filtered or unexported fields\n}\n```\nRecord is the unit of metadata that flows through Meteor's pipeline. An extractor emits one Record per discovered resource.\n\n```go\nfunc NewRecord(entity *meteorv1beta1.Entity, edges ...*meteorv1beta1.Edge) Record\n```\nNewRecord creates a new record with an entity and optional edges.\n\n```go\nfunc (r Record) Edges() []*meteorv1beta1.Edge\n```\nEdges returns the edges in this record.\n\n```go\nfunc (r Record) Entity() *meteorv1beta1.Entity\n```\nEntity returns the entity in this record.\n\n","path":"github.com/raystack/meteor/models","name":"models","synopsis":"","isRedistributable":true}
