Skip to content

Commit

Permalink
Implement existing backend
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-be committed Nov 3, 2023
1 parent 8af62c6 commit 892aa1e
Show file tree
Hide file tree
Showing 21 changed files with 3,261 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/go-test.yml
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 ./...
22 changes: 22 additions & 0 deletions .gitignore
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

13 changes: 13 additions & 0 deletions api/DEVELOPMENT.md
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
````
Loading

0 comments on commit 892aa1e

Please sign in to comment.