config

package
v1.62.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

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

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"`
	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"`
	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
}

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