{"id":23159070,"url":"https://github.com/classfunc/firecli","last_synced_at":"2025-07-08T00:38:15.798Z","repository":{"id":186929487,"uuid":"649624643","full_name":"ClassFunc/firecli","owner":"ClassFunc","description":"Manage Firestore Admin","archived":false,"fork":false,"pushed_at":"2023-09-20T06:23:46.000Z","size":55,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-04T18:47:35.529Z","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":"2023-06-05T09:32:27.000Z","updated_at":"2023-08-08T08:33:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"29dcbee1-7ef0-4be2-8895-a80d9f900e79","html_url":"https://github.com/ClassFunc/firecli","commit_stats":null,"previous_names":["classfunc/firecli"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ClassFunc/firecli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClassFunc%2Ffirecli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClassFunc%2Ffirecli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClassFunc%2Ffirecli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClassFunc%2Ffirecli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ClassFunc","download_url":"https://codeload.github.com/ClassFunc/firecli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClassFunc%2Ffirecli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264169411,"owners_count":23567300,"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":[],"created_at":"2024-12-17T22:28:54.372Z","updated_at":"2025-07-08T00:38:15.775Z","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/firecli\n```\n\n## Usage:\n\n```go\npackage main\n\nimport (\n    \"github.com/classfunc/firecli\"\n)\n\nfunc main() {\n\n    // init firebase client\n    firecli.WithCredentialsFile(\"SERVICE_ACCOUNT_FILE_PATH\")\n    \n    // then you can use\n    firecli.DB.Collection(...)\n    firecli.Auth.CreateUser(...)\n    firecli.DefaultBucket.Object(\"media/\" + fileName)\n    firecli.Storage.Bucket(\"name\").Object(\"media/\" + fileName)\n\t\n\t\n    // settings firestore client\n    firecli.EnvCollPrefix = \"GO_COL_\"\n    fmt.Println(firecli.CollPathFromEnv(\"GO_COL_USERS\"))\n    \n    // actions with firestore collections\n    firecli.CollRef(\"GO_COL_USERS\" /* or \"users\"*/)\n    firecli.CollGetAllDocs(\"users\")\n    firecli.CollGetAllDocsData(\"users\")\n    \n    // actions with firestore documents\n    firecli.DocRef(\"users\", \"123\")\n    firecli.GetDoc(\"users\", \"123\")\n    firecli.GetDocData(\"users\", \"123\")\n    firecli.GetDocDataTo(\"users\", \"123\", nil)\n    \n    // actions with firestore sub_collections\n    firecli.SubCollRef(\"users\", \"123\", \"roles\")\n    firecli.SubCollGetAllDocs(\"users\", \"123\", \"roles\")\n    firecli.SubCollGetAllDocsData(\"users\", \"123\", \"roles\")\n    \n    // actions with firestore sub_documents\n    firecli.SubDocRef(\"users\", \"123\", \"roles\", \"456\")\n    firecli.GetSubDoc(\"users\", \"123\", \"roles\", \"456\")\n    firecli.GetSubDocData(\"users\", \"123\", \"roles\", \"456\")\n\n    type User struct {\n        Name string\n    }\n    var adam = new(User)\n    firecli.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%2Ffirecli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclassfunc%2Ffirecli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclassfunc%2Ffirecli/lists"}