Documentation
¶
Overview ¶
Package store persists komando state (inventory, keys, snippets, jobs, tunnels, settings) as JSON files under $KOMANDO_HOME (default ~/.komando).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Host ¶
type Host struct {
Name string `json:"name"`
Address string `json:"address"`
Port int `json:"port,omitempty"`
User string `json:"user,omitempty"`
Key string `json:"key,omitempty"` // name of a key in the keychain
Identity string `json:"identity,omitempty"` // path to a private key file
PasswordRef string `json:"password_ref,omitempty"` // secret:<name> or env:<VAR>
SudoRef string `json:"sudo_ref,omitempty"` // sudo password ref (secret:/env:)
Jump string `json:"jump,omitempty"` // host name or comma-separated chain
Groups []string `json:"groups,omitempty"`
Tags []string `json:"tags,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Env map[string]string `json:"env,omitempty"` // exported before every command
Protected bool `json:"protected,omitempty"`
Notes string `json:"notes,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
func (*Host) EffectivePort ¶
type Key ¶
type Key struct {
Name string `json:"name"`
Path string `json:"path"`
Type string `json:"type,omitempty"`
PublicKey string `json:"public_key,omitempty"`
Fingerprint string `json:"fingerprint,omitempty"`
PassphraseRef string `json:"passphrase_ref,omitempty"`
Managed bool `json:"managed"` // generated/stored by komando
CreatedAt time.Time `json:"created_at"`
}
type Settings ¶
type Settings struct {
HostKeyPolicy string `json:"host_key_policy"` // accept-new | strict | off
DefaultUser string `json:"default_user,omitempty"`
DefaultTimeout string `json:"default_timeout"`
ConnectTimeout string `json:"connect_timeout"`
Parallel int `json:"parallel"`
MaxOutputBytes int `json:"max_output_bytes"`
ExtraDenyPattern []string `json:"extra_deny_patterns,omitempty"`
Audit bool `json:"audit"`
}
func DefaultSettings ¶
func DefaultSettings() Settings
type State ¶
type State struct {
Hosts map[string]*Host `json:"hosts"`
Keys map[string]*Key `json:"keys"`
Snippets map[string]*Snippet `json:"snippets"`
Jobs map[string]*Job `json:"jobs"`
Tunnels map[string]*Tunnel `json:"tunnels"`
Settings Settings `json:"settings"`
}
func (*State) SortedHosts ¶
Click to show internal directories.
Click to hide internal directories.