ct

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: May 20, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContentTypesRollup

type ContentTypesRollup struct {
	TablesMap map[string]Model // normalized table name to table metadata (map[CQ Table Name]Model)
	// contains filtered or unexported fields
}

func NewContentTypesRollup

func NewContentTypesRollup(sp *api.SP, logger zerolog.Logger) *ContentTypesRollup

func (*ContentTypesRollup) GetDestTable

func (c *ContentTypesRollup) GetDestTable(ctID string, spec Spec) (*schema.Table, error)

func (*ContentTypesRollup) Sync

func (c *ContentTypesRollup) Sync(ctx context.Context, metrics *source.TableClientMetrics, res chan<- *schema.Resource, table *schema.Table) error

type Model

type Model struct {
	ContentTypeID string
	Spec          Spec
}

type Spec

type Spec struct {
	// REST `$select` OData modificator, fields entity properties array
	// Wildcard selectors `*` are intentionally not supported
	// If not provided, only default fields will be fetched (ID, Created, AuthorId, Modified, EditorId)
	Select []string `json:"select"`
	// REST `$expand` OData modificator, fields entity properties array
	// When expanding an entity use selection of a nested entity property(s)
	// Optional, and in most of the cases we recommend to avoid it and
	// prefer to map nested entities to the separate tables
	Expand []string `json:"expand"`
	// Optional, an alias for the table name
	// Don't map different lists to the same table - such scenario is not supported
	Alias string `json:"alias"`
	// contains filtered or unexported fields
}

Spec is the configuration for a list source

func (*Spec) GetAlias added in v1.6.3

func (*Spec) GetAlias(ctName string) string

GetAlias returns an alias for a content type rollup

func (*Spec) SetDefault

func (s *Spec) SetDefault()

SetDefault sets default values for list spec

func (*Spec) Validate

func (s *Spec) Validate() error

Validate validates list spec

Jump to

Keyboard shortcuts

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