Documentation
¶
Index ¶
- func DiagsToErrorsAndWarnings(errPrefix string, diags hcl.Diagnostics) error_helpers.ErrorAndWarnings
- func HclDiagsToError(prefix string, diags hcl.Diagnostics) error
- func LoadTailpipeConfig(v *versionfile.PluginVersionFile) (tailpipeConfig *config.TailpipeConfig, ew error_helpers.ErrorAndWarnings)
- func ParseResourceNameWithSubtype(propertyPath string) (modconfig.ResourceNameParser, error)
- type ConfigParseContext
- func (c *ConfigParseContext) AddDependencies(block *hcl.Block, name string, ...) hcl.Diagnostics
- func (c *ConfigParseContext) AddResource(resource modconfig.HclResource) hcl.Diagnostics
- func (c *ConfigParseContext) GetResource(parsedName *modconfig.ParsedResourceName) (resource modconfig.HclResource, found bool)
- type ParsedPropertyPath
- type ParsedResourceNameWithSubtype
- func (p *ParsedResourceNameWithSubtype) GetItemType() string
- func (p *ParsedResourceNameWithSubtype) GetMod() string
- func (p *ParsedResourceNameWithSubtype) GetName() string
- func (p *ParsedResourceNameWithSubtype) GetSubType() string
- func (p *ParsedResourceNameWithSubtype) String() string
- func (p *ParsedResourceNameWithSubtype) ToFullName() string
- func (p *ParsedResourceNameWithSubtype) ToFullNameWithMod(string) string
- func (p *ParsedResourceNameWithSubtype) ToResourceName() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiagsToErrorsAndWarnings ¶ added in v0.2.0
func DiagsToErrorsAndWarnings(errPrefix string, diags hcl.Diagnostics) error_helpers.ErrorAndWarnings
func HclDiagsToError ¶ added in v0.2.0
func LoadTailpipeConfig ¶
func LoadTailpipeConfig(v *versionfile.PluginVersionFile) (tailpipeConfig *config.TailpipeConfig, ew error_helpers.ErrorAndWarnings)
LoadTailpipeConfig loads the HCL connection config, resources and workspace profiles
func ParseResourceNameWithSubtype ¶ added in v0.2.0
func ParseResourceNameWithSubtype(propertyPath string) (modconfig.ResourceNameParser, error)
ParseResourceNameWithSubtype parses the name of a resource into type name and , where applicable, subtype.
Types ¶
type ConfigParseContext ¶
type ConfigParseContext struct {
parse.ParseContext
// contains filtered or unexported fields
}
ConfigParseContext is a parse context that is used to parse the TailpipeConfig
func NewConfigParseContext ¶
func NewConfigParseContext(rootEvalPath string) (*ConfigParseContext, error)
func (*ConfigParseContext) AddDependencies ¶
func (c *ConfigParseContext) AddDependencies(block *hcl.Block, name string, dependencies map[string]*modconfig.ResourceDependency) hcl.Diagnostics
AddDependencies is called when a block could not be resolved as it has dependencies 1) store block as unresolved 2) add dependencies to our tree of dependencies NOTE: this overrides ParseContext.AddDependencies to allwo us to override ParseResourcePropertyPath to handle resource type labels
func (*ConfigParseContext) AddResource ¶
func (c *ConfigParseContext) AddResource(resource modconfig.HclResource) hcl.Diagnostics
AddResource stores this resource as a variable to be added to the eval context.
func (*ConfigParseContext) GetResource ¶
func (c *ConfigParseContext) GetResource(parsedName *modconfig.ParsedResourceName) (resource modconfig.HclResource, found bool)
type ParsedPropertyPath ¶
type ParsedPropertyPath struct {
Type string
SubType string
Name string
PropertyPath []string
Original string
}
ParsedPropertyPath represents a parsed property path for a resource with a subtype
func ParseResourcePropertyPath ¶
func ParseResourcePropertyPath(propertyPath string) (*ParsedPropertyPath, error)
func (*ParsedPropertyPath) PropertyPathString ¶
func (p *ParsedPropertyPath) PropertyPathString() string
func (*ParsedPropertyPath) String ¶
func (p *ParsedPropertyPath) String() string
func (*ParsedPropertyPath) ToResourceName ¶
func (p *ParsedPropertyPath) ToResourceName() string
type ParsedResourceNameWithSubtype ¶ added in v0.2.0
type ParsedResourceNameWithSubtype struct {
Type string
SubType string
Name string
Original string
}
ParsedResourceNameWithSubtype represents a parsed property path for a resource with a subtype
func (*ParsedResourceNameWithSubtype) GetItemType ¶ added in v0.2.0
func (p *ParsedResourceNameWithSubtype) GetItemType() string
func (*ParsedResourceNameWithSubtype) GetMod ¶ added in v0.2.0
func (p *ParsedResourceNameWithSubtype) GetMod() string
func (*ParsedResourceNameWithSubtype) GetName ¶ added in v0.2.0
func (p *ParsedResourceNameWithSubtype) GetName() string
func (*ParsedResourceNameWithSubtype) GetSubType ¶ added in v0.2.0
func (p *ParsedResourceNameWithSubtype) GetSubType() string
func (*ParsedResourceNameWithSubtype) String ¶ added in v0.2.0
func (p *ParsedResourceNameWithSubtype) String() string
func (*ParsedResourceNameWithSubtype) ToFullName ¶ added in v0.2.0
func (p *ParsedResourceNameWithSubtype) ToFullName() string
func (*ParsedResourceNameWithSubtype) ToFullNameWithMod ¶ added in v0.2.0
func (p *ParsedResourceNameWithSubtype) ToFullNameWithMod(string) string
func (*ParsedResourceNameWithSubtype) ToResourceName ¶ added in v0.2.0
func (p *ParsedResourceNameWithSubtype) ToResourceName() string