Documentation
¶
Index ¶
- func LoadTailpipeConfig(ctx context.Context) (tailpipeConfig *config.TailpipeConfig, ...)
- 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 ParsedResourceName
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadTailpipeConfig ¶
func LoadTailpipeConfig(ctx context.Context) (tailpipeConfig *config.TailpipeConfig, errorsAndWarnings error_helpers.ErrorAndWarnings)
LoadTailpipeConfig loads the HCL connection config, resources and workspace profiles
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
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 ParsedResourceName ¶
ParsedResourceName represents a parsed property path for a resource with a subtype
func ParseResourceName ¶
func ParseResourceName(propertyPath string) (*ParsedResourceName, error)
func (*ParsedResourceName) String ¶
func (p *ParsedResourceName) String() string
func (*ParsedResourceName) ToResourceName ¶
func (p *ParsedResourceName) ToResourceName() string