{"id":19204310,"url":"https://github.com/jmbl1685/golang-restapi","last_synced_at":"2026-06-16T03:32:23.248Z","repository":{"id":134056345,"uuid":"136388645","full_name":"jmbl1685/golang-restapi","owner":"jmbl1685","description":"Minimal server with Golang using gorilla/mux + MongoDB","archived":false,"fork":false,"pushed_at":"2018-06-08T17:56:42.000Z","size":2395,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-23T06:16:00.005Z","etag":null,"topics":["golang","gorilla-mux","mongobd","rest-api"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jmbl1685.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-06T21:35:23.000Z","updated_at":"2019-11-03T00:43:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"9910ea90-0872-4992-a982-12ebb8eb9e4a","html_url":"https://github.com/jmbl1685/golang-restapi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jmbl1685/golang-restapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmbl1685%2Fgolang-restapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmbl1685%2Fgolang-restapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmbl1685%2Fgolang-restapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmbl1685%2Fgolang-restapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jmbl1685","download_url":"https://codeload.github.com/jmbl1685/golang-restapi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmbl1685%2Fgolang-restapi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34390052,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-16T02:00:06.860Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["golang","gorilla-mux","mongobd","rest-api"],"created_at":"2024-11-09T13:07:14.410Z","updated_at":"2026-06-16T03:32:23.233Z","avatar_url":"https://github.com/jmbl1685.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# API REST Example using Go [Golang]\n\nUsed modules\n```\ngo get github.com/gorilla/mux\ngo get github.com/rs/cors\ngo get gopkg.in/mgo.v2\ngo get gopkg.in/mgo.v2/bson\ngo get github.com/jasonsoft/go-short-id\n```\n\n## CRUD Football player\n\n\nPlayer Model:\n\n```go\ntype Player struct {\n\tId          string `json:\"id\"`\n\tName        string `json:\"name\"`\n\tTeam        string `json:\"team\"`\n\tPosition    string `json:\"position\"`\n\tDorsal      int    `json:\"dorsal\"`\n\tNationality string `json:\"nationality\"`\n\tImageUrl    string `json:\"image\"`\n}\n```\nPlayer Controllers:\n\n```go\nfunc AddPlayer(w http.ResponseWriter, r *http.Request){...}\nfunc GetPlayer(w http.ResponseWriter, r *http.Request){...}\nfunc GetPlayerById(w http.ResponseWriter, r *http.Request){...}\nfunc DeletePlayer(w http.ResponseWriter, r *http.Request){...}\nfunc UpdatePlayer(w http.ResponseWriter, r *http.Request){...}\n```\nPlayer Routes:\n```go\nrouter = mux.NewRouter()\n\nrouter.HandleFunc(\"/player\", controllers.AddPlayer).Methods(\"POST\")\nrouter.HandleFunc(\"/player\", controllers.GetPlayer).Methods(\"GET\")\nrouter.HandleFunc(\"/player/{id}\", controllers.GetPlayerById).Methods(\"GET\")\nrouter.HandleFunc(\"/player/{id}\", controllers.DeletePlayer).Methods(\"DELETE\")\nrouter.HandleFunc(\"/player/{id}\", controllers.UpdatePlayer).Methods(\"PUT\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmbl1685%2Fgolang-restapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmbl1685%2Fgolang-restapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmbl1685%2Fgolang-restapi/lists"}