conf

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: MIT, BSD-3-Clause Imports: 9 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	Include        []string
	Exclude        []string
	NoCommonFilter bool
	InDir          string

	Daemons []Daemon
	Preps   []Prep
}

Block is a match pattern and a set of specifications

type Config

type Config struct {
	Blocks []Block
	// contains filtered or unexported fields
}

Config represents a complete configuration

func Parse

func Parse(name string, text string) (*Config, error)

Parse parses a string, and returns a completed Config

func (*Config) CommonExcludes

func (c *Config) CommonExcludes(excludes []string)

CommonExcludes extends all blocks that require it with a common exclusion set

func (*Config) GetVariables

func (c *Config) GetVariables() map[string]string

GetVariables returns a copy of the Variables map

func (*Config) IncludePatterns

func (c *Config) IncludePatterns() []string

IncludePatterns retrieves all include patterns from all blocks.

type Daemon

type Daemon struct {
	Command       string
	RestartSignal os.Signal
}

A Daemon is a persistent process that is kept running

type Pos

type Pos int

Pos represents a byte position in the original input text from which this template was parsed.

type Prep

type Prep struct {
	Command  string
	Onchange bool // Should prep skip initial run
}

A Prep runs and terminates

Jump to

Keyboard shortcuts

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