All Projects → eddycjy → Go Gin Example

eddycjy / Go Gin Example

Licence: mit
An example of gin

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Go Gin Example

Snake
🐍 一款小巧的基于Go构建的开发框架,可以快速构建API服务或者Web网站进行业务开发,遵循SOLID设计原则
Stars: ✭ 615 (-87.68%)
Mutual labels:  api, swagger, gorm, gin, jwt
Go Admin
基于Gin + Vue + Element UI的前后端分离权限管理系统脚手架(包含了:多租户的支持,基础用户管理功能,jwt鉴权,代码生成器,RBAC资源控制,表单构建,定时任务等)3分钟构建自己的中后台项目;文档:https://doc.go-admin.dev Demo: https://www.go-admin.dev Antd beta版本:https://preview.go-admin.dev
Stars: ✭ 5,439 (+8.95%)
Mutual labels:  swagger, gin, jwt, gorm
Golang Gin Realworld Example App
Exemplary real world application built with Golang + Gin
Stars: ✭ 1,780 (-64.34%)
Mutual labels:  api, gorm, gin, jwt
Zendea
A free, open-source, self-hosted forum software written in Go 官方QQ群:656868
Stars: ✭ 116 (-97.68%)
Mutual labels:  gorm, gin, jwt
Duckygo
一个同时支持Session以及JWT的高性能高可用 Golang Restful API 脚手架 !
Stars: ✭ 57 (-98.86%)
Mutual labels:  gorm, gin, jwt
Ginbro
Converting a MySQL database'schema to a RESTful golang APIs app in the fastest way
Stars: ✭ 97 (-98.06%)
Mutual labels:  gorm, gin, jwt
Full Stack
Full stack, modern web application generator. Using Flask, PostgreSQL DB, Docker, Swagger, automatic HTTPS and more.
Stars: ✭ 451 (-90.97%)
Mutual labels:  api, swagger, jwt
Go Gin Api
基于 Gin 进行模块化设计的 API 框架,封装了常用功能,使用简单,致力于进行快速的业务研发。比如,支持 cors 跨域、jwt 签名验证、zap 日志收集、panic 异常捕获、trace 链路追踪、prometheus 监控指标、swagger 文档生成、viper 配置文件解析、gorm 数据库组件、gormgen 代码生成工具、graphql 查询语言、errno 统一定义错误码、gRPC 的使用 等等。
Stars: ✭ 730 (-85.38%)
Mutual labels:  swagger, gorm, gin
Go Book Store Api
Go Sample project to understand Mysql CRUD operation with best practises Includes logging, JWT, Swagger and Transactions
Stars: ✭ 18 (-99.64%)
Mutual labels:  api, swagger, jwt
Ugin
UGin is an API boilerplate written in Go (Golang) with Gin Framework.
Stars: ✭ 110 (-97.8%)
Mutual labels:  api, gorm, gin
Go-Gin-Api
基于golang开源框架 gin封装的api框架
Stars: ✭ 42 (-99.16%)
Mutual labels:  swagger, gin, gorm
golang api
This is a source code of my golang restful api series on youtube.
Stars: ✭ 36 (-99.28%)
Mutual labels:  jwt, gin, gorm
Koa Rest Api Boilerplate
💯 Boilerplate for Node.js Koa RESTful API application with Docker, Swagger, Jest, CodeCov and CircleCI
Stars: ✭ 420 (-91.59%)
Mutual labels:  api, swagger
Jianshu
仿简书nx+nodejs+nestjs6+express+mongodb+angular8+爬虫
Stars: ✭ 296 (-94.07%)
Mutual labels:  api, swagger
Jwt sessions
XSS/CSRF safe JWT auth designed for SPA
Stars: ✭ 431 (-91.37%)
Mutual labels:  api, jwt
Flask Api Starter Kit
Start a Flask API in less than 5 minutes
Stars: ✭ 296 (-94.07%)
Mutual labels:  api, swagger
Blog.core
💖 ASP.NET Core 6.0 全家桶教程,前后端分离后端接口,vue教程姊妹篇,官方文档:
Stars: ✭ 3,542 (-29.05%)
Mutual labels:  swagger, jwt
Go Admin
go web api,包含gin+gorm+jwt+rbac等。
Stars: ✭ 298 (-94.03%)
Mutual labels:  gin, jwt
Securing Restful Apis With Jwt
How to secure a Nodejs RESTful CRUD API using JSON web tokens?
Stars: ✭ 301 (-93.97%)
Mutual labels:  api, jwt
Jimu
.netcore micro service framework
Stars: ✭ 315 (-93.69%)
Mutual labels:  swagger, jwt

Go Gin Example rcard GoDoc License

An example of gin contains many useful features

简体中文

Installation

$ go get github.com/EDDYCJY/go-gin-example

How to run

Required

  • Mysql
  • Redis

Ready

Create a blog database and import SQL

Conf

You should modify conf/app.ini

[database]
Type = mysql
User = root
Password =
Host = 127.0.0.1:3306
Name = blog
TablePrefix = blog_

[redis]
Host = 127.0.0.1:6379
Password =
MaxIdle = 30
MaxActive = 30
IdleTimeout = 200
...

Run

$ cd $GOPATH/src/go-gin-example

$ go run main.go 

Project information and existing API

[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:	export GIN_MODE=release
 - using code:	gin.SetMode(gin.ReleaseMode)

[GIN-debug] GET    /auth                     --> github.com/EDDYCJY/go-gin-example/routers/api.GetAuth (3 handlers)
[GIN-debug] GET    /swagger/*any             --> github.com/EDDYCJY/go-gin-example/vendor/github.com/swaggo/gin-swagger.WrapHandler.func1 (3 handlers)
[GIN-debug] GET    /api/v1/tags              --> github.com/EDDYCJY/go-gin-example/routers/api/v1.GetTags (4 handlers)
[GIN-debug] POST   /api/v1/tags              --> github.com/EDDYCJY/go-gin-example/routers/api/v1.AddTag (4 handlers)
[GIN-debug] PUT    /api/v1/tags/:id          --> github.com/EDDYCJY/go-gin-example/routers/api/v1.EditTag (4 handlers)
[GIN-debug] DELETE /api/v1/tags/:id          --> github.com/EDDYCJY/go-gin-example/routers/api/v1.DeleteTag (4 handlers)
[GIN-debug] GET    /api/v1/articles          --> github.com/EDDYCJY/go-gin-example/routers/api/v1.GetArticles (4 handlers)
[GIN-debug] GET    /api/v1/articles/:id      --> github.com/EDDYCJY/go-gin-example/routers/api/v1.GetArticle (4 handlers)
[GIN-debug] POST   /api/v1/articles          --> github.com/EDDYCJY/go-gin-example/routers/api/v1.AddArticle (4 handlers)
[GIN-debug] PUT    /api/v1/articles/:id      --> github.com/EDDYCJY/go-gin-example/routers/api/v1.EditArticle (4 handlers)
[GIN-debug] DELETE /api/v1/articles/:id      --> github.com/EDDYCJY/go-gin-example/routers/api/v1.DeleteArticle (4 handlers)

Listening port is 8000
Actual pid is 4393

Swagger doc

image

Features

  • RESTful API
  • Gorm
  • Swagger
  • logging
  • Jwt-go
  • Gin
  • Graceful restart or stop (fvbock/endless)
  • App configurable
  • Cron
  • Redis
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].