Documentation
¶
Overview ¶
Core functions shared by the clients and the server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config interface {
// Get a configuration value; may be transformed by the evaluator (e.g. os.Getenv).
Eval(file string, section string, key string, evaluator func(string) string) (string, error)
// Get the list of extra configuration files, directly useable as first argument of Eval()
// "config.rc" itself is ommitted
ListConfigFiles() ([]string, error)
// The path of the live vault
VaultPath() (string, error)
// Access to the XDG context
Xdg() (XdgContext, error)
}
An object mirroring the user configuration
type XdgContext ¶
type XdgContext interface {
// Find a data file and returns the corresponding reader and full file name.
ReadData(file string) (io.ReadCloser, string, error)
// Find a config file and returns the corresponding reader and full file name.
ReadConfig(file string) (io.ReadCloser, string, error)
// The XDG cache home (usually $HOME/.cache).
CacheHome() (string, error)
// The XDG runtime directory (usually inside /tmp).
RuntimeDir() (string, error)
// The XDG data directory (usually $HOME/.local/share).
DataHome() (string, error)
// The XDG configuration directory (usually $HOME/.config).
ConfigHome() (string, error)
}
XDG context
Directories
¶
| Path | Synopsis |
|---|---|
|
Getting a stacktrace from Go errors.
|
Getting a stacktrace from Go errors. |
|
Some execution facilities, because Gate relies a lot on process spawning
|
Some execution facilities, because Gate relies a lot on process spawning |
|
The configuration files parser.
|
The configuration files parser. |
Click to show internal directories.
Click to hide internal directories.