These are a set of guidelines to follow when writing any new component on the karix.io platform
- Every component must have a Dockerfile
- Every component must have a Jenkinsfile
- Jenkinsfile will be used to build the container and push it to the registry
- Use https://github.com/uber-go/zap for golang services
- Logging will be done on stdout and stderr
- Logging must be structured
- All internal requests to different components must include X-RequestID HTTP header or x-requestid metadata in gRPC
- Use dep to manage go dependencies.
- Don't commit the vendor folder to the source repository
- Config files must be separate from the source code
- Config files should be written in a way they can be mounted on a container
- It should be templatized, and generated based on the environment (prod, dev, stage)
- Go repositories to use https://github.com/spf13/viper to read config
- Use https://github.com/golang/mock for mock testing
- Gingkgo https://onsi.github.io/ginkgo/ for BDD testing
- Go testing https://golang.org/pkg/testing/ for unit tests