Documentation
¶
Overview ¶
Package config stores connection profiles — named endpoints such as "staging" or "prod" — in one JSON file with mode 0600, since it holds passwords. The local container is the built-in "local" profile and is never stored.
Index ¶
- func DefaultPath() string
- func ValidName(name string) error
- type Profile
- type Store
- func (s *Store) Delete(name string)
- func (s *Store) Endpoint(name string) (driver.Endpoint, error)
- func (s *Store) Get(name string) (Profile, bool)
- func (s *Store) ImportLegacy(path string) (bool, error)
- func (s *Store) Names() []string
- func (s *Store) Put(old string, p Profile)
- func (s *Store) Save() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultPath ¶ added in v0.2.0
func DefaultPath() string
DefaultPath is <user config dir>/dbclone/profiles.json.
Types ¶
type Store ¶ added in v0.2.0
func (*Store) ImportLegacy ¶ added in v0.2.0
ImportLegacy turns an old .env.staging file into a "staging" profile, once. It reports whether a profile was added.
Click to show internal directories.
Click to hide internal directories.