{"id":22588520,"url":"https://github.com/danny-yamamoto/go-api-samples","last_synced_at":"2025-03-28T17:42:41.772Z","repository":{"id":205552242,"uuid":"714518744","full_name":"danny-yamamoto/go-api-samples","owner":"danny-yamamoto","description":"A collection of REST API samples implemented in Go.","archived":false,"fork":false,"pushed_at":"2023-11-20T11:03:35.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-02T18:20:36.201Z","etag":null,"topics":["cloudstorage","dependency-injection","golang","sqlite3"],"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/danny-yamamoto.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}},"created_at":"2023-11-05T04:44:50.000Z","updated_at":"2023-11-22T23:57:33.000Z","dependencies_parsed_at":"2023-11-20T12:26:55.330Z","dependency_job_id":"fc8c56fb-79d2-4b75-ae28-b0e05a04f2a3","html_url":"https://github.com/danny-yamamoto/go-api-samples","commit_stats":null,"previous_names":["danny-yamamoto/go-api-samples"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danny-yamamoto%2Fgo-api-samples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danny-yamamoto%2Fgo-api-samples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danny-yamamoto%2Fgo-api-samples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danny-yamamoto%2Fgo-api-samples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danny-yamamoto","download_url":"https://codeload.github.com/danny-yamamoto/go-api-samples/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246072068,"owners_count":20719237,"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":["cloudstorage","dependency-injection","golang","sqlite3"],"created_at":"2024-12-08T08:09:46.830Z","updated_at":"2025-03-28T17:42:41.742Z","avatar_url":"https://github.com/danny-yamamoto.png","language":"Go","readme":"# go-api-samples\nA collection of REST API samples implemented in Go.\n\n## `/storage`\n- [Docs](./cmd/storage/README.md)\n\n## `/users`\n- [Docs](./cmd/users/README.md)\n\n## server\n- env\n```bash\nexport GOOGLE_APPLICATION_CREDENTIALS=\"/workspaces/go-api-samples/key.json\"\necho $GOOGLE_APPLICATION_CREDENTIALS\nexport DATABASE_URL=\"local.db\"\necho $DATABASE_URL\n```\n\n- installation\n```bash\nsudo apt-get update\nsudo apt-get install sqlite3\nsqlite3 --version\n```\n\n- `/users`\n```bash\nvscode ➜ /workspaces/go-api-samples (feature/add-user-to-server) $ curl \"localhost:8080/users?user_id=1\" -i\nHTTP/1.1 200 OK\nContent-Type: application/json\nDate: Thu, 16 Nov 2023 03:29:45 GMT\nContent-Length: 90\n\n{\"user_id\":1,\"email_address\":\"maria@example.com\",\"created_at\":0,\"deleted\":0,\"settings\":\"\"}\nvscode ➜ /workspaces/go-api-samples (feature/add-user-to-server) $ \n```\n\n- `/storage`\n```bash\nvscode ➜ /workspaces/go-api-samples (feature/add-user-to-server) curl \"localhost:8080/storage?bucket=sanbox-334000_bucket\u0026object=test.html\" -i\nHTTP/1.1 200 OK\nContent-Type: application/json\nDate: Thu, 16 Nov 2023 03:31:51 GMT\nContent-Length: 424\n\n{\"content\":\"\\u003c!DOCTYPE html\\u003e\\n\\u003chtml lang=\\\"en\\\"\\u003e\\n\\u003chead\\u003e\\n    \\u003cmeta charset=\\\"UTF-8\\\"\\u003e\\n    \\u003cmeta http-equiv=\\\"X-UA-Compatible\\\" content=\\\"IE=edge\\\"\\u003e\\n    \\u003cmeta name=\\\"viewport\\\" content=\\\"width=device-width, initial-scale=1.0\\\"\\u003e\\n    \\u003ctitle\\u003eDocument\\u003c/title\\u003e\\n\\u003c/head\\u003e\\n\\u003cbody\\u003e\\n    test\\n\\u003c/body\\u003e\\n\\u003c/html\\u003e\"}\nvscode ➜ /workspaces/go-api-samples (feature/add-user-to-server) $\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanny-yamamoto%2Fgo-api-samples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanny-yamamoto%2Fgo-api-samples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanny-yamamoto%2Fgo-api-samples/lists"}