Documentation
¶
Index ¶
- Variables
- func CIDConfigDir() string
- func CIDStateDir() string
- func ExportMachineCACertsToFile(target string) error
- func GetCertFileByType(certFileType string) (string, error)
- func GetContainerUser() string
- func GetStringOrDefault(value string, defaultValue string) string
- func MergeMaps(maps ...map[string]string) map[string]string
- func RandomUUIDWithoutDashes() string
- func RegexFormat(input string, regexExpr string, outputTemplate string) (string, error)
- func ResolveEnvMap(env map[string]string) map[string]string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrFailedToReadBundleFile = errors.New("failed to read bundle file") ErrNoCertBundleFound = errors.New("no ca bundle found") ErrFailedToCreateCertDir = errors.New("failed to create cert dir") ErrFailedToWriteCertFile = errors.New("failed to write cert file") ErrUnknownCertFileType = errors.New("unknown cert file type") )
View Source
var CaBundles = [][]string{
{"/etc/ssl/certs/ca-certificates.crt"},
{"/etc/pki/tls/certs/ca-bundle.crt", "/etc/pki/tls/certs/ca-extra.crt"},
{"/etc/ssl/ca-bundle.pem"},
{"/etc/pki/tls/cacert.pem"},
{"/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem"},
{"/etc/ssl/cert.pem"},
}
CaBundles paths on various systems, see https://go.dev/src/crypto/x509/root_linux.go
Functions ¶
func CIDConfigDir ¶
func CIDConfigDir() string
func CIDStateDir ¶
func CIDStateDir() string
func ExportMachineCACertsToFile ¶
ExportMachineCACertsToFile exports the machine CA certificates to a file
func GetCertFileByType ¶
GetCertFileByType returns the cert file by type (ca-bundle, java-keystore)
func GetContainerUser ¶
func GetContainerUser() string
GetContainerUser returns the user id and group id of the current user to mirror it in the container TODO: This is not working yet because of some issues, we still require root as of now
func GetStringOrDefault ¶
func RandomUUIDWithoutDashes ¶
func RandomUUIDWithoutDashes() string
func RegexFormat ¶
RegexFormat will evaluate a regex expr to render a template
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.