Documentation
¶
Overview ¶
Package config reads and writes ~/.config/hadron/config.toml.
Index ¶
Constants ¶
View Source
const DefaultServer = "https://srv.hadronmemory.com"
DefaultServer is the hosted Hadron platform's API server (the GraphQL + OAuth host; hadronmemory.com itself is the portal).
Variables ¶
View Source
var Keys = map[string]string{
"server": "Hadron server base URL",
"app": "default App URN sent with requests (set via hadron app use)",
"memory": "default memory URN or ID (set via hadron memory set-active)",
}
Keys lists the settings hadron config get/set accepts.
Functions ¶
func AuthFile ¶
AuthFile returns the path of the fallback token file used when no OS keychain is available.
func Dir ¶
Dir returns the hadron config directory: $XDG_CONFIG_HOME/hadron, defaulting to ~/.config/hadron (gh-style, on every platform).
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) Memory ¶ added in v0.3.0
Memory returns the default memory URN or ID, or "" for no memory context.
func (*Config) Server ¶
Server returns the configured server base URL, with the HADRON_SERVER environment variable taking precedence.
Click to show internal directories.
Click to hide internal directories.