{"id":19430702,"url":"https://github.com/jmrashed/go-todo-rest-api-example","last_synced_at":"2025-09-20T11:06:46.949Z","repository":{"id":162327525,"uuid":"636475612","full_name":"jmrashed/go-todo-rest-api-example","owner":"jmrashed","description":"Go-MySQL-Todo-Rest-API-Example is a sample project showcasing how to build a RESTful API for a Todo application using Go, MySQL and Gin framework.","archived":false,"fork":false,"pushed_at":"2023-05-05T01:49:34.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-26T04:26:27.327Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/jmrashed.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":"2023-05-04T23:52:31.000Z","updated_at":"2025-02-27T10:54:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"3df35b28-05ce-47c4-91f6-1045cd4518ea","html_url":"https://github.com/jmrashed/go-todo-rest-api-example","commit_stats":null,"previous_names":["mrzstack/go-todo-rest-api-example","jmrashed/go-todo-rest-api-example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jmrashed/go-todo-rest-api-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmrashed%2Fgo-todo-rest-api-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmrashed%2Fgo-todo-rest-api-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmrashed%2Fgo-todo-rest-api-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmrashed%2Fgo-todo-rest-api-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jmrashed","download_url":"https://codeload.github.com/jmrashed/go-todo-rest-api-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmrashed%2Fgo-todo-rest-api-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276085259,"owners_count":25582514,"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","status":"online","status_checked_at":"2025-09-20T02:00:10.207Z","response_time":63,"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":[],"created_at":"2024-11-10T14:26:14.470Z","updated_at":"2025-09-20T11:06:46.650Z","avatar_url":"https://github.com/jmrashed.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go Todo REST API Example With Docker\nA RESTful API example for simple todo application with Go\n\nIt is a just simple tutorial or example for making simple RESTful API with Go using **gorilla/mux** (A nice mux library) and **gorm** (An ORM for Go)\n\n## Installation \u0026 Run\n```bash\n# Download this project\ngo get github.com/jmrashed/go-todo-rest-api-example\n```\n\nvisit docker [jmrashed/go-todo-rest-api-example](https://hub.docker.com/r/jmrashed/go-todo-rest-api-example)\n\nBefore running API server, you should set the database config with yours or set the your database config with my values on [config.go](https://github.com/jmrashed/go-todo-rest-api-example/blob/master/config/config.go)\n```go\nfunc GetConfig() *Config {\n\treturn \u0026Config{\n\t\tDB: \u0026DBConfig{\n\t\t\tDialect:  \"mysql\",\n\t\t\tUsername: \"root\",\n\t\t\tPassword: \"password\",\n\t\t\tName:     \"todoapp\",\n\t\t\tCharset:  \"utf8\",\n\t\t},\n\t}\n}\n```\n\n```bash\n# Build and Run\ncd go-todo-rest-api-example\ngo build\n./go-todo-rest-api-example\n\n# API Endpoint : http://127.0.0.1:3000\n```\n\n## Structure\n```\n├── app\n│   ├── app.go\n│   ├── handler          // Our API core handlers\n│   │   ├── common.go    // Common response functions\n│   │   ├── projects.go  // APIs for Project model\n│   │   └── tasks.go     // APIs for Task model\n│   └── model\n│       └── model.go     // Models for our application\n├── config\n│   └── config.go        // Configuration\n└── main.go\n```\n\n## API\n\n#### /projects\n* `GET` : Get all projects\n* `POST` : Create a new project\n\n#### /projects/:title\n* `GET` : Get a project\n* `PUT` : Update a project\n* `DELETE` : Delete a project\n\n#### /projects/:title/archive\n* `PUT` : Archive a project\n* `DELETE` : Restore a project \n\n#### /projects/:title/tasks\n* `GET` : Get all tasks of a project\n* `POST` : Create a new task in a project\n\n#### /projects/:title/tasks/:id\n* `GET` : Get a task of a project\n* `PUT` : Update a task of a project\n* `DELETE` : Delete a task of a project\n\n#### /projects/:title/tasks/:id/complete\n* `PUT` : Complete a task of a project\n* `DELETE` : Undo a task of a project\n\n## Todo\n\n- [x] Support basic REST APIs.\n- [ ] Support Authentication with user for securing the APIs.\n- [ ] Make convenient wrappers for creating API handlers.\n- [ ] Write the tests for all APIs.\n- [x] Organize the code with packages\n- [ ] Make docs with GoDoc\n- [ ] Building a deployment process \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmrashed%2Fgo-todo-rest-api-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmrashed%2Fgo-todo-rest-api-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmrashed%2Fgo-todo-rest-api-example/lists"}