Clone this repo so that it has the same parent dir as the scout repo. Or just edit the paths below.
First, you have to compile the conjure-ir json file. Then use gödel to generate the conjure.
pushd ../scout; ./gradlew scout-service-api:compileIr; popd
./godelw conjureTidy and check your build:
go mod tidy
go build ./...Install go 1.25. Then we need to add gödel. It's like gradle, but for golang projects, which no one asked for, but alas.
Check the wiki for more: https://github.com/palantir/godel/wiki/Add-godel
go install github.com/palantir/godel/v2/godelinit@latestNow let's create the structure.
go mod init github.com/nominal-io/nominal-api-goInitialize the gödel crap
godelinitAdd the gödel conjure plugin
echo 'plugins:
resolvers:
- "https://github.com/{{index GroupParts 1}}/{{index GroupParts 2}}/releases/download/v{{Version}}/{{Product}}-{{Version}}-{{OS}}-{{Arch}}.tgz"
plugins:
- locator:
id: "com.palantir.godel-conjure-plugin:conjure-plugin:6.84.0"
checksums:
darwin-arm64: "ad493a2ff5a997380d0d96428f1b8dc2bdf47706b1ba3277053f3e0689043da9"' >> ./godel/config/godel.ymlAdd the config for the conjure plugin
echo 'version: 1
projects:
scout-service-api:
output-dir: generated
ir-locator: ../scout/scout-service-api/build/conjure-ir/scout-service-api.conjure.json
' > ./godel/config/conjure-plugin.ymlUpdate gödel to download the plugin
./godelw updateYou need to install the golang witchcraft-go-error package. If you don't have it installed, it generates code that uses the package without importing it. But if you install it, then it is imported and used. 🤷
go get github.com/palantir/witchcraft-go-errorNow you can generate the golang code. You may need to compile the conjure IR first.
pushd ../scout; ./gradlew scout-service-api:compileIr; popd
./godelw conjureRun go mod tidy to download your dependencies.
Finally, test it all works
go build ./...