github.com/emcfarlane/larking@v0.0.0-20220605172417-1704b45ee6c3/starlib/starlarkblob/README.md (about) 1 ## open 2 3 `open(url)` opens a blob bucket at the path returning a `bucket`. 4 5 | Parameter | Type | Description | 6 | --------- | ---- | ----------- | 7 | url | string | URL of bucket. | 8 9 ### bucket·attributes 10 11 `b.attributes(key)` gets the attributes of the blob. 12 13 | Parameter | Type | Description | 14 | --------- | ---- | ----------- | 15 | key | string | Name of key. | 16 17 ### bucket·write_all 18 19 `b.write_all(key, bytes, **kwargs)` writes all the bytes to the key. 20 If `conent_md5` is not set, `write_all` will compute the MD5 of `bytes`. 21 22 | Parameter | Type | Description | 23 | --------- | ---- | ----------- | 24 | key | string | Name of key. | 25 | bytes | bytes|string | Bytes of the file. | 26 | buffer_size | int | [*blob.WriterOptions](https://pkg.go.dev/gocloud.dev/blob#WriterOptions). | 27 | cache_control | string | [*blob.WriterOptions](https://pkg.go.dev/gocloud.dev/blob#WriterOptions). | 28 | content_disposition | string | [*blob.WriterOptions](https://pkg.go.dev/gocloud.dev/blob#WriterOptions). | 29 | content_encoding | string | [*blob.WriterOptions](https://pkg.go.dev/gocloud.dev/blob#WriterOptions). | 30 | content_language | string | [*blob.WriterOptions](https://pkg.go.dev/gocloud.dev/blob#WriterOptions). | 31 | content_type | string | [*blob.WriterOptions](https://pkg.go.dev/gocloud.dev/blob#WriterOptions). | 32 | content_md5 | string, bytes | [*blob.WriterOptions](https://pkg.go.dev/gocloud.dev/blob#WriterOptions). | 33 | metadata | dict | [*blob.WriterOptions](https://pkg.go.dev/gocloud.dev/blob#WriterOptions). | 34 | before_write | function | [*blob.WriterOptions](https://pkg.go.dev/gocloud.dev/blob#WriterOptions). | 35 36 ### bucket·read_all 37 38 `b.read_all(key)` reads the entire blob with no options. 39 40 | Parameter | Type | Description | 41 | --------- | ---- | ----------- | 42 | key | string | Name of key. | 43 44 ### bucket·delete 45 46 `b.delete(key)` deletes the blob. 47 48 | Parameter | Type | Description | 49 | --------- | ---- | ----------- | 50 | key | string | Name of key. | 51 52 ### bucket·close 53 54 `b.close()` closes the bucket.