Documentation ¶
Index ¶
- Variables
- func BootstrapViper(loader *WorkspaceProfileLoader, cmd *cobra.Command) error
- func GetModFileExtensions() []string
- func GetVariableValues(ctx context.Context, parseCtx *parse.ModParseContext, ...) (*modconfig.ModVariableMap, *error_helpers.ErrorAndWarnings)
- func IsCloudWorkspaceIdentifier(name string) bool
- func LoadMod(modPath string, parseCtx *parse.ModParseContext) (mod *modconfig.Mod, errorsAndWarnings *error_helpers.ErrorAndWarnings)
- func LoadModResourceNames(mod *modconfig.Mod, parseCtx *parse.ModParseContext) (resources *modconfig.WorkspaceResources, err error)
- func LoadModWithFileName(modPath string, 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 LoadVariableDefinitions(variablePath string, parseCtx *parse.ModParseContext) (*modconfig.ModVariableMap, error)
- func ModFileExists(modPath, modFile string) bool
- func SetDefaultFromEnv(k string, configVar string, varType cmdconfig.EnvVarType)
- func SetDefaultsFromConfig(configMap map[string]interface{})
- func SetDefaultsFromEnv()
- func ToError(val interface{}) error
- func Viper() *viper.Viper
- type DependencyPathKey
- type MissingVariableError
- type ParseModFlag
- type PluginRemoveReport
- type PluginRemoveReports
- type ReferenceTypeValueMap
- type VariableValidationFailedError
- type WorkspaceProfileLoader
Constants ¶
This section is empty.
Variables ¶
var GlobalWorkspaceProfile *modconfig.WorkspaceProfile
Functions ¶
func BootstrapViper ¶
func BootstrapViper(loader *WorkspaceProfileLoader, cmd *cobra.Command) error
BootstrapViper sets up viper with the essential path config (workspace-chdir and install-dir)
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(ctx context.Context, parseCtx *parse.ModParseContext, variableMap *modconfig.ModVariableMap, validate bool) (*modconfig.ModVariableMap, *error_helpers.ErrorAndWarnings)
func IsCloudWorkspaceIdentifier ¶
IsCloudWorkspaceIdentifier returns whether name is a cloud workspace identifier of the form: {identity_handle}/{workspace_handle},
func LoadMod ¶
func LoadMod(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(mod *modconfig.Mod, parseCtx *parse.ModParseContext) (resources *modconfig.WorkspaceResources, err error)
LoadModResourceNames parses all hcl files in modPath and returns the names of all resources
func LoadModWithFileName ¶
func LoadModWithFileName(modPath string, 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(variablePath string, parseCtx *parse.ModParseContext) (*modconfig.ModVariableMap, error)
func ModFileExists ¶
func SetDefaultFromEnv ¶
func SetDefaultFromEnv(k string, configVar string, varType cmdconfig.EnvVarType)
func SetDefaultsFromConfig ¶
func SetDefaultsFromConfig(configMap map[string]interface{})
SetDefaultsFromConfig overrides viper default values from hcl config values
Types ¶
type DependencyPathKey ¶
type DependencyPathKey string
DependencyPathKey is a string representation of a dependency path
- a set of mod dependencyPath values separated by '->'
e.g. local -> github.com/kaidaguerre/steampipe-mod-m1@v3.1.1 -> github.com/kaidaguerre/steampipe-mod-m2@v5.1.1
func (DependencyPathKey) GetParent ¶
func (k DependencyPathKey) GetParent() DependencyPathKey
func (DependencyPathKey) PathLength ¶
func (k DependencyPathKey) PathLength() int
how long is the depdency path
type MissingVariableError ¶
type MissingVariableError struct { MissingVariables []*modconfig.Variable MissingTransitiveVariables map[DependencyPathKey][]*modconfig.Variable // contains filtered or unexported fields }
func NewMissingVarsError ¶
func NewMissingVarsError(workspaceMod *modconfig.Mod) MissingVariableError
func (MissingVariableError) Error ¶
func (m MissingVariableError) Error() string
type ParseModFlag ¶
type ParseModFlag uint32
const ( CreateDefaultMod ParseModFlag = 1 << iota CreatePseudoResources )
type PluginRemoveReport ¶
type PluginRemoveReport struct { Image *ociinstaller.SteampipeImageRef ShortName string Connections []*modconfig.Connection }
type PluginRemoveReports ¶
type PluginRemoveReports []PluginRemoveReport
func (PluginRemoveReports) Print ¶
func (r PluginRemoveReports) Print()
type ReferenceTypeValueMap ¶
ReferenceTypeValueMap is the raw data used to build the evaluation context
When resolving hcl references like : - query.q1 - var.v1 - mod1.query.my_query.sql
ReferenceTypeValueMap is keyed by resource type, then by resource name
type VariableValidationFailedError ¶
type VariableValidationFailedError struct {
// contains filtered or unexported fields
}
func (VariableValidationFailedError) Error ¶
func (m VariableValidationFailedError) Error() string
type WorkspaceProfileLoader ¶
type WorkspaceProfileLoader struct { DefaultProfile *modconfig.WorkspaceProfile ConfiguredProfile *modconfig.WorkspaceProfile // contains filtered or unexported fields }
func LoadWorkspaceProfile ¶
func LoadWorkspaceProfile(runCtx context.Context) (*WorkspaceProfileLoader, error)
func NewWorkspaceProfileLoader ¶
func NewWorkspaceProfileLoader(runCtx context.Context, workspaceProfilePath string) (*WorkspaceProfileLoader, error)
func (*WorkspaceProfileLoader) GetActiveWorkspaceProfile ¶
func (l *WorkspaceProfileLoader) GetActiveWorkspaceProfile() *modconfig.WorkspaceProfile
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package version :: The version package provides a location to set the release versions for all packages to consume, without creating import cycles.
|
Package version :: The version package provides a location to set the release versions for all packages to consume, without creating import cycles. |