A demo with Hertz
and Gorm
- Use
thrift
IDL to defineHTTP
interface - Use
hz
to generate code - Use
Hertz
binding and validate - Use
Gorm
andMySQL
This demo use thrift
IDL to define HTTP
interface. The specific interface define in api.thrift
This demo use hz
to generate code. The use of hz
refers
to hz
The hz
commands used can be found in Makefile
The use of binding and Validate refers to Binding and Validate
This demo use Gorm
to operate MySQL
and refers to Gorm
cd bizdemo/hertz_gorm && docker-compose up
Connect MySQL and execute user.sql
cd bizdemo/hertz_gorm
go build -o hertz_gorm && ./hertz_gorm