Documentation
¶
Index ¶
- Variables
- func NewFilter(block *hcl.Block, fullName string) (modconfig.HclResource, hcl.Diagnostics)
- func NewFormat(block *hcl.Block, fullName string) (modconfig.HclResource, hcl.Diagnostics)
- func NewPartition(block *hcl.Block, fullName string) (modconfig.HclResource, hcl.Diagnostics)
- func NewTable(block *hcl.Block, fullName string) (modconfig.HclResource, hcl.Diagnostics)
- func NewTailpipeConnection(block *hcl.Block, fullName string) (modconfig.HclResource, hcl.Diagnostics)
- func NewTailpipePlugin(block *hcl.Block, fullName string) (modconfig.HclResource, hcl.Diagnostics)
- func ResourceHasSubtype(blockType string) bool
- type ColumnSchema
- type Filter
- type Format
- type HclBytes
- type Partition
- type Source
- type Table
- type TailpipeConfig
- type TailpipeConnection
- type TailpipePlugin
Constants ¶
This section is empty.
Variables ¶
View Source
var GlobalWorkspaceProfile *workspace_profile.TpWorkspaceProfile
Functions ¶
func NewFilter ¶
func NewFilter(block *hcl.Block, fullName string) (modconfig.HclResource, hcl.Diagnostics)
func NewFormat ¶
func NewFormat(block *hcl.Block, fullName string) (modconfig.HclResource, hcl.Diagnostics)
func NewPartition ¶
func NewPartition(block *hcl.Block, fullName string) (modconfig.HclResource, hcl.Diagnostics)
func NewTable ¶
func NewTable(block *hcl.Block, fullName string) (modconfig.HclResource, hcl.Diagnostics)
func NewTailpipeConnection ¶
func NewTailpipeConnection(block *hcl.Block, fullName string) (modconfig.HclResource, hcl.Diagnostics)
func NewTailpipePlugin ¶
func NewTailpipePlugin(block *hcl.Block, fullName string) (modconfig.HclResource, hcl.Diagnostics)
func ResourceHasSubtype ¶
Types ¶
type ColumnSchema ¶
type Filter ¶
type Filter struct {
modconfig.HclResourceImpl
Where *string `hcl:"where"`
}
type Format ¶
type Format struct {
modconfig.HclResourceImpl
Type string `cty:"type"`
Config *HclBytes `cty:"config"`
}
func (*Format) GetSubType ¶
GetSubType returns the subtype for the format block (the type). The presence of this function indicates this resource supports 3 part names, which affects how it is stored in the eval context
func (*Format) SetConfigHcl ¶
func (*Format) ToProto ¶
func (f *Format) ToProto() *proto.ConfigData
type HclBytes ¶
type HclBytes struct {
Hcl []byte `cty:"hcl"`
Range hclhelpers.Range `cty:"range"`
}
func HclBytesForRange ¶
type Partition ¶
type Partition struct {
modconfig.HclResourceImpl
// the name of the table this partition is for - this is the first label in the partition block
TableName string
// if the partition of for a custom table, this will be set to the custom table config
CustomTable *Table `cty:"table"`
// Plugin used for this partition
Plugin *plugin.Plugin `cty:"-"`
// Source of the data for this partition
Source Source `cty:"source"`
// any partition-type specific config data for the partition
Config []byte `cty:"config"`
// the config location
ConfigRange hclhelpers.Range `cty:"config_range"`
// an option filter in the format of a SQL where clause
Filter string
}
func (*Partition) CollectionStatePath ¶
func (*Partition) InferPluginName ¶
func (*Partition) SetConfigHcl ¶
type Source ¶
type Source struct {
Type string `hcl:" type,label" cty:"type"`
Connection *TailpipeConnection `hcl:"connection" cty:"connection"`
// optional: the format (for custom tables)
Format *Format `hcl:"format" cty:"format"`
// the config hcl
Config *HclBytes `cty:"config"`
}
func (*Source) SetConfigHcl ¶
func (*Source) ToProto ¶
func (s *Source) ToProto() *proto.ConfigData
type Table ¶
type Table struct {
modconfig.HclResourceImpl
// the default format for this table (todo make a map keyed by source name?)
DefaultSourceFormat *Format `hcl:"format" cty:"format"`
Columns []ColumnSchema `hcl:"column,block" cty:"columns"`
// should we include ALL source fields in addition to any defined columns, or ONLY include the columns defined
AutoMapSourceFields bool `hcl:"automap_source_fields,optional" cty:"automap_source_fields"`
// should we exclude any source fields from the output (only applicable if automap_source_fields is true)
ExcludeSourceFields []string `hcl:"exclude_source_fields,optional" cty:"exclude_source_fields"`
}
func (*Table) ToProtoSchema ¶
type TailpipeConfig ¶
type TailpipeConfig struct {
// map of partitions, keyed by unqualified name (<partition_type>.<partition_name>)
Partitions map[string]*Partition
Connections map[string]*TailpipeConnection
// map of plugin configs, keyed by plugin image ref
// (for each image ref we store an array of configs)
//Plugins map[string][]*plugin.Plugin
//// map of plugin configs, keyed by plugin instance
//PluginsInstances map[string]plugin.Plugin
// map of installed plugin versions, keyed by plugin image ref
PluginVersions map[string]*versionfile.InstalledVersion
CustomTables map[string]*Table
Formats map[string]*Format
}
var GlobalConfig *TailpipeConfig
func NewTailpipeConfig ¶
func NewTailpipeConfig() *TailpipeConfig
func (*TailpipeConfig) Add ¶
func (c *TailpipeConfig) Add(resource modconfig.HclResource) error
func (*TailpipeConfig) InitPartitions ¶
func (c *TailpipeConfig) InitPartitions()
func (*TailpipeConfig) Validate ¶
func (c *TailpipeConfig) Validate() error
type TailpipeConnection ¶
type TailpipeConnection struct {
modconfig.HclResourceImpl
Plugin string `cty:"plugin"`
Hcl []byte `cty:"hcl"`
// the hcl range for the connection - use our version so we can sty serialise it
HclRange hclhelpers.Range `cty:"hcl_range"`
}
func (*TailpipeConnection) GetSubType ¶
func (c *TailpipeConnection) GetSubType() string
GetSubType returns the subtype for the connection (the plugin). The presence of this function indicates this resource supports 3 part names, which affects how it is stored in the eval context
func (*TailpipeConnection) ToProto ¶
func (c *TailpipeConnection) ToProto() *proto.ConfigData
type TailpipePlugin ¶
type TailpipePlugin struct {
modconfig.HclResourceImpl
Plugin string `cty:"plugin"`
Version string `cty:"version"`
}
TODO UNUSED AS YET - can we just use plugin.Plugin??? sort parsing
func (*TailpipePlugin) GetSubType ¶
func (c *TailpipePlugin) GetSubType() string
GetSubType returns the subtype for the plug (the plugin). The presence of this function indicates this resource supports 3 part names, which affects how it is stored in the eval context
Click to show internal directories.
Click to hide internal directories.