Documentation
¶
Overview ¶
Package profile provides CRUD operations on named connection profiles persisted in siphon's config file.
Index ¶
- type Store
- func (s *Store) Add(name string, p config.ProfileConfig) error
- func (s *Store) Get(name string) (config.ProfileConfig, error)
- func (s *Store) List() []string
- func (s *Store) Remove(name string) error
- func (s *Store) Resolve(name string) (driver.Profile, error)
- func (s *Store) Update(name string, p config.ProfileConfig) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is the runtime API for managing profiles.
func New ¶
New creates a Store backed by cfg. The save function controls persistence; pass config.Save in production, or a no-op for tests.
func (*Store) Add ¶
func (s *Store) Add(name string, p config.ProfileConfig) error
Add stores a new profile. Returns an error if name already exists. Always sets p.Name = name to keep the Name field consistent with the map key (which Load() also enforces on reload).
func (*Store) Get ¶
func (s *Store) Get(name string) (config.ProfileConfig, error)
Get returns the unresolved profile (Password is still a SecretRef).
Click to show internal directories.
Click to hide internal directories.