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:"-"`
KafkaSecProtocol string `envconfig:"KAFKA_SEC_PROTO"`
KafkaSecCACerts string `envconfig:"KAFKA_SEC_CA_CERTS"`
KafkaSecClientCert string `envconfig:"KAFKA_SEC_CLIENT_CERT"`
KafkaSecClientKey string `envconfig:"KAFKA_SEC_CLIENT_KEY" json:"-"`
KafkaSecSkipVerify bool `envconfig:"KAFKA_SEC_SKIP_VERIFY"`
GenerateDownloadsTopic string `envconfig:"GENERATE_DOWNLOADS_TOPIC"`
CantabularExportStartTopic string `envconfig:"CANTABULAR_EXPORT_START"`
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"`
DisableGraphDBDependency bool `envconfig:"DISABLE_GRAPH_DB_DEPENDENCY"`
KafkaVersion string `envconfig:"KAFKA_VERSION"`
DefaultMaxLimit int `envconfig:"DEFAULT_MAXIMUM_LIMIT"`
DefaultLimit int `envconfig:"DEFAULT_LIMIT"`
DefaultOffset int `envconfig:"DEFAULT_OFFSET"`
MaxRequestOptions int `envconfig:"MAX_REQUEST_OPTIONS"`
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, and initialises with default values.
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 {
URI string `envconfig:"MONGODB_BIND_ADDR" json:"-"`
Collection string `envconfig:"MONGODB_COLLECTION"`
Database string `envconfig:"MONGODB_DATABASE"`
Username string `envconfig:"MONGODB_USERNAME" json:"-"`
Password string `envconfig:"MONGODB_PASSWORD" json:"-"`
IsSSL bool `envconfig:"MONGODB_IS_SSL"`
EnableReadConcern bool `envconfig:"MONGODB_ENABLE_READ_CONCERN"`
EnableWriteConcern bool `envconfig:"MONGODB_ENABLE_WRITE_CONCERN"`
QueryTimeout time.Duration `envconfig:"MONGODB_QUERY_TIMEOUT"`
ConnectionTimeout time.Duration `envconfig:"MONGODB_CONNECT_TIMEOUT"`
CodeListAPIURL string `envconfig:"CODE_LIST_API_URL"`
DatasetAPIURL string `envconfig:"DATASET_API_URL"`
}
MongoConfig contains the config required to connect to MongoDB.
Click to show internal directories.
Click to hide internal directories.