35 lines
564 B
Go
35 lines
564 B
Go
package conf
|
|
|
|
import "sync"
|
|
|
|
type Config struct {
|
|
PVKPath string
|
|
|
|
LDAPEndpoints string
|
|
LDAPBindDN string
|
|
LDAPBindPW string
|
|
LDAPBaseDN string
|
|
LDAPRoleBaseDN string
|
|
|
|
ClientSecret string
|
|
|
|
Auth string
|
|
AuthConnectorHost string
|
|
AuthConnectorPort int
|
|
AuthConnectorAdminPort int
|
|
|
|
PermissionConnectorHost string
|
|
PermissionConnectorPort int
|
|
PermissionConnectorAdminPort int
|
|
}
|
|
|
|
var instance *Config
|
|
var once sync.Once
|
|
|
|
func GetConfig() *Config {
|
|
once.Do(func() {
|
|
instance = &Config{}
|
|
})
|
|
return instance
|
|
}
|