config

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalConfig

type LocalConfig struct {
	// contains filtered or unexported fields
}

Local configuration.

func NewLocal

func NewLocal() *LocalConfig

Initialise a new local config.

func (*LocalConfig) Create

func (c *LocalConfig) Create() error

Create a config file from a template.

func (*LocalConfig) Exists

func (c *LocalConfig) Exists() bool

Check if the config file exists.

func (*LocalConfig) Read

func (c *LocalConfig) Read() (*ServerConfig, error)

Read and parse the config file into a struct.

type RemoteConfig

type RemoteConfig struct {
	// contains filtered or unexported fields
}

Remote configuration.

func NewRemote

func NewRemote(conn *server.Connection) *RemoteConfig

Initialise a new remote config.

func (*RemoteConfig) Read

func (c *RemoteConfig) Read() (string, error)

Read the remote config.

func (*RemoteConfig) Write

func (c *RemoteConfig) Write(rev string) error

Write to the remote config.

type SectionConfig

type SectionConfig struct {
	Scheme     string
	Section    string
	Host       string
	Port       int
	Username   string
	Password   string
	Privatekey string
	Path       string
	Branch     string
	Atomic     bool
	Releasedir string
	Include    []string
	Exclude    []string
	Logger     bool
	Maxclients int
	Predeploy  []string
	Postdeploy []string
}

Maps the server sections of the local init file.

type ServerConfig

type ServerConfig struct {
	Sections []SectionConfig
}

Maps the local ini file to a struct.

Jump to

Keyboard shortcuts

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