Merged in feature/docresult (pull request #105)
Document Result Endpoint * testing * cleantesting * progress * query * lint * readme * dockerclient * api * passtest * tests * test
This commit is contained in:
@@ -2,18 +2,21 @@
|
||||
|
||||
This repository contains the DoczyAI code.
|
||||
|
||||
Using the following project as a baseline: https://github.com/golang-standards/project-layout.
|
||||
Using the following project as a baseline: `https://github.com/golang-standards/project-layout`.
|
||||
|
||||
## Installation and Usage
|
||||
|
||||
- Install devbox: `https://www.jetify.com/docs/devbox/installing_devbox`
|
||||
- Ubuntu/MacOS: `curl -fsSL https://get.jetify.com/devbox | bash`
|
||||
- NixOS: `devbox`
|
||||
- Install docker: `https://docs.docker.com/engine/install/`
|
||||
- (IF NECESSARY) Ensure user in docker group and docker group is in sudo group
|
||||
```
|
||||
|
||||
```sh
|
||||
sudo groupadd docker
|
||||
sudo usermod -aG docker $USER
|
||||
```
|
||||
|
||||
- Run `touch .env` to create `.env` file for custom environment variables
|
||||
- Run `devbox shell` to enter the environment
|
||||
- Run `task fullsuite` to run all tests that ensure the current state
|
||||
@@ -54,14 +57,14 @@ This will:
|
||||
**Service** - This term is used internally in order to refer to commands that get deployed as APIs.
|
||||
**Runner** - This term is used internally in order to refer to commands that get deployed as consumers of a queue.
|
||||
|
||||
### Creating a new Service
|
||||
### Creating a new API
|
||||
|
||||
1. Add a file named `<service_name>.yml`. The service name is important, as it will be used as a reference throughout the codebase. The service name must be in the format `<functionality>Service`. E.g. queryService, ClientService
|
||||
1. Add a file named `<api_name>.yml`. The api name is important, as it will be used as a reference throughout the codebase. The api name must be in the format `<functionality>API`. E.g. queryAPI, ClientAPI
|
||||
2. Run `task openapi:generate`. This will generate the following:
|
||||
- A location to implement the server-side functions in `./api/<service_name>/`, as well as generated functions, models and swagger docs.
|
||||
- A location with the client-side code in `./pkg/<service_name>/`
|
||||
3. Implement the controllers in `./api/<service_name>/`
|
||||
4. Create a command in `./cmd/<service_name>/main.go` which creates a new instance from `./internal/api`
|
||||
a. A location to implement the server-side functions in `./api/<api_name>/`, as well as generated functions, models and swagger docs.
|
||||
b. A location with the client-side code in `./pkg/<api_name>/`
|
||||
3. Implement the controllers in `./api/<api_name>/`
|
||||
4. Create a command in `./cmd/<api_name>/main.go` which creates a new instance from `./internal/api`
|
||||
|
||||
### Creating a new Runner
|
||||
|
||||
|
||||
Reference in New Issue
Block a user