package conf

import "sync"

type Config struct {
	SourceMode     string
	AdminRole      string
	PublicKeyPath  string
	PrivateKeyPath string

	LDAPEndpoints  string
	LDAPBindDN     string
	LDAPBindPW     string
	LDAPBaseDN     string
	LDAPRoleBaseDN string

	ClientSecret                string
	OAuth2ClientSecretName      string
	OAuth2ClientSecretNamespace string

	Auth                   string
	AuthConnectPublicHost  string
	AuthConnectorHost      string
	AuthConnectorPort      int
	AuthConnectorAdminPort int

	PermissionConnectorWriteHost string
	PermissionConnectorReadHost  string
	PermissionConnectorPort      int
	PermissionConnectorAdminPort int

	Local bool
}

var instance *Config
var once sync.Once

func GetConfig() *Config {
	once.Do(func() {
		instance = &Config{}
	})
	return instance
}
