config

package
v0.0.0-...-db1fe24 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigSearch configPaths

Functions

This section is empty.

Types

type Config

type Config struct {
	Debug       bool               `json:"debug"`
	Service     ServiceConfig      `json:"service"`
	Connections []ConnectionConfig `json:"connections"`
	Control     ControlConfig      `json:"control"`
	Logging     LogConfig          `json:"logging"`
	Version     string
}

func NewConfig

func NewConfig(input []byte) (*Config, error)

func NewConfigAutoDiscover

func NewConfigAutoDiscover(configPath *string) (*Config, error)

func NewConfigFromConsulKey

func NewConfigFromConsulKey(key, address string) (*Config, error)

type ConnectionConfig

type ConnectionConfig struct {
	Name            string   `json:"name"`
	Host            string   `json:"host"`
	Port            int      `json:"port"`
	FloodProtection bool     `json:"flood_protection"`
	Password        string   `json:"password"`
	Nicks           []string `json:"nicks"`
	Ident           string   `json:"ident"`
	Realname        string   `json:"real_name"`
	Commands        []string `json:"commands"`
	Admins          []string `json:"admins"`
	Channels        []string `json:"channels"`
	Ssl             bool     `json:"ssl"`
}

type ControlConfig

type ControlConfig struct {
	Enabled bool   `json:"enabled"`
	Bind    string `json:"bind"`
}

type LogConfig

type LogConfig struct {
	Debug bool `json:"debug"`
}

type ServiceConfig

type ServiceConfig struct {
	SenderBind   string `json:"sender_bind"`
	ReceiverBind string `json:"receiver_bind"`
}

TODO(kt) look into zmq channels later

Jump to

Keyboard shortcuts

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