{"id":15060797,"url":"https://github.com/arhea/go-mock-bigquery","last_synced_at":"2026-02-16T04:01:57.892Z","repository":{"id":215705239,"uuid":"739601127","full_name":"arhea/go-mock-bigquery","owner":"arhea","description":"Creates a mock BigQuery client based on the bigquery-emulator for testing in Golang projects.","archived":false,"fork":false,"pushed_at":"2024-04-10T00:38:25.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-17T21:05:35.056Z","etag":null,"topics":["bigquery","golang","golang-module","google-bigquery","google-cloud-platform","testcontainers-go","testing"],"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/arhea.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["arhea"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2024-01-06T01:12:49.000Z","updated_at":"2024-01-06T01:14:55.000Z","dependencies_parsed_at":"2024-01-06T02:34:53.931Z","dependency_job_id":"d00d251b-6064-4e08-9899-68769f8b880c","html_url":"https://github.com/arhea/go-mock-bigquery","commit_stats":null,"previous_names":["arhea/go-mock-bigquery"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/arhea/go-mock-bigquery","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arhea%2Fgo-mock-bigquery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arhea%2Fgo-mock-bigquery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arhea%2Fgo-mock-bigquery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arhea%2Fgo-mock-bigquery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arhea","download_url":"https://codeload.github.com/arhea/go-mock-bigquery/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arhea%2Fgo-mock-bigquery/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29499803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T03:57:51.541Z","status":"ssl_error","status_checked_at":"2026-02-16T03:55:59.854Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["bigquery","golang","golang-module","google-bigquery","google-cloud-platform","testcontainers-go","testing"],"created_at":"2024-09-24T23:04:44.101Z","updated_at":"2026-02-16T04:01:57.876Z","avatar_url":"https://github.com/arhea.png","language":"Go","funding_links":["https://github.com/sponsors/arhea"],"categories":[],"sub_categories":[],"readme":"# Mock BigQuery Emulator\n\n![Tests](https://github.com/arhea/go-mock-bigquery/actions/workflows/main.yml/badge.svg?branch=main) ![goreportcard](https://goreportcard.com/badge/github.com/arhea/go-mock-bigquery)\n\nProvide a mock BigQuery Emulator instance and optionally a mock BigQuery client for testing purposes. This library is built so you can mock BigQuery using the [bigquery-emulator](https://github.com/goccy/bigquery-emulator) project. You will need to have Docker running on your local machine or within your CI environment.\n\nThis library is built on top of [testcontainers](https://testcontainers.com/).\n\n## Usage\n\nCreating a mock instance for creating a customer connection.\n\n```golang\nfunc TestXXX(t *testing.T) {\n\tctx := context.Background()\n\n    const projectID = \"test-project\"\n\tconst datasetID = \"test-dataset\"\n\n\tmock, err := mockbigquery.NewInstance(ctx, t, projectID, datasetID)\n\n\tif err != nil {\n\t\tt.Fatalf(\"creating the instance: %v\", err)\n\t\treturn\n\t}\n\n\t// close the mock\n\tdefer mock.Close(ctx)\n\n\t// ... my test code\n}\n```\n\nCreating a mock redis client for interacting with Redis.\n\n```golang\nfunc TestXXX(t *testing.T) {\n\tctx := context.Background()\n\n\tconst projectID = \"test-project\"\n\tconst datasetID = \"test-dataset\"\n\n\tmock, err := mockbigquery.NewClient(ctx, t, projectID, datasetID)\n\n\tif err != nil {\n\t\tt.Fatalf(\"creating the client: %v\", err)\n\t\treturn\n\t}\n\n\t// close the mock\n\tdefer mock.Close(ctx)\n\n    bqClient := mock.Client()\n\n\t// ... my test code\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farhea%2Fgo-mock-bigquery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farhea%2Fgo-mock-bigquery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farhea%2Fgo-mock-bigquery/lists"}