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

# README

dp-permissions-api

API for managing access control permissions for Digital Publishing API resources

Getting started

  • Load inital roles into your local mongodb using the import-script utility in the import-script folder. Follow the steps in the README.
  • Run make debug

Dependencies

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

Configuration

Environment variableDefaultDescription
BIND_ADDR:25400The host and port to bind to
GRACEFUL_SHUTDOWN_TIMEOUT5sThe 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_USERNAMEThe MongoDB Username
MONGODB_PASSWORDThe MongoDB Password
MONGODB_DATABASEpermissionsThe MongoDB database
MONGODB_COLLECTIONSRolesCollection:roles, PoliciesCollection:policiesThe MongoDB collections
MONGODB_REPLICA_SETThe name of the MongoDB replica set
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
DEFAULT_LIMIT20Default limit for pagination
DEFAULT_OFFSET0Default offset for pagination
DEFAULT_MAXIMUM_LIMIT1000Default maximum limit for pagination

SDK Package

An SDK for the API is available as a subpackage in /sdk

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

# 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.