config

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorMissing  = "Missing site[%d]%s from config.toml"
	ErrorConflict = "Conflict in site[%d] between %s and %s in config.toml"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AllowedRuns

type AllowedRuns struct {
	Rsync bool
	Mysql bool
}

func CheckConfig

func CheckConfig(c *Config) ([]AllowedRuns, error)

Check config for missing values and add default values where ommitted

type Config

type Config struct {
	Site []Site `toml:"site"`
}

func GetConfig

func GetConfig() (*Config, error)

type Mysql

type Mysql struct {
	Databases []string
	User      string
	Pass      string
}

type Rsync

type Rsync struct {
	Www     string
	Exclude []string
}

type Site

type Site struct {
	Name    string
	Encrypt string
	Local   bool
	Ssh     Ssh
	Rsync   Rsync
	Mysql   Mysql
}

type Ssh

type Ssh struct {
	Host string
	User string
	Port uint
	Pass string
}

Jump to

Keyboard shortcuts

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