opg-reports

module
v0.0.16-uptimeapi.3 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: MIT

README

opg-reports

This repository acts as a central hub to generate, combine and display series of key data that we report on frequently to both internal and external parties.

Quick startup

As the codebase will auto-generate databases if they are not present, you can get a local version up and running in docker by:

make clean && make docker

You can then view the site at:

Comments used in scripts

To help with the automated forking script the code contains blocks marked for removal / changes using the following:

#--fork-remove-start
#--fork-remove-end
#--fork-replacement

Please make sure to leave those as they are.

Forking

This repository comes with a bash script to update values, so afte ryou ahve forked please run:

./scripts/fork.sh

The script will ask for following details:

  • Name of business unit (--business-unit)
  • Name of the DEVELOPMENT S3 bucket used for data storage (--development-bucket-name)
  • The DEVELOPMENT aws profile for local S3 download (--aws-profile)
  • The DEVELOPMENT role ARN to use for DOWNLOADING from the S3 bucket in workflow (--development-bucket-download-arn)
  • The DEVELOPMENT OIDC role ARN to use for UPLOADING to the S3 bucket in workflows (--development-bucket-upload-arn)
  • The AWS ECR registry id (--ecr-registry-id)
  • The DEVELOPMENT OIDC role ARN to use for pushing to ECR (--ecr-login-push-arn)
  • The github organisation slug (--gh-org)
  • The github team slug (--gh-team)

You can also pass these values as cli arguments and the script will use the passed value instead of asking, like:

./scripts/fork.sh \
  --business-unit OPG \
  --gh-team opg \
  --aws-profile operator

After this completes, you can re-run the app and see the updates (see here).

Please then commit any changes made into your fork.

If you want to make changes manually, there is a more detailed guide available here.

Note: Assumes infrastructure will be handled external to this repository.

Docs

Directories

Path Synopsis
commands
seed/seeder
Package seeder main function is to generate sqlite3 databases for use with the api.
Package seeder main function is to generate sqlite3 databases for use with the api.
github_standards/ghs
Package ghs NOT generated by sqlc
Package ghs NOT generated by sqlc
servers
api
shared/srvr/mw
package mw is the middleware handler
package mw is the middleware handler
shared/srvr/request/get
Package get handles parasing and fetching get parameters from query string
Package get handles parasing and fetching get parameters from query string
shared
aws
dates
Package dates groups a series of funcs converting between time.Time and string
Package dates groups a series of funcs converting between time.Time and string
env
fake
Package fake provides some helper functions to generate fake data for mocking / testing
Package fake provides some helper functions to generate fake data for mocking / testing
github
Package gh provides top level helpers for github
Package gh provides top level helpers for github
govassets
Package govassets provides a method to download a set version of govuk frontend assets
Package govassets provides a method to download a set version of govuk frontend assets
logger
Package logger provides a wrapper for slog configuration
Package logger provides a wrapper for slog configuration
must
Package much provides generic helpers to ensure values are returned
Package much provides generic helpers to ensure values are returned
testhelpers
Package testhelpers contains some commonly used functions within testing packages
Package testhelpers contains some commonly used functions within testing packages
timer
Package timer used for timing events
Package timer used for timing events

Jump to

Keyboard shortcuts

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