Documentation
¶
Index ¶
- Variables
- func ConfigTemplate(driverConfig *config.DriverConfig, modifier *helperkv.Modifier, ...) (string, map[int]string, bool, error)
- func ConfigTemplateRaw(driverConfig *config.DriverConfig, mod *helperkv.Modifier, ...) ([]byte, error)
- func FilterPaths(templatePaths []string, endPaths []string, fileFilter []string, prefix bool) ([]string, []string)
- func GenerateConfigsFromVault(ctx config.ProcessContext, configCtx *config.ConfigContext, ...) (any, error)
- func GetPathsFromProject(config *coreconfig.CoreConfig, mod *helperkv.Modifier, projects []string, ...) ([]string, error)
- func GetTemplate(driverConfig *config.DriverConfig, mod *helperkv.Modifier, templatePath string) (string, error)
- func PopulateTemplate(driverConfig *config.DriverConfig, emptyTemplate string, ...) (string, map[int]string, error)
- func ValidateTag(driverConfig *config.DriverConfig, tag string) (bool, error)
- type ConfigDataStore
- func (cds *ConfigDataStore) GetConfigValue(service string, config string, key string) (string, bool)
- func (cds *ConfigDataStore) GetConfigValues(service string, config string) (map[string]any, bool)
- func (cds *ConfigDataStore) GetConfigValuesByMatch(service string, config string) (map[string]any, bool)
- func (cds *ConfigDataStore) GetValue(service string, keyPath []string, key string) (string, error)
- func (cds *ConfigDataStore) Init(config *coreconfig.CoreConfig, mod *helperkv.Modifier, secretMode bool, ...) error
- func (cds *ConfigDataStore) InitTemplateVersionData(config *coreconfig.CoreConfig, mod *helperkv.Modifier, useDirs bool, ...) (map[string]any, error)
Constants ¶
This section is empty.
Variables ¶
var (
ConfiginatorOsPathSeparator string = string(os.PathSeparator)
)
Functions ¶
func ConfigTemplate ¶
func ConfigTemplate(driverConfig *config.DriverConfig, modifier *helperkv.Modifier, emptyFilePath string, secretMode bool, project string, service string, cert bool, zc bool) (string, map[int]string, bool, error)
ConfigTemplate takes a modifier object, a file path where the template is located, the target path, and two maps of data to populate the template with. It configures the template and writes it to the specified file path.
func ConfigTemplateRaw ¶
func ConfigTemplateRaw(driverConfig *config.DriverConfig, mod *helperkv.Modifier, emptyFilePath string, configuredFilePath string, secretMode bool, project string, service string, cert bool, zc bool, exitOnFailure bool) ([]byte, error)
ConfigTemplateRaw - gets a raw unpopulated template.
func FilterPaths ¶
func FilterPaths(templatePaths []string, endPaths []string, fileFilter []string, prefix bool) ([]string, []string)
FilterPaths -- filters based on provided fileFilter
func GenerateConfigsFromVault ¶
func GenerateConfigsFromVault(ctx config.ProcessContext, configCtx *config.ConfigContext, driverConfig *config.DriverConfig) (any, error)
GenerateConfigsFromVault configures the templates in trc_templates and writes them to trcconfig
func GetPathsFromProject ¶
func GetPathsFromProject(config *coreconfig.CoreConfig, mod *helperkv.Modifier, projects []string, services []string) ([]string, error)
func GetTemplate ¶
func GetTemplate(driverConfig *config.DriverConfig, mod *helperkv.Modifier, templatePath string) (string, error)
GetTemplate makes a request to the vault for the template found in <project>/<service>/<file>/template-file Returns the template data in base64 and the template's extension. Returns any errors generated by vault
func PopulateTemplate ¶
func PopulateTemplate(driverConfig *config.DriverConfig, emptyTemplate string, modifier *helperkv.Modifier, secretMode bool, project string, service string, filename string, cert bool) (string, map[int]string, error)
PopulateTemplate takes an empty template and a modifier. It populates the template and returns it in a string.
func ValidateTag ¶ added in v1.48.0
func ValidateTag(driverConfig *config.DriverConfig, tag string) (bool, error)
Types ¶
type ConfigDataStore ¶
type ConfigDataStore struct {
Regions []string
// contains filtered or unexported fields
}
ConfigDataStore stores the data needed to configure the specified template files
func (*ConfigDataStore) GetConfigValue ¶
func (cds *ConfigDataStore) GetConfigValue(service string, config string, key string) (string, bool)
GetConfigValue gets an individual configuration value for a service from the data store.
func (*ConfigDataStore) GetConfigValues ¶
GetConfigValues gets a set of configuration values for a service from the data store.
func (*ConfigDataStore) GetConfigValuesByMatch ¶ added in v1.50.9
func (*ConfigDataStore) Init ¶
func (cds *ConfigDataStore) Init(config *coreconfig.CoreConfig, mod *helperkv.Modifier, secretMode bool, useDirs bool, project string, commonPaths []string, servicesWanted ...string) error
func (*ConfigDataStore) InitTemplateVersionData ¶
func (cds *ConfigDataStore) InitTemplateVersionData(config *coreconfig.CoreConfig, mod *helperkv.Modifier, useDirs bool, project string, file string, servicesWanted ...string) (map[string]any, error)