conf

package
v0.0.0-...-91ede74 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2018 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GZIP archiveType = "gzip"
	BZ2              = "bz2"
	XZ               = "xz"
	NONE             = "none"
)

if you change it, should change syslog/initializer const, too.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonConfig

type CommonConfig struct {
	Include string `toml:"include"`
}

type CompressConfig

type CompressConfig struct {
	Type archiveType `toml:"type"`
	Ext  string      `toml:"ext"`
}

type Config

type Config struct {
	Common   CommonConfig
	Projects []ProjectConfig `toml:"project"`
}

func New

func New(path string) (Config, error)

type ProjectConfig

type ProjectConfig struct {
	Name     string         `toml:"name"`
	From     string         `toml:"from"`
	To       string         `toml:"to"`
	Rotate   RotateConfig   `toml:"rotate"`
	Compress CompressConfig `toml:"compress"`
	Success  string         `toml:"successCommand"`
	Failed   string         `toml:"failedCommand"`
	Pid      string         `toml:"pid"`
}

type RotateConfig

type RotateConfig struct {
	Term  string `toml:"term"`
	Size  string `toml:"size"`
	Count int    `toml:"count"`
}

Jump to

Keyboard shortcuts

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