config

package
v0.0.0-...-4813284 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2014 License: BSD-3-Clause Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Server  Server
	Motd    Motd
	Recycle Recycle
}

func New

func New() *Config

func (*Config) LoadFromFile

func (c *Config) LoadFromFile(name string) error

type Motd

type Motd struct {
	File string
}

type Ports

type Ports []int

func (*Ports) Set

func (p *Ports) Set(value string) error

func (*Ports) String

func (p *Ports) String() string

type Recycle

type Recycle struct {
	PingInterval int `gcfg:"ping-interval"`
	UserTimeout  int `gcfg:"user-timeout"`
}

type Server

type Server struct {
	Ip               string   `gcfg:"ip"`               // IP to bind, normally 0.0.0.0
	Ports            []int    `gcfg:"port"`             // Port to bind
	Name             string   `gcfg:"name"`             // Name of this IRC server
	CreatedAt        string   `gcfg:"created"`          // Creted Time of this IRC server
	SSL              bool     `gcfg:"ssl"`              // Enable SSL or not
	Password         string   `gcfg:"password"`         // Password of this IRC server
	CertFile         string   `gcfg:"cert-file"`        // Cert for SSL
	KeyFile          string   `gcfg:"key-file"`         // Key for SSL
	DisabledCommands []string `gcfg:"disabled-command"` // Which commands to disable
}

Jump to

Keyboard shortcuts

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