Documentation
¶
Index ¶
Constants ¶
View Source
const ( DatasetsCollection = "DatasetsCollection" ContactsCollection = "ContactsCollection" EditionsCollection = "EditionsCollection" InstanceCollection = "InstanceCollection" DimensionOptionsCollection = "DimensionOptionsCollection" InstanceLockCollection = "InstanceLockCollection" VersionsCollection = "VersionsCollection" )
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:"-"`
KafkaConsumerMinBrokersHealthy int `envconfig:"KAFKA_CONSUMER_MIN_BROKERS_HEALTHY"`
KafkaProducerMinBrokersHealthy int `envconfig:"KAFKA_PRODUCER_MIN_BROKERS_HEALTHY"`
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"`
SearchContentUpdatedTopic string `envconfig:"SEARCH_CONTENT_UPDATED_TOPIC"`
APIRouterPublicURL string `envconfig:"API_ROUTER_PUBLIC_URL"`
CodeListAPIURL string `envconfig:"CODE_LIST_API_URL"`
DatasetAPIURL string `envconfig:"DATASET_API_URL"`
FilesAPIURL string `envconfig:"FILES_API_URL"`
DownloadServiceURL string `envconfig:"DOWNLOAD_SERVICE_URL"`
ImportAPIURL string `envconfig:"IMPORT_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"`
EnableDeleteStaticVersion bool `envconfig:"ENABLE_DELETE_STATIC_VERSION"`
EnablePermissionsAuth bool `envconfig:"ENABLE_PERMISSIONS_AUTH"`
EnableObservationEndpoint bool `envconfig:"ENABLE_OBSERVATION_ENDPOINT"`
EnableURLRewriting bool `envconfig:"ENABLE_URL_REWRITING"`
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"`
EncryptionDisabled bool `envconfig:"ENCRYPTION_DISABLED"`
ComponentTestUseLogFile bool `envconfig:"COMPONENT_TEST_USE_LOG_FILE"`
OTExporterOTLPEndpoint string `envconfig:"OTEL_EXPORTER_OTLP_ENDPOINT"`
OTServiceName string `envconfig:"OTEL_SERVICE_NAME"`
OTBatchTimeout time.Duration `envconfig:"OTEL_BATCH_TIMEOUT"`
OtelEnabled bool `envconfig:"OTEL_ENABLED"`
MongoConfig
AuthConfig *authorisation.Config
CloudflareEnabled bool `envconfig:"CLOUDFLARE_ENABLED"`
CloudflareConfig *cloudflare.Config
}
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 {
mongodriver.MongoDriverConfig
CodeListAPIURL string `envconfig:"CODE_LIST_API_URL"`
DatasetAPIURL string `envconfig:"DATASET_API_URL"`
}
Click to show internal directories.
Click to hide internal directories.