You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
md5 is the MD5 hash of the blob content. If supplied for uploads, the server validates the content using the hash value. For downloads, the server returns the stored hash value of the blob content. The length of the hash value is 0 (not present) or 16 (present) bytes.
crc32c is the CRC32C checksum of the blob content. Specifically, it uses the Castagnoli polynomial. https://pkg.go.dev/hash/crc32#pkg-constants If supplied for uploads, the server validates the content using the checksum. For downloads, the server returns the checksum of the blob content. Open Saves provides both MD5 and CRC32C because CRC32C is often used by Cloud object storage services.
md5 is the MD5 hash of the chunk content. If supplied for uploads, the server validates the content using the hash value. For downloads, the server returns the stored hash value of the chunk content. The length of the hash value is 0 (not present) or 16 (present) bytes.
crc32c is the CRC32C checksum of the chunk content. Specifically, it uses the Castagnoli polynomial. https://pkg.go.dev/hash/crc32#pkg-constants If supplied for uploads, the server validates the content using the checksum. For downloads, the server returns the checksum of the chunk content. Open Saves provides both MD5 and CRC32C because CRC32C is often used by Cloud object storage services.
CreateBlobRequest is used for CreateBlob, a client-streaming method.
The first message should contain metadata, and the subsequent messages
should contain content.
GetBlobChunkResponse is a server-streaming response to return metadata and
content of a chunked blob object. The first message contains metadata and the
subsequent messages contain the binary data of the chunk inthe content field.
GetBlobResponse is a server-streaming response to return metadata and
content of a blob object. The first message contains metadata and the
subsequent messages contain the rest of the binary blob in the content
field.
Tells the server to not use blob storage. Always store the blob into the metadata entity. The server will return an error if the blob is too large. The exact size limit depends on the backend implementation.
ListStoresRequest
ListStoresRequest contains conditions to filter stores.
Multiple conditions are AND'ed together.
List of store keys that each of the records belongs to. The order of keys is the same as the records field, e.g. store_keys[0] is the store for records[0], and so on.
Record
Record represents each entity in the Open Saves database.
key is the user defined primary key. It is recommended to use uniformally distributed key (e.g. UUID) rather than monotonically increasing values for performance reasons. See https://cloud.google.com/datastore/docs/best-practices#keys for details.
owner_id is the owner of the record, represented as an external user ID. Open Saves doesn't maintain list of valid users and it is the responsibility of the client to keep track of user IDs.
updated_at is the point in time in UTC when the Record is updated on the Open Saves server. It is managed by the server and updated every time the Record is updated.
Opaque string where you can store any utf-8 string (e.g. JSON) that is too big and does not fit in the properties. This will not be indexed or queryable. The maximum length is 1,048,487 bytes on Datastore but the actual limit might be smaller because the total Record size is capped at 1,048,572 bytes.
Signature is a server-generated unique UUID that is updated each time the server updates the record. The server returns the current signature for read requests. The client may optionally populate this field and send update requests, and the server will check the value against the latest value and abort the request if they don't match.
key is the user defined primary key. It is recommended to use uniformally distributed key (e.g. UUID) rather than monotonically increasing values for performance reasons. See https://cloud.google.com/datastore/docs/best-practices#keys for details.
owner_id is the owner of the store, represented as an external user ID. Open Saves doesn't maintain list of valid users and it is the responsibility of the client to keep track of user IDs.
updated_at is the point in time in UTC when the Store is updated on the Open Saves server. It is managed by the server and updated every time the Store is updated.
UploadChunkRequest is used by UploadChunk, which is a client-streaming
method. The first message should contain the metadata, and the subsequent
messages should contain the content field until EOF.
CommitChunkedUpload commits a chunked blob upload session and makes the blob available for reads. An optional record can be passed to perform an update within the same transaction.
GetBlob retrieves a blob object in a record. Currently this method does not support chunked blobs and returns an UNIMPLEMENTED error if called for chunked blobs. TODO(yuryu): Support chunked blobs and return such objects entirely.
GetBlobChunk returns a chunk of a blob object uploaded using CreateChunkedBlob. It returns an INVALID_ARGUMENT error if the blob is not a chunked object.
CompareAndSwap compares the property to old_value and updates the property to value if the old_value and the current property are equal. The updated field in CompareAndSwapResponse is set to true if the swap is executed. For example, CompareAndSwap(property, value = 42, old_value = 24) will set the property to 42 if the current value is 24. CompareAndSwap also supports swapping with a value of another type, e.g. CompareAndSwap(property, value = "42", old_value = 24). Otherwise it will not update the property and return the current (unchanged) value and updated = false. The operation is executed atomically. Errors: - NotFound: the requested record or property was not found.
CompareAndSwapGreaterInt compares the number of an integer property to value and updates the property if the new value is greater than the current value. The updated field in AtomicResponse is set to true if the swap is executed. For example, CompareAndSwapGreaterInt(property, value = 42) will replace property with 42 and return {value = old value, updated = true} if 42 > property. Otherwise it will not update the property and return the current (unchanged) value and updated = false. The operation is executed atomically. Errors: - NotFound: the requested record or property was not found. - InvalidArgument: the requested property was not an integer.
AtomicAddInt adds a number to an integer property atomically. For example, AtomicAdd(property, 42) will run property += 42 and return the old value. The updated field in AtomicIntResponse is always set to true. Errors: - NotFound: the requested record or property was not found. - InvalidArgument: the requested property was not an integer.
AtomicInc increments the number of an integer property if less than upper_bound. Otherwise it resets the property to lower_bound. if (property < upper_bound) { property++ } else { property = lower_bound } This makes the property an incrementing counter between [lower_bound, upper_bound]. It returns the old value of the property. The updated field in AtomicIntResponse is set to true. Errors: - NotFound: the requested record or property was not found. - InvalidArgument: the requested property was not an integer.
AtomicDec decrements the number of an integer property by one if more than lower_bound. Otherwise it resets the property to upper_bound. if (lower_bound < property) { property-- } else { property = upper_bound } This makes the property a decrementing counter between [lower_bound, upper_bound]. It returns the old value of the property. The updated field in AtomicIntResponse is always set to true. Errors: - NotFound: the requested record or property was not found. - InvalidArgument: the requested property was not an integer.