config

package
v0.0.0-...-1fdd0bd Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2018 License: MIT Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptString

func DecryptString(toDecrypt string) (string, error)

DecryptString decrypts a string if KMS is enabled, otherwise it will return the string as is

func ParseConfig

func ParseConfig(values interface{}) error

ParseConfig parses the config file and unmarshals it into the provided interface

Types

type Config

type Config struct {
	Kms             bool
	Token           string
	DefaultLanguage string
	Blacklist       []string
	Whitelist       []string
	Languages       map[string]languageConfig
	LanguageDir     string
}

Config contains general configuration details

func GeneralConfig

func GeneralConfig() (Config, error)

GeneralConfig reads the configuration file and parses its general information

type LanguagePluginCommandDetails

type LanguagePluginCommandDetails struct {
	Description string
	Command     string
	Texts       map[string]string
}

LanguagePluginCommandDetails holds the details for a plugin command in a language

type LanguagePluginDetails

type LanguagePluginDetails struct {
	Description string
	Commands    map[string]LanguagePluginCommandDetails
}

LanguagePluginDetails holds the details for a plugin in a language

Jump to

Keyboard shortcuts

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