util

package
v1.12.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2024 License: MIT Imports: 23 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckNotSudo

func CheckNotSudo()

CheckNotSudo -- checks if current user is sudoer and exits if they are.

func GetJSONFromClientByGet

func GetJSONFromClientByGet(config *core.CoreConfig, httpClient *http.Client, headers map[string]string, address string, body io.Reader) (map[string]interface{}, int, error)

func GetJSONFromClientByPost

func GetJSONFromClientByPost(config *core.CoreConfig, httpClient *http.Client, headers map[string]string, address string, body io.Reader) (map[string]interface{}, int, error)

func GetLocalVaultHost

func GetLocalVaultHost(withPort bool, vaultHostChan chan string, vaultLookupErrChan chan error, logger *log.Logger)

Unused/deprecated

func GetPluginToolConfig

func GetPluginToolConfig(driverConfig *eUtils.DriverConfig, mod *helperkv.Modifier, pluginConfig map[string]interface{}, defineService bool) (map[string]interface{}, error)

func LoadBaseTemplate

func LoadBaseTemplate(driverConfig *eUtils.DriverConfig, templateResult *extract.TemplateResultData, goMod *helperkv.Modifier, project string, service string, templatePath string) error

func ResolveTokenName

func ResolveTokenName(env string) string

func Sanitize added in v1.7.3

func Sanitize(input interface{}) string

func SeedVaultById

func SeedVaultById(driverConfig *eUtils.DriverConfig, goMod *helperkv.Modifier, service string, address string, token string, baseTemplate *extract.TemplateResultData, tableData map[string]interface{}, indexPath string, project string) error

func UncompressZipFile added in v1.3.4

func UncompressZipFile(filePath string) (bool, []error)

Types

type ProcessFlowConfig

type ProcessFlowConfig func(pluginEnvConfig map[string]interface{}) map[string]interface{}

type ProcessFlowFunc

type ProcessFlowFunc func(pluginConfig map[string]interface{}, logger *log.Logger) error

type ProcessFlowInitConfig

type ProcessFlowInitConfig func(pluginConfig map[string]interface{}, logger *log.Logger) error

type Properties

type Properties struct {
	AuthEndpoint string
	// contains filtered or unexported fields
}

Properties stores all configuration properties for a project.

func NewProperties

func NewProperties(config *core.CoreConfig, v *sys.Vault, mod *helperkv.Modifier, env string, project string, service string) (*Properties, error)

func (*Properties) GetConfigValue

func (p *Properties) GetConfigValue(service string, config string, key string) (string, bool)

GetConfigValue gets an individal configuration value for a service from the data store.

func (*Properties) GetConfigValues

func (p *Properties) GetConfigValues(service string, config string) (map[string]interface{}, bool)

GetConfigValues gets an individal configuration value for a service from the data store.

func (*Properties) GetPluginData

func (p *Properties) GetPluginData(region string, service string, config string, log *log.Logger) (map[string]interface{}, map[string]interface{})

func (*Properties) GetValue

func (p *Properties) GetValue(service string, keyPath []string, key string) (string, error)

GetValue gets an individal configuration value for a service from the data store.

func (*Properties) WritePluginData

func (p *Properties) WritePluginData(pluginData map[string]interface{}, replacedFields map[string]interface{}, mod *helperkv.Modifier, log *log.Logger, hostRegion string, pluginName string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL