{"id":20554902,"url":"https://github.com/phankieuphu/go-lang-base","last_synced_at":"2026-04-09T20:37:55.794Z","repository":{"id":158938629,"uuid":"605263743","full_name":"phankieuphu/go-lang-base","owner":"phankieuphu","description":"Build base scr golang with gin, gorm, redis, viper and more to custom func ","archived":false,"fork":false,"pushed_at":"2024-07-26T15:10:08.000Z","size":32,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-16T17:56:52.312Z","etag":null,"topics":["gin","go","golang","gorm","postgresql","redis","viper"],"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/phankieuphu.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-02-22T19:48:49.000Z","updated_at":"2023-03-17T13:49:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"a1153ace-80bb-44a7-8ba2-598407958816","html_url":"https://github.com/phankieuphu/go-lang-base","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/phankieuphu%2Fgo-lang-base","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phankieuphu%2Fgo-lang-base/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phankieuphu%2Fgo-lang-base/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phankieuphu%2Fgo-lang-base/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phankieuphu","download_url":"https://codeload.github.com/phankieuphu/go-lang-base/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242159874,"owners_count":20081564,"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":["gin","go","golang","gorm","postgresql","redis","viper"],"created_at":"2024-11-16T03:14:19.821Z","updated_at":"2026-04-09T20:37:50.735Z","avatar_url":"https://github.com/phankieuphu.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"- ORM --\u003e gorm https://github.com/go-gorm/gorm\n- Database --\u003e postgresql https://www.postgresql.org/\n- Framework --\u003e gin https://github.com/gin-gonic/gin\n- Cache --\u003e redis https://redis.io\n- Stucture --\u003e kafka\n- Type_api --\u003e resful\n- Devops --\u003e dev ( heroku ) --\u003e prod ( aws google-cloud)\n- Target --\u003e voucher\n- Env manager --\u003e Viper\n\n```\nsystem/\n  cmd/\n    server/\n      main.go\n  internal/\n    app/\n      app.go\n    handler/\n      voucher.go\n    model/\n      voucher.go\n    repository/\n\n  util/\n    database.go\n  vendor/\n  .env\n  .env.example\n  .gitignore\n  go.mod\n  go.sum\n  README.md\n```\n\nHere's what each component of the project structure does:\n\n1. cmd\n\n- cmd/server/main.go: This is the main entry point for the application, and is responsible for starting the Gin web server and handling HTTP requests.\n\n2. Internal\n\n- internal/app/app.go: This file contains the code for initializing the Gin web framework and setting up middleware, such as logging or authentication.\n\n- internal/handler/voucher.go: This file contains the code for handling HTTP requests related to vouchers, such as redeeming a voucher or retrieving information about a voucher.\n\n- internal/model/voucher.go: This file contains the Go struct for representing a voucher, with fields for the voucher code, expiration date, and redemption status.\n\n- internal/repository/voucher.go: This file contains the code for interacting with the PostgreSQL database to retrieve, create, and update vouchers.\n\n- internal/util/database.go: This file contains the code for connecting to the PostgreSQL database and executing SQL queries.\n\n2. Vendor\n\n- vendor/: This directory contains the dependencies for the project, managed using Go's built-in go mod tool.\n\n3. .env: This file contains environment variables for the application, such as the database connection details.\n\n4. .env.example: This file provides an example of the environment variables that should be defined in the .env file.\n\n5. .gitignore: This file specifies files and directories that should be ignored by Git.\n\n6. go.mod and go.sum: These files are generated by Go's go mod tool and manage the dependencies for the project.\n\n7. README.md: This file provides a high-level overview of the project, including instructions for building and running the application.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphankieuphu%2Fgo-lang-base","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphankieuphu%2Fgo-lang-base","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphankieuphu%2Fgo-lang-base/lists"}