Documentation ¶
Index ¶
- func GetModFileExtensions() []string
- func GetVariableValues(ctx context.Context, parseCtx *parse.ModParseContext, ...) (*modconfig.ModVariableMap, *error_helpers.ErrorAndWarnings)
- func LoadMod(ctx context.Context, modPath string, parseCtx *parse.ModParseContext) (mod *modconfig.Mod, errorsAndWarnings *error_helpers.ErrorAndWarnings)
- func LoadModResourceNames(ctx context.Context, mod *modconfig.Mod, parseCtx *parse.ModParseContext) (resources *modconfig.WorkspaceResources, err error)
- func LoadModWithFileName(ctx context.Context, modPath, modFile string, parseCtx *parse.ModParseContext) (mod *modconfig.Mod, errorsAndWarnings *error_helpers.ErrorAndWarnings)
- func LoadPipelines(ctx context.Context, configPath string) (map[string]*modconfig.Pipeline, map[string]*modconfig.Trigger, error)
- func LoadPipelinesReturningItsMod(ctx context.Context, configPath string) (*modconfig.Mod, error)
- func LoadVariableDefinitions(ctx context.Context, variablePath string, parseCtx *parse.ModParseContext) (*modconfig.ModVariableMap, error)
- func ModFileExists(modPath, modFile string) bool
- func ToError(val interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetModFileExtensions ¶
func GetModFileExtensions() []string
TODO KAI WHO USES THIS GetModFileExtensions returns list of all file extensions we care about this will be the mod data extension, plus any registered extensions registered in fileToResourceMap
func GetVariableValues ¶
func GetVariableValues(ctx context.Context, parseCtx *parse.ModParseContext, variableMap *modconfig.ModVariableMap, validate bool) (*modconfig.ModVariableMap, *error_helpers.ErrorAndWarnings)
func LoadMod ¶
func LoadMod(ctx context.Context, modPath string, parseCtx *parse.ModParseContext) (mod *modconfig.Mod, errorsAndWarnings *error_helpers.ErrorAndWarnings)
LoadMod parses all hcl files in modPath and returns a single mod if CreatePseudoResources flag is set, construct hcl resources for files with specific extensions NOTE: it is an error if there is more than 1 mod defined, however zero mods is acceptable - a default mod will be created assuming there are any resource files
func LoadModResourceNames ¶
func LoadModResourceNames(ctx context.Context, mod *modconfig.Mod, parseCtx *parse.ModParseContext) (resources *modconfig.WorkspaceResources, err error)
TODO KAI WHO USES THIS? LoadModResourceNames parses all hcl files in modPath and returns the names of all resources
func LoadModWithFileName ¶
func LoadModWithFileName(ctx context.Context, modPath, modFile string, parseCtx *parse.ModParseContext) (mod *modconfig.Mod, errorsAndWarnings *error_helpers.ErrorAndWarnings)
func LoadPipelines ¶
func LoadPipelines(ctx context.Context, configPath string) (map[string]*modconfig.Pipeline, map[string]*modconfig.Trigger, error)
Convenient function to support testing
The automated tests were initially created before the concept of Mod is introduced in Flowpipe ¶
We can potentially remove this function, but we have to refactor all our test cases
func LoadVariableDefinitions ¶
func LoadVariableDefinitions(ctx context.Context, variablePath string, parseCtx *parse.ModParseContext) (*modconfig.ModVariableMap, error)
func ModFileExists ¶
Types ¶
This section is empty.