Documentation
¶
Overview ¶
Package config loads Bindle's host-agnostic connection profiles.
Bindle is never tied to one IBM i host: the host is configuration. Profiles live OUTSIDE any repository (default ~/.bindle/config.json) so credentials are never committed. A resolved profile is assembled from, in increasing precedence: built-in defaults < config file profile < environment < flags.
Index ¶
Constants ¶
const DefaultPort = 22
DefaultPort is the SSH port assumed when a profile omits one.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
DefaultProfile string `json:"defaultProfile,omitempty"`
Profiles map[string]Profile `json:"profiles,omitempty"`
}
Config is the on-disk ~/.bindle/config.json.
type Overrides ¶
type Overrides struct {
Profile string
Host string
User string
Port int
Transport string
KeyFile string
}
Overrides are values supplied by command-line flags (highest precedence).
type Profile ¶
type Profile struct {
Host string `json:"host,omitempty"`
Port int `json:"port,omitempty"`
User string `json:"user,omitempty"`
Transport string `json:"transport,omitempty"` // "ssh" (default) | "odbc"
Auth string `json:"auth,omitempty"` // "key" (default) | "agent" | "password"
KeyFile string `json:"keyFile,omitempty"`
Password string `json:"password,omitempty"`
DefaultLibrary string `json:"defaultLibrary,omitempty"`
}
Profile describes how to reach one IBM i host.
Password is supported for convenience (the file already lives in the user's home, never in a repo), but key or agent auth is preferred. It can always be supplied at runtime via BINDLE_PASSWORD instead of being stored.