Categorygithub.com/ONSdigital/dp-topic-api
modulepackage
0.23.0
Repository: https://github.com/onsdigital/dp-topic-api.git
Documentation: pkg.go.dev

# README

dp-topic-api

Enables greater flexibility in creating journeys through the website

Getting started

  • Run make debug

Dependencies

  • Mongo db (can use dp-compose to stand up an instance in docker container, this requires docker)
  • Once you have a working mongo db instance, you will want to populate your database with topics; TODO further instructions/scripts needed
  • No further dependencies other than those defined in go.mod

Configuration

Environment variableDefaultDescription
BIND_ADDR:25300The host and port to bind to
GRACEFUL_SHUTDOWN_TIMEOUT10sThe graceful shutdown timeout in seconds (time.Duration format)
HEALTHCHECK_INTERVAL30sTime between self-healthchecks (time.Duration format)
HEALTHCHECK_CRITICAL_TIMEOUT90sTime to wait until an unhealthy dependent propagates its state to make this app unhealthy (time.Duration format)
MONGODB_BIND_ADDRlocalhost:27017The MongoDB bind address
MONGODB_USERNAMEMongoDB Username
MONGODB_PASSWORDMongoDB Password
MONGODB_DATABASEtopicsThe MongoDB topics database
MONGODB_COLLECTIONSTopicsCollection:topics,ContentCollection:contentMongoDB collections
MONGODB_ENABLE_READ_CONCERNfalseSwitch to use (or not) majority read concern
MONGODB_ENABLE_WRITE_CONCERNtrueSwitch to use (or not) majority write concern
MONGODB_CONNECT_TIMEOUT5sThe timeout when connecting to MongoDB (time.Duration format)
MONGODB_QUERY_TIMEOUT15sThe timeout for querying MongoDB (time.Duration format)
MONGODB_IS_SSLfalseSwitch to use (or not) TLS when connecting to mongodb
ZEBEDEE_URLhttp://localhost:8082The URL to Zebedee (for authentication)
ENABLE_PRIVATE_ENDPOINTSfalseEnable private endpoints for the API
ENABLE_PERMISSIONS_AUTHZfalseEnable/disable user/service permissions checking for private endpoints

Environments

Any data issues in any of the ONS environments, please visit dp-operations repository for guides

Contributing

See CONTRIBUTING for details.

License

Copyright © 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
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
No description provided by the author

# Variables

BuildTime represents the time in which the service was built.
GitCommit represents the commit (SHA-1) hash of the service that is running.
Version represents the version of the service that is running.