Documentation
¶
Index ¶
- type DockerSecretsManager
- func (m *DockerSecretsManager) CleanupUnusedSecrets(usedSecrets []string) error
- func (m *DockerSecretsManager) EnsureSecret(secret config.SecretConfig) (string, error)
- func (m *DockerSecretsManager) GetSecretName(secret config.SecretConfig) string
- func (m *DockerSecretsManager) GetSecretTarget(secret config.SecretConfig) string
- type EnvFile
- func (ef *EnvFile) Count() int
- func (ef *EnvFile) Get(key string) (string, bool)
- func (ef *EnvFile) GetAll() map[string]string
- func (ef *EnvFile) GetCreatedAt() time.Time
- func (ef *EnvFile) GetID() string
- func (ef *EnvFile) GetKeys() []string
- func (ef *EnvFile) GetPath(projectName, serviceName string) string
- func (ef *EnvFile) Set(key, value string)
- func (ef *EnvFile) Size() int
- func (ef *EnvFile) ToReader() io.Reader
- func (ef *EnvFile) Validate() error
- type Manager
- func (m *Manager) CreateEnvFile(service *config.ServiceConfig) (*EnvFile, error)
- func (m *Manager) Delete(key string, environment string) error
- func (m *Manager) Get(key string) (string, error)
- func (m *Manager) GetRedactor() *Redactor
- func (m *Manager) IsSensitive(key string) bool
- func (m *Manager) List() []string
- func (m *Manager) Set(key, value string, environment string) error
- func (m *Manager) ValidateRequired(required []string) error
- type Redactor
- type SafeOutput
- func (so *SafeOutput) Debug(verbose bool, format string, args ...interface{})
- func (so *SafeOutput) Error(err error) error
- func (so *SafeOutput) Errorf(format string, args ...interface{}) error
- func (so *SafeOutput) Info(format string, args ...interface{})
- func (so *SafeOutput) Print(args ...interface{})
- func (so *SafeOutput) Printf(format string, args ...interface{})
- func (so *SafeOutput) Println(args ...interface{})
- func (so *SafeOutput) SetWriter(w io.Writer)
- func (so *SafeOutput) Success(format string, args ...interface{})
- func (so *SafeOutput) Warning(format string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DockerSecretsManager ¶
type DockerSecretsManager struct {
// contains filtered or unexported fields
}
DockerSecretsManager handles Docker Swarm secrets (for backward compatibility)
func NewDockerSecretsManager ¶
func NewDockerSecretsManager(client *ssh.Client, project, environment string, verbose bool) *DockerSecretsManager
NewDockerSecretsManager creates a new Docker secrets manager
func (*DockerSecretsManager) CleanupUnusedSecrets ¶
func (m *DockerSecretsManager) CleanupUnusedSecrets(usedSecrets []string) error
CleanupUnusedSecrets removes secrets that are no longer referenced
func (*DockerSecretsManager) EnsureSecret ¶
func (m *DockerSecretsManager) EnsureSecret(secret config.SecretConfig) (string, error)
EnsureSecret creates or updates a Docker secret Returns the secret name that was created
func (*DockerSecretsManager) GetSecretName ¶
func (m *DockerSecretsManager) GetSecretName(secret config.SecretConfig) string
GetSecretName returns the full secret name for a given secret config
func (*DockerSecretsManager) GetSecretTarget ¶
func (m *DockerSecretsManager) GetSecretTarget(secret config.SecretConfig) string
GetSecretTarget returns the target path for a secret in the container
type EnvFile ¶
type EnvFile struct {
// contains filtered or unexported fields
}
EnvFile represents a Docker environment file
func (*EnvFile) GetCreatedAt ¶
GetCreatedAt returns when this env file was created
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
NewManager creates a new secrets manager for the given environment
func (*Manager) CreateEnvFile ¶
func (m *Manager) CreateEnvFile(service *config.ServiceConfig) (*EnvFile, error)
CreateEnvFile creates a Docker env file for a service
func (*Manager) GetRedactor ¶
GetRedactor returns the redactor for output sanitization
func (*Manager) IsSensitive ¶
IsSensitive checks if a key name indicates sensitive data
func (*Manager) ValidateRequired ¶
ValidateRequired checks if all required secrets are present
type Redactor ¶
type Redactor struct {
// contains filtered or unexported fields
}
Redactor automatically redacts sensitive information from output
func (*Redactor) IsSensitiveKey ¶
IsSensitiveKey checks if a key name indicates sensitive data
type SafeOutput ¶
type SafeOutput struct {
// contains filtered or unexported fields
}
SafeOutput wraps output functions to automatically redact sensitive data
func NewSafeOutput ¶
func NewSafeOutput(redactor *Redactor) *SafeOutput
NewSafeOutput creates a new safe output wrapper
func (*SafeOutput) Debug ¶
func (so *SafeOutput) Debug(verbose bool, format string, args ...interface{})
Debug prints a debug message (only if verbose mode)
func (*SafeOutput) Error ¶
func (so *SafeOutput) Error(err error) error
Error creates a redacted error
func (*SafeOutput) Errorf ¶
func (so *SafeOutput) Errorf(format string, args ...interface{}) error
Errorf creates a formatted redacted error
func (*SafeOutput) Info ¶
func (so *SafeOutput) Info(format string, args ...interface{})
Info prints an info message
func (*SafeOutput) Print ¶
func (so *SafeOutput) Print(args ...interface{})
Print prints redacted output
func (*SafeOutput) Printf ¶
func (so *SafeOutput) Printf(format string, args ...interface{})
Printf formats and prints redacted output
func (*SafeOutput) Println ¶
func (so *SafeOutput) Println(args ...interface{})
Println prints redacted output with newline
func (*SafeOutput) SetWriter ¶
func (so *SafeOutput) SetWriter(w io.Writer)
SetWriter sets the output writer (for testing)
func (*SafeOutput) Success ¶
func (so *SafeOutput) Success(format string, args ...interface{})
Success prints a success message with checkmark
func (*SafeOutput) Warning ¶
func (so *SafeOutput) Warning(format string, args ...interface{})
Warning prints a warning message