Documentation ¶
Index ¶
- Variables
- type PrimaryKeyDescriptor
- func (*PrimaryKeyDescriptor) Descriptor() ([]byte, []int)deprecated
- func (x *PrimaryKeyDescriptor) GetAutoIncrement() bool
- func (x *PrimaryKeyDescriptor) GetFields() string
- func (x *PrimaryKeyDescriptor) GetReferences() string
- func (*PrimaryKeyDescriptor) ProtoMessage()
- func (x *PrimaryKeyDescriptor) ProtoReflect() protoreflect.Message
- func (x *PrimaryKeyDescriptor) Reset()
- func (x *PrimaryKeyDescriptor) String() string
- type SchemaDescriptor
- func (*SchemaDescriptor) Descriptor() ([]byte, []int)deprecated
- func (x *SchemaDescriptor) GetFiles() *descriptorpb.FileDescriptorSet
- func (x *SchemaDescriptor) GetModules() []*SchemaDescriptor_ModuleEntry
- func (*SchemaDescriptor) ProtoMessage()
- func (x *SchemaDescriptor) ProtoReflect() protoreflect.Message
- func (x *SchemaDescriptor) Reset()
- func (x *SchemaDescriptor) String() string
- type SchemaDescriptor_FileEntry
- func (*SchemaDescriptor_FileEntry) Descriptor() ([]byte, []int)deprecated
- func (x *SchemaDescriptor_FileEntry) GetFileName() string
- func (x *SchemaDescriptor_FileEntry) GetId() uint32
- func (*SchemaDescriptor_FileEntry) ProtoMessage()
- func (x *SchemaDescriptor_FileEntry) ProtoReflect() protoreflect.Message
- func (x *SchemaDescriptor_FileEntry) Reset()
- func (x *SchemaDescriptor_FileEntry) String() string
- type SchemaDescriptor_ModuleEntry
- func (*SchemaDescriptor_ModuleEntry) Descriptor() ([]byte, []int)deprecated
- func (x *SchemaDescriptor_ModuleEntry) GetFiles() []*SchemaDescriptor_FileEntry
- func (x *SchemaDescriptor_ModuleEntry) GetName() string
- func (x *SchemaDescriptor_ModuleEntry) GetPrefix() []byte
- func (*SchemaDescriptor_ModuleEntry) ProtoMessage()
- func (x *SchemaDescriptor_ModuleEntry) ProtoReflect() protoreflect.Message
- func (x *SchemaDescriptor_ModuleEntry) Reset()
- func (x *SchemaDescriptor_ModuleEntry) String() string
- type SecondaryIndexDescriptor
- func (*SecondaryIndexDescriptor) Descriptor() ([]byte, []int)deprecated
- func (x *SecondaryIndexDescriptor) GetFields() string
- func (x *SecondaryIndexDescriptor) GetId() uint32
- func (x *SecondaryIndexDescriptor) GetReferences() string
- func (x *SecondaryIndexDescriptor) GetUnique() bool
- func (*SecondaryIndexDescriptor) ProtoMessage()
- func (x *SecondaryIndexDescriptor) ProtoReflect() protoreflect.Message
- func (x *SecondaryIndexDescriptor) Reset()
- func (x *SecondaryIndexDescriptor) String() string
- type SingletonDescriptor
- func (*SingletonDescriptor) Descriptor() ([]byte, []int)deprecated
- func (x *SingletonDescriptor) GetId() uint32
- func (*SingletonDescriptor) ProtoMessage()
- func (x *SingletonDescriptor) ProtoReflect() protoreflect.Message
- func (x *SingletonDescriptor) Reset()
- func (x *SingletonDescriptor) String() string
- type TableDescriptor
- func (*TableDescriptor) Descriptor() ([]byte, []int)deprecated
- func (x *TableDescriptor) GetId() uint32
- func (x *TableDescriptor) GetIndex() []*SecondaryIndexDescriptor
- func (x *TableDescriptor) GetPrimaryKey() *PrimaryKeyDescriptor
- func (*TableDescriptor) ProtoMessage()
- func (x *TableDescriptor) ProtoReflect() protoreflect.Message
- func (x *TableDescriptor) Reset()
- func (x *TableDescriptor) String() string
Constants ¶
This section is empty.
Variables ¶
var ( // table specifies that this message will be used as an ORM table. It cannot // be used together with the singleton option. // // optional cosmos.orm.v1alpha1.TableDescriptor table = 104503790; E_Table = &file_cosmos_orm_v1alpha1_orm_proto_extTypes[0] // singleton specifies that this message will be used as an ORM singleton. It cannot // be used together with the table option. // // optional cosmos.orm.v1alpha1.SingletonDescriptor singleton = 104503791; E_Singleton = &file_cosmos_orm_v1alpha1_orm_proto_extTypes[1] )
Extension fields to descriptorpb.MessageOptions.
var File_cosmos_orm_v1alpha1_orm_proto protoreflect.FileDescriptor
var File_cosmos_orm_v1alpha1_schema_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type PrimaryKeyDescriptor ¶
type PrimaryKeyDescriptor struct { // fields is a comma-separated list of fields in the primary key. Spaces are // not allowed. Supported field types, their encodings, and any applicable constraints // are described below. // - uint32, uint64 are encoded as big-endian fixed width bytes and support // sorted iteration. // - string's are encoded as raw bytes in terminal key segments and null-terminated // in non-terminal segments. Null characters are thus forbidden in strings. // string fields support sorted iteration. // - bytes are encoded as raw bytes in terminal segments and length-prefixed // with a single byte in non-terminal segments. Because of this byte arrays // longer than 255 bytes are unsupported and bytes fields should not // be assumed to be lexically sorted. If you have a byte array longer than // 255 bytes that you'd like to index, you should consider hashing it first. // - int32, sint32, int64, sint64 are encoding as fixed width bytes with // an encoding that enables sorted iteration. // - google.protobuf.Timestamp and google.protobuf.Duration are encoded // as 12 bytes using an encoding that enables sorted iteration. // - enum fields are encoded using varint encoding and do not support sorted // iteration. // - bool fields are encoded as a single byte 0 or 1. // // All other fields types are unsupported in keys including repeated and // oneof fields. // // Primary keys are prefixed by the varint encoded table id and the byte 0x0 // plus any additional prefix specified by the schema. Fields string `protobuf:"bytes,1,opt,name=fields,proto3" json:"fields,omitempty"` // auto_increment specifies that the primary key is generated by an // auto-incrementing integer. If this is set to true fields must only // contain one field of that is of type uint64. AutoIncrement bool `protobuf:"varint,2,opt,name=auto_increment,json=autoIncrement,proto3" json:"auto_increment,omitempty"` // references specifies that this primary key references the primary key // of another table. See the documentation for the SecondaryIndexDescriptor.references // field for more details. An additional constraint placed on primary keys // which reference another table is that those references cannot be circular. References string `protobuf:"bytes,3,opt,name=references,proto3" json:"references,omitempty"` // contains filtered or unexported fields }
PrimaryKeyDescriptor describes a table primary key.
func (*PrimaryKeyDescriptor) Descriptor
deprecated
func (*PrimaryKeyDescriptor) Descriptor() ([]byte, []int)
Deprecated: Use PrimaryKeyDescriptor.ProtoReflect.Descriptor instead.
func (*PrimaryKeyDescriptor) GetAutoIncrement ¶
func (x *PrimaryKeyDescriptor) GetAutoIncrement() bool
func (*PrimaryKeyDescriptor) GetFields ¶
func (x *PrimaryKeyDescriptor) GetFields() string
func (*PrimaryKeyDescriptor) GetReferences ¶
func (x *PrimaryKeyDescriptor) GetReferences() string
func (*PrimaryKeyDescriptor) ProtoMessage ¶
func (*PrimaryKeyDescriptor) ProtoMessage()
func (*PrimaryKeyDescriptor) ProtoReflect ¶
func (x *PrimaryKeyDescriptor) ProtoReflect() protoreflect.Message
func (*PrimaryKeyDescriptor) Reset ¶
func (x *PrimaryKeyDescriptor) Reset()
func (*PrimaryKeyDescriptor) String ¶
func (x *PrimaryKeyDescriptor) String() string
type SchemaDescriptor ¶
type SchemaDescriptor struct { // files is the set of all FileDescriptorProto's needed to decode the stored data. // A schema imposes the constraint that every file and every table within that // schema have at most one instance in the store. Files *descriptorpb.FileDescriptorSet `protobuf:"bytes,1,opt,name=files,proto3" json:"files,omitempty"` // modules is the set of modules in the schema. Modules []*SchemaDescriptor_ModuleEntry `protobuf:"bytes,2,rep,name=modules,proto3" json:"modules,omitempty"` // contains filtered or unexported fields }
SchemaDescriptor describes an ORM schema that contains all the information needed for a dynamic client to decode the stored data.
func (*SchemaDescriptor) Descriptor
deprecated
func (*SchemaDescriptor) Descriptor() ([]byte, []int)
Deprecated: Use SchemaDescriptor.ProtoReflect.Descriptor instead.
func (*SchemaDescriptor) GetFiles ¶
func (x *SchemaDescriptor) GetFiles() *descriptorpb.FileDescriptorSet
func (*SchemaDescriptor) GetModules ¶
func (x *SchemaDescriptor) GetModules() []*SchemaDescriptor_ModuleEntry
func (*SchemaDescriptor) ProtoMessage ¶
func (*SchemaDescriptor) ProtoMessage()
func (*SchemaDescriptor) ProtoReflect ¶
func (x *SchemaDescriptor) ProtoReflect() protoreflect.Message
func (*SchemaDescriptor) Reset ¶
func (x *SchemaDescriptor) Reset()
func (*SchemaDescriptor) String ¶
func (x *SchemaDescriptor) String() string
type SchemaDescriptor_FileEntry ¶
type SchemaDescriptor_FileEntry struct { // id is a prefix that will be varint encoded and prepended to all the // table keys specified in the file's tables. Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // file_name is the name of a file in the FileDescriptor set that contains // table definitions. FileName string `protobuf:"bytes,2,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"` // contains filtered or unexported fields }
FileEntry describes an ORM file used in a module.
func (*SchemaDescriptor_FileEntry) Descriptor
deprecated
func (*SchemaDescriptor_FileEntry) Descriptor() ([]byte, []int)
Deprecated: Use SchemaDescriptor_FileEntry.ProtoReflect.Descriptor instead.
func (*SchemaDescriptor_FileEntry) GetFileName ¶
func (x *SchemaDescriptor_FileEntry) GetFileName() string
func (*SchemaDescriptor_FileEntry) GetId ¶
func (x *SchemaDescriptor_FileEntry) GetId() uint32
func (*SchemaDescriptor_FileEntry) ProtoMessage ¶
func (*SchemaDescriptor_FileEntry) ProtoMessage()
func (*SchemaDescriptor_FileEntry) ProtoReflect ¶
func (x *SchemaDescriptor_FileEntry) ProtoReflect() protoreflect.Message
func (*SchemaDescriptor_FileEntry) Reset ¶
func (x *SchemaDescriptor_FileEntry) Reset()
func (*SchemaDescriptor_FileEntry) String ¶
func (x *SchemaDescriptor_FileEntry) String() string
type SchemaDescriptor_ModuleEntry ¶
type SchemaDescriptor_ModuleEntry struct { // name is the name of the module. In the multi-store model this name is // used to locate the module's store. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // prefix is an optional prefix that precedes all keys in this module's // store. Prefix []byte `protobuf:"bytes,2,opt,name=prefix,proto3" json:"prefix,omitempty"` // files describes the schema files used in this module. Files []*SchemaDescriptor_FileEntry `protobuf:"bytes,3,rep,name=files,proto3" json:"files,omitempty"` // contains filtered or unexported fields }
ModuleEntry describes a single module's schema.
func (*SchemaDescriptor_ModuleEntry) Descriptor
deprecated
func (*SchemaDescriptor_ModuleEntry) Descriptor() ([]byte, []int)
Deprecated: Use SchemaDescriptor_ModuleEntry.ProtoReflect.Descriptor instead.
func (*SchemaDescriptor_ModuleEntry) GetFiles ¶
func (x *SchemaDescriptor_ModuleEntry) GetFiles() []*SchemaDescriptor_FileEntry
func (*SchemaDescriptor_ModuleEntry) GetName ¶
func (x *SchemaDescriptor_ModuleEntry) GetName() string
func (*SchemaDescriptor_ModuleEntry) GetPrefix ¶
func (x *SchemaDescriptor_ModuleEntry) GetPrefix() []byte
func (*SchemaDescriptor_ModuleEntry) ProtoMessage ¶
func (*SchemaDescriptor_ModuleEntry) ProtoMessage()
func (*SchemaDescriptor_ModuleEntry) ProtoReflect ¶
func (x *SchemaDescriptor_ModuleEntry) ProtoReflect() protoreflect.Message
func (*SchemaDescriptor_ModuleEntry) Reset ¶
func (x *SchemaDescriptor_ModuleEntry) Reset()
func (*SchemaDescriptor_ModuleEntry) String ¶
func (x *SchemaDescriptor_ModuleEntry) String() string
type SecondaryIndexDescriptor ¶
type SecondaryIndexDescriptor struct { // fields is a comma-separated list of fields in the index. The supported // field types are the same as those for PrimaryKeyDescriptor.fields. // Index keys are prefixed by the varint encoded table id and the varint // encoded index id plus any additional prefix specified by the schema. // // In addition the the field segments, non-unique index keys are suffixed with // any additional primary key fields not present in the index fields so that the // primary key can be reconstructed. Unique indexes instead of being suffixed // store the remaining primary key fields in the value.. Fields string `protobuf:"bytes,1,opt,name=fields,proto3" json:"fields,omitempty"` // id is a non-zero integer ID that must be unique within the indexes for this // table and less than 32768. It may be deprecated in the future when this can // be auto-generated. Id uint32 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` // unique specifies that this an unique index. Unique bool `protobuf:"varint,3,opt,name=unique,proto3" json:"unique,omitempty"` // references specifies that this index references another table defined in the same // proto file. Currently references are not support to tables with composite // primary keys, therefore fields must reference one field and its type must // be the same type as the primary key field of the referenced table. // References to tables in defined by different proto files are not supported // to avoid tight coupling of dependencies. Beyond validating that the reference // is valid key constraints are currently not enforced, but references should // be used by clients to perform automatic joins. References string `protobuf:"bytes,4,opt,name=references,proto3" json:"references,omitempty"` // contains filtered or unexported fields }
PrimaryKeyDescriptor describes a table secondary index.
func (*SecondaryIndexDescriptor) Descriptor
deprecated
func (*SecondaryIndexDescriptor) Descriptor() ([]byte, []int)
Deprecated: Use SecondaryIndexDescriptor.ProtoReflect.Descriptor instead.
func (*SecondaryIndexDescriptor) GetFields ¶
func (x *SecondaryIndexDescriptor) GetFields() string
func (*SecondaryIndexDescriptor) GetId ¶
func (x *SecondaryIndexDescriptor) GetId() uint32
func (*SecondaryIndexDescriptor) GetReferences ¶
func (x *SecondaryIndexDescriptor) GetReferences() string
func (*SecondaryIndexDescriptor) GetUnique ¶
func (x *SecondaryIndexDescriptor) GetUnique() bool
func (*SecondaryIndexDescriptor) ProtoMessage ¶
func (*SecondaryIndexDescriptor) ProtoMessage()
func (*SecondaryIndexDescriptor) ProtoReflect ¶
func (x *SecondaryIndexDescriptor) ProtoReflect() protoreflect.Message
func (*SecondaryIndexDescriptor) Reset ¶
func (x *SecondaryIndexDescriptor) Reset()
func (*SecondaryIndexDescriptor) String ¶
func (x *SecondaryIndexDescriptor) String() string
type SingletonDescriptor ¶
type SingletonDescriptor struct { // id is a non-zero integer ID that must be unique within the // tables and singletons in this file. It may be deprecated in the future when this // can be auto-generated. Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
TableDescriptor describes an ORM singleton table which has at most one instance.
func (*SingletonDescriptor) Descriptor
deprecated
func (*SingletonDescriptor) Descriptor() ([]byte, []int)
Deprecated: Use SingletonDescriptor.ProtoReflect.Descriptor instead.
func (*SingletonDescriptor) GetId ¶
func (x *SingletonDescriptor) GetId() uint32
func (*SingletonDescriptor) ProtoMessage ¶
func (*SingletonDescriptor) ProtoMessage()
func (*SingletonDescriptor) ProtoReflect ¶
func (x *SingletonDescriptor) ProtoReflect() protoreflect.Message
func (*SingletonDescriptor) Reset ¶
func (x *SingletonDescriptor) Reset()
func (*SingletonDescriptor) String ¶
func (x *SingletonDescriptor) String() string
type TableDescriptor ¶
type TableDescriptor struct { // primary_key defines the primary key for the table. PrimaryKey *PrimaryKeyDescriptor `protobuf:"bytes,1,opt,name=primary_key,json=primaryKey,proto3" json:"primary_key,omitempty"` // index defines one or more secondary indexes. Index []*SecondaryIndexDescriptor `protobuf:"bytes,2,rep,name=index,proto3" json:"index,omitempty"` // id is a non-zero integer ID that must be unique within the // tables and singletons in this file. It may be deprecated in the future when this // can be auto-generated. Id uint32 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
TableDescriptor describes an ORM table.
func (*TableDescriptor) Descriptor
deprecated
func (*TableDescriptor) Descriptor() ([]byte, []int)
Deprecated: Use TableDescriptor.ProtoReflect.Descriptor instead.
func (*TableDescriptor) GetId ¶
func (x *TableDescriptor) GetId() uint32
func (*TableDescriptor) GetIndex ¶
func (x *TableDescriptor) GetIndex() []*SecondaryIndexDescriptor
func (*TableDescriptor) GetPrimaryKey ¶
func (x *TableDescriptor) GetPrimaryKey() *PrimaryKeyDescriptor
func (*TableDescriptor) ProtoMessage ¶
func (*TableDescriptor) ProtoMessage()
func (*TableDescriptor) ProtoReflect ¶
func (x *TableDescriptor) ProtoReflect() protoreflect.Message
func (*TableDescriptor) Reset ¶
func (x *TableDescriptor) Reset()
func (*TableDescriptor) String ¶
func (x *TableDescriptor) String() string