Documentation
¶
Overview ¶
Package refs provides functions for extracting resolver references from Go templates and CEL expressions.
Index ¶
- func ExtractFromCEL(ctx context.Context, expr string) ([]string, error)
- func ExtractFromTemplate(content, leftDelim, rightDelim string) ([]string, error)
- func ExtractFromTemplateFile(filePath, leftDelim, rightDelim string) ([]string, error)
- func ExtractResolverName(path string) string
- func ReadStdin(r io.Reader) (string, error)
- type Output
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractFromCEL ¶
ExtractFromCEL extracts resolver references from a CEL expression.
func ExtractFromTemplate ¶
ExtractFromTemplate extracts resolver references from a Go template string.
func ExtractFromTemplateFile ¶
ExtractFromTemplateFile reads a template file and extracts resolver references.
func ExtractResolverName ¶
ExtractResolverName extracts the resolver name from a template path. e.g., "._.config.host" -> "config", ".config" -> "config"
Types ¶
type Output ¶
type Output struct {
Source string `json:"source" yaml:"source"`
SourceType string `json:"sourceType" yaml:"sourceType"`
References []string `json:"references" yaml:"references"`
Count int `json:"count" yaml:"count"`
}
Output represents the output structure for resolver reference extraction.
Click to show internal directories.
Click to hide internal directories.