YOU CANNOT RUN THIS SERVICE LOCALLY. DO NOT TRY.
This repo contains a Gin, API server. These are the entities that exist:
- 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. Readclients/internaldao/model_kv.gofor an understanding of the pattern to use when accessing db objects.
- 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.
- 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. - All api models should be defined in apimodels. All response models need to inherit response.V1ResponseBase. Look at
apimodels/key_value.gofor examples - If you need to add any new clients, do so following the same convention in
clients - Generally you should not touch configs. Any credentials that the user has access to will automatically be available in credentials
- Migrations are run automatically when the server starts up. You do not need to run them manually yourself.
- Run
go build -n cmd/main.goto understand if your app will compile. Fix errors before checking in code. - All external integrations are captured in
extclients