Documentation
¶
Index ¶
- type BaseConfig
- func (c *BaseConfig) GetConfigDB() *MongoDB
- func (c *BaseConfig) GetKeycloakEndpoint() string
- func (c *BaseConfig) GetLocationServiceHost() string
- func (c *BaseConfig) GetLocationServicePort() string
- func (c *BaseConfig) GetSwaggerDir() string
- func (c *BaseConfig) IsCORSEnabled() bool
- func (c *BaseConfig) IsLocationServiceConfigured() bool
- type CorsConfig
- type Keycloak
- type LocationService
- type MongoDB
- type Swagger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseConfig ¶
type BaseConfig struct {
ConfigDB *MongoDB `yaml:"configDB,omitempty"`
Swagger Swagger `yaml:"swagger,omitempty"`
Keycloak *Keycloak `yaml:"keycloak,omitempty"`
LocationService *LocationService `yaml:"locationService,omitempty"`
Cors CorsConfig `yaml:"cors,omitempty"`
}
Base config struct
func ParseConfig ¶
func ParseConfig(filePath string) (*BaseConfig, error)
Parse YAML Config file from the provided config file path returns pointer to config structure and error if failed to generate the config struct. This also ensures handling scenarios when no config file is provided
func (*BaseConfig) GetConfigDB ¶
func (c *BaseConfig) GetConfigDB() *MongoDB
get Config database information, if the struct is nil it ensures sending the default mongodb config for base development scenarios
func (*BaseConfig) GetKeycloakEndpoint ¶
func (c *BaseConfig) GetKeycloakEndpoint() string
func (*BaseConfig) GetLocationServiceHost ¶
func (c *BaseConfig) GetLocationServiceHost() string
GetLocationServiceHost returns the configured location service host
func (*BaseConfig) GetLocationServicePort ¶
func (c *BaseConfig) GetLocationServicePort() string
GetLocationServicePort returns the configured location service port
func (*BaseConfig) GetSwaggerDir ¶
func (c *BaseConfig) GetSwaggerDir() string
func (*BaseConfig) IsCORSEnabled ¶
func (c *BaseConfig) IsCORSEnabled() bool
func (*BaseConfig) IsLocationServiceConfigured ¶
func (c *BaseConfig) IsLocationServiceConfigured() bool
IsLocationServiceConfigured checks if location service is properly configured with both host and port values
type CorsConfig ¶
type CorsConfig struct {
Enabled bool `yaml:"enabled,omitempty"`
}
type LocationService ¶
Click to show internal directories.
Click to hide internal directories.