Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SaveWingConfig ¶ added in v0.34.0
func SaveWingConfig(dir string, cfg *WingConfig) error
SaveWingConfig writes wing.yaml to dir.
Types ¶
type AllowKey ¶ added in v0.34.0
type AllowKey struct {
Key string `yaml:"key,omitempty"` // base64 raw P-256 public key (optional)
UserID string `yaml:"user_id,omitempty"` // relay user ID
Email string `yaml:"email,omitempty"` // auto-set from relay, for display
}
AllowKey is a pinned user for wing access control.
type Config ¶
type Config struct {
Dir string `yaml:"-"`
DefaultAgent string `yaml:"default_agent"`
DefaultEmbedder string `yaml:"default_embedder"`
WingID string `yaml:"wing_id"`
Hostname string `yaml:"-"` // os.Hostname(), not persisted
PollInterval string `yaml:"poll_interval"`
DefaultMaxRetries int `yaml:"max_retries"`
RoostURL string `yaml:"roost_url"`
Vars map[string]string `yaml:"vars"`
}
func (*Config) RelayDBPath ¶ added in v0.16.1
func (*Config) ResolveVars ¶
type WingConfig ¶ added in v0.34.0
type WingConfig struct {
WingID string `yaml:"wing_id"`
Roost string `yaml:"roost,omitempty"`
Org string `yaml:"org,omitempty"`
Root string `yaml:"root,omitempty"`
Labels []string `yaml:"labels,omitempty"`
EggConfig string `yaml:"egg_config,omitempty"`
Conv string `yaml:"conv,omitempty"`
Audit bool `yaml:"audit,omitempty"`
Debug bool `yaml:"debug,omitempty"`
Pinned bool `yaml:"pinned,omitempty"` // explicit pin mode toggle
AuthTTL string `yaml:"auth_ttl,omitempty"` // passkey auth token duration (default "1h")
AllowKeys []AllowKey `yaml:"allow_keys,omitempty"`
}
WingConfig holds wing-specific settings persisted in ~/.wingthing/wing.yaml.
func LoadWingConfig ¶ added in v0.34.0
func LoadWingConfig(dir string) (*WingConfig, error)
LoadWingConfig reads wing.yaml from dir. If the file doesn't exist, it returns a zero-value config (no error). If a legacy wing-id file exists, the wing_id is seeded from it.
Click to show internal directories.
Click to hide internal directories.