/go-gin-mysql-boilerplate

Golang Gin boilerplate with MySQL resource. Authenticated with Bearer and Basic authentication.

Primary LanguageGoMIT LicenseMIT

go-gin-mysql-boilerplate

A starter project with Golang, Gin and MySQL

Golang Gin boilerplate with MySQL resource. Authenticated with Bearer and Basic authentication.

Boilerplate structure

.
├── Config
│   └── Database.go
├── Controllers
│   ├── Auth.go
│   └── User.go
├── Middlewares
│   └── Auth.go
├── Models
│   ├── Auth.go
│   ├── Schema
│   │   ├── OAuthAccessToken.go
│   │   ├── OAuthClient.go
│   │   ├── OAuthRefreshToken.go
│   │   └── User.go
│   └── User.go
├── Routes
│   └── Routes.go
├── Services
│   ├── Auth.go
│   └── Response.go
├── Validations
│   ├── Auth.go
│   └── User.go
├── go.mod
├── go.sum
├── LICENSE
├── README.md
└── main.go

Installation

go run main.go

Usage example

curl http://localhost:8080/users

Dependencies:

License

The go-gin-mysql-boilerplate is a open-source application licensed under the MIT License.