Documentation ¶
Index ¶
- Variables
- func ConfigTemplate(driverConfig *eUtils.DriverConfig, modifier *helperkv.Modifier, ...) (string, map[int]string, bool, error)
- func ConfigTemplateRaw(driverConfig *eUtils.DriverConfig, mod *helperkv.Modifier, ...) ([]byte, error)
- func FilterPaths(templatePaths []string, endPaths []string, fileFilter []string, prefix bool) ([]string, []string)
- func GenerateConfigsFromVault(ctx eUtils.ProcessContext, configCtx *eUtils.ConfigContext, ...) (interface{}, error)
- func GetPathsFromProject(config *core.CoreConfig, mod *helperkv.Modifier, projects []string, ...) ([]string, error)
- func GetTemplate(driverConfig *eUtils.DriverConfig, modifier *helperkv.Modifier, ...) (string, error)
- func PopulateTemplate(driverConfig *eUtils.DriverConfig, emptyTemplate string, ...) (string, map[int]string, 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]interface{}, bool)
- func (cds *ConfigDataStore) GetValue(service string, keyPath []string, key string) (string, error)
- func (cds *ConfigDataStore) Init(config *core.CoreConfig, mod *helperkv.Modifier, secretMode bool, useDirs bool, ...) error
- func (cds *ConfigDataStore) InitTemplateVersionData(config *core.CoreConfig, mod *helperkv.Modifier, useDirs bool, project string, ...) (map[string]interface{}, error)
Constants ¶
This section is empty.
Variables ¶
var ConfiginatorOsPathSeparator string = string(os.PathSeparator)
Functions ¶
func ConfigTemplate ¶
func ConfigTemplate(driverConfig *eUtils.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 *eUtils.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 eUtils.ProcessContext, configCtx *eUtils.ConfigContext, driverConfig *eUtils.DriverConfig) (interface{}, error)
GenerateConfigsFromVault configures the templates in trc_templates and writes them to trcconfig
func GetPathsFromProject ¶
func GetTemplate ¶
func GetTemplate(driverConfig *eUtils.DriverConfig, modifier *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 *eUtils.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.
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 ¶
func (cds *ConfigDataStore) GetConfigValues(service string, config string) (map[string]interface{}, bool)
GetConfigValues gets a set of configuration values for a service from the data store.