Documentation ¶
Index ¶
- func GetModFileExtensions() []string
- func GetVariableValues(parseCtx *parse.ModParseContext, variableMap *modconfig.ModVariableMap, ...) (*modconfig.ModVariableMap, error_helpers.ErrorAndWarnings)
- func LoadMod(ctx context.Context, modPath string, parseCtx *parse.ModParseContext) (mod *modconfig.Mod, ew error_helpers.ErrorAndWarnings)
- 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_helpers.ErrorAndWarnings)
- func ToError(val interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetModFileExtensions ¶
func GetModFileExtensions() []string
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(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, ew error_helpers.ErrorAndWarnings)
LoadMod parses all hcl files in modPath and returns a single mod 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 LoadModWithFileName ¶
func LoadModWithFileName(ctx context.Context, modPath, modFile string, parseCtx *parse.ModParseContext) (mod *modconfig.Mod, errorsAndWarnings error_helpers.ErrorAndWarnings)
Deprecated TODO this function is included for backwards compatibility - it is used for Flowpipe LoadPipelines
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 LoadPipelinesReturningItsMod ¶
TODO update this to NOT use deprecated LoadModWithFileName
func LoadVariableDefinitions ¶
func LoadVariableDefinitions(ctx context.Context, variablePath string, parseCtx *parse.ModParseContext) (*modconfig.ModVariableMap, error_helpers.ErrorAndWarnings)
Types ¶
This section is empty.