-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
3,261 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: API Go Build and Test | ||
|
||
on: | ||
push: | ||
branches: ["**"] | ||
pull_request: | ||
branches: ["**"] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: "1.20" | ||
|
||
- name: Build | ||
run: | | ||
cd api | ||
go build ./... | ||
- name: Test | ||
run: | | ||
cd api/internal | ||
go test -v ./... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# IDE files | ||
api/.idea | ||
.idea | ||
|
||
# API | ||
# | ||
# Binaries for programs and plugins | ||
api/*.exe | ||
api/*.exe~ | ||
api/*.dll | ||
api/*.so | ||
api/*.dylib | ||
|
||
# Test binary, built with `go test -c` | ||
api/*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
api/*.out | ||
|
||
# Go workspace file | ||
api/go.work | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# NimbusX api development guide | ||
|
||
## Code generation | ||
|
||
````bash | ||
go run github.com/deepmap/oapi-codegen/cmd/[email protected] -generate gin -package api -o internal/api/api.go api.yaml | ||
```` | ||
|
||
## Redoc | ||
|
||
````bash | ||
docker run -it --rm -p 80:80 -v $(pwd)/api.yaml:/usr/share/nginx/html/swagger.yaml -e SPEC_URL=swagger.yaml redocly/redoc | ||
```` |
Oops, something went wrong.