{"id":24321078,"url":"https://github.com/ishtiaqhimel/go-api-server","last_synced_at":"2026-02-03T14:03:57.271Z","repository":{"id":64088931,"uuid":"571588756","full_name":"ishtiaqhimel/go-api-server","owner":"ishtiaqhimel","description":"API Server","archived":false,"fork":false,"pushed_at":"2024-12-13T06:24:46.000Z","size":256,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T21:35:35.026Z","etag":null,"topics":["docker","golang","jwt","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ishtiaqhimel.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}},"created_at":"2022-11-28T13:08:03.000Z","updated_at":"2024-12-13T06:24:50.000Z","dependencies_parsed_at":"2023-01-14T22:00:37.041Z","dependency_job_id":null,"html_url":"https://github.com/ishtiaqhimel/go-api-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ishtiaqhimel/go-api-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishtiaqhimel%2Fgo-api-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishtiaqhimel%2Fgo-api-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishtiaqhimel%2Fgo-api-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishtiaqhimel%2Fgo-api-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ishtiaqhimel","download_url":"https://codeload.github.com/ishtiaqhimel/go-api-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishtiaqhimel%2Fgo-api-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29047093,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T10:09:22.136Z","status":"ssl_error","status_checked_at":"2026-02-03T10:09:16.814Z","response_time":96,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["docker","golang","jwt","rest-api"],"created_at":"2025-01-17T16:31:12.555Z","updated_at":"2026-02-03T14:03:55.564Z","avatar_url":"https://github.com/ishtiaqhimel.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# API server Using Go\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/ishtiaqhimel/go-api-server)](https://goreportcard.com/report/github.com/ishtiaqhimel/go-api-server)\n\n### RESTful API using [go](https://github.com/golang), [cobra CLI](https://github.com/spf13/cobra), [go-chi/chi](https://github.com/go-chi/chi), Basic Auth, [JWT Auth](https://github.com/dgrijalva/jwt-go)\n\n--- \nAPI Endpoints\n| Endpoint | Function | Method | StatusCode | Auth |\n| -------- | -------- | ------ | ---------- | ---- |\n| `/api/login` | LogIn | POST | Success - 200, Failure - 401 | Basic |\n| `/api/student` | StudentGet | GET | Success - 200, Failure - 401 | JWT |\n| `/api/student` | StudentPost | POST | Success - 200, Failure - 401, 409 | JWT |\n| `/api/student/{id}` | StudentUpdate | PUT | Success - 200, Failure - 401, 404 | JWT |\n| `/api/student/{id}` | StudentDelete | DELETE | Success - 200, Failure - 401, 404 | JWT |\n| `/api/subject` | SubjectGet | GET | Success - 200, Failure - 401 | JWT |\n| `/api/subject` | SubjectPost | POST | Success - 200, Failure - 401, 409 | JWT |\n| `/api/subject/{id}` | SubjectUpdate | PUT | Success - 200, Failure - 401, 404 | JWT |\n| `/api/subject/{id}` | SubjectDelete | DELETE | Success - 200, Failure - 401, 404 | JWT |\n\n---\nData Model\n```\npackage model\n\ntype Student struct {\n\tId        string    `json:\"id\"`\n\tFirstName string    `json:\"firstName\"`\n\tLastName  string    `json:\"lastName\"`\n\tSubjects  []Subject `json:\"subjects\"`\n}\n\n```\n```\npackage model\n\ntype Subject struct {\n\tId    string `json:\"id\"`\n\tTitle string `json:\"title\"`\n\tCode  string `json:\"code\"`\n}\n\n```\n\n---\n\nInstallation\n* `go install github.com/ishtiaqhimel/go-api-server@latest`\n\nRun\n* `go-api-server start`\n---\n\nCLI Commands\n* build the app locally `make build`\n* help with the start commands `./bin/apiserver start -h` or `./bin/apiserver start --help`\n---\nAuthentication Method\n* Basic Authentication\n* JWT Authentication\n\n---\nResources:\n* [sysdevbd learn GO](https://sysdevbd.com/go/)\n* [A Beginner’s Guide to HTTP and REST](https://code.tutsplus.com/tutorials/a-beginners-guide-to-http-and-rest--net-16340)\n* [HTTP Response Status Codes](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fishtiaqhimel%2Fgo-api-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fishtiaqhimel%2Fgo-api-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fishtiaqhimel%2Fgo-api-server/lists"}