appengine: google.golang.org/appengine/datastore/internal/cloudpb Index | Files

package cloudpb

import "google.golang.org/appengine/datastore/internal/cloudpb"

Package cloudpb is a subset of protobufs, copied from google.golang.org/genproto/googleapis/datastore/v1.

They are copied here to provide compatibility to decode keys generated by the cloud.google.com/go/datastore package.

Index

Package Files

entity.pb.go

type Key Uses

type Key struct {
    // Entities are partitioned into subsets, currently identified by a project
    // ID and namespace ID.
    // Queries are scoped to a single partition.
    PartitionId *PartitionId `protobuf:"bytes,1,opt,name=partition_id,json=partitionId,proto3" json:"partition_id,omitempty"`
    // The entity path.
    // An entity path consists of one or more elements composed of a kind and a
    // string or numerical identifier, which identify entities. The first
    // element identifies a _root entity_, the second element identifies
    // a _child_ of the root entity, the third element identifies a child of the
    // second entity, and so forth. The entities identified by all prefixes of
    // the path are called the element's _ancestors_.
    //
    // An entity path is always fully complete: *all* of the entity's ancestors
    // are required to be in the path along with the entity identifier itself.
    // The only exception is that in some documented cases, the identifier in the
    // last path element (for the entity) itself may be omitted. For example,
    // the last path element of the key of `Mutation.insert` may have no
    // identifier.
    //
    // A path can never be empty, and a path can have at most 100 elements.
    Path                 []*Key_PathElement `protobuf:"bytes,2,rep,name=path,proto3" json:"path,omitempty"`
    XXX_NoUnkeyedLiteral struct{}           `json:"-"`
    XXX_unrecognized     []byte             `json:"-"`
    XXX_sizecache        int32              `json:"-"`
}

A unique identifier for an entity. If a key's partition ID or any of its path kinds or names are reserved/read-only, the key is reserved/read-only. A reserved/read-only key is forbidden in certain documented contexts.

func (*Key) Descriptor Uses

func (*Key) Descriptor() ([]byte, []int)

func (*Key) ProtoMessage Uses

func (*Key) ProtoMessage()

func (*Key) Reset Uses

func (m *Key) Reset()

func (*Key) String Uses

func (m *Key) String() string

func (*Key) XXX_DiscardUnknown Uses

func (m *Key) XXX_DiscardUnknown()

func (*Key) XXX_Marshal Uses

func (m *Key) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Key) XXX_Merge Uses

func (dst *Key) XXX_Merge(src proto.Message)

func (*Key) XXX_Size Uses

func (m *Key) XXX_Size() int

func (*Key) XXX_Unmarshal Uses

func (m *Key) XXX_Unmarshal(b []byte) error

type Key_PathElement Uses

type Key_PathElement struct {
    // The kind of the entity.
    // A kind matching regex `__.*__` is reserved/read-only.
    // A kind must not contain more than 1500 bytes when UTF-8 encoded.
    // Cannot be `""`.
    Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"`
    // The type of ID.
    //
    // Types that are valid to be assigned to IdType:
    //	*Key_PathElement_Id
    //	*Key_PathElement_Name
    IdType               isKey_PathElement_IdType `protobuf_oneof:"id_type"`
    XXX_NoUnkeyedLiteral struct{}                 `json:"-"`
    XXX_unrecognized     []byte                   `json:"-"`
    XXX_sizecache        int32                    `json:"-"`
}

A (kind, ID/name) pair used to construct a key path.

If either name or ID is set, the element is complete. If neither is set, the element is incomplete.

func (*Key_PathElement) Descriptor Uses

func (*Key_PathElement) Descriptor() ([]byte, []int)

func (*Key_PathElement) GetId Uses

func (m *Key_PathElement) GetId() int64

func (*Key_PathElement) GetIdType Uses

func (m *Key_PathElement) GetIdType() isKey_PathElement_IdType

func (*Key_PathElement) GetKind Uses

func (m *Key_PathElement) GetKind() string

func (*Key_PathElement) GetName Uses

func (m *Key_PathElement) GetName() string

func (*Key_PathElement) ProtoMessage Uses

func (*Key_PathElement) ProtoMessage()

func (*Key_PathElement) Reset Uses

func (m *Key_PathElement) Reset()

func (*Key_PathElement) String Uses

func (m *Key_PathElement) String() string

func (*Key_PathElement) XXX_DiscardUnknown Uses

func (m *Key_PathElement) XXX_DiscardUnknown()

func (*Key_PathElement) XXX_Marshal Uses

func (m *Key_PathElement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Key_PathElement) XXX_Merge Uses

func (dst *Key_PathElement) XXX_Merge(src proto.Message)

func (*Key_PathElement) XXX_OneofFuncs Uses

func (*Key_PathElement) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*Key_PathElement) XXX_Size Uses

func (m *Key_PathElement) XXX_Size() int

func (*Key_PathElement) XXX_Unmarshal Uses

func (m *Key_PathElement) XXX_Unmarshal(b []byte) error

type Key_PathElement_Id Uses

type Key_PathElement_Id struct {
    Id int64 `protobuf:"varint,2,opt,name=id,proto3,oneof"`
}

type Key_PathElement_Name Uses

type Key_PathElement_Name struct {
    Name string `protobuf:"bytes,3,opt,name=name,proto3,oneof"`
}

type PartitionId Uses

type PartitionId struct {
    // The ID of the project to which the entities belong.
    ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
    // If not empty, the ID of the namespace to which the entities belong.
    NamespaceId          string   `protobuf:"bytes,4,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

A partition ID identifies a grouping of entities. The grouping is always by project and namespace, however the namespace ID may be empty.

A partition ID contains several dimensions: project ID and namespace ID.

Partition dimensions:

- May be `""`. - Must be valid UTF-8 bytes. - Must have values that match regex `[A-Za-z\d\.\-_]{1,100}` If the value of any dimension matches regex `__.*__`, the partition is reserved/read-only. A reserved/read-only partition ID is forbidden in certain documented contexts.

Foreign partition IDs (in which the project ID does not match the context project ID ) are discouraged. Reads and writes of foreign partition IDs may fail if the project is not in an active state.

func (*PartitionId) Descriptor Uses

func (*PartitionId) Descriptor() ([]byte, []int)

func (*PartitionId) GetNamespaceId Uses

func (m *PartitionId) GetNamespaceId() string

func (*PartitionId) GetProjectId Uses

func (m *PartitionId) GetProjectId() string

func (*PartitionId) ProtoMessage Uses

func (*PartitionId) ProtoMessage()

func (*PartitionId) Reset Uses

func (m *PartitionId) Reset()

func (*PartitionId) String Uses

func (m *PartitionId) String() string

func (*PartitionId) XXX_DiscardUnknown Uses

func (m *PartitionId) XXX_DiscardUnknown()

func (*PartitionId) XXX_Marshal Uses

func (m *PartitionId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PartitionId) XXX_Merge Uses

func (dst *PartitionId) XXX_Merge(src proto.Message)

func (*PartitionId) XXX_Size Uses

func (m *PartitionId) XXX_Size() int

func (*PartitionId) XXX_Unmarshal Uses

func (m *PartitionId) XXX_Unmarshal(b []byte) error

Package cloudpb imports 2 packages (graph) and is imported by 1 packages. Updated 2019-05-15. Refresh now. Tools for package owners.