core

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2013 License: GPL-3.0 Imports: 6 Imported by: 0

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

func NewConfig

func NewConfig() (result Config, err error)

Get 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL