cloudpb

package
v0.1.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

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

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

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

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

func (*Key) ProtoMessage

func (*Key) ProtoMessage()

func (*Key) Reset

func (m *Key) Reset()

func (*Key) String

func (m *Key) String() string

func (*Key) XXX_DiscardUnknown

func (m *Key) XXX_DiscardUnknown()

func (*Key) XXX_Marshal

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

func (*Key) XXX_Merge

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

func (*Key) XXX_Size

func (m *Key) XXX_Size() int

func (*Key) XXX_Unmarshal

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

type Key_PathElement

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

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

func (*Key_PathElement) GetId

func (m *Key_PathElement) GetId() int64

func (*Key_PathElement) GetIdType

func (m *Key_PathElement) GetIdType() isKey_PathElement_IdType

func (*Key_PathElement) GetKind

func (m *Key_PathElement) GetKind() string

func (*Key_PathElement) GetName

func (m *Key_PathElement) GetName() string

func (*Key_PathElement) ProtoMessage

func (*Key_PathElement) ProtoMessage()

func (*Key_PathElement) Reset

func (m *Key_PathElement) Reset()

func (*Key_PathElement) String

func (m *Key_PathElement) String() string

func (*Key_PathElement) XXX_DiscardUnknown

func (m *Key_PathElement) XXX_DiscardUnknown()

func (*Key_PathElement) XXX_Marshal

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

func (*Key_PathElement) XXX_Merge

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

func (*Key_PathElement) XXX_OneofFuncs

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

func (m *Key_PathElement) XXX_Size() int

func (*Key_PathElement) XXX_Unmarshal

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

type Key_PathElement_Id

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

type Key_PathElement_Name

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

type PartitionId

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

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

func (*PartitionId) GetNamespaceId

func (m *PartitionId) GetNamespaceId() string

func (*PartitionId) GetProjectId

func (m *PartitionId) GetProjectId() string

func (*PartitionId) ProtoMessage

func (*PartitionId) ProtoMessage()

func (*PartitionId) Reset

func (m *PartitionId) Reset()

func (*PartitionId) String

func (m *PartitionId) String() string

func (*PartitionId) XXX_DiscardUnknown

func (m *PartitionId) XXX_DiscardUnknown()

func (*PartitionId) XXX_Marshal

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

func (*PartitionId) XXX_Merge

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

func (*PartitionId) XXX_Size

func (m *PartitionId) XXX_Size() int

func (*PartitionId) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL