config

package
v0.0.0-...-b146d40 Latest Latest
Warning

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

Go to latest
Published: May 1, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Enabled bool `toml:"enabled"`
	// IP Address the REST API listens on
	// If empty or non-existing listen on all interfaces
	IP string `toml:"ip"`
	// Port the REST API listens on
	Port string `toml:"port"`
}

API holds the API settings for the AbyleBotter configuration

type Botter

type Botter struct {
	Address string
}

Botter holds the configuration for one Botter instance

type Config

type Config struct {
	General                General                `toml:"general"`
	MongoBotConfigProvider MongoBotConfigProvider `toml:"mongobotconfigprovider"`
	Botters                map[string]Botter
}

Config holds the complete AbyleBotter config

func Parse

func Parse(rd io.Reader) (Config, error)

Parse a provided reader and return the config if successful

func ParseFromFile

func ParseFromFile(fileName string) (Config, error)

ParseFromFile and return the config if successful

type General

type General struct {
	API API `toml:"api"`
}

General holds the general settings for the AbyleBotter configuration

type MongoBotConfigProvider

type MongoBotConfigProvider struct {
	// URL to connect to
	URL string
	// Database to use
	Database string
}

MongoBotConfigProvider holds the settings for the mongodb bot config provider

Jump to

Keyboard shortcuts

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