Documentation ¶
Index ¶
- Variables
- func AutoAuth(driverConfig *DriverConfig, secretIDPtr *string, appRoleIDPtr *string, ...) error
- func BoundCheck(driverConfig *DriverConfig, versionNumbers []int, version string)
- func CheckError(config *core.CoreConfig, err error, exit bool)
- func CheckErrorNoStack(config *core.CoreConfig, err error, exit bool)
- func CheckInitFlags(flagset *flag.FlagSet)
- func CheckWarning(config *core.CoreConfig, warning string, exit bool)
- func CheckWarnings(config *core.CoreConfig, warnings []string, exit bool)
- func ConfigControl(ctx ProcessContext, configCtx *ConfigContext, driverConfig *DriverConfig, ...)
- func DiffHelper(configCtx *ConfigContext, config bool)
- func GetAcceptedTemplatePaths(driverConfig *DriverConfig, modCheck *helperkv.Modifier, ...) ([]string, error)
- func GetProjectService(templateFile string) (string, string, string)
- func GetProjectServices(templateFiles []string) ([]string, []string, []string)
- func GetProjectVersionInfo(driverConfig *DriverConfig, mod *helperkv.Modifier) map[string]map[string]interface{}
- func GetProjectVersions(driverConfig *DriverConfig, ...) []int
- func GetRawEnv(env string) string
- func GetStringInBetween(str string, start string, end string) (result string)
- func GetSupportedProdRegions() []string
- func GetTemplateFileName(templateFile string, service string) string
- func InitHeadless(headless bool)
- func IsWindows() bool
- func LineByLineDiff(stringA *string, stringB *string, patchData bool, colorSkip bool) string
- func LogAndSafeExit(config *core.CoreConfig, message string, code int) error
- func LogError(config *core.CoreConfig, err error, f *os.File, exit bool)
- func LogErrorAndSafeExit(config *core.CoreConfig, err error, code int) error
- func LogErrorMessage(config *core.CoreConfig, errorMessage string, exit bool)
- func LogErrorObject(config *core.CoreConfig, err error, exit bool)
- func LogInfo(config *core.CoreConfig, msg string)
- func LogMessageErrorObject(config *core.CoreConfig, errorMessage string, err error, exit bool)
- func LogWarningMessage(config *core.CoreConfig, errorMessage string, exit bool)
- func LogWarnings(config *core.CoreConfig, warnings []string, f *os.File, exit bool)
- func LogWarningsObject(config *core.CoreConfig, warnings []string, exit bool)
- func LoginToLocal() (string, error)
- func Parse(filepath string, service string, filename string) (map[string]interface{}, error)
- func RemoveDuplicateValues(intSlice []string) []string
- func RemoveDuplicates(versionFilter []string) []string
- func SanitizeForLogging(errMsg string) string
- func SplitEnv(env string) []string
- func VersionHelper(versionData map[string]interface{}, templateOrValues bool, valuePath string, ...)
- type ConfigContext
- type ConfigDriver
- type DriverConfig
- type MemoryFileSystem
- type ProcessContext
- type ResultData
Constants ¶
This section is empty.
Variables ¶
var BasePtr *bool
var IndexNameFilterPtr *string
var IndexValueFilterPtr *string
var IndexedPtr *string
var OnlyBasePtr = false
var ProtectedPtr *string
var RestrictedPtr *string
var ServiceFilterPtr *string
var ServiceNameFilterPtr *string
var SubPathFilter *string
Functions ¶
func AutoAuth ¶
func AutoAuth(driverConfig *DriverConfig, secretIDPtr *string, appRoleIDPtr *string, tokenPtr *string, tokenNamePtr *string, envPtr *string, addrPtr *string, envCtxPtr *string, appRoleConfig string, ping bool) error
AutoAuth attempts to authenticate a user.
func BoundCheck ¶
func BoundCheck(driverConfig *DriverConfig, versionNumbers []int, version string)
func CheckError ¶
func CheckError(config *core.CoreConfig, err error, exit bool)
CheckError Simplifies the error checking process
func CheckErrorNoStack ¶
func CheckErrorNoStack(config *core.CoreConfig, err error, exit bool)
CheckErrorNoStack Simplifies the error checking process
func CheckInitFlags ¶
func CheckWarning ¶
func CheckWarning(config *core.CoreConfig, warning string, exit bool)
CheckWarnings Checks warnings returned from various vault relation operations
func CheckWarnings ¶
func CheckWarnings(config *core.CoreConfig, warnings []string, exit bool)
CheckWarnings Checks warnings returned from various vault relation operations
func ConfigControl ¶
func ConfigControl(ctx ProcessContext, configCtx *ConfigContext, driverConfig *DriverConfig, drive ConfigDriver)
ConfigControl Setup initializes the directory structures in preparation for parsing templates.
func DiffHelper ¶
func DiffHelper(configCtx *ConfigContext, config bool)
func GetProjectServices ¶
func GetProjectVersionInfo ¶
func GetProjectVersionInfo(driverConfig *DriverConfig, mod *helperkv.Modifier) map[string]map[string]interface{}
func GetProjectVersions ¶
func GetProjectVersions(driverConfig *DriverConfig, versionMetadataMap map[string]map[string]interface{}) []int
func GetStringInBetween ¶
func GetSupportedProdRegions ¶
func GetSupportedProdRegions() []string
func GetTemplateFileName ¶
func InitHeadless ¶
func InitHeadless(headless bool)
func LineByLineDiff ¶
func LogAndSafeExit ¶
func LogAndSafeExit(config *core.CoreConfig, message string, code int) error
LogAndSafeExit -- provides isolated location of os.Exit to ensure os.Exit properly processed.
func LogErrorAndSafeExit ¶
func LogErrorAndSafeExit(config *core.CoreConfig, err error, code int) error
LogErrorAndSafeExit -- provides isolated location of os.Exit to ensure os.Exit properly processed.
func LogErrorMessage ¶
func LogErrorMessage(config *core.CoreConfig, errorMessage string, exit bool)
LogErrorObject writes errors to the passed logger object and exits
func LogErrorObject ¶
func LogErrorObject(config *core.CoreConfig, err error, exit bool)
LogErrorObject writes errors to the passed logger object and exits
func LogInfo ¶
func LogInfo(config *core.CoreConfig, msg string)
LogErrorObject writes errors to the passed logger object and exits
func LogMessageErrorObject ¶
func LogMessageErrorObject(config *core.CoreConfig, errorMessage string, err error, exit bool)
LogErrorObject writes errors to the passed logger object and exits
func LogWarningMessage ¶
func LogWarningMessage(config *core.CoreConfig, errorMessage string, exit bool)
LogErrorObject writes errors to the passed logger object and exits
func LogWarnings ¶
LogWarnings Writes array of warnings to the log file and terminates
func LogWarningsObject ¶
func LogWarningsObject(config *core.CoreConfig, warnings []string, exit bool)
LogWarningsObject writes warnings to the passed logger object and exits
func LoginToLocal ¶
LoginToLocal prompts the user to enter credentials from the terminal and resolves granular local environment
func Parse ¶
Parse Extracts default values as key-value pairs from template files. Before being uploaded, the service and filename will be appended so the uploaded value will be <Service>.<Filename>.<Key> Underscores in key names will be replaced with periods before being uploaded
func RemoveDuplicateValues ¶
func RemoveDuplicates ¶
func SanitizeForLogging ¶
Types ¶
type ConfigContext ¶
type ConfigContext struct { ResultMap map[string]*string EnvSlice []string ProjectSectionsSlice []string ResultChannel chan *ResultData FileSysIndex int DiffFileCount int32 EnvLength int ConfigWg sync.WaitGroup Mutex *sync.Mutex }
func (*ConfigContext) GetDiffFileCount ¶
func (cfgContext *ConfigContext) GetDiffFileCount() int32
func (*ConfigContext) SetDiffFileCount ¶
func (cfgContext *ConfigContext) SetDiffFileCount(cnt int)
type ConfigDriver ¶
type ConfigDriver func(ctx ProcessContext, configCtx *ConfigContext, driverConfig *DriverConfig) (interface{}, error)
type DriverConfig ¶
type DriverConfig struct { CoreConfig core.CoreConfig // Process context used by new tool implementations in callbacks. // Tools can attach their own context here for later access in // certain callbacks. Context ProcessContext // Internal systems... Insecure bool IsShellSubProcess bool // If subshell // Vault Configurations... Token string VaultAddress string EnvRaw string // May change depending on tool running... Env string // Immutable... Regions []string FileFilter []string // Which systems to operate on. SubPathFilter []string // Which subpaths to operate on. PathParam string // Path parameter for dynamic pathing... SecretMode bool // Tierceron source and destination I/O StartDir []string // Starting directory. possibly multiple EndDir string OutputMemCache bool MemFs MemoryFileSystem CertPathOverrides map[string]string // certFileName -> certDest // Config modes.... ZeroConfig bool GenAuth bool TrcShellRaw string //Used for TrcShell Trcxe []string //Used for TRCXE Trcxr bool //Used for TRCXR Clean bool Update func(*ConfigContext, *string, string) // KeyStore Output tooling KeyStore *keystore.KeyStore KeystorePassword string WantKeystore string // If provided and non nil, pem files will be put into a java compatible keystore. // Diff tooling Diff bool DiffCounter int VersionInfo func(map[string]interface{}, bool, string, bool) VersionFilter []string // Vault Pathing.... // This section stores information useful in directing I/O with Vault. AppRoleConfig string ServicesWanted []string ProjectSections []string SectionKey string // Restricted or Index SectionName string // extension provided name SubSectionName string // extension provided subsection name SubSectionValue string ServiceFilter []string // Which tables to use. DeploymentConfig map[string]interface{} // For trcsh to indicate which deployment to work on DeploymentCtlMessageChan chan string }
DriverConfig -- contains many structures necessary for Tierceron tool functionality.
func InitVaultMod ¶
func InitVaultMod(driverConfig *DriverConfig) (*DriverConfig, *helperkv.Modifier, *sys.Vault, error)
Helper to easiliy intialize a vault and a mod all at once.
type MemoryFileSystem ¶ added in v1.9.10
type MemoryFileSystem interface {
WriteToMemFile(driverConfig *DriverConfig, memCacheLocal *sync.Mutex, byteData *[]byte, path string)
}
type ProcessContext ¶
type ProcessContext interface{}