Contributions to this project are welcomed. We request that you read through the guidelines before getting started.
Contributions to this project must be accompanied by a Contributor License Agreement (CLA). You (or your employer) retain the copyright to your contribution; this simply gives us permission to use and redistribute your contributions as part of the project. Head over to https://cla.developers.google.com/ to see your current agreements on file or to sign a new one.
You generally only need to submit a CLA once, so if you've already submitted one (even if it was for a different project), you probably don't need to do it again.
This project follows Google's Open Source Community Guidelines.
All submissions will be reviewed before merging. Submissions are reviewed using GitHub pull requests.
Please note that the federation*
packages are reference-only, and we do not
actively support them.
Common code is in the /internal
folder.
Each binary will have its main.go
file in a /cmd/[bin-name]
folder.
To run the server, you must install the following dependencies:
Run the tests with:
$ go test ./...
You should run the presubmit checks before committing changes. The presubmit script
is located at scripts/presubmit.sh
.
These instructions use Docker to run components locally. You may be
able to run these components without Docker, but these instructions assume
Docker is installed and available in your $PATH
.
-
Set development environment variables:
$ eval $(./scripts/dev init)
If you close your terminal tab or session, you need to re-run this command.
-
Create the local development database:
$ ./scripts/dev dbstart
This command may take a few minutes to execute on the first invocation. This is because it needs to download the Postgres container. Future invocations will be faster.
-
Run any migrations. This creates the tables and schema:
$ ./scripts/dev dbmigrate
-
(Optional) Seed the database with some initial data:
$ ./scripts/dev dbseed
-
Run a component. For example, to run the
exposure
endpoint:$ go run ./cmd/exposure/...
-
When you're done developing, you can stop the database.
$ ./scripts/dev dbstop
Warning: This will also delete any stored data in the database.
User documentation for this project is in the docs
directory,
with information on building, deploying, and using the reference implementation.