Documentation
¶
Index ¶
- func ListApps(dir string) ([]string, error)
- func ListEnvs(dir, app string) ([]string, error)
- func ParseEnv(content string) ([]entry, error)
- func Serialize(entries []entry) string
- type Store
- func (s *Store) Delete(key string) bool
- func (s *Store) Dump() map[string]string
- func (s *Store) DumpOrdered() []entry
- func (s *Store) FilePath() string
- func (s *Store) Get(key string) (string, bool)
- func (s *Store) Import(content string) error
- func (s *Store) List() []string
- func (s *Store) Load() error
- func (s *Store) RawContent() string
- func (s *Store) Save() error
- func (s *Store) Set(key, value string)
- func (s *Store) SetRaw(content string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store manages secrets for a single app+env combination.
func New ¶
func New(dir, app, env string, identity *age.X25519Identity) *Store
New creates a new Store. It does not load from disk yet; call Load() for that.
func (*Store) DumpOrdered ¶
func (s *Store) DumpOrdered() []entry
DumpOrdered returns keys in the order they appear.
func (*Store) Import ¶
Import merges key-value pairs from parsed .env content. Existing keys are overwritten.
func (*Store) Load ¶
Load reads and decrypts the .age file, parsing its contents. If the file doesn't exist, the store starts empty (no error).
func (*Store) RawContent ¶
RawContent returns the serialized .env content.
Click to show internal directories.
Click to hide internal directories.