Documentation ¶
Overview ¶
This is a minimalist config package. It uses a flat structure and simple obfuscation to avoid over-the-shoulder or casual viewing of passwords on the file system. Future implemenations may improve upon the data structure and allow for user provided passwords that will better protect the locally stored password. Or we can try to find a config library that supports:
- getting / setting values in a structured way (like Viper)
- securely prompting for values (I suppose this could be externalized)
- encrypting / decrypting / obfuscating stored values
- loading and saving configuration (not just reading)
Index ¶
- Constants
- type Config
- func (c Config) Get(group, name string) string
- func (c Config) GetSecret(group, name string) (string, error)
- func (c Config) PromptPlainText(group, name, prompt string) error
- func (c Config) PromptSecret(group, name, prompt string) error
- func (c Config) Read() error
- func (c Config) Set(group, name string, value string)
- func (c Config) Write() error
Constants ¶
View Source
const DefaultConfigFileName = ".graven.yaml"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (Config) PromptPlainText ¶ added in v0.10.0
func (Config) PromptSecret ¶ added in v0.10.0
Click to show internal directories.
Click to hide internal directories.