dis-redirect-api

command module
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: MIT Imports: 10 Imported by: ? modules, 0 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.

README

dis-redirect-api

A Go API for management of redirects.

Getting started

Dependencies
  • No further dependencies other than those defined in go.mod
Tools

To run some of our tests you will need additional tooling:

Audit

We use dis-vulncheck to do Go auditing, which you will need to install.

For Java auditing we use mvn ossindex:audit which requires you to setup an OSS Index account and make some updates to Maven: Local Setup for ossindex:audit

Component testing

To run the component tests, we use testcontainers via our dp-component-test library.

To get setup, follow our guidance on using testcontainers

If you're already setup, you will just need to ensure a docker daemon is running, for example via colima start.

Linting

We use v2 of golangci-lint, which you will need to install.

Validating Specification

To validate the swagger specification you can do this via:

make validate-specification

To run this, you will need to run Node > v20 and have redocly CLI installed:

npm install @redocly/cli -g
Configuration
Environment variable Default Description
BIND_ADDR :29900 The host and port to bind to
GRACEFUL_SHUTDOWN_TIMEOUT 5s The graceful shutdown timeout in seconds (time.Duration format)
HEALTHCHECK_INTERVAL 30s Time between self-healthchecks (time.Duration format)
HEALTHCHECK_CRITICAL_TIMEOUT 90s Time to wait until an unhealthy dependent propagates its state to make this app unhealthy (time.Duration format)
OTEL_EXPORTER_OTLP_ENDPOINT localhost:4317 Endpoint for OpenTelemetry service
OTEL_SERVICE_NAME dis-redirect-api Label of service for OpenTelemetry service
OTEL_BATCH_TIMEOUT 5s Timeout for OpenTelemetry
OTEL_ENABLED false Feature flag to enable OpenTelemetry
REDIRECT_API_URL localhost:29900 Currently used to populated HATEOS links
REDIS_ADDRESS localhost:6379 Endpoint for Redis service
REDIS_CLUSTER_NAME "" Cluster name for Redis service
REDIS_REGION "" AWS Region to connect to for Redis backing service
REDIS_SEC_PROTO "" Use 'TLS' to connect with TLS
REDIS_SERVICE "" Name of the redis service to connect to, e.g. memorydb, elasticache
REDIS_USERNAME "" Username to connect to Redis with
ENABLE_REVERSE_LOOKUP false Feature flag to enable reverse lookup capability
SDKs

This API has two SDKs available:

Contributing

See CONTRIBUTING for details.

License

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

Released under MIT license, see LICENSE for details.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
features
sdk
go

Jump to

Keyboard shortcuts

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