{"id":23159069,"url":"https://github.com/classfunc/admin_client","last_synced_at":"2025-07-24T10:34:14.612Z","repository":{"id":64301482,"uuid":"573555738","full_name":"ClassFunc/admin_client","owner":"ClassFunc","description":"Singleton Firebase Admin Client","archived":false,"fork":false,"pushed_at":"2023-02-18T03:32:10.000Z","size":41,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-04T18:47:36.013Z","etag":null,"topics":[],"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/ClassFunc.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":"2022-12-02T18:46:27.000Z","updated_at":"2022-12-15T01:31:06.000Z","dependencies_parsed_at":"2024-06-20T15:29:39.056Z","dependency_job_id":"3037a7dc-d677-4309-9153-91a1c426897c","html_url":"https://github.com/ClassFunc/admin_client","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/ClassFunc/admin_client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClassFunc%2Fadmin_client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClassFunc%2Fadmin_client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClassFunc%2Fadmin_client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClassFunc%2Fadmin_client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ClassFunc","download_url":"https://codeload.github.com/ClassFunc/admin_client/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClassFunc%2Fadmin_client/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266828501,"owners_count":23991216,"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","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-12-17T22:28:54.049Z","updated_at":"2025-07-24T10:34:14.586Z","avatar_url":"https://github.com/ClassFunc.png","language":"Go","readme":"# Singleton Firebase Admin Client\n\n## Install:\n\n```sh\ngo get -u github.com/ClassFunc/admin_client\n```\n\n## Usage:\n\n```go\npackage main\n\nimport (\n    \"github.com/ClassFunc/admin_client\"\n)\n\nfunc main() {\n\n    admin_client.New(\n    \"PROJECT_ID\",\n    \"SERVICE_ACCOUNT_FILE_PATH\",\n    )\n    // or more simpler\n    admin_client.WithCredentialsFile(\"SERVICE_ACCOUNT_FILE_PATH\")\n    \n    // then you can use\n    admin_client.DB.Collection(...)\n    admin_client.Auth.CreateUser(...)\n    admin_client.DefaultBucket.Object(\"media/\" + fileName)\n    admin_client.Storage.Bucket(\"name\").Object(\"media/\" + fileName)\n\t\n\t\n    // settings firestore client\n    admin_client.EnvCollPrefix = \"GO_COL_\"\n    fmt.Println(admin_client.CollPathFromEnv(\"GO_COL_USERS\"))\n    \n    // actions with firestore collections\n    admin_client.CollRef(\"GO_COL_USERS\" /* or \"users\"*/)\n    admin_client.CollGetAllDocs(\"users\")\n    admin_client.CollGetAllDocsData(\"users\")\n    \n    // actions with firestore documents\n    admin_client.DocRef(\"users\", \"123\")\n    admin_client.GetDoc(\"users\", \"123\")\n    admin_client.GetDocData(\"users\", \"123\")\n    admin_client.GetDocDataTo(\"users\", \"123\", nil)\n    \n    // actions with firestore sub_collections\n    admin_client.SubCollRef(\"users\", \"123\", \"roles\")\n    admin_client.SubCollGetAllDocs(\"users\", \"123\", \"roles\")\n    admin_client.SubCollGetAllDocsData(\"users\", \"123\", \"roles\")\n    \n    // actions with firestore sub_documents\n    admin_client.SubDocRef(\"users\", \"123\", \"roles\", \"456\")\n    admin_client.GetSubDoc(\"users\", \"123\", \"roles\", \"456\")\n    admin_client.GetSubDocData(\"users\", \"123\", \"roles\", \"456\")\n\n\ttype User struct {\n        Name string\n    }\n    var adam = new(User)\n    admin_client.GetDocDataTo(\"users\", \"123\", adam)\n}\n```\n\n## Lisence:\nMIT\n\n## Authors:\nClassFunc Softwares JSC\n\nWebsite: https://classfunc.com\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclassfunc%2Fadmin_client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclassfunc%2Fadmin_client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclassfunc%2Fadmin_client/lists"}