Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecoderOptions ¶
func DecoderOptions(config *mapstructure.DecoderConfig)
DecoderOptions enables necessary mapstructure decode hook functions
func StringToLogLevelHookFunc ¶
func StringToLogLevelHookFunc() mapstructure.DecodeHookFunc
StringToLogLevelHookFunc returns a mapstructure.DecodeHookFunc which parses a logrus Level from a string
func StringToTemplateHookFunc ¶
func StringToTemplateHookFunc() mapstructure.DecodeHookFunc
StringToTemplateHookFunc returns a mapstructure.DecodeHookFunc which parses a template.Template from a string
Types ¶
type Config ¶
type Config struct {
LogLevel log.Level `mapstructure:"log_level"`
Timeouts struct {
Startup time.Duration
Shutdown time.Duration
}
HTTP struct {
ListenAddress string `mapstructure:"listen_address"`
CORS struct {
AllowedOrigins []string `mapstructure:"allowed_origins"`
}
}
Database struct {
Host string `mapstructure:"host"`
Name string `mapstructure:"name"`
Username string `mapstructure:"username"`
Password string `mapstructure:"password"`
}
LDAP struct {
URL string `mapstrcutre:"url"`
Bind string `mapstructure:"bind"`
Password string `mapstructure:"password"`
UserSearchBase string `mapstructure:"user_search_base"`
SocietySearchBase string `mapstructure:"society_search_base"`
GroupSearchBase string `mapstructure:"group_search_base"`
SearchBase string `mapstructure:"search_base"`
}
SocsPortal struct {
WebservicesEndpoint string `mapstructure:"webservices_endpoint"`
AjaxEndpoint string `mapstructure:"ajax_endpoint"`
WebservicesUsername string `mapstructure:"webservices_username"`
WebservicesPassword string `mapstructure:"webservices_password"`
WebservicesMemberServiceMethodIndividual string `mapstructure:"webservices_member_service_method_individual"`
WebservicesMemberServiceMethodAll string `mapstructure:"webservices_member_service_method_all"`
WebservicesMemberServiceSearchByOption string `mapstructure:"webservices_member_service_search_by_option"`
EventService string `mapstructure:"event_service"`
EventServiceMethodIndividual string `mapstructure:"event_service_method_individual"`
EventServiceMethodAll string `mapstructure:"event_service_method_all"`
EventServiceAction string `mapstructure:"event_service_action"`
}
}
Config describes the configuration for Server
func (*Config) ReadSecrets ¶
ReadSecrets loads values for secret config options from files
Click to show internal directories.
Click to hide internal directories.