func (conf *ConfigType) ToJSON() ([]byte, error) {
	return json.MarshalIndent(&conf, " ", "\t")
}
ToJSON returns a JSON string of the config
package util
import (
	"encoding/base64"
	"encoding/json"
	"errors"
	"fmt"
	"io"
	"net/url"
	"os"
	"path"
	"strings"
	"github.com/gorilla/securecookie"
)
var Cookie *securecookie.SecureCookie
var WebHostURL *url.URL
type DbDriver string
const (
	DbDriverMySQL    DbDriver = "mysql"
	DbDriverBolt     DbDriver = "bolt"
	DbDriverPostgres DbDriver = "postgres"
)
type DbConfig struct {
	Dialect DbDriver `json:"-"`
	Hostname string            `json:"host"`
	Username string            `json:"user"`
	Password string            `json:"pass"`
	DbName   string            `json:"name"`
	Options  map[string]string `json:"options"`
}
type ldapMappings struct {
	DN   string `json:"dn"`
	Mail string `json:"mail"`
	UID  string `json:"uid"`
	CN   string `json:"cn"`
}
type VariablesPassingMethod string
const (
	VariablesPassingNone  VariablesPassingMethod = "none"
	VariablesPassingEnv   VariablesPassingMethod = "env_vars"
	VariablesPassingExtra VariablesPassingMethod = "extra_vars"
	VariablesPassingBoth  VariablesPassingMethod = ""
)
type ConfigType struct {
	MySQL    DbConfig `json:"mysql"`
	BoltDb   DbConfig `json:"bolt"`
	Postgres DbConfig `json:"postgres"`
	Dialect DbDriver `json:"dialect"`
	Port string `json:"port"`
	Interface string `json:"interface"`
	TmpPath string `json:"tmp_path"`
	CookieHash          string `json:"cookie_hash"`
	CookieEncryption    string `json:"cookie_encryption"`
	AccessKeyEncryption string `json:"access_key_encryption"`
	EmailSender   string `json:"email_sender"`
	EmailHost     string `json:"email_host"`
	EmailPort     string `json:"email_port"`
	EmailUsername string `json:"email_username"`
	EmailPassword string `json:"email_password"`
	WebHost string `json:"web_host"`
	LdapBindDN       string       `json:"ldap_binddn"`
	LdapBindPassword string       `json:"ldap_bindpassword"`
	LdapServer       string       `json:"ldap_server"`
	LdapSearchDN     string       `json:"ldap_searchdn"`
	LdapSearchFilter string       `json:"ldap_searchfilter"`
	LdapMappings     ldapMappings `json:"ldap_mappings"`
	TelegramChat  string `json:"telegram_chat"`
	TelegramToken string `json:"telegram_token"`
	ConcurrencyMode  string `json:"concurrency_mode"`
	MaxParallelTasks int    `json:"max_parallel_tasks"`
	EmailAlert    bool `json:"email_alert"`
	EmailSecure   bool `json:"email_secure"`
	TelegramAlert bool `json:"telegram_alert"`
	LdapEnable    bool `json:"ldap_enable"`
	LdapNeedTLS   bool `json:"ldap_needtls"`
	SshConfigPath string `json:"ssh_config_path"`
	VariablesPassingMethod VariablesPassingMethod `json:"variables_passing_method"`
}
var Config *ConfigType