dconf

package
v0.0.0-...-28ebc5c Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const DBDir = "etc/dconf/db"

DBDir specifies the default base path for dconf databases.

View Source
const LocksDir = "locks"

LocksDir specifies the relative path to lock configuration for a system database.

Variables

This section is empty.

Functions

This section is empty.

Types

type Directive

type Directive struct {
	Type DirectiveType
	Name string
}

Directive relates a profile to a database.

type DirectiveType

type DirectiveType string

DirectiveType how a database relates to a profile.

const (
	// ProfileDir is the default directory where profiles are defined.
	ProfileDir = "etc/dconf/profile"

	// User relates a user database at $XDG_CONFIG_HOME/dconf/<name>.
	User DirectiveType = "user-db"
	// System specifies that a system database should be read. The binary
	// database is read from /etc/dconf/db/<name>.
	System DirectiveType = "system-db"
	// Service relates a binary and text database pair. The binary database file
	// is installed at $XDG_RUNTIME_DIR, while the text database is stored at
	// $XDG_CONFIG_HOME/dconf/<name>.txt. The two files are kept up to date.
	Service DirectiveType = "service-db"
	// File relates a database to the file at the path specified by name.
	File DirectiveType = "file-db"
)

type Lock

type Lock string

Lock specifies a configuration key in a system database that overrides other, higher-level keys (such as in a user db).

func (Lock) Generate

func (l Lock) Generate() []byte

Generate will create the contents of the lock file, to be placed at <db-dir>/locks/<name>.

type Profile

type Profile struct {
	RW  Directive
	ROs []Directive
}

Profile represents the configuration of a Dconf profile.

func (*Profile) Generate

func (p *Profile) Generate() []byte

Generate serializes a profile into a format writeable to /etc/dconf/profile.

Jump to

Keyboard shortcuts

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