Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

RIDCHA-DATA/golang-rest-api

Repository files navigation

golang-rest-api

get all deps

GO111MODULE=on go get

Start the api

GO111MODULE=on go run main.go

swagger docs url : http://localhost:8081/v1/api-docs/index.html

alt text

Generate Swagger docs (version 1.7.9) ref: swaggo/swag#1126

swag init --parseDependency --parseInternal -g main.go

E2E test with curl

Get all actions

curl -X 'GET'   'http://localhost:8081/v1/actions'   -H 'accept: application/json'

Get all actions

curl -X 'POST'   'http://localhost:8081/v1/actions'   -H 'accept: application/json'  -d '{"action": "TestAddAction"}'

Todo list

  • [ x ] Check & fix pb with go 1.18
  • [ x ] Check migration on sqllite
  • [ x ] Prepare dev env with psql
  • [ x ] Add CI process
    • [ x ] go test & build
    • [ x ] Dcoker image build
    • Helm chart package/build