config

package
v0.0.0-...-dc96fc5 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2015 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_LANG     = "en"
	DEFAULT_NICKNAME = "perpetua"
	DEFAULT_USER     = "perpetua"
	Version          = "0.1a"
)

Variables

View Source
var (
	BASE_DIR      = path.Join(os.ExpandEnv("$HOME"), ".perpetua")
	CONFIG_FILE   = path.Join(BASE_DIR, "perpetua.toml")
	DATABASE_FILE = path.Join(BASE_DIR, "perpetua.sqlite3")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Server struct {
		Hostname           string
		Port               uint16
		UseTLS, SkipVerify bool
	}
	IRC struct {
		Nickname, User string
		Channels       []string
	}
	I18N struct {
		Lang string
	}
}

Config is used to store information about the configuration of the bot.

func (*Config) Read

func (c *Config) Read(configFile string) (err error)

Read configuration from file specified by configFile and use the default config file CONFIG_FILE if configFile is empty.

func (*Config) ReadFromString

func (c *Config) ReadFromString(config string) (err error)

Read configuration from string.

Jump to

Keyboard shortcuts

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