tomlbotconfigprovider

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TomlBotConfigProvider

type TomlBotConfigProvider struct {
	// contains filtered or unexported fields
}

TomlBotConfigProvider is a provider for bot configurations stored in a TOML file

func ParseTomlBotConfig

func ParseTomlBotConfig(rd io.Reader) (*TomlBotConfigProvider, error)

ParseTomlBotConfig a provided reader and return the config if successful

func ParseTomlBotConfigFromFile

func ParseTomlBotConfigFromFile(fileName string) (*TomlBotConfigProvider, error)

ParseTomlBotConfigFromFile and return the config if successful

func (*TomlBotConfigProvider) GetAllBotConfigs

func (c *TomlBotConfigProvider) GetAllBotConfigs() botconfig.BotConfigs

GetAllBotConfigs returns all known bot configurations

func (*TomlBotConfigProvider) GetAllEnabledBotIDs

func (c *TomlBotConfigProvider) GetAllEnabledBotIDs() (botIDs []string)

GetAllEnabledBotIDs returns only bot IDs for bots which are enabled

func (*TomlBotConfigProvider) GetBotConfig

func (c *TomlBotConfigProvider) GetBotConfig(id string) (botconfig.BotConfig, error)

GetBotConfig returns a config for the given ID if it exists

Jump to

Keyboard shortcuts

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