Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Collect ¶
Collect filters the list of entries against the source filter on the output, returning a list of all entries which pass the filter.
func MarshalType ¶
func MarshalType(output *Output) (base *CatalogTypeModel, enumTypes []*CatalogTypeModel)
MarshalType builds the base catalog type model for the output, and any associated enum types for its attributes.
Types ¶
type Attribute ¶
type Attribute struct { ID string `json:"id"` Name string `json:"name"` Type null.String `json:"type"` Array bool `json:"array"` Source null.String `json:"source"` Enum *AttributeEnum `json:"enum"` }
type AttributeEnum ¶ added in v0.14.0
type CatalogEntryModel ¶
type CatalogEntryModel struct { ExternalID string Name string Aliases []string AttributeValues map[string]client.CatalogAttributeBindingPayloadV2 }
func MarshalEntries ¶
func MarshalEntries(ctx context.Context, output *Output, entries []source.Entry) ([]*CatalogEntryModel, error)
MarshalEntries builds payloads to for the entries of the given output, assuming those entries have already been filtered.
The majority of the work comes from compiling and evaluating the CEL expressions that marshal the catalog entries from source.
type CatalogTypeModel ¶
type Output ¶
type Output struct { Name string `json:"name"` Description string `json:"description"` TypeName string `json:"type_name"` Source SourceConfig `json:"source"` Attributes []*Attribute `json:"attributes"` }
Output represents a catalog type that will be managed by this importer. It includes config for the resulting catalog type, along with catalog type attributes and how to build the values of said attributes from the sourced entries.
type SourceConfig ¶
type SourceConfig struct { Filter null.String `json:"filter"` Name string `json:"name"` ExternalID string `json:"external_id"` Aliases []string `json:"aliases"` }
SourceConfig controls how we filter the source for this output's entries, and sets the external ID – used to uniquely identify an entry in the catalog – and the aliases of that entry from the source.
func (SourceConfig) Validate ¶
func (s SourceConfig) Validate() error