{"id":23252241,"url":"https://github.com/anucha-tk/go_bank","last_synced_at":"2026-04-19T02:02:24.055Z","repository":{"id":267569467,"uuid":"901661507","full_name":"anucha-tk/go_bank","owner":"anucha-tk","description":"GoBank RestAPI build with gin-gonic","archived":false,"fork":false,"pushed_at":"2025-02-04T02:13:04.000Z","size":111,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-08T08:00:03.364Z","etag":null,"topics":["gin-gonic","golang","jwt","paseto","postgresql","rest-api","testing"],"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/anucha-tk.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-12-11T04:41:50.000Z","updated_at":"2025-01-27T10:01:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"3f87e23d-a21b-477e-a037-a458567e171c","html_url":"https://github.com/anucha-tk/go_bank","commit_stats":null,"previous_names":["anucha-tk/go_bank"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/anucha-tk/go_bank","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anucha-tk%2Fgo_bank","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anucha-tk%2Fgo_bank/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anucha-tk%2Fgo_bank/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anucha-tk%2Fgo_bank/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anucha-tk","download_url":"https://codeload.github.com/anucha-tk/go_bank/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anucha-tk%2Fgo_bank/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278909713,"owners_count":26066887,"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-10-08T02:00:06.501Z","response_time":56,"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":["gin-gonic","golang","jwt","paseto","postgresql","rest-api","testing"],"created_at":"2024-12-19T10:13:50.868Z","updated_at":"2025-10-08T08:00:04.408Z","avatar_url":"https://github.com/anucha-tk.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GOBANK APP\n\n\u003c!--toc:start--\u003e\n\n- [GOBANK APP](#gobank-app)\n  - [Tools and Technical](#tools-and-technical)\n  - [Learn](#learn)\n  - [Migration](#migration)\n    - [Deadlock problem](#deadlock-problem)\n    - [Register custom validation params](#register-custom-validation-params)\n    - [Unit testing](#unit-testing)\n    - [Handle DB Errors](#handle-db-errors)\n    - [JWT vs Paseto Token](#jwt-vs-paseto-token)\n    - [Dockerfile](#dockerfile)\n  - [Resource](#resource)\n\n## Tools and Technical\n\n- HTTP Framework\n  - Gin\n- Database\n  - PostgreSQL\n  - [migrate](https://github.com/golang-migrate/migrate)\n  - Sqlc\n  - Transaction\n- Testing\n  - [Testify](https://github.com/stretchr/testify)\n  - Faker\n  - Gomock(Unit-test)\n- Infrastructure\n  - Viper(configuration)\n  - Docker\n  - Makefile\n  - Github Actions (CI)\n- ETC\n  - JWT and [Paseto](https://github.com/paragonie/paseto)\n    - Authentication(Access Token and Refresh Token)\n  - Auth Middleware\n\n## Learn\n\n## Migration\n\n- Create a new db migrate\n\n```bash\nmigrate create -ext sql -dir db/migration -seq \u003cmigration_name\u003e\n```\n\n### Deadlock problem\n\navoid deadlock with order see more `/db/sqlc/store.go`\n\n### Register custom validation params\n\ncreate constant of currency on my app at `/util/currency.go` then custom at `/api/validCurrency.go`\nand register at `/api/server.go`\n\n\u003e using `json:\"currency\" binding:\"required,currency\"`\n\n### Unit testing\n\nunit testing with gomock separate testing from real database, see more `api/account_test.go`\n\n### Handle DB Errors\n\n\u003e use err.(\\*pq.Error) at `/api/account.go`\n\n### JWT vs Paseto Token\n\nlearn build jwt token and paseto (modern) token at `/token`\n\n### Dockerfile\n\nlearn build stage for reduce file size see more `Dockerfile` and pre-load [migrate](https://github.com/golang-migrate/migrate) and ensure run `start.sh` after postgres container is ready with `wait-for.sh`\n\n## Resource\n\n[backend-master-class-golang-postgresql-kubernetes](https://www.udemy.com/course/backend-master-class-golang-postgresql-kubernetes/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanucha-tk%2Fgo_bank","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanucha-tk%2Fgo_bank","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanucha-tk%2Fgo_bank/lists"}