{"id":15096044,"url":"https://github.com/agieaja/crudgolang","last_synced_at":"2025-04-14T22:12:56.995Z","repository":{"id":93577627,"uuid":"191261260","full_name":"AgieAja/crudgolang","owner":"AgieAja","description":"Sample API CRUD Golang And Gin","archived":false,"fork":false,"pushed_at":"2020-08-11T08:03:31.000Z","size":23,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-28T10:11:42.856Z","etag":null,"topics":["api","crud","gin","golang","sample"],"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/AgieAja.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":"2019-06-10T23:49:55.000Z","updated_at":"2024-04-04T04:47:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"dd2bb26c-d382-4bd9-9696-160d34d24667","html_url":"https://github.com/AgieAja/crudgolang","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/AgieAja%2Fcrudgolang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AgieAja%2Fcrudgolang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AgieAja%2Fcrudgolang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AgieAja%2Fcrudgolang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AgieAja","download_url":"https://codeload.github.com/AgieAja/crudgolang/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248968916,"owners_count":21191162,"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":["api","crud","gin","golang","sample"],"created_at":"2024-09-25T15:45:12.185Z","updated_at":"2025-04-14T22:12:56.977Z","avatar_url":"https://github.com/AgieAja.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003eSample API CRUD using Golang And Gin\u003c/h1\u003e\n\n\u003ch3\u003eInstalation\u003c/h3\u003e\n\u003chr/\u003e\n\u003col\u003e\n  \u003cli\u003eCreate some database and Import table in the folder database on MYSQL\u003c/li\u003e\n  \u003cli\u003e\n    Open your terminal and run command :\n    \u003cul\u003e\n      \u003cli\u003ego get github.com/gin-contrib/logger\u003c/li\u003e\n      \u003cli\u003ego get github.com/gin-gonic/gin\u003c/li\u003e\n      \u003cli\u003ego get github.com/rs/zerolog\u003c/li\u003e\n      \u003cli\u003ego get github.com/rs/zerolog/log\u003c/li\u003e\n      \u003cli\u003ego get github.com/jinzhu/gorm\u003c/li\u003e\n      \u003cli\u003ego get github.com/go-sql-driver/mysql\u003c/li\u003e\n    \u003c/ul\u003e\n  \u003c/li\u003e\n  \u003cli\u003e\n    Change the contents of the connectdb.go file in the config folder as follow :\n    \u003cul\u003e\n      \u003cli\u003edbHost := \"your host name / IP database\"\u003c/li\u003e\n      \u003cli\u003edbPort := \"your port hostname / IP database\"\u003c/li\u003e\n      \u003cli\u003edbUser := \"your user database\"\u003c/li\u003e\n      \u003cli\u003edbPass := \"your password database\"\u003c/li\u003e\n      \u003cli\u003edbName := \"your database name\"\u003c/li\u003e\n    \u003c/ul\u003e\n  \u003c/li\u003e\n  \u003cli\u003eOpen your terminal on the root project and run command go run main.go\u003c/li\u003e\n\u003c/ol\u003e\n\n\n\u003ch3\u003eModule\u003c/h3\u003e\n\u003chr/\u003e\n\u003ctable style=\"width:100%;border:1px;\"\u003e\n  \u003ctr\u003e\n    \u003cth\u003eModule\u003c/th\u003e\n    \u003cth\u003eMethod\u003c/th\u003e\n    \u003cth\u003eURL\u003c/th\u003e\n    \u003cth\u003eDescription\u003c/th\u003e\n    \u003cth\u003eRequest Body\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eAdd\u003c/td\u003e\n    \u003ctd\u003ePOST\u003c/td\u003e\n    \u003ctd\u003e{baseURL}/phonebook/add\u003c/td\u003e\n    \u003ctd\u003eAdd some data in table phone_books\u003c/td\u003e\n    \u003ctd\u003e{\"name\":\"Tiar\",\"phone\":\"12346\"}\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eEdit\u003c/td\u003e\n    \u003ctd\u003ePOST\u003c/td\u003e\n    \u003ctd\u003e{baseURL}/phonebook/edit\u003c/td\u003e\n    \u003ctd\u003eedit some data in table phone_books\u003c/td\u003e\n    \u003ctd\u003e{\"id\":1,\"name\":\"Tiar\",\"phone\":\"12346\"}\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eList\u003c/td\u003e\n    \u003ctd\u003eGET\u003c/td\u003e\n    \u003ctd\u003e{baseURL}/phonebook/list\u003c/td\u003e\n    \u003ctd\u003eget all data in table phone_books\u003c/td\u003e\n    \u003ctd\u003e-\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eGet Data by ID\u003c/td\u003e\n    \u003ctd\u003eGET\u003c/td\u003e\n    \u003ctd\u003e{baseURL}/phonebook/data/id\u003c/td\u003e\n    \u003ctd\u003eget data by id in table phone_books\u003c/td\u003e\n    \u003ctd\u003e-\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eDelete\u003c/td\u003e\n    \u003ctd\u003ePOST\u003c/td\u003e\n    \u003ctd\u003e{baseURL}/phonebook/delete\u003c/td\u003e\n    \u003ctd\u003edelete some data in table phone_books\u003c/td\u003e\n    \u003ctd\u003e{\"id\":1}\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagieaja%2Fcrudgolang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagieaja%2Fcrudgolang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagieaja%2Fcrudgolang/lists"}