Skip to content

zjq1945/GoDemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

This Demo is used to show how to implement a RESTful service by Go

What have been shown in this demo

  • How to do CRUD operations on MySql (mysql)
  • How to do CRUD operations on MsSql (go-mssqldb)
  • How to do CRUD operations on Rest Api (Gin)
  • How to use GORM as data access layer to MySql (gorm)
  • How to consume a Restful Api
  • How to cache data (go-cache)
  • How to use middleware to do some customized things ie. logging, authenticating, caching response body
  • How to read settings from config file (viper)
  • How to do the unit test

Following APIs have been created for this demo

  • /Consumer/Get (GET)
  • /Consumer/Insert (POST)
  • /Consumer/Update (PUT)
  • /Consumer/Delete (DELETE)
  • /Consumer/GetResponseFromOtherService (GET)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages