Skip to content

Latest commit

 

History

History
15 lines (13 loc) · 1.51 KB

File metadata and controls

15 lines (13 loc) · 1.51 KB

YOU CANNOT RUN THIS SERVICE LOCALLY. DO NOT TRY.

This repo contains a Gin, API server. These are the entities that exist:

  1. There is an internal DB connection string. This can be used by the app to store any state that the app might need.
  • all DB operations to the internal DB should go through clients/internaldao. Read clients/internaldao/model_kv.go for an understanding of the pattern to use when accessing db objects.
  1. There is a customer DB connection in the server credentials list. This connection should be used in a strictly READ-ONLY capacity unless otherwise stated by the customer. Generally the frontend should define queries and the backend should just pass them through.

Guidelines

  1. When trying to understand how to write endpoints, look at the examples in ep_kv.go. It will establish the pattern of how to use the response objects. Follow that example to a T.
  2. All api models should be defined in apimodels. All response models need to inherit response.V1ResponseBase. Look at apimodels/key_value.go for examples
  3. If you need to add any new clients, do so following the same convention in clients
  4. Generally you should not touch configs. Any credentials that the user has access to will automatically be available in credentials
  5. Migrations are run automatically when the server starts up. You do not need to run them manually yourself.
  6. Run go build -n cmd/main.go to understand if your app will compile. Fix errors before checking in code.
  7. All external integrations are captured in extclients