{"id":17035384,"url":"https://github.com/hhxsv5/go-db-proxy-api","last_synced_at":"2026-04-13T02:07:44.129Z","repository":{"id":57582877,"uuid":"111644404","full_name":"hhxsv5/go-db-proxy-api","owner":"hhxsv5","description":"A simple http API is used to connect the database which is in private/intranet network.","archived":false,"fork":false,"pushed_at":"2017-12-19T10:49:28.000Z","size":18,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-28T02:14:47.329Z","etag":null,"topics":["proxy-database","proxy-mssql","proxy-mysql","proxy-server"],"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/hhxsv5.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-22T06:20:18.000Z","updated_at":"2020-03-04T13:40:16.000Z","dependencies_parsed_at":"2022-09-04T05:23:26.952Z","dependency_job_id":null,"html_url":"https://github.com/hhxsv5/go-db-proxy-api","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hhxsv5%2Fgo-db-proxy-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hhxsv5%2Fgo-db-proxy-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hhxsv5%2Fgo-db-proxy-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hhxsv5%2Fgo-db-proxy-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hhxsv5","download_url":"https://codeload.github.com/hhxsv5/go-db-proxy-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245027354,"owners_count":20549288,"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":["proxy-database","proxy-mssql","proxy-mysql","proxy-server"],"created_at":"2024-10-14T08:46:41.387Z","updated_at":"2026-04-13T02:07:39.073Z","avatar_url":"https://github.com/hhxsv5.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Database Proxy API\n==================\n\nA simple http API is used to connect the database which is in private/intranet network.\n\n## Usage\n\n1. Install\n\n```Shell\n//cd your-root-folder-of-project\n//Create the file glide.yaml if not exist\n//touch glide.yaml\nglide get github.com/hhxsv5/go-db-proxy-api#~1.0.0\n```\n\n2. Config\n- config of database: config/db.toml\n- config of http server: config/http.toml\n\n\n3. Run\n\n```Go\nvar handlers = map[string]func(w http.ResponseWriter, r *http.Request){}\nhandlers[\"/\"] = func(w http.ResponseWriter, r *http.Request) {\n    //rand.Seed(time.Now().UnixNano())\n    //cellphone := \"1878020\" + strconv.Itoa(int(1000+rand.Int31n(9999-1000)))\n    //mydefault.CreateUser(cellphone)\n\n    users := mydefault.GetUsersByIds([]uint64{})\n\n    var (\n        rsp string\n        it  time.Time\n        mt  time.Time\n    )\n\n    for i, u := range users {\n        it = time.Unix(u.InsertTime, 0)\n        mt = time.Unix(u.ModifyTime, 0)\n        rsp += fmt.Sprintf(\"%d: %d, %s, %s, %s\\n\", i, u.Id, u.Cellphone, it.Format(time.RFC3339), mt.Format(\"2006-01-02 15:04:05\"))\n    }\n\n    io.WriteString(w, rsp)\n}\n\np := godpa.NewProxy(handlers)\np.Run()\n```\n\n## Thanks [ORM](https://github.com/go-xorm/xorm)\n\n## License\n\n[MIT](https://github.com/hhxsv5/go-db-proxy-api/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhhxsv5%2Fgo-db-proxy-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhhxsv5%2Fgo-db-proxy-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhhxsv5%2Fgo-db-proxy-api/lists"}