Files
query-orchestration/README.md
T
Michael McGuinness b1f8ac453b Merged in feature/baseTemplate (pull request #1)
feat!: base template

* first bit of templating

* codeowners

* linuxbased

* restart

* baseline project

* add grpc api and basic integration test

* startqueue

* queueMsg

* splitscripts

* migrations

* queueintegrationtest

* gateway
2024-12-06 14:38:42 +00:00

1.2 KiB

Go Template

This repository is a template for golang projects with the assumption that is being run in a linux-based environment.

Using the following project as a baseline: https://github.com/golang-standards/project-layout.

Set Up

gRPC API

Remove queue folders, and bring grpc into super directory.

AWS SQS Listener

Remove grpc folders, and bring queue into super directory.

gRPC Gateway

Set up gRPC Gateway: https://github.com/grpc-ecosystem/grpc-gateway

Installation

  • Install golang: https://go.dev/doc/install
  • Add to ~/.profile or equivalent:
      PATH=$PATH:/usr/local/go/bin
      PATH=$PATH:$(go env GOPATH)/bin
    
  • Restart terminal
  • Install protoc: https://grpc.io/docs/protoc-installation/
    • Ubuntu: apt install -y protobuf-compiler
    • MacOS: brew install protobuf
  • Install shellcheck
    • Ubuntu: apt install -y shellcheck
  • Ensure user in docker group and docker group is in sudo group
      sudo groupadd docker
      sudo usermod -aG docker $USER
    
  • Run: ./scripts/install-deps.sh
  • Add to ~/.profile or equivalent:
      eval "$(direnv hook bash)"
    
  • Restart terminal
  • Create .env file to add environment variables