{"id":17637919,"url":"https://github.com/yuki-tu/todo-go","last_synced_at":"2026-04-19T04:34:04.810Z","repository":{"id":62864894,"uuid":"528480417","full_name":"Yuki-TU/todo-go","owner":"Yuki-TU","description":"GoのRESTAPI","archived":false,"fork":false,"pushed_at":"2022-10-12T16:24:26.000Z","size":122,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-05T06:16:10.995Z","etag":null,"topics":["adminer","gin","go","golang","mysql"],"latest_commit_sha":null,"homepage":"","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/Yuki-TU.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}},"created_at":"2022-08-24T15:20:05.000Z","updated_at":"2022-09-26T18:18:55.000Z","dependencies_parsed_at":"2022-11-08T06:33:44.594Z","dependency_job_id":null,"html_url":"https://github.com/Yuki-TU/todo-go","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yuki-TU%2Ftodo-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yuki-TU%2Ftodo-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yuki-TU%2Ftodo-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yuki-TU%2Ftodo-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yuki-TU","download_url":"https://codeload.github.com/Yuki-TU/todo-go/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246273561,"owners_count":20750906,"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":["adminer","gin","go","golang","mysql"],"created_at":"2024-10-23T03:07:30.427Z","updated_at":"2026-04-19T04:34:04.779Z","avatar_url":"https://github.com/Yuki-TU.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# todo-go\ntodo appのREST API\n\n利用ライブラリ\n- [gin](https://pkg.go.dev/github.com/gin-gonic/gin)\n- [golang-migration](https://github.com/golang-migrate/migrate)\n- [swagger-ui](https://swagger.io/tools/swagger-ui/)\n- [sql](https://pkg.go.dev/database/sql)\n\n# 環境構築\n\n```sh\n$ git clone https://github.com/Yuki-TU/todo-go\n$ cd ./todo-go\n$ cp .env.example .env\n$ docker compose up -d --build\n$ docker compose exec app sh\n# 以下コンテナ内\n$ go run main.go\n```\n \nAPI\n[http://localhost:8081](http://localhost:8081)\n\nswagger-ui\n[http://localhost](http://localhost)\n\nまたMakefileも用意しているため、そちらでも実行可能\n\n```sh\n$ make up # docker compose up -d\n$ make build DOCKER_TAG=v1.0.0 # docker build --tag yuki-tu/todo-go:v1.0.0 --target deploy ./\n```\n\n詳しくは、`$ make help`または`Makefile`を参考\n\n# DB\n\nテスト環境での情報は以下\n\n|項目|設定値|\n|---|---|\n|データベース種類|MySQL|\n|サーバ|db|\n|ユーザ|test|\n|パスワード|test|\n|データベース|todo|\n\n# migration\n\n```sh\n# 環境変数定義（環境変数が指定されていないエラーが出たら）\n$ export MYSQL_URI='mysql://test:test@tcp(db:3306)/todo?charset=utf8\u0026parseTime=true\u0026loc=Asia%2FTokyo'\n# テンプレート作成\n$ migrate create -ext sql -dir db/migrations -seq (table-name)\n# マイグレーション適用\n$ migrate -database ${MYSQL_URI} -path db/migrations up\n# リバースマイグレーション\n$ migrate -database ${MYSQL_URI} -path db/migrations down\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuki-tu%2Ftodo-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuki-tu%2Ftodo-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuki-tu%2Ftodo-go/lists"}