Documentation
¶
Index ¶
- Constants
- func FetchProviderSecrets(ctx context.Context, provider string, names []string, options ProviderOptions) (map[string]string, error)
- 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) Has(key string) bool
- 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 ProviderOptions
- 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 ¶
const ( ProviderAWSSSM = "aws-ssm" ProviderAWSSecretsManager = "aws-secrets-manager" )
const GitignoreContent = `# Tako secrets - DO NOT COMMIT
secrets*
encryption.key
*.key
*.env
state.json
state/
deployments/
logs/
audit.log
`
Variables ¶
This section is empty.
Functions ¶
func FetchProviderSecrets ¶ added in v0.4.1
Types ¶
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 ProviderOptions ¶ added in v0.4.1
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