Categorygithub.com/ONSdigital/dp-frontend-search-controller

# README

dp-frontend-search-controller

An HTTP service for the controlling of search API

Getting started

  • Run make debug

Run new search in the UI:

Dependencies

No further dependencies other than those defined in go.mod

Configuration

Environment variableDefaultDescription
API_ROUTER_URLhttp://localhost:23200/v1The URL of the dp-api-router
AB_TEST_ASPECT_IDdp-frontend-search-controllerUnique Aspect ID for AB test cookie
AB_TEST_ENABLEDtrueIf AB testing is switched on - if false, this will default to the new handler
AB_TEST_PERCENTAGE0What percentage of traffic goes to the new handler
AB_TEST_EXITsearch-ab-exitParam to purge the cookie if a user enters in browser
BIND_ADDR:25000The port to bind to
CACHE_CENSUS_TOPICS_UPDATE_INTERVAL30mThe time interval to update cache for census topics (time.Duration format)
CACHE_DATA_TOPICS_UPDATE_INTERVAL30mThe time interval to update cache for data topics (time.Duration format)
CACHE_NAVIGATION_UPDATE_INTERVAL30mThe time interval to update cache for navigation bar (time.Duration format)
CENSUS_TOPIC_ID4445Unique identifier for the census topic, used to get census topics from Topics API
DEBUGfalseEnable debug mode
DEFAULT_DATASET_SORTrelease_dateThe default sort for census dataset finder
DEFAULT_LIMIT10The default limit of search results in a page
DEFAULT_MAXIMUM_LIMIT50The default maximum limit of search results in a page
DEFAULT_MAXIMUM_SEARCH_RESULTS500The default maximum search results
DEFAULT_OFFSET0The default offset of search results
DEFAULT_PAGE1The default current page of search results
DEFAULT_SORTrelevanceThe default sort of search results
ENABLE_AGGREGATION_PAGESfalseEnable the aggregation pages, is a combination feature flag with ENABLE_TOPIC_AGGREGATION_PAGES
ENABLE_TOPIC_AGGREGATION_PAGESfalseEnable the topic aggregation pages, is a combination feature flag with ENABLE_AGGREGATION_PAGES. To enable this, the ENABLE_AGGREGATION_PAGES flag has to be enabled.
ENABLE_CENSUS_DIMENSIONS_FILTER_OPTIONfalseEnable dimensions filter for census dataset finder
ENABLE_CENSUS_POPULATION_TYPE_FILTER_OPTIONfalseEnable populations filter for census dataset finder
ENABLE_CENSUS_TOPIC_FILTER_OPTIONfalseEnable filtering on various census topics
ENABLE_NEW_NAV_BARfalseEnable new dynamic navigation bar
GRACEFUL_SHUTDOWN_TIMEOUT5sThe graceful shutdown timeout in seconds (time.Duration format)
HEALTHCHECK_CRITICAL_TIMEOUT90sTime to wait until an unhealthy dependent propagates its state to make this app unhealthy (time.Duration format)
HEALTHCHECK_INTERVAL30sTime between self-healthchecks (time.Duration format)
OTEL_BATCH_TIMEOUT5sInterval between pushes to OT Collector
OTEL_EXPORTER_OTLP_ENDPOINThttp://localhost:4317URL for OpenTelemetry endpoint
OTEL_SERVICE_NAME"dp-frontend-search-controller"Service name to report to telemetry tools
OTEL_ENABLEDfalseFeature flag to enable OpenTelemetry
IS_PUBLISHINGfalseMode in which service is running
PATTERN_LIBRARY_ASSETS_PATH""Pattern library location
SERVICE_AUTH_TOKEN""This is required to identify the controller when it calls the topic API via the API router in publishing mode
SITE_DOMAINlocalhost
SUPPORTED_LANGUAGES[2]string{"en", "cy"}Supported languages

Contributing

See CONTRIBUTING for details.

License

Copyright © 2020 - 2022, Office for National Statistics (https://www.ons.gov.uk)

Released under MIT license, see LICENSE for details.

# Packages

No description provided by the author
assets in locale and templates folders are converted into Go source code with go-bindata the data.go file in this package is auto generated through the generate-dev and generate-prod tasks in the Makefile.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author