configuration

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2016 License: ISC Imports: 10 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BitcoinAccess

type BitcoinAccess struct {
	Username      string `libucl:"username"`
	Password      string `libucl:"password"`
	URL           string `libucl:"url"`
	CACertificate string `libucl:"ca_certificate"`
	Certificate   string `libucl:"certificate"`
	PrivateKey    string `libucl:"private_key"`
	Address       string `libucl:"address"`
	Fee           string `libucl:"fee"`
}

type Configuration

type Configuration struct {
	DataDirectory string       `libucl:"data_directory"`
	PidFile       string       `libucl:"pidfile"`
	Chain         string       `libucl:"chain"`
	Database      DatabaseType `libucl:"database"`

	ClientRPC RPCType       `libucl:"client_rpc"`
	Peering   PeerType      `libucl:"peering"`
	Mining    RPCType       `libucl:"mining"`
	Bitcoin   BitcoinAccess `libucl:"bitcoin"`
	Logging   LoggerType    `libucl:"logging"`
}

func GetConfiguration

func GetConfiguration(configurationFileName string) (*Configuration, error)

will read decode and verify the configuration

type Connection

type Connection struct {
	PublicKey string `libucl:"public_key"`
	Address   string `libucl:"address"`
}

type DatabaseType

type DatabaseType struct {
	Directory string `libucl:"directory"`
	Name      string `libucl:"name"`
}

type LoggerType

type LoggerType struct {
	Directory string            `libucl:"directory"`
	File      string            `libucl:"file"`
	Size      int               `libucl:"size"`
	Count     int               `libucl:"count"`
	Levels    map[string]string `libucl:"levels"`
}

type LoglevelMap

type LoglevelMap map[string]string

to hold log levels

type PeerType

type PeerType struct {
	MaximumConnections int          `libucl:"maximum_connections"`
	Listen             []string     `libucl:"listen"`
	Connect            []Connection `libucl:"connect"`
	PrivateKey         string       `libucl:"private_key"`
	PublicKey          string       `libucl:"public_key"`
	Announce           []string     `libucl:"announce"`
}

server identification in Z85 (ZeroMQ Base-85 Encoding) see: http://rfc.zeromq.org/spec:32

type RPCType

type RPCType struct {
	MaximumConnections int      `libucl:"maximum_connections"`
	Listen             []string `libucl:"listen"`
	Certificate        string   `libucl:"certificate"`
	PrivateKey         string   `libucl:"private_key"`
	Announce           []string `libucl:"announce"`
}

Jump to

Keyboard shortcuts

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