{"id":13416796,"url":"https://github.com/eddycjy/go-gin-example","last_synced_at":"2025-05-14T02:05:07.187Z","repository":{"id":37286230,"uuid":"121746465","full_name":"eddycjy/go-gin-example","owner":"eddycjy","description":"An example of gin","archived":false,"fork":false,"pushed_at":"2023-07-07T01:59:34.000Z","size":23567,"stargazers_count":6993,"open_issues_count":51,"forks_count":1610,"subscribers_count":137,"default_branch":"master","last_synced_at":"2025-04-10T16:48:19.492Z","etag":null,"topics":["api","endless","gin","go","golang","gorm","jwt","swagger"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eddycjy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-02-16T12:06:24.000Z","updated_at":"2025-04-10T16:18:37.000Z","dependencies_parsed_at":"2023-01-31T10:15:38.447Z","dependency_job_id":"86314593-47e0-427f-a4a3-890f33627176","html_url":"https://github.com/eddycjy/go-gin-example","commit_stats":{"total_commits":102,"total_committers":4,"mean_commits":25.5,"dds":0.02941176470588236,"last_synced_commit":"28f372bf41f9e67a9cec5980fd1c365363064ebc"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddycjy%2Fgo-gin-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddycjy%2Fgo-gin-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddycjy%2Fgo-gin-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddycjy%2Fgo-gin-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eddycjy","download_url":"https://codeload.github.com/eddycjy/go-gin-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254052692,"owners_count":22006716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","endless","gin","go","golang","gorm","jwt","swagger"],"created_at":"2024-07-30T22:00:22.301Z","updated_at":"2025-05-14T02:05:02.171Z","avatar_url":"https://github.com/eddycjy.png","language":"Go","funding_links":[],"categories":["Popular","Go","Repositories"],"sub_categories":[],"readme":"# Go Gin Example [![rcard](https://goreportcard.com/badge/github.com/EDDYCJY/go-gin-example)](https://goreportcard.com/report/github.com/EDDYCJY/go-gin-example) [![GoDoc](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)](https://godoc.org/github.com/EDDYCJY/go-gin-example) [![License](http://img.shields.io/badge/license-mit-blue.svg?style=flat-square)](https://raw.githubusercontent.com/EDDYCJY/go-gin-example/master/LICENSE)\n\nAn example of gin contains many useful features\n\n[简体中文](https://github.com/EDDYCJY/go-gin-example/blob/master/README_ZH.md)\n\n## Installation\n```\n$ go get github.com/EDDYCJY/go-gin-example\n```\n\n## How to run\n\n### Required\n\n- Mysql\n- Redis\n\n### Ready\n\nCreate a **blog database** and import [SQL](https://github.com/EDDYCJY/go-gin-example/blob/master/docs/sql/blog.sql)\n\n### Conf\n\nYou should modify `conf/app.ini`\n\n```\n[database]\nType = mysql\nUser = root\nPassword =\nHost = 127.0.0.1:3306\nName = blog\nTablePrefix = blog_\n\n[redis]\nHost = 127.0.0.1:6379\nPassword =\nMaxIdle = 30\nMaxActive = 30\nIdleTimeout = 200\n...\n```\n\n### Run\n```\n$ cd $GOPATH/src/go-gin-example\n\n$ go run main.go \n```\n\nProject information and existing API\n\n```\n[GIN-debug] [WARNING] Running in \"debug\" mode. Switch to \"release\" mode in production.\n - using env:\texport GIN_MODE=release\n - using code:\tgin.SetMode(gin.ReleaseMode)\n\n[GIN-debug] GET    /auth                     --\u003e github.com/EDDYCJY/go-gin-example/routers/api.GetAuth (3 handlers)\n[GIN-debug] GET    /swagger/*any             --\u003e github.com/EDDYCJY/go-gin-example/vendor/github.com/swaggo/gin-swagger.WrapHandler.func1 (3 handlers)\n[GIN-debug] GET    /api/v1/tags              --\u003e github.com/EDDYCJY/go-gin-example/routers/api/v1.GetTags (4 handlers)\n[GIN-debug] POST   /api/v1/tags              --\u003e github.com/EDDYCJY/go-gin-example/routers/api/v1.AddTag (4 handlers)\n[GIN-debug] PUT    /api/v1/tags/:id          --\u003e github.com/EDDYCJY/go-gin-example/routers/api/v1.EditTag (4 handlers)\n[GIN-debug] DELETE /api/v1/tags/:id          --\u003e github.com/EDDYCJY/go-gin-example/routers/api/v1.DeleteTag (4 handlers)\n[GIN-debug] GET    /api/v1/articles          --\u003e github.com/EDDYCJY/go-gin-example/routers/api/v1.GetArticles (4 handlers)\n[GIN-debug] GET    /api/v1/articles/:id      --\u003e github.com/EDDYCJY/go-gin-example/routers/api/v1.GetArticle (4 handlers)\n[GIN-debug] POST   /api/v1/articles          --\u003e github.com/EDDYCJY/go-gin-example/routers/api/v1.AddArticle (4 handlers)\n[GIN-debug] PUT    /api/v1/articles/:id      --\u003e github.com/EDDYCJY/go-gin-example/routers/api/v1.EditArticle (4 handlers)\n[GIN-debug] DELETE /api/v1/articles/:id      --\u003e github.com/EDDYCJY/go-gin-example/routers/api/v1.DeleteArticle (4 handlers)\n\nListening port is 8000\nActual pid is 4393\n```\nSwagger doc\n\n![image](https://i.imgur.com/bVRLTP4.jpg)\n\n## Features\n\n- RESTful API\n- Gorm\n- Swagger\n- logging\n- Jwt-go\n- Gin\n- Graceful restart or stop (fvbock/endless)\n- App configurable\n- Cron\n- Redis","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feddycjy%2Fgo-gin-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feddycjy%2Fgo-gin-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feddycjy%2Fgo-gin-example/lists"}