Repository of all common go modules used by go services.
- crypt
- doggie
- glogger
- instrumentation
- logSchema
- metrics
- secrets
- errors
Used to encrypt/decrypt sensitive information within documents being persisted to ElasticSearch and files being upload/downloaded to/from S3 buckets. Includes Encrypt/Decrypt functions which encrypts/decrypts an entire string, and EncryptPayload/DecryptPayload functions which encrypts/decrypts fields called ENCRYPTED_PAYLOAD within json files.
Datadog client used for sending metrics to Datadog dashboard on go services. Includes basic datadog functionalities such as Histogram and Gauge, along with config and tag initialization within statsdconfig.go and statsdtags.go. Used along with send-stats.go in helpers to push metrics up. Currently set to have a sampling rate of 0.1.
Standard logger used by go services. Includes a default schema and various log methods such as Info and Warn.
Used to produce memory usage, garbage collection information, and load data on go services. Uses datadog client to push metrics and therefore can only be initialized if datadog client is initialized. Must be put into main.go after datadog client is created for it to run.
Single struct used to create glogger in the correct format. The initialization of a glogger requires a logSchema, and therefore it must be present for logger factories.
Convenience helper to send metrics and handle logging of errors. The initialization of a metrics optionally requires a doggie client and a glogger instance.
metrics allows nil
DD tags and nil
logging fields to be passed in all function calls.
Used to fetch secrets from directories on different environments as well as from AWS secrets manager. These secrets are required for establishing sessions with AWS and therefore mandatory for any go service using AWS services (including ElasticSearch).
Used to initialize S3 and AWS sessions in go services. Contains methods such as downloading, uploading, deletion of S3 objects, as well as creation of S3 buckets.
- Ensure githooks are installed by running
make init-git-hooks
.
unit tests: make unit
unit tests with verbosity: make unit-verbose
go mod tidy
to pull newest dependencies or new dependencies- Double check go.mod looks correct
go mod vendor
to bring dependencies into vendor folder
After your changes have been merged from branch to master, do the following steps.
-
cd to the root directory of local repository.
-
git status
to see that it's on master branch and up to date with remote -
git tag <tag_name> .
to create the tag -
git push origin <tag_name>