Skip to content

Messing around with Gin, GORM, Cloud Run, CloudSQL, Github Actions, Docker, GHCR and GCR.

License

Notifications You must be signed in to change notification settings

asomervell/gin-gorm-cloudsql-todo-app

Repository files navigation

Api go simple

It is a just simple REST API with Go using:

  1. Gin Framework
  2. Gorm

Installation & Run

# Download this project
$ go get github.com/go-sql-driver/mysql

# Download Gin Framework
$ go get github.com/gin-gonic/gin

# Download GORM
$ go get github.com/jinzhu/gorm

DB Setup

  1. Go to Config/Database.go
  2. Update DBName, User, Password and Host, Port according to your database configuration

API list

  • GET : Get all todos
  • POST : Create a todo
  • GET : Get a todo
  • PUT : Update a todo
  • DELETE : Delete a todo

Post Params

{
	"name": "Groceries shopping",
	"description": "Biscuits, Tea, Milk, Soap, Powder",
}

About

Messing around with Gin, GORM, Cloud Run, CloudSQL, Github Actions, Docker, GHCR and GCR.

Resources

License

Security policy

Stars

Watchers

Forks

Packages