package cloudkey
import "google.golang.org/appengine/datastore/internal/cloudkey"
Package cloudpb is a subset of types and functions, copied from cloud.google.com/go/datastore.
They are copied here to provide compatibility to decode keys generated by the cloud.google.com/go/datastore package.
Index ¶
Variables ¶
var ( // ErrInvalidKey is returned when an invalid key is presented. ErrInvalidKey = errors.New("datastore: invalid key") )
Types ¶
type Key ¶
type Key struct { // Kind cannot be empty. Kind string // Either ID or Name must be zero for the Key to be valid. // If both are zero, the Key is incomplete. ID int64 Name string // Parent must either be a complete Key or nil. Parent *Key // Namespace provides the ability to partition your data for multiple // tenants. In most cases, it is not necessary to specify a namespace. // See docs on datastore multitenancy for details: // https://cloud.google.com/datastore/docs/concepts/multitenancy Namespace string }
Key represents the datastore key for a stored entity.
func DecodeKey ¶
DecodeKey decodes a key from the opaque representation returned by Encode.
func (*Key) Incomplete ¶
Incomplete reports whether the key does not refer to a stored entity.
Source Files ¶
cloudkey.go
- Version
- v1.6.8 (latest)
- Published
- Aug 30, 2023
- Platform
- js/wasm
- Imports
- 5 packages
- Last checked
- 11 hours ago –
Tools for package owners.