config

package
v1.130.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2026 License: MIT Imports: 6 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	DatasetsCollection         = "DatasetsCollection"
	ContactsCollection         = "ContactsCollection"
	EditionsCollection         = "EditionsCollection"
	InstanceCollection         = "InstanceCollection"
	DimensionOptionsCollection = "DimensionOptionsCollection"
	InstanceLockCollection     = "InstanceLockCollection"
	VersionsCollection         = "VersionsCollection"
	DatasetEventsCollection    = "DatasetEventsCollection"
)

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"`
	TopicAPIURL                      string        `envconfig:"TOPIC_API_URL"`
	PublicWebsiteURL                 string        `envconfig:"PUBLIC_WEBSITE_URL"`
	PrivateWebsiteURL                string        `envconfig:"PRIVATE_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"`
	CacheStaleWhileRevalidateSeconds int           `envconfig:"CACHE_STALE_WHILE_REVALIDATE_SECONDS"`
	CacheStaleIfErrorSeconds         int           `envconfig:"CACHE_STALE_IF_ERROR_SECONDS"`
	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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL