Cloud Storage
Firebase.auth_headerFirebase.auth_urlFirebase.cloudstore_addfirebaseFirebase.cloudstore_getFirebase.cloudstore_getbucketFirebase.cloudstore_initFirebase.cloudstore_listbucketsFirebase.cloudstore_removefirebaseFirebase.cloudstore_sendfileFirebase.confirm_passwordresetFirebase.content_typeFirebase.database_nsFirebase.emulator_activeFirebase.emulator_runningFirebase.firebase_changeemailFirebase.firebase_changepasswordFirebase.firebase_confirmemailverifyFirebase.firebase_deleteuserFirebase.firebase_fetchprovidersFirebase.firebase_getuserinfoFirebase.firebase_linkoauthFirebase.firebase_linkuserinfoFirebase.firebase_passwordresetFirebase.firebase_signinFirebase.firebase_signinanonFirebase.firebase_signinoauthFirebase.firebase_signupFirebase.firebase_unlinkprovideFirebase.firebase_updateprofileFirebase.firebase_verifyemailFirebase.firestore_batchgetFirebase.firestore_batchwriteFirebase.firestore_beginTransactionFirebase.firestore_commitFirebase.firestore_createdocFirebase.firestore_deletedocFirebase.firestore_getcollectionidsFirebase.firestore_getdoclistFirebase.firestore_partitionqueryFirebase.firestore_patchFirebase.firestore_runqueryFirebase.firestore_urlFirebase.get_requestFirebase.get_tokenFirebase.initFirebase.initparsedjsonFirebase.realdb_deleteFirebase.realdb_downloadFirebase.realdb_getFirebase.realdb_initFirebase.realdb_patchFirebase.realdb_postFirebase.realdb_putFirebase.set_webapikeyFirebase.use_emulatorFirebase.use_productionFirebase.verify_passwordresetcode
Firebase.cloudstore_addfirebase — Method
cloudstoreaddfirebase(bucket; projectid=projectid())
Links a Google Cloud Storage bucket to a Firebase project.
Example
init("[PROJECT_SDK].json")
cloudstore_addfirebase("my-existing-gcs-bucket")Firebase.cloudstore_get — Function
cloudstore_get(file2download; token=nothing, dest=nothing)
Get a file from cloud storage and write it to disk. Returns the path written.
token is the object's download token, required when the bucket's rules do not allow unauthenticated reads. dest overrides the local destination path, which otherwise mirrors the remote path.
Example
init("[PROJECT_SDK].json")
cloudstore_init("https://firebasestorage.googleapis.com/v0/b/[PROJECT_ID].appspot.com/o/")
cloudstore_get("/audio/data.mp3")
cloudstore_get("/data.mp3"; dest="local-copy.mp3")Firebase.cloudstore_getbucket — Method
cloudstoregetbucket(bucket; projectid=projectid())
Gets a single linked storage bucket. bucket is the bucket id, e.g. "my-app.appspot.com".
Example
init("[PROJECT_SDK].json")
cloudstore_getbucket("my-app.appspot.com")Firebase.cloudstore_init — Method
cloudstore_init(url)
Set cloud storage url initialize
Example
cloudstore_init("https://firebasestorage.googleapis.com/v0/b/[PROJECT_ID].appspot.com/o")Firebase.cloudstore_listbuckets — Method
cloudstorelistbuckets(; projectid=projectid(), pagesize=nothing, pagetoken=nothing)
Lists the linked storage buckets for a project.
Note that the Storage Management API identifies the project by its project number, so project_id may need to be the numeric id rather than the textual one.
Example
init("[PROJECT_SDK].json")
cloudstore_listbuckets()
#=
Dict{String, Any} with 1 entry:
"buckets" => Any[Dict{String, Any}("name"=>"projects/123456789/buckets/my-app.appspot.com")]
=#Firebase.cloudstore_removefirebase — Method
cloudstoreremovefirebase(bucket; projectid=projectid())
Unlinks a linked Google Cloud Storage bucket from a Firebase project. The bucket and its contents are not deleted, they just stop being reachable through Firebase.
Example
init("[PROJECT_SDK].json")
cloudstore_removefirebase("my-app.appspot.com")Firebase.cloudstore_sendfile — Function
cloudstore_sendfile(file2upload)
Send a file to cloud storage to store. The local file is read from file2upload relative to the current directory, and stored under the same path in the bucket.
Example
init("[PROJECT_SDK].json")
cloudstore_init("https://firebasestorage.googleapis.com/v0/b/[PROJECT_ID].appspot.com/o/")
cloudstore_sendfile("/audio/data.mp3")Firebase.content_type — Method
content_type(path) -> StringBest-effort content type for path, from its extension. Falls back to "application/octet-stream".