{"id":18246461,"url":"https://github.com/joacod/go-playground-api","last_synced_at":"2026-04-22T16:34:12.387Z","repository":{"id":176969792,"uuid":"257354287","full_name":"joacod/go-playground-api","owner":"joacod","description":"Go playground Web API using Gin, Swaggo, CORS gin's middleware and GORM","archived":false,"fork":false,"pushed_at":"2020-05-29T14:34:02.000Z","size":81,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-16T05:30:54.060Z","etag":null,"topics":["gin-gonic","gin-swagger","go","gorm","gorm-orm","swag","swaggo"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joacod.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":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-20T17:23:35.000Z","updated_at":"2022-10-16T03:00:31.000Z","dependencies_parsed_at":"2023-07-14T18:16:28.407Z","dependency_job_id":null,"html_url":"https://github.com/joacod/go-playground-api","commit_stats":null,"previous_names":["joacod/go-playground-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/joacod/go-playground-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joacod%2Fgo-playground-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joacod%2Fgo-playground-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joacod%2Fgo-playground-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joacod%2Fgo-playground-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joacod","download_url":"https://codeload.github.com/joacod/go-playground-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joacod%2Fgo-playground-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32145828,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T15:33:03.595Z","status":"ssl_error","status_checked_at":"2026-04-22T15:30:42.712Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["gin-gonic","gin-swagger","go","gorm","gorm-orm","swag","swaggo"],"created_at":"2024-11-05T09:26:05.059Z","updated_at":"2026-04-22T16:34:07.378Z","avatar_url":"https://github.com/joacod.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go Playground\nGo playground Web API using [Gin](https://github.com/gin-gonic/gin), [Swaggo](https://github.com/swaggo/gin-swagger), [CORS gin's middleware](https://github.com/gin-contrib/cors) and [GORM](https://gorm.io/)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg height=\"200\" src=\"https://raw.githubusercontent.com/gin-gonic/logo/master/color.png\"\u003e\n  \u003cimg height=\"200\" src=\"https://avatars0.githubusercontent.com/u/29616670?s=400\u0026v=4\"\u003e\n\u003c/p\u003e\n\n## Notes\nGo version 1.14\n\nThe idea of this project is to provide all the apis that exists in my other repositories [NetCore.Playground.Api](https://github.com/joacod/NetCore.Playground.Api) and [node-playground-api](https://github.com/joacod/node-playground-api)\n\nWhat we get from this:\n- We practice different approaches in Go\n- We can compare **Go** implementations with the same ones written in **.NetCore** and **Node.js**\n- We have three versions of the same Web Api written in different languages, that can be switched from a UI having the exact same results\n\nI have created three UI projects to consume the APIs created here, you can use either of the following repositories:\n- [Angular Playground](https://github.com/joacod/angular-playground-ui)\n- [Vue Playground](https://github.com/joacod/vue-playground-ui)\n- [React Playground](https://github.com/joacod/react-playground-ui)\n\n## Prerequisites\n- [Install Go](https://golang.org/)\n- [VS Code Extension for Go](https://github.com/microsoft/vscode-go)\n- [MySQL instance in your system](https://www.mysql.com/)\n    - This is optional and used only for implemented CRUD operations using GORM\n    - If you are not interested in this part, you can avoid the installtion of MySQL and just change the flag named *useMysqlDb* in main.go file\n\n## Installation and Setup\n1. Download Gin framework: `go get github.com/gin-gonic/gin`\n2. Download Swag for Go: `go get -u github.com/swaggo/swag/cmd/swag`\n3. Download [gin-swagger](https://github.com/swaggo/gin-swagger) by using:\n```sh\n$ go get -u github.com/swaggo/gin-swagger\n$ go get -u github.com/swaggo/files\n```\n4. Download MySQL driver for Go: `go get github.com/go-sql-driver/mysql`\n5. Download GORM: `go get github.com/jinzhu/gorm`\n6. Go to the file *database/Database.go* and update DBName, Host, Port, User and Password according to your local environment configuration\n\n## How to Run it\n1. From the terminal: `go run playground`\n2. Once it's running, go to a browser\n3. Hit the following url http://localhost:8080/swagger/index.html\n\n## Generating Swagger documentation\nIf you change or add new apis:\n1. Make sure they have the proper [General API](https://github.com/swaggo/swag/blob/master/README.md#general-api-info) annotations\n2. Run the Swaggo command to regenerate the documentation: `swag init`\n3. That's all :smiley:\n\n## What you will find so far :heavy_check_mark:\n- [x] Web API created with [Gin](https://github.com/gin-gonic/gin)\n- [x] Swagger documentation of the APIs usign [Swaggo](https://github.com/swaggo/gin-swagger)\n- [x] CRUD operations using GORM and MySQL\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoacod%2Fgo-playground-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoacod%2Fgo-playground-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoacod%2Fgo-playground-api/lists"}