Documentation
¶
Index ¶
- func ChmodAndChownRecursively(logger *logrus.Entry, path string, uid int, gid int, mode os.FileMode) error
- func ChmodIfUnmatched(logger *logrus.Entry, path string, stat fs.FileInfo, desiredPerm fs.FileMode) error
- func CleanupNotExistingSymlinks(logger *logrus.Entry, path string) error
- func ExecuteCommand(logger *logrus.Entry, cmd *exec.Cmd, secrets []string) error
- func ExecuteCommandWithAllOutput(logger *logrus.Entry, cmd *exec.Cmd, secrets []string) (*bytes.Buffer, *bytes.Buffer, error)
- func ExecuteCommandWithOutput(logger *logrus.Entry, cmd *exec.Cmd, secrets []string) (*bytes.Buffer, error)
- func IsPermModeMatched(stat fs.FileInfo, desiredPerm fs.FileMode) bool
- func IsSymlink(fi os.FileInfo) bool
- func NewObscuredOutputWriter(wrappedWriter io.Writer, secrets []string) (*bytes.Buffer, io.Writer)
- func NewWrappedOutputWriter(wrappedWriter io.Writer) (*bytes.Buffer, io.Writer)
- func ObscureString(str string, secrets []string) string
- func RandBytes(length ...int) ([]byte, error)
- func RandomHashString(length ...int) string
- func RandomInt64(upper ...int64) int64
- func RedirectCmdWithObscureOutputWriter(cmd *exec.Cmd, secrets []string) (*bytes.Buffer, *bytes.Buffer)
- type ObscuredWriter
- type SecretKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChmodIfUnmatched ¶
func ExecuteCommand ¶
func NewObscuredOutputWriter ¶
func NewWrappedOutputWriter ¶
func ObscureString ¶
func RandomHashString ¶
RandomHashString generates a random SHA256 string with the maximum length of 64.
Types ¶
type ObscuredWriter ¶
type ObscuredWriter struct {
// contains filtered or unexported fields
}
func NewObscuredWriter ¶
func NewObscuredWriter(wrappedWriter io.Writer, secrets []string) *ObscuredWriter
type SecretKey ¶ added in v0.1.8
type SecretKey string
const ( SecretKeyUsername SecretKey = "username" SecretKeyPassword SecretKey = "password" SecretKeyPrivateKey SecretKey = "ssh-privatekey" SecretKeyPrivateKeyPassphrase SecretKey = "ssh-privatekey-passphrase" // #nosec G101 SecretKeyToken SecretKey = "token" SecretKeyAccessKey SecretKey = "access-key" SecretKeySecretKey SecretKey = "secret-key" )
external code needs to reference the following fields, which were previously placed in the internal directory and therefore couldn't be accessed by external code.
Click to show internal directories.
Click to hide internal directories.