Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { BindAddr string `envconfig:"BIND_ADDR"` KafkaAddr []string `envconfig:"KAFKA_ADDR" json:"-"` GenerateDownloadsTopic string `envconfig:"GENERATE_DOWNLOADS_TOPIC"` CodeListAPIURL string `envconfig:"CODE_LIST_API_URL"` DatasetAPIURL string `envconfig:"DATASET_API_URL"` WebsiteURL string `envconfig:"WEBSITE_URL"` ZebedeeURL string `envconfig:"ZEBEDEE_URL"` DownloadServiceSecretKey string `envconfig:"DOWNLOAD_SERVICE_SECRET_KEY" json:"-"` ServiceAuthToken string `envconfig:"SERVICE_AUTH_TOKEN" json:"-"` GracefulShutdownTimeout time.Duration `envconfig:"GRACEFUL_SHUTDOWN_TIMEOUT"` HealthCheckInterval time.Duration `envconfig:"HEALTHCHECK_INTERVAL"` HealthCheckCriticalTimeout time.Duration `envconfig:"HEALTHCHECK_CRITICAL_TIMEOUT"` EnablePrivateEndpoints bool `envconfig:"ENABLE_PRIVATE_ENDPOINTS"` EnableDetachDataset bool `envconfig:"ENABLE_DETACH_DATASET"` EnablePermissionsAuth bool `envconfig:"ENABLE_PERMISSIONS_AUTH"` EnableObservationEndpoint bool `envconfig:"ENABLE_OBSERVATION_ENDPOINT"` KafkaVersion string `envconfig:"KAFKA_VERSION"` DefaultMaxLimit int `envconfig:"DEFAULT_MAXIMUM_LIMIT"` DefaultLimit int `envconfig:"DEFAULT_LIMIT"` DefaultOffset int `envconfig:"DEFAULT_OFFSET"` MongoConfig MongoConfig }
Configuration structure which hold information for configuring the import API
func Get ¶
func Get() (*Configuration, error)
Get the application and returns the configuration structure
func (Configuration) String ¶
func (config Configuration) String() string
String is implemented to prevent sensitive fields being logged. The config is returned as JSON with sensitive fields omitted.
type MongoConfig ¶
type MongoConfig struct { BindAddr string `envconfig:"MONGODB_BIND_ADDR" json:"-"` Collection string `envconfig:"MONGODB_COLLECTION"` Database string `envconfig:"MONGODB_DATABASE"` }
MongoConfig contains the config required to connect to MongoDB.
Click to show internal directories.
Click to hide internal directories.