diff --git a/api/cosmos/app/v1alpha1/module.pulsar.go b/api/cosmos/app/v1alpha1/module.pulsar.go index ab3af39c0..a5dfd5124 100644 --- a/api/cosmos/app/v1alpha1/module.pulsar.go +++ b/api/cosmos/app/v1alpha1/module.pulsar.go @@ -3,14 +3,15 @@ package appv1alpha1 import ( fmt "fmt" + io "io" + reflect "reflect" + sync "sync" + runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" descriptorpb "google.golang.org/protobuf/types/descriptorpb" - io "io" - reflect "reflect" - sync "sync" ) var _ protoreflect.List = (*_ModuleDescriptor_2_list)(nil) @@ -1802,15 +1803,15 @@ var file_cosmos_app_v1alpha1_module_proto_extTypes = []protoimpl.ExtensionInfo{ ExtendedType: (*descriptorpb.MessageOptions)(nil), ExtensionType: (*ModuleDescriptor)(nil), Field: 57193479, - Name: "cosmos.app.v1alpha1.is_module", - Tag: "bytes,57193479,opt,name=is_module", + Name: "cosmos.app.v1alpha1.module", + Tag: "bytes,57193479,opt,name=module", Filename: "cosmos/app/v1alpha1/module.proto", }, } // Extension fields to descriptorpb.MessageOptions. var ( - // is_module indicates that this proto type is a config object for an app module + // module indicates that this proto type is a config object for an app module // and optionally provides other descriptive information about the module. // It is recommended that a new module config object and go module is versioned // for every state machine breaking version of a module. The recommended @@ -1818,8 +1819,8 @@ var ( // package from the API they expose. Ex: the cosmos.group.v1 API would be // exposed by module configs cosmos.group.module.v1, cosmos.group.module.v2, etc. // - // optional cosmos.app.v1alpha1.ModuleDescriptor is_module = 57193479; - E_IsModule = &file_cosmos_app_v1alpha1_module_proto_extTypes[0] + // optional cosmos.app.v1alpha1.ModuleDescriptor module = 57193479; + E_Module = &file_cosmos_app_v1alpha1_module_proto_extTypes[0] ) var File_cosmos_app_v1alpha1_module_proto protoreflect.FileDescriptor @@ -1850,27 +1851,27 @@ var file_cosmos_app_v1alpha1_module_proto_rawDesc = []byte{ 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x29, 0x0a, 0x0f, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x6f, 0x64, 0x75, - 0x6c, 0x65, 0x3a, 0x66, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, - 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x87, 0xe8, 0xa2, 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, - 0x52, 0x08, 0x69, 0x73, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x42, 0xd6, 0x01, 0x0a, 0x17, 0x63, - 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, - 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, - 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x61, 0x70, 0x70, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, 0x13, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0xca, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x70, - 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x70, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6c, 0x65, 0x3a, 0x61, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x1f, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x87, 0xe8, + 0xa2, 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x70, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x06, 0x6d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x42, 0xd6, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x61, 0x70, 0x70, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, + 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x70, 0x5c, 0x56, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, + 0x70, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, + 0x3a, 0x41, 0x70, 0x70, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1895,8 +1896,8 @@ var file_cosmos_app_v1alpha1_module_proto_goTypes = []interface{}{ var file_cosmos_app_v1alpha1_module_proto_depIdxs = []int32{ 1, // 0: cosmos.app.v1alpha1.ModuleDescriptor.use_package:type_name -> cosmos.app.v1alpha1.PackageReference 2, // 1: cosmos.app.v1alpha1.ModuleDescriptor.can_migrate_from:type_name -> cosmos.app.v1alpha1.MigrateFromInfo - 3, // 2: cosmos.app.v1alpha1.is_module:extendee -> google.protobuf.MessageOptions - 0, // 3: cosmos.app.v1alpha1.is_module:type_name -> cosmos.app.v1alpha1.ModuleDescriptor + 3, // 2: cosmos.app.v1alpha1.module:extendee -> google.protobuf.MessageOptions + 0, // 3: cosmos.app.v1alpha1.module:type_name -> cosmos.app.v1alpha1.ModuleDescriptor 4, // [4:4] is the sub-list for method output_type 4, // [4:4] is the sub-list for method input_type 3, // [3:4] is the sub-list for extension type_name diff --git a/api/cosmos/orm/module/v1alpha1/module.pulsar.go b/api/cosmos/orm/module/v1alpha1/module.pulsar.go new file mode 100644 index 000000000..90a776bfb --- /dev/null +++ b/api/cosmos/orm/module/v1alpha1/module.pulsar.go @@ -0,0 +1,509 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package modulev1alpha1 + +import ( + fmt "fmt" + io "io" + reflect "reflect" + sync "sync" + + runtime "github.com/cosmos/cosmos-proto/runtime" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + + _ "github.com/cosmos/cosmos-sdk/api/cosmos/app/v1alpha1" +) + +var ( + md_Module protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_orm_module_v1alpha1_module_proto_init() + md_Module = File_cosmos_orm_module_v1alpha1_module_proto.Messages().ByName("Module") +} + +var _ protoreflect.Message = (*fastReflection_Module)(nil) + +type fastReflection_Module Module + +func (x *Module) ProtoReflect() protoreflect.Message { + return (*fastReflection_Module)(x) +} + +func (x *Module) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_orm_module_v1alpha1_module_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_Module_messageType fastReflection_Module_messageType +var _ protoreflect.MessageType = fastReflection_Module_messageType{} + +type fastReflection_Module_messageType struct{} + +func (x fastReflection_Module_messageType) Zero() protoreflect.Message { + return (*fastReflection_Module)(nil) +} +func (x fastReflection_Module_messageType) New() protoreflect.Message { + return new(fastReflection_Module) +} +func (x fastReflection_Module_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Module +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Module) Descriptor() protoreflect.MessageDescriptor { + return md_Module +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_Module) Type() protoreflect.MessageType { + return _fastReflection_Module_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Module) New() protoreflect.Message { + return new(fastReflection_Module) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Module) Interface() protoreflect.ProtoMessage { + return (*Module)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_Module) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.module.v1alpha1.Module")) + } + panic(fmt.Errorf("message cosmos.orm.module.v1alpha1.Module does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.module.v1alpha1.Module")) + } + panic(fmt.Errorf("message cosmos.orm.module.v1alpha1.Module does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.module.v1alpha1.Module")) + } + panic(fmt.Errorf("message cosmos.orm.module.v1alpha1.Module does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.module.v1alpha1.Module")) + } + panic(fmt.Errorf("message cosmos.orm.module.v1alpha1.Module does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.module.v1alpha1.Module")) + } + panic(fmt.Errorf("message cosmos.orm.module.v1alpha1.Module does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.module.v1alpha1.Module")) + } + panic(fmt.Errorf("message cosmos.orm.module.v1alpha1.Module does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.orm.module.v1alpha1.Module", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_Module) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Module) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_Module) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Module) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*Module) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*Module) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: cosmos/orm/module/v1alpha1/module.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Module defines the ORM module which adds providers to the app container for +// module-scoped DB's. In the future it may provide gRPC services for interacting +// with ORM data. +type Module struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Module) Reset() { + *x = Module{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_orm_module_v1alpha1_module_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Module) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Module) ProtoMessage() {} + +// Deprecated: Use Module.ProtoReflect.Descriptor instead. +func (*Module) Descriptor() ([]byte, []int) { + return file_cosmos_orm_module_v1alpha1_module_proto_rawDescGZIP(), []int{0} +} + +var File_cosmos_orm_module_v1alpha1_module_proto protoreflect.FileDescriptor + +var file_cosmos_orm_module_v1alpha1_module_proto_rawDesc = []byte{ + 0x0a, 0x27, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, 0x6d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x6f, 0x72, 0x6d, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, + 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x32, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x3a, 0x28, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x22, 0x0a, 0x20, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x6f, 0x72, 0x6d, 0x42, 0x84, 0x02, 0x0a, 0x1e, + 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x6d, 0x2e, 0x6d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0b, + 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x4f, 0x4d, 0xaa, + 0x02, 0x1a, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x4f, 0x72, 0x6d, 0x2e, 0x4d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1a, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4f, 0x72, 0x6d, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x26, 0x43, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x5c, 0x4f, 0x72, 0x6d, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x1d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x4f, 0x72, 0x6d, + 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_cosmos_orm_module_v1alpha1_module_proto_rawDescOnce sync.Once + file_cosmos_orm_module_v1alpha1_module_proto_rawDescData = file_cosmos_orm_module_v1alpha1_module_proto_rawDesc +) + +func file_cosmos_orm_module_v1alpha1_module_proto_rawDescGZIP() []byte { + file_cosmos_orm_module_v1alpha1_module_proto_rawDescOnce.Do(func() { + file_cosmos_orm_module_v1alpha1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_orm_module_v1alpha1_module_proto_rawDescData) + }) + return file_cosmos_orm_module_v1alpha1_module_proto_rawDescData +} + +var file_cosmos_orm_module_v1alpha1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_cosmos_orm_module_v1alpha1_module_proto_goTypes = []interface{}{ + (*Module)(nil), // 0: cosmos.orm.module.v1alpha1.Module +} +var file_cosmos_orm_module_v1alpha1_module_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_cosmos_orm_module_v1alpha1_module_proto_init() } +func file_cosmos_orm_module_v1alpha1_module_proto_init() { + if File_cosmos_orm_module_v1alpha1_module_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_cosmos_orm_module_v1alpha1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Module); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_cosmos_orm_module_v1alpha1_module_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_cosmos_orm_module_v1alpha1_module_proto_goTypes, + DependencyIndexes: file_cosmos_orm_module_v1alpha1_module_proto_depIdxs, + MessageInfos: file_cosmos_orm_module_v1alpha1_module_proto_msgTypes, + }.Build() + File_cosmos_orm_module_v1alpha1_module_proto = out.File + file_cosmos_orm_module_v1alpha1_module_proto_rawDesc = nil + file_cosmos_orm_module_v1alpha1_module_proto_goTypes = nil + file_cosmos_orm_module_v1alpha1_module_proto_depIdxs = nil +} diff --git a/api/cosmos/orm/v1alpha1/orm.pulsar.go b/api/cosmos/orm/v1alpha1/orm.pulsar.go index 45b0353c2..b9ba3148c 100644 --- a/api/cosmos/orm/v1alpha1/orm.pulsar.go +++ b/api/cosmos/orm/v1alpha1/orm.pulsar.go @@ -3,14 +3,15 @@ package ormv1alpha1 import ( fmt "fmt" + io "io" + reflect "reflect" + sync "sync" + runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" descriptorpb "google.golang.org/protobuf/types/descriptorpb" - io "io" - reflect "reflect" - sync "sync" ) var _ protoreflect.List = (*_TableDescriptor_2_list)(nil) @@ -638,7 +639,6 @@ var ( md_PrimaryKeyDescriptor protoreflect.MessageDescriptor fd_PrimaryKeyDescriptor_fields protoreflect.FieldDescriptor fd_PrimaryKeyDescriptor_auto_increment protoreflect.FieldDescriptor - fd_PrimaryKeyDescriptor_references protoreflect.FieldDescriptor ) func init() { @@ -646,7 +646,6 @@ func init() { md_PrimaryKeyDescriptor = File_cosmos_orm_v1alpha1_orm_proto.Messages().ByName("PrimaryKeyDescriptor") fd_PrimaryKeyDescriptor_fields = md_PrimaryKeyDescriptor.Fields().ByName("fields") fd_PrimaryKeyDescriptor_auto_increment = md_PrimaryKeyDescriptor.Fields().ByName("auto_increment") - fd_PrimaryKeyDescriptor_references = md_PrimaryKeyDescriptor.Fields().ByName("references") } var _ protoreflect.Message = (*fastReflection_PrimaryKeyDescriptor)(nil) @@ -726,12 +725,6 @@ func (x *fastReflection_PrimaryKeyDescriptor) Range(f func(protoreflect.FieldDes return } } - if x.References != "" { - value := protoreflect.ValueOfString(x.References) - if !f(fd_PrimaryKeyDescriptor_references, value) { - return - } - } } // Has reports whether a field is populated. @@ -751,8 +744,6 @@ func (x *fastReflection_PrimaryKeyDescriptor) Has(fd protoreflect.FieldDescripto return x.Fields != "" case "cosmos.orm.v1alpha1.PrimaryKeyDescriptor.auto_increment": return x.AutoIncrement != false - case "cosmos.orm.v1alpha1.PrimaryKeyDescriptor.references": - return x.References != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.PrimaryKeyDescriptor")) @@ -773,8 +764,6 @@ func (x *fastReflection_PrimaryKeyDescriptor) Clear(fd protoreflect.FieldDescrip x.Fields = "" case "cosmos.orm.v1alpha1.PrimaryKeyDescriptor.auto_increment": x.AutoIncrement = false - case "cosmos.orm.v1alpha1.PrimaryKeyDescriptor.references": - x.References = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.PrimaryKeyDescriptor")) @@ -797,9 +786,6 @@ func (x *fastReflection_PrimaryKeyDescriptor) Get(descriptor protoreflect.FieldD case "cosmos.orm.v1alpha1.PrimaryKeyDescriptor.auto_increment": value := x.AutoIncrement return protoreflect.ValueOfBool(value) - case "cosmos.orm.v1alpha1.PrimaryKeyDescriptor.references": - value := x.References - return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.PrimaryKeyDescriptor")) @@ -824,8 +810,6 @@ func (x *fastReflection_PrimaryKeyDescriptor) Set(fd protoreflect.FieldDescripto x.Fields = value.Interface().(string) case "cosmos.orm.v1alpha1.PrimaryKeyDescriptor.auto_increment": x.AutoIncrement = value.Bool() - case "cosmos.orm.v1alpha1.PrimaryKeyDescriptor.references": - x.References = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.PrimaryKeyDescriptor")) @@ -850,8 +834,6 @@ func (x *fastReflection_PrimaryKeyDescriptor) Mutable(fd protoreflect.FieldDescr panic(fmt.Errorf("field fields of message cosmos.orm.v1alpha1.PrimaryKeyDescriptor is not mutable")) case "cosmos.orm.v1alpha1.PrimaryKeyDescriptor.auto_increment": panic(fmt.Errorf("field auto_increment of message cosmos.orm.v1alpha1.PrimaryKeyDescriptor is not mutable")) - case "cosmos.orm.v1alpha1.PrimaryKeyDescriptor.references": - panic(fmt.Errorf("field references of message cosmos.orm.v1alpha1.PrimaryKeyDescriptor is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.PrimaryKeyDescriptor")) @@ -869,8 +851,6 @@ func (x *fastReflection_PrimaryKeyDescriptor) NewField(fd protoreflect.FieldDesc return protoreflect.ValueOfString("") case "cosmos.orm.v1alpha1.PrimaryKeyDescriptor.auto_increment": return protoreflect.ValueOfBool(false) - case "cosmos.orm.v1alpha1.PrimaryKeyDescriptor.references": - return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.PrimaryKeyDescriptor")) @@ -947,10 +927,6 @@ func (x *fastReflection_PrimaryKeyDescriptor) ProtoMethods() *protoiface.Methods if x.AutoIncrement { n += 2 } - l = len(x.References) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -980,13 +956,6 @@ func (x *fastReflection_PrimaryKeyDescriptor) ProtoMethods() *protoiface.Methods i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.References) > 0 { - i -= len(x.References) - copy(dAtA[i:], x.References) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.References))) - i-- - dAtA[i] = 0x1a - } if x.AutoIncrement { i-- if x.AutoIncrement { @@ -1105,38 +1074,6 @@ func (x *fastReflection_PrimaryKeyDescriptor) ProtoMethods() *protoiface.Methods } } x.AutoIncrement = bool(v != 0) - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field References", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.References = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -1173,11 +1110,10 @@ func (x *fastReflection_PrimaryKeyDescriptor) ProtoMethods() *protoiface.Methods } var ( - md_SecondaryIndexDescriptor protoreflect.MessageDescriptor - fd_SecondaryIndexDescriptor_fields protoreflect.FieldDescriptor - fd_SecondaryIndexDescriptor_id protoreflect.FieldDescriptor - fd_SecondaryIndexDescriptor_unique protoreflect.FieldDescriptor - fd_SecondaryIndexDescriptor_references protoreflect.FieldDescriptor + md_SecondaryIndexDescriptor protoreflect.MessageDescriptor + fd_SecondaryIndexDescriptor_fields protoreflect.FieldDescriptor + fd_SecondaryIndexDescriptor_id protoreflect.FieldDescriptor + fd_SecondaryIndexDescriptor_unique protoreflect.FieldDescriptor ) func init() { @@ -1186,7 +1122,6 @@ func init() { fd_SecondaryIndexDescriptor_fields = md_SecondaryIndexDescriptor.Fields().ByName("fields") fd_SecondaryIndexDescriptor_id = md_SecondaryIndexDescriptor.Fields().ByName("id") fd_SecondaryIndexDescriptor_unique = md_SecondaryIndexDescriptor.Fields().ByName("unique") - fd_SecondaryIndexDescriptor_references = md_SecondaryIndexDescriptor.Fields().ByName("references") } var _ protoreflect.Message = (*fastReflection_SecondaryIndexDescriptor)(nil) @@ -1272,12 +1207,6 @@ func (x *fastReflection_SecondaryIndexDescriptor) Range(f func(protoreflect.Fiel return } } - if x.References != "" { - value := protoreflect.ValueOfString(x.References) - if !f(fd_SecondaryIndexDescriptor_references, value) { - return - } - } } // Has reports whether a field is populated. @@ -1299,8 +1228,6 @@ func (x *fastReflection_SecondaryIndexDescriptor) Has(fd protoreflect.FieldDescr return x.Id != uint32(0) case "cosmos.orm.v1alpha1.SecondaryIndexDescriptor.unique": return x.Unique != false - case "cosmos.orm.v1alpha1.SecondaryIndexDescriptor.references": - return x.References != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.SecondaryIndexDescriptor")) @@ -1323,8 +1250,6 @@ func (x *fastReflection_SecondaryIndexDescriptor) Clear(fd protoreflect.FieldDes x.Id = uint32(0) case "cosmos.orm.v1alpha1.SecondaryIndexDescriptor.unique": x.Unique = false - case "cosmos.orm.v1alpha1.SecondaryIndexDescriptor.references": - x.References = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.SecondaryIndexDescriptor")) @@ -1350,9 +1275,6 @@ func (x *fastReflection_SecondaryIndexDescriptor) Get(descriptor protoreflect.Fi case "cosmos.orm.v1alpha1.SecondaryIndexDescriptor.unique": value := x.Unique return protoreflect.ValueOfBool(value) - case "cosmos.orm.v1alpha1.SecondaryIndexDescriptor.references": - value := x.References - return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.SecondaryIndexDescriptor")) @@ -1379,8 +1301,6 @@ func (x *fastReflection_SecondaryIndexDescriptor) Set(fd protoreflect.FieldDescr x.Id = uint32(value.Uint()) case "cosmos.orm.v1alpha1.SecondaryIndexDescriptor.unique": x.Unique = value.Bool() - case "cosmos.orm.v1alpha1.SecondaryIndexDescriptor.references": - x.References = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.SecondaryIndexDescriptor")) @@ -1407,8 +1327,6 @@ func (x *fastReflection_SecondaryIndexDescriptor) Mutable(fd protoreflect.FieldD panic(fmt.Errorf("field id of message cosmos.orm.v1alpha1.SecondaryIndexDescriptor is not mutable")) case "cosmos.orm.v1alpha1.SecondaryIndexDescriptor.unique": panic(fmt.Errorf("field unique of message cosmos.orm.v1alpha1.SecondaryIndexDescriptor is not mutable")) - case "cosmos.orm.v1alpha1.SecondaryIndexDescriptor.references": - panic(fmt.Errorf("field references of message cosmos.orm.v1alpha1.SecondaryIndexDescriptor is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.SecondaryIndexDescriptor")) @@ -1428,8 +1346,6 @@ func (x *fastReflection_SecondaryIndexDescriptor) NewField(fd protoreflect.Field return protoreflect.ValueOfUint32(uint32(0)) case "cosmos.orm.v1alpha1.SecondaryIndexDescriptor.unique": return protoreflect.ValueOfBool(false) - case "cosmos.orm.v1alpha1.SecondaryIndexDescriptor.references": - return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.SecondaryIndexDescriptor")) @@ -1509,10 +1425,6 @@ func (x *fastReflection_SecondaryIndexDescriptor) ProtoMethods() *protoiface.Met if x.Unique { n += 2 } - l = len(x.References) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1542,13 +1454,6 @@ func (x *fastReflection_SecondaryIndexDescriptor) ProtoMethods() *protoiface.Met i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.References) > 0 { - i -= len(x.References) - copy(dAtA[i:], x.References) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.References))) - i-- - dAtA[i] = 0x22 - } if x.Unique { i-- if x.Unique { @@ -1691,38 +1596,6 @@ func (x *fastReflection_SecondaryIndexDescriptor) ProtoMethods() *protoiface.Met } } x.Unique = bool(v != 0) - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field References", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.References = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -2276,11 +2149,6 @@ type PrimaryKeyDescriptor struct { // 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"` } func (x *PrimaryKeyDescriptor) Reset() { @@ -2317,13 +2185,6 @@ func (x *PrimaryKeyDescriptor) GetAutoIncrement() bool { return false } -func (x *PrimaryKeyDescriptor) GetReferences() string { - if x != nil { - return x.References - } - return "" -} - // PrimaryKeyDescriptor describes a table secondary index. type SecondaryIndexDescriptor struct { state protoimpl.MessageState @@ -2346,15 +2207,6 @@ type SecondaryIndexDescriptor struct { 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"` } func (x *SecondaryIndexDescriptor) Reset() { @@ -2398,13 +2250,6 @@ func (x *SecondaryIndexDescriptor) GetUnique() bool { return false } -func (x *SecondaryIndexDescriptor) GetReferences() string { - if x != nil { - return x.References - } - return "" -} - // TableDescriptor describes an ORM singleton table which has at most one instance. type SingletonDescriptor struct { state protoimpl.MessageState @@ -2496,22 +2341,18 @@ var file_cosmos_orm_v1alpha1_orm_proto_rawDesc = []byte{ 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x22, 0x75, 0x0a, 0x14, 0x50, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x22, 0x55, 0x0a, 0x14, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x61, 0x75, 0x74, 0x6f, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, - 0x65, 0x73, 0x22, 0x7a, 0x0a, 0x18, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x49, + 0x6e, 0x74, 0x22, 0x5a, 0x0a, 0x18, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x12, 0x1e, - 0x0a, 0x0a, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x25, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x22, 0x25, 0x0a, 0x13, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x74, 0x6f, 0x6e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x3a, 0x5e, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1f, diff --git a/api/cosmos/orm/v1alpha1/schema.pulsar.go b/api/cosmos/orm/v1alpha1/schema.pulsar.go index 4c3bc7dff..beb6a817c 100644 --- a/api/cosmos/orm/v1alpha1/schema.pulsar.go +++ b/api/cosmos/orm/v1alpha1/schema.pulsar.go @@ -3,89 +3,90 @@ package ormv1alpha1 import ( fmt "fmt" + io "io" + reflect "reflect" + sync "sync" + runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" descriptorpb "google.golang.org/protobuf/types/descriptorpb" - io "io" - reflect "reflect" - sync "sync" ) -var _ protoreflect.List = (*_SchemaDescriptor_2_list)(nil) +var _ protoreflect.List = (*_ModuleSchemaDescriptor_1_list)(nil) -type _SchemaDescriptor_2_list struct { - list *[]*SchemaDescriptor_ModuleEntry +type _ModuleSchemaDescriptor_1_list struct { + list *[]*ModuleSchemaDescriptor_FileEntry } -func (x *_SchemaDescriptor_2_list) Len() int { +func (x *_ModuleSchemaDescriptor_1_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_SchemaDescriptor_2_list) Get(i int) protoreflect.Value { +func (x *_ModuleSchemaDescriptor_1_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } -func (x *_SchemaDescriptor_2_list) Set(i int, value protoreflect.Value) { +func (x *_ModuleSchemaDescriptor_1_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*SchemaDescriptor_ModuleEntry) + concreteValue := valueUnwrapped.Interface().(*ModuleSchemaDescriptor_FileEntry) (*x.list)[i] = concreteValue } -func (x *_SchemaDescriptor_2_list) Append(value protoreflect.Value) { +func (x *_ModuleSchemaDescriptor_1_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*SchemaDescriptor_ModuleEntry) + concreteValue := valueUnwrapped.Interface().(*ModuleSchemaDescriptor_FileEntry) *x.list = append(*x.list, concreteValue) } -func (x *_SchemaDescriptor_2_list) AppendMutable() protoreflect.Value { - v := new(SchemaDescriptor_ModuleEntry) +func (x *_ModuleSchemaDescriptor_1_list) AppendMutable() protoreflect.Value { + v := new(ModuleSchemaDescriptor_FileEntry) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_SchemaDescriptor_2_list) Truncate(n int) { +func (x *_ModuleSchemaDescriptor_1_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } -func (x *_SchemaDescriptor_2_list) NewElement() protoreflect.Value { - v := new(SchemaDescriptor_ModuleEntry) +func (x *_ModuleSchemaDescriptor_1_list) NewElement() protoreflect.Value { + v := new(ModuleSchemaDescriptor_FileEntry) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_SchemaDescriptor_2_list) IsValid() bool { +func (x *_ModuleSchemaDescriptor_1_list) IsValid() bool { return x.list != nil } var ( - md_SchemaDescriptor protoreflect.MessageDescriptor - fd_SchemaDescriptor_files protoreflect.FieldDescriptor - fd_SchemaDescriptor_modules protoreflect.FieldDescriptor + md_ModuleSchemaDescriptor protoreflect.MessageDescriptor + fd_ModuleSchemaDescriptor_schema_file protoreflect.FieldDescriptor + fd_ModuleSchemaDescriptor_prefix protoreflect.FieldDescriptor ) func init() { file_cosmos_orm_v1alpha1_schema_proto_init() - md_SchemaDescriptor = File_cosmos_orm_v1alpha1_schema_proto.Messages().ByName("SchemaDescriptor") - fd_SchemaDescriptor_files = md_SchemaDescriptor.Fields().ByName("files") - fd_SchemaDescriptor_modules = md_SchemaDescriptor.Fields().ByName("modules") + md_ModuleSchemaDescriptor = File_cosmos_orm_v1alpha1_schema_proto.Messages().ByName("ModuleSchemaDescriptor") + fd_ModuleSchemaDescriptor_schema_file = md_ModuleSchemaDescriptor.Fields().ByName("schema_file") + fd_ModuleSchemaDescriptor_prefix = md_ModuleSchemaDescriptor.Fields().ByName("prefix") } -var _ protoreflect.Message = (*fastReflection_SchemaDescriptor)(nil) +var _ protoreflect.Message = (*fastReflection_ModuleSchemaDescriptor)(nil) -type fastReflection_SchemaDescriptor SchemaDescriptor +type fastReflection_ModuleSchemaDescriptor ModuleSchemaDescriptor -func (x *SchemaDescriptor) ProtoReflect() protoreflect.Message { - return (*fastReflection_SchemaDescriptor)(x) +func (x *ModuleSchemaDescriptor) ProtoReflect() protoreflect.Message { + return (*fastReflection_ModuleSchemaDescriptor)(x) } -func (x *SchemaDescriptor) slowProtoReflect() protoreflect.Message { +func (x *ModuleSchemaDescriptor) slowProtoReflect() protoreflect.Message { mi := &file_cosmos_orm_v1alpha1_schema_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -97,43 +98,43 @@ func (x *SchemaDescriptor) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_SchemaDescriptor_messageType fastReflection_SchemaDescriptor_messageType -var _ protoreflect.MessageType = fastReflection_SchemaDescriptor_messageType{} +var _fastReflection_ModuleSchemaDescriptor_messageType fastReflection_ModuleSchemaDescriptor_messageType +var _ protoreflect.MessageType = fastReflection_ModuleSchemaDescriptor_messageType{} -type fastReflection_SchemaDescriptor_messageType struct{} +type fastReflection_ModuleSchemaDescriptor_messageType struct{} -func (x fastReflection_SchemaDescriptor_messageType) Zero() protoreflect.Message { - return (*fastReflection_SchemaDescriptor)(nil) +func (x fastReflection_ModuleSchemaDescriptor_messageType) Zero() protoreflect.Message { + return (*fastReflection_ModuleSchemaDescriptor)(nil) } -func (x fastReflection_SchemaDescriptor_messageType) New() protoreflect.Message { - return new(fastReflection_SchemaDescriptor) +func (x fastReflection_ModuleSchemaDescriptor_messageType) New() protoreflect.Message { + return new(fastReflection_ModuleSchemaDescriptor) } -func (x fastReflection_SchemaDescriptor_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SchemaDescriptor +func (x fastReflection_ModuleSchemaDescriptor_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ModuleSchemaDescriptor } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_SchemaDescriptor) Descriptor() protoreflect.MessageDescriptor { - return md_SchemaDescriptor +func (x *fastReflection_ModuleSchemaDescriptor) Descriptor() protoreflect.MessageDescriptor { + return md_ModuleSchemaDescriptor } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_SchemaDescriptor) Type() protoreflect.MessageType { - return _fastReflection_SchemaDescriptor_messageType +func (x *fastReflection_ModuleSchemaDescriptor) Type() protoreflect.MessageType { + return _fastReflection_ModuleSchemaDescriptor_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_SchemaDescriptor) New() protoreflect.Message { - return new(fastReflection_SchemaDescriptor) +func (x *fastReflection_ModuleSchemaDescriptor) New() protoreflect.Message { + return new(fastReflection_ModuleSchemaDescriptor) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_SchemaDescriptor) Interface() protoreflect.ProtoMessage { - return (*SchemaDescriptor)(x) +func (x *fastReflection_ModuleSchemaDescriptor) Interface() protoreflect.ProtoMessage { + return (*ModuleSchemaDescriptor)(x) } // Range iterates over every populated field in an undefined order, @@ -141,597 +142,16 @@ func (x *fastReflection_SchemaDescriptor) Interface() protoreflect.ProtoMessage // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_SchemaDescriptor) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Files != nil { - value := protoreflect.ValueOfMessage(x.Files.ProtoReflect()) - if !f(fd_SchemaDescriptor_files, value) { - return - } - } - if len(x.Modules) != 0 { - value := protoreflect.ValueOfList(&_SchemaDescriptor_2_list{list: &x.Modules}) - if !f(fd_SchemaDescriptor_modules, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_SchemaDescriptor) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.orm.v1alpha1.SchemaDescriptor.files": - return x.Files != nil - case "cosmos.orm.v1alpha1.SchemaDescriptor.modules": - return len(x.Modules) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.SchemaDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1alpha1.SchemaDescriptor does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SchemaDescriptor) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.orm.v1alpha1.SchemaDescriptor.files": - x.Files = nil - case "cosmos.orm.v1alpha1.SchemaDescriptor.modules": - x.Modules = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.SchemaDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1alpha1.SchemaDescriptor does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_SchemaDescriptor) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.orm.v1alpha1.SchemaDescriptor.files": - value := x.Files - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.orm.v1alpha1.SchemaDescriptor.modules": - if len(x.Modules) == 0 { - return protoreflect.ValueOfList(&_SchemaDescriptor_2_list{}) - } - listValue := &_SchemaDescriptor_2_list{list: &x.Modules} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.SchemaDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1alpha1.SchemaDescriptor does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SchemaDescriptor) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.orm.v1alpha1.SchemaDescriptor.files": - x.Files = value.Message().Interface().(*descriptorpb.FileDescriptorSet) - case "cosmos.orm.v1alpha1.SchemaDescriptor.modules": - lv := value.List() - clv := lv.(*_SchemaDescriptor_2_list) - x.Modules = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.SchemaDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1alpha1.SchemaDescriptor does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SchemaDescriptor) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.orm.v1alpha1.SchemaDescriptor.files": - if x.Files == nil { - x.Files = new(descriptorpb.FileDescriptorSet) - } - return protoreflect.ValueOfMessage(x.Files.ProtoReflect()) - case "cosmos.orm.v1alpha1.SchemaDescriptor.modules": - if x.Modules == nil { - x.Modules = []*SchemaDescriptor_ModuleEntry{} - } - value := &_SchemaDescriptor_2_list{list: &x.Modules} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.SchemaDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1alpha1.SchemaDescriptor does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_SchemaDescriptor) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.orm.v1alpha1.SchemaDescriptor.files": - m := new(descriptorpb.FileDescriptorSet) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.orm.v1alpha1.SchemaDescriptor.modules": - list := []*SchemaDescriptor_ModuleEntry{} - return protoreflect.ValueOfList(&_SchemaDescriptor_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.SchemaDescriptor")) - } - panic(fmt.Errorf("message cosmos.orm.v1alpha1.SchemaDescriptor does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_SchemaDescriptor) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.orm.v1alpha1.SchemaDescriptor", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_SchemaDescriptor) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SchemaDescriptor) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_SchemaDescriptor) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_SchemaDescriptor) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SchemaDescriptor) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Files != nil { - l = options.Size(x.Files) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Modules) > 0 { - for _, e := range x.Modules { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*SchemaDescriptor) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Modules) > 0 { - for iNdEx := len(x.Modules) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Modules[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if x.Files != nil { - encoded, err := options.Marshal(x.Files) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*SchemaDescriptor) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SchemaDescriptor: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SchemaDescriptor: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Files", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Files == nil { - x.Files = &descriptorpb.FileDescriptorSet{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Files); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Modules", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Modules = append(x.Modules, &SchemaDescriptor_ModuleEntry{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Modules[len(x.Modules)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_SchemaDescriptor_ModuleEntry_3_list)(nil) - -type _SchemaDescriptor_ModuleEntry_3_list struct { - list *[]*SchemaDescriptor_FileEntry -} - -func (x *_SchemaDescriptor_ModuleEntry_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_SchemaDescriptor_ModuleEntry_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_SchemaDescriptor_ModuleEntry_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*SchemaDescriptor_FileEntry) - (*x.list)[i] = concreteValue -} - -func (x *_SchemaDescriptor_ModuleEntry_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*SchemaDescriptor_FileEntry) - *x.list = append(*x.list, concreteValue) -} - -func (x *_SchemaDescriptor_ModuleEntry_3_list) AppendMutable() protoreflect.Value { - v := new(SchemaDescriptor_FileEntry) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_SchemaDescriptor_ModuleEntry_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_SchemaDescriptor_ModuleEntry_3_list) NewElement() protoreflect.Value { - v := new(SchemaDescriptor_FileEntry) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_SchemaDescriptor_ModuleEntry_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_SchemaDescriptor_ModuleEntry protoreflect.MessageDescriptor - fd_SchemaDescriptor_ModuleEntry_name protoreflect.FieldDescriptor - fd_SchemaDescriptor_ModuleEntry_prefix protoreflect.FieldDescriptor - fd_SchemaDescriptor_ModuleEntry_files protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_orm_v1alpha1_schema_proto_init() - md_SchemaDescriptor_ModuleEntry = File_cosmos_orm_v1alpha1_schema_proto.Messages().ByName("SchemaDescriptor").Messages().ByName("ModuleEntry") - fd_SchemaDescriptor_ModuleEntry_name = md_SchemaDescriptor_ModuleEntry.Fields().ByName("name") - fd_SchemaDescriptor_ModuleEntry_prefix = md_SchemaDescriptor_ModuleEntry.Fields().ByName("prefix") - fd_SchemaDescriptor_ModuleEntry_files = md_SchemaDescriptor_ModuleEntry.Fields().ByName("files") -} - -var _ protoreflect.Message = (*fastReflection_SchemaDescriptor_ModuleEntry)(nil) - -type fastReflection_SchemaDescriptor_ModuleEntry SchemaDescriptor_ModuleEntry - -func (x *SchemaDescriptor_ModuleEntry) ProtoReflect() protoreflect.Message { - return (*fastReflection_SchemaDescriptor_ModuleEntry)(x) -} - -func (x *SchemaDescriptor_ModuleEntry) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_orm_v1alpha1_schema_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_SchemaDescriptor_ModuleEntry_messageType fastReflection_SchemaDescriptor_ModuleEntry_messageType -var _ protoreflect.MessageType = fastReflection_SchemaDescriptor_ModuleEntry_messageType{} - -type fastReflection_SchemaDescriptor_ModuleEntry_messageType struct{} - -func (x fastReflection_SchemaDescriptor_ModuleEntry_messageType) Zero() protoreflect.Message { - return (*fastReflection_SchemaDescriptor_ModuleEntry)(nil) -} -func (x fastReflection_SchemaDescriptor_ModuleEntry_messageType) New() protoreflect.Message { - return new(fastReflection_SchemaDescriptor_ModuleEntry) -} -func (x fastReflection_SchemaDescriptor_ModuleEntry_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SchemaDescriptor_ModuleEntry -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SchemaDescriptor_ModuleEntry) Descriptor() protoreflect.MessageDescriptor { - return md_SchemaDescriptor_ModuleEntry -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_SchemaDescriptor_ModuleEntry) Type() protoreflect.MessageType { - return _fastReflection_SchemaDescriptor_ModuleEntry_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SchemaDescriptor_ModuleEntry) New() protoreflect.Message { - return new(fastReflection_SchemaDescriptor_ModuleEntry) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SchemaDescriptor_ModuleEntry) Interface() protoreflect.ProtoMessage { - return (*SchemaDescriptor_ModuleEntry)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_SchemaDescriptor_ModuleEntry) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_SchemaDescriptor_ModuleEntry_name, value) { +func (x *fastReflection_ModuleSchemaDescriptor) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.SchemaFile) != 0 { + value := protoreflect.ValueOfList(&_ModuleSchemaDescriptor_1_list{list: &x.SchemaFile}) + if !f(fd_ModuleSchemaDescriptor_schema_file, value) { return } } if len(x.Prefix) != 0 { value := protoreflect.ValueOfBytes(x.Prefix) - if !f(fd_SchemaDescriptor_ModuleEntry_prefix, value) { - return - } - } - if len(x.Files) != 0 { - value := protoreflect.ValueOfList(&_SchemaDescriptor_ModuleEntry_3_list{list: &x.Files}) - if !f(fd_SchemaDescriptor_ModuleEntry_files, value) { + if !f(fd_ModuleSchemaDescriptor_prefix, value) { return } } @@ -748,19 +168,17 @@ func (x *fastReflection_SchemaDescriptor_ModuleEntry) Range(f func(protoreflect. // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_SchemaDescriptor_ModuleEntry) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_ModuleSchemaDescriptor) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry.name": - return x.Name != "" - case "cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry.prefix": + case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.schema_file": + return len(x.SchemaFile) != 0 + case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.prefix": return len(x.Prefix) != 0 - case "cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry.files": - return len(x.Files) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.ModuleSchemaDescriptor")) } - panic(fmt.Errorf("message cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.orm.v1alpha1.ModuleSchemaDescriptor does not contain field %s", fd.FullName())) } } @@ -770,19 +188,17 @@ func (x *fastReflection_SchemaDescriptor_ModuleEntry) Has(fd protoreflect.FieldD // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SchemaDescriptor_ModuleEntry) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_ModuleSchemaDescriptor) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry.name": - x.Name = "" - case "cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry.prefix": + case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.schema_file": + x.SchemaFile = nil + case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.prefix": x.Prefix = nil - case "cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry.files": - x.Files = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.ModuleSchemaDescriptor")) } - panic(fmt.Errorf("message cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.orm.v1alpha1.ModuleSchemaDescriptor does not contain field %s", fd.FullName())) } } @@ -792,25 +208,22 @@ func (x *fastReflection_SchemaDescriptor_ModuleEntry) Clear(fd protoreflect.Fiel // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_SchemaDescriptor_ModuleEntry) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_ModuleSchemaDescriptor) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry.name": - value := x.Name - return protoreflect.ValueOfString(value) - case "cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry.prefix": + case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.schema_file": + if len(x.SchemaFile) == 0 { + return protoreflect.ValueOfList(&_ModuleSchemaDescriptor_1_list{}) + } + listValue := &_ModuleSchemaDescriptor_1_list{list: &x.SchemaFile} + return protoreflect.ValueOfList(listValue) + case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.prefix": value := x.Prefix return protoreflect.ValueOfBytes(value) - case "cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry.files": - if len(x.Files) == 0 { - return protoreflect.ValueOfList(&_SchemaDescriptor_ModuleEntry_3_list{}) - } - listValue := &_SchemaDescriptor_ModuleEntry_3_list{list: &x.Files} - return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.ModuleSchemaDescriptor")) } - panic(fmt.Errorf("message cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message cosmos.orm.v1alpha1.ModuleSchemaDescriptor does not contain field %s", descriptor.FullName())) } } @@ -824,21 +237,19 @@ func (x *fastReflection_SchemaDescriptor_ModuleEntry) Get(descriptor protoreflec // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SchemaDescriptor_ModuleEntry) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_ModuleSchemaDescriptor) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry.name": - x.Name = value.Interface().(string) - case "cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry.prefix": - x.Prefix = value.Bytes() - case "cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry.files": + case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.schema_file": lv := value.List() - clv := lv.(*_SchemaDescriptor_ModuleEntry_3_list) - x.Files = *clv.list + clv := lv.(*_ModuleSchemaDescriptor_1_list) + x.SchemaFile = *clv.list + case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.prefix": + x.Prefix = value.Bytes() default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.ModuleSchemaDescriptor")) } - panic(fmt.Errorf("message cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.orm.v1alpha1.ModuleSchemaDescriptor does not contain field %s", fd.FullName())) } } @@ -852,53 +263,49 @@ func (x *fastReflection_SchemaDescriptor_ModuleEntry) Set(fd protoreflect.FieldD // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SchemaDescriptor_ModuleEntry) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_ModuleSchemaDescriptor) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry.files": - if x.Files == nil { - x.Files = []*SchemaDescriptor_FileEntry{} + case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.schema_file": + if x.SchemaFile == nil { + x.SchemaFile = []*ModuleSchemaDescriptor_FileEntry{} } - value := &_SchemaDescriptor_ModuleEntry_3_list{list: &x.Files} + value := &_ModuleSchemaDescriptor_1_list{list: &x.SchemaFile} return protoreflect.ValueOfList(value) - case "cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry.name": - panic(fmt.Errorf("field name of message cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry is not mutable")) - case "cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry.prefix": - panic(fmt.Errorf("field prefix of message cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry is not mutable")) + case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.prefix": + panic(fmt.Errorf("field prefix of message cosmos.orm.v1alpha1.ModuleSchemaDescriptor is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.ModuleSchemaDescriptor")) } - panic(fmt.Errorf("message cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.orm.v1alpha1.ModuleSchemaDescriptor does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_SchemaDescriptor_ModuleEntry) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_ModuleSchemaDescriptor) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry.name": - return protoreflect.ValueOfString("") - case "cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry.prefix": + case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.schema_file": + list := []*ModuleSchemaDescriptor_FileEntry{} + return protoreflect.ValueOfList(&_ModuleSchemaDescriptor_1_list{list: &list}) + case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.prefix": return protoreflect.ValueOfBytes(nil) - case "cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry.files": - list := []*SchemaDescriptor_FileEntry{} - return protoreflect.ValueOfList(&_SchemaDescriptor_ModuleEntry_3_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.ModuleSchemaDescriptor")) } - panic(fmt.Errorf("message cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.orm.v1alpha1.ModuleSchemaDescriptor does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_SchemaDescriptor_ModuleEntry) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_ModuleSchemaDescriptor) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in cosmos.orm.v1alpha1.ModuleSchemaDescriptor", d.FullName())) } panic("unreachable") } @@ -906,7 +313,7 @@ func (x *fastReflection_SchemaDescriptor_ModuleEntry) WhichOneof(d protoreflect. // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_SchemaDescriptor_ModuleEntry) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_ModuleSchemaDescriptor) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -917,7 +324,7 @@ func (x *fastReflection_SchemaDescriptor_ModuleEntry) GetUnknown() protoreflect. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SchemaDescriptor_ModuleEntry) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_ModuleSchemaDescriptor) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -929,7 +336,7 @@ func (x *fastReflection_SchemaDescriptor_ModuleEntry) SetUnknown(fields protoref // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_SchemaDescriptor_ModuleEntry) IsValid() bool { +func (x *fastReflection_ModuleSchemaDescriptor) IsValid() bool { return x != nil } @@ -939,9 +346,9 @@ func (x *fastReflection_SchemaDescriptor_ModuleEntry) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_SchemaDescriptor_ModuleEntry) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_ModuleSchemaDescriptor) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SchemaDescriptor_ModuleEntry) + x := input.Message.Interface().(*ModuleSchemaDescriptor) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -953,20 +360,16 @@ func (x *fastReflection_SchemaDescriptor_ModuleEntry) ProtoMethods() *protoiface var n int var l int _ = l - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) + if len(x.SchemaFile) > 0 { + for _, e := range x.SchemaFile { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } } l = len(x.Prefix) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if len(x.Files) > 0 { - for _, e := range x.Files { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -977,7 +380,7 @@ func (x *fastReflection_SchemaDescriptor_ModuleEntry) ProtoMethods() *protoiface } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*SchemaDescriptor_ModuleEntry) + x := input.Message.Interface().(*ModuleSchemaDescriptor) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -996,22 +399,6 @@ func (x *fastReflection_SchemaDescriptor_ModuleEntry) ProtoMethods() *protoiface i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Files) > 0 { - for iNdEx := len(x.Files) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Files[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } if len(x.Prefix) > 0 { i -= len(x.Prefix) copy(dAtA[i:], x.Prefix) @@ -1019,12 +406,21 @@ func (x *fastReflection_SchemaDescriptor_ModuleEntry) ProtoMethods() *protoiface i-- dAtA[i] = 0x12 } - if len(x.Name) > 0 { - i -= len(x.Name) - copy(dAtA[i:], x.Name) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) - i-- - dAtA[i] = 0xa + if len(x.SchemaFile) > 0 { + for iNdEx := len(x.SchemaFile) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.SchemaFile[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -1037,7 +433,7 @@ func (x *fastReflection_SchemaDescriptor_ModuleEntry) ProtoMethods() *protoiface }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*SchemaDescriptor_ModuleEntry) + x := input.Message.Interface().(*ModuleSchemaDescriptor) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1069,17 +465,17 @@ func (x *fastReflection_SchemaDescriptor_ModuleEntry) ProtoMethods() *protoiface fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SchemaDescriptor_ModuleEntry: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ModuleSchemaDescriptor: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SchemaDescriptor_ModuleEntry: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ModuleSchemaDescriptor: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SchemaFile", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -1089,23 +485,25 @@ func (x *fastReflection_SchemaDescriptor_ModuleEntry) ProtoMethods() *protoiface } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Name = string(dAtA[iNdEx:postIndex]) + x.SchemaFile = append(x.SchemaFile, &ModuleSchemaDescriptor_FileEntry{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SchemaFile[len(x.SchemaFile)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } iNdEx = postIndex case 2: if wireType != 2 { @@ -1141,40 +539,6 @@ func (x *fastReflection_SchemaDescriptor_ModuleEntry) ProtoMethods() *protoiface x.Prefix = []byte{} } iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Files", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Files = append(x.Files, &SchemaDescriptor_FileEntry{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Files[len(x.Files)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -1211,28 +575,30 @@ func (x *fastReflection_SchemaDescriptor_ModuleEntry) ProtoMethods() *protoiface } var ( - md_SchemaDescriptor_FileEntry protoreflect.MessageDescriptor - fd_SchemaDescriptor_FileEntry_id protoreflect.FieldDescriptor - fd_SchemaDescriptor_FileEntry_file_name protoreflect.FieldDescriptor + md_ModuleSchemaDescriptor_FileEntry protoreflect.MessageDescriptor + fd_ModuleSchemaDescriptor_FileEntry_id protoreflect.FieldDescriptor + fd_ModuleSchemaDescriptor_FileEntry_proto_file_name protoreflect.FieldDescriptor + fd_ModuleSchemaDescriptor_FileEntry_storage_type protoreflect.FieldDescriptor ) func init() { file_cosmos_orm_v1alpha1_schema_proto_init() - md_SchemaDescriptor_FileEntry = File_cosmos_orm_v1alpha1_schema_proto.Messages().ByName("SchemaDescriptor").Messages().ByName("FileEntry") - fd_SchemaDescriptor_FileEntry_id = md_SchemaDescriptor_FileEntry.Fields().ByName("id") - fd_SchemaDescriptor_FileEntry_file_name = md_SchemaDescriptor_FileEntry.Fields().ByName("file_name") + md_ModuleSchemaDescriptor_FileEntry = File_cosmos_orm_v1alpha1_schema_proto.Messages().ByName("ModuleSchemaDescriptor").Messages().ByName("FileEntry") + fd_ModuleSchemaDescriptor_FileEntry_id = md_ModuleSchemaDescriptor_FileEntry.Fields().ByName("id") + fd_ModuleSchemaDescriptor_FileEntry_proto_file_name = md_ModuleSchemaDescriptor_FileEntry.Fields().ByName("proto_file_name") + fd_ModuleSchemaDescriptor_FileEntry_storage_type = md_ModuleSchemaDescriptor_FileEntry.Fields().ByName("storage_type") } -var _ protoreflect.Message = (*fastReflection_SchemaDescriptor_FileEntry)(nil) +var _ protoreflect.Message = (*fastReflection_ModuleSchemaDescriptor_FileEntry)(nil) -type fastReflection_SchemaDescriptor_FileEntry SchemaDescriptor_FileEntry +type fastReflection_ModuleSchemaDescriptor_FileEntry ModuleSchemaDescriptor_FileEntry -func (x *SchemaDescriptor_FileEntry) ProtoReflect() protoreflect.Message { - return (*fastReflection_SchemaDescriptor_FileEntry)(x) +func (x *ModuleSchemaDescriptor_FileEntry) ProtoReflect() protoreflect.Message { + return (*fastReflection_ModuleSchemaDescriptor_FileEntry)(x) } -func (x *SchemaDescriptor_FileEntry) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_orm_v1alpha1_schema_proto_msgTypes[2] +func (x *ModuleSchemaDescriptor_FileEntry) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_orm_v1alpha1_schema_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1243,43 +609,43 @@ func (x *SchemaDescriptor_FileEntry) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_SchemaDescriptor_FileEntry_messageType fastReflection_SchemaDescriptor_FileEntry_messageType -var _ protoreflect.MessageType = fastReflection_SchemaDescriptor_FileEntry_messageType{} +var _fastReflection_ModuleSchemaDescriptor_FileEntry_messageType fastReflection_ModuleSchemaDescriptor_FileEntry_messageType +var _ protoreflect.MessageType = fastReflection_ModuleSchemaDescriptor_FileEntry_messageType{} -type fastReflection_SchemaDescriptor_FileEntry_messageType struct{} +type fastReflection_ModuleSchemaDescriptor_FileEntry_messageType struct{} -func (x fastReflection_SchemaDescriptor_FileEntry_messageType) Zero() protoreflect.Message { - return (*fastReflection_SchemaDescriptor_FileEntry)(nil) +func (x fastReflection_ModuleSchemaDescriptor_FileEntry_messageType) Zero() protoreflect.Message { + return (*fastReflection_ModuleSchemaDescriptor_FileEntry)(nil) } -func (x fastReflection_SchemaDescriptor_FileEntry_messageType) New() protoreflect.Message { - return new(fastReflection_SchemaDescriptor_FileEntry) +func (x fastReflection_ModuleSchemaDescriptor_FileEntry_messageType) New() protoreflect.Message { + return new(fastReflection_ModuleSchemaDescriptor_FileEntry) } -func (x fastReflection_SchemaDescriptor_FileEntry_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SchemaDescriptor_FileEntry +func (x fastReflection_ModuleSchemaDescriptor_FileEntry_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ModuleSchemaDescriptor_FileEntry } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_SchemaDescriptor_FileEntry) Descriptor() protoreflect.MessageDescriptor { - return md_SchemaDescriptor_FileEntry +func (x *fastReflection_ModuleSchemaDescriptor_FileEntry) Descriptor() protoreflect.MessageDescriptor { + return md_ModuleSchemaDescriptor_FileEntry } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_SchemaDescriptor_FileEntry) Type() protoreflect.MessageType { - return _fastReflection_SchemaDescriptor_FileEntry_messageType +func (x *fastReflection_ModuleSchemaDescriptor_FileEntry) Type() protoreflect.MessageType { + return _fastReflection_ModuleSchemaDescriptor_FileEntry_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_SchemaDescriptor_FileEntry) New() protoreflect.Message { - return new(fastReflection_SchemaDescriptor_FileEntry) +func (x *fastReflection_ModuleSchemaDescriptor_FileEntry) New() protoreflect.Message { + return new(fastReflection_ModuleSchemaDescriptor_FileEntry) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_SchemaDescriptor_FileEntry) Interface() protoreflect.ProtoMessage { - return (*SchemaDescriptor_FileEntry)(x) +func (x *fastReflection_ModuleSchemaDescriptor_FileEntry) Interface() protoreflect.ProtoMessage { + return (*ModuleSchemaDescriptor_FileEntry)(x) } // Range iterates over every populated field in an undefined order, @@ -1287,16 +653,22 @@ func (x *fastReflection_SchemaDescriptor_FileEntry) Interface() protoreflect.Pro // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_SchemaDescriptor_FileEntry) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_ModuleSchemaDescriptor_FileEntry) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Id != uint32(0) { value := protoreflect.ValueOfUint32(x.Id) - if !f(fd_SchemaDescriptor_FileEntry_id, value) { + if !f(fd_ModuleSchemaDescriptor_FileEntry_id, value) { return } } - if x.FileName != "" { - value := protoreflect.ValueOfString(x.FileName) - if !f(fd_SchemaDescriptor_FileEntry_file_name, value) { + if x.ProtoFileName != "" { + value := protoreflect.ValueOfString(x.ProtoFileName) + if !f(fd_ModuleSchemaDescriptor_FileEntry_proto_file_name, value) { + return + } + } + if x.StorageType != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.StorageType)) + if !f(fd_ModuleSchemaDescriptor_FileEntry_storage_type, value) { return } } @@ -1313,17 +685,19 @@ func (x *fastReflection_SchemaDescriptor_FileEntry) Range(f func(protoreflect.Fi // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_SchemaDescriptor_FileEntry) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_ModuleSchemaDescriptor_FileEntry) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "cosmos.orm.v1alpha1.SchemaDescriptor.FileEntry.id": + case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.id": return x.Id != uint32(0) - case "cosmos.orm.v1alpha1.SchemaDescriptor.FileEntry.file_name": - return x.FileName != "" + case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.proto_file_name": + return x.ProtoFileName != "" + case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.storage_type": + return x.StorageType != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.SchemaDescriptor.FileEntry")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry")) } - panic(fmt.Errorf("message cosmos.orm.v1alpha1.SchemaDescriptor.FileEntry does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry does not contain field %s", fd.FullName())) } } @@ -1333,17 +707,19 @@ func (x *fastReflection_SchemaDescriptor_FileEntry) Has(fd protoreflect.FieldDes // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SchemaDescriptor_FileEntry) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_ModuleSchemaDescriptor_FileEntry) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "cosmos.orm.v1alpha1.SchemaDescriptor.FileEntry.id": + case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.id": x.Id = uint32(0) - case "cosmos.orm.v1alpha1.SchemaDescriptor.FileEntry.file_name": - x.FileName = "" + case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.proto_file_name": + x.ProtoFileName = "" + case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.storage_type": + x.StorageType = 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.SchemaDescriptor.FileEntry")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry")) } - panic(fmt.Errorf("message cosmos.orm.v1alpha1.SchemaDescriptor.FileEntry does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry does not contain field %s", fd.FullName())) } } @@ -1353,19 +729,22 @@ func (x *fastReflection_SchemaDescriptor_FileEntry) Clear(fd protoreflect.FieldD // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_SchemaDescriptor_FileEntry) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_ModuleSchemaDescriptor_FileEntry) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "cosmos.orm.v1alpha1.SchemaDescriptor.FileEntry.id": + case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.id": value := x.Id return protoreflect.ValueOfUint32(value) - case "cosmos.orm.v1alpha1.SchemaDescriptor.FileEntry.file_name": - value := x.FileName + case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.proto_file_name": + value := x.ProtoFileName return protoreflect.ValueOfString(value) + case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.storage_type": + value := x.StorageType + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.SchemaDescriptor.FileEntry")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry")) } - panic(fmt.Errorf("message cosmos.orm.v1alpha1.SchemaDescriptor.FileEntry does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry does not contain field %s", descriptor.FullName())) } } @@ -1379,17 +758,19 @@ func (x *fastReflection_SchemaDescriptor_FileEntry) Get(descriptor protoreflect. // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SchemaDescriptor_FileEntry) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_ModuleSchemaDescriptor_FileEntry) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "cosmos.orm.v1alpha1.SchemaDescriptor.FileEntry.id": + case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.id": x.Id = uint32(value.Uint()) - case "cosmos.orm.v1alpha1.SchemaDescriptor.FileEntry.file_name": - x.FileName = value.Interface().(string) + case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.proto_file_name": + x.ProtoFileName = value.Interface().(string) + case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.storage_type": + x.StorageType = (StorageType)(value.Enum()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.SchemaDescriptor.FileEntry")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry")) } - panic(fmt.Errorf("message cosmos.orm.v1alpha1.SchemaDescriptor.FileEntry does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry does not contain field %s", fd.FullName())) } } @@ -1403,44 +784,48 @@ func (x *fastReflection_SchemaDescriptor_FileEntry) Set(fd protoreflect.FieldDes // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SchemaDescriptor_FileEntry) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_ModuleSchemaDescriptor_FileEntry) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.orm.v1alpha1.SchemaDescriptor.FileEntry.id": - panic(fmt.Errorf("field id of message cosmos.orm.v1alpha1.SchemaDescriptor.FileEntry is not mutable")) - case "cosmos.orm.v1alpha1.SchemaDescriptor.FileEntry.file_name": - panic(fmt.Errorf("field file_name of message cosmos.orm.v1alpha1.SchemaDescriptor.FileEntry is not mutable")) + case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.id": + panic(fmt.Errorf("field id of message cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry is not mutable")) + case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.proto_file_name": + panic(fmt.Errorf("field proto_file_name of message cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry is not mutable")) + case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.storage_type": + panic(fmt.Errorf("field storage_type of message cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.SchemaDescriptor.FileEntry")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry")) } - panic(fmt.Errorf("message cosmos.orm.v1alpha1.SchemaDescriptor.FileEntry does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_SchemaDescriptor_FileEntry) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_ModuleSchemaDescriptor_FileEntry) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.orm.v1alpha1.SchemaDescriptor.FileEntry.id": + case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.id": return protoreflect.ValueOfUint32(uint32(0)) - case "cosmos.orm.v1alpha1.SchemaDescriptor.FileEntry.file_name": + case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.proto_file_name": return protoreflect.ValueOfString("") + case "cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.storage_type": + return protoreflect.ValueOfEnum(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.SchemaDescriptor.FileEntry")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry")) } - panic(fmt.Errorf("message cosmos.orm.v1alpha1.SchemaDescriptor.FileEntry does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_SchemaDescriptor_FileEntry) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_ModuleSchemaDescriptor_FileEntry) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.orm.v1alpha1.SchemaDescriptor.FileEntry", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry", d.FullName())) } panic("unreachable") } @@ -1448,7 +833,7 @@ func (x *fastReflection_SchemaDescriptor_FileEntry) WhichOneof(d protoreflect.On // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_SchemaDescriptor_FileEntry) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_ModuleSchemaDescriptor_FileEntry) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -1459,7 +844,7 @@ func (x *fastReflection_SchemaDescriptor_FileEntry) GetUnknown() protoreflect.Ra // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SchemaDescriptor_FileEntry) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_ModuleSchemaDescriptor_FileEntry) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -1471,7 +856,7 @@ func (x *fastReflection_SchemaDescriptor_FileEntry) SetUnknown(fields protorefle // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_SchemaDescriptor_FileEntry) IsValid() bool { +func (x *fastReflection_ModuleSchemaDescriptor_FileEntry) IsValid() bool { return x != nil } @@ -1481,9 +866,9 @@ func (x *fastReflection_SchemaDescriptor_FileEntry) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_SchemaDescriptor_FileEntry) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_ModuleSchemaDescriptor_FileEntry) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SchemaDescriptor_FileEntry) + x := input.Message.Interface().(*ModuleSchemaDescriptor_FileEntry) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1498,10 +883,13 @@ func (x *fastReflection_SchemaDescriptor_FileEntry) ProtoMethods() *protoiface.M if x.Id != 0 { n += 1 + runtime.Sov(uint64(x.Id)) } - l = len(x.FileName) + l = len(x.ProtoFileName) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + if x.StorageType != 0 { + n += 1 + runtime.Sov(uint64(x.StorageType)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1512,7 +900,7 @@ func (x *fastReflection_SchemaDescriptor_FileEntry) ProtoMethods() *protoiface.M } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*SchemaDescriptor_FileEntry) + x := input.Message.Interface().(*ModuleSchemaDescriptor_FileEntry) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1531,10 +919,15 @@ func (x *fastReflection_SchemaDescriptor_FileEntry) ProtoMethods() *protoiface.M i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.FileName) > 0 { - i -= len(x.FileName) - copy(dAtA[i:], x.FileName) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FileName))) + if x.StorageType != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.StorageType)) + i-- + dAtA[i] = 0x18 + } + if len(x.ProtoFileName) > 0 { + i -= len(x.ProtoFileName) + copy(dAtA[i:], x.ProtoFileName) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ProtoFileName))) i-- dAtA[i] = 0x12 } @@ -1554,7 +947,7 @@ func (x *fastReflection_SchemaDescriptor_FileEntry) ProtoMethods() *protoiface.M }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*SchemaDescriptor_FileEntry) + x := input.Message.Interface().(*ModuleSchemaDescriptor_FileEntry) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1586,10 +979,10 @@ func (x *fastReflection_SchemaDescriptor_FileEntry) ProtoMethods() *protoiface.M fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SchemaDescriptor_FileEntry: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ModuleSchemaDescriptor_FileEntry: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SchemaDescriptor_FileEntry: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ModuleSchemaDescriptor_FileEntry: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1613,7 +1006,7 @@ func (x *fastReflection_SchemaDescriptor_FileEntry) ProtoMethods() *protoiface.M } case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FileName", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProtoFileName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1641,8 +1034,27 @@ func (x *fastReflection_SchemaDescriptor_FileEntry) ProtoMethods() *protoiface.M if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.FileName = string(dAtA[iNdEx:postIndex]) + x.ProtoFileName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StorageType", wireType) + } + x.StorageType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.StorageType |= StorageType(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -1691,23 +1103,100 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// SchemaDescriptor describes an ORM schema that contains all the information -// needed for a dynamic client to decode the stored data. -type SchemaDescriptor struct { +// StorageType +type StorageType int32 + +const ( + // STORAGE_TYPE_DEFAULT_UNSPECIFIED indicates the persistent + // KV-storage where primary key entries are stored in merkle-tree + // backed commitment storage and indexes and seqs are stored in + // fast index storage. Note that the Cosmos SDK before store/v2 + // does not support this. + StorageType_STORAGE_TYPE_DEFAULT_UNSPECIFIED StorageType = 0 + // STORAGE_TYPE_MEMORY indicates in-memory storage that will be + // reloaded every time an app restarts. Tables with this type of storage + // will by default be ignored when importing and exporting a module's + // state from JSON. + StorageType_STORAGE_TYPE_MEMORY StorageType = 1 + // STORAGE_TYPE_TRANSIENT indicates transient storage that is reset + // at the end of every block. Tables with this type of storage + // will by default be ignored when importing and exporting a module's + // state from JSON. + StorageType_STORAGE_TYPE_TRANSIENT StorageType = 2 + // STORAGE_TYPE_INDEX indicates persistent storage which is not backed + // by a merkle-tree and won't affect the app hash. Note that the Cosmos SDK + // before store/v2 does not support this. + StorageType_STORAGE_TYPE_INDEX StorageType = 3 + // STORAGE_TYPE_INDEX indicates persistent storage which is backed by + // a merkle-tree. With this type of storage, both primary and index keys + // will affect the app hash and this is generally less efficient + // than using STORAGE_TYPE_DEFAULT_UNSPECIFIED which separates index + // keys into index storage. Note that modules built with the + // Cosmos SDK before store/v2 must specify STORAGE_TYPE_COMMITMENT + // instead of STORAGE_TYPE_DEFAULT_UNSPECIFIED or STORAGE_TYPE_INDEX + // because this is the only type of persistent storage available. + StorageType_STORAGE_TYPE_COMMITMENT StorageType = 4 +) + +// Enum value maps for StorageType. +var ( + StorageType_name = map[int32]string{ + 0: "STORAGE_TYPE_DEFAULT_UNSPECIFIED", + 1: "STORAGE_TYPE_MEMORY", + 2: "STORAGE_TYPE_TRANSIENT", + 3: "STORAGE_TYPE_INDEX", + 4: "STORAGE_TYPE_COMMITMENT", + } + StorageType_value = map[string]int32{ + "STORAGE_TYPE_DEFAULT_UNSPECIFIED": 0, + "STORAGE_TYPE_MEMORY": 1, + "STORAGE_TYPE_TRANSIENT": 2, + "STORAGE_TYPE_INDEX": 3, + "STORAGE_TYPE_COMMITMENT": 4, + } +) + +func (x StorageType) Enum() *StorageType { + p := new(StorageType) + *p = x + return p +} + +func (x StorageType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (StorageType) Descriptor() protoreflect.EnumDescriptor { + return file_cosmos_orm_v1alpha1_schema_proto_enumTypes[0].Descriptor() +} + +func (StorageType) Type() protoreflect.EnumType { + return &file_cosmos_orm_v1alpha1_schema_proto_enumTypes[0] +} + +func (x StorageType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use StorageType.Descriptor instead. +func (StorageType) EnumDescriptor() ([]byte, []int) { + return file_cosmos_orm_v1alpha1_schema_proto_rawDescGZIP(), []int{0} +} + +// ModuleSchemaDescriptor describe's a module's ORM schema. +type ModuleSchemaDescriptor struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // 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"` + SchemaFile []*ModuleSchemaDescriptor_FileEntry `protobuf:"bytes,1,rep,name=schema_file,json=schemaFile,proto3" json:"schema_file,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"` } -func (x *SchemaDescriptor) Reset() { - *x = SchemaDescriptor{} +func (x *ModuleSchemaDescriptor) Reset() { + *x = ModuleSchemaDescriptor{} if protoimpl.UnsafeEnabled { mi := &file_cosmos_orm_v1alpha1_schema_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1715,90 +1204,33 @@ func (x *SchemaDescriptor) Reset() { } } -func (x *SchemaDescriptor) String() string { +func (x *ModuleSchemaDescriptor) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SchemaDescriptor) ProtoMessage() {} +func (*ModuleSchemaDescriptor) ProtoMessage() {} -// Deprecated: Use SchemaDescriptor.ProtoReflect.Descriptor instead. -func (*SchemaDescriptor) Descriptor() ([]byte, []int) { +// Deprecated: Use ModuleSchemaDescriptor.ProtoReflect.Descriptor instead. +func (*ModuleSchemaDescriptor) Descriptor() ([]byte, []int) { return file_cosmos_orm_v1alpha1_schema_proto_rawDescGZIP(), []int{0} } -func (x *SchemaDescriptor) GetFiles() *descriptorpb.FileDescriptorSet { +func (x *ModuleSchemaDescriptor) GetSchemaFile() []*ModuleSchemaDescriptor_FileEntry { if x != nil { - return x.Files + return x.SchemaFile } return nil } -func (x *SchemaDescriptor) GetModules() []*SchemaDescriptor_ModuleEntry { - if x != nil { - return x.Modules - } - return nil -} - -// ModuleEntry describes a single module's schema. -type SchemaDescriptor_ModuleEntry struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // 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"` -} - -func (x *SchemaDescriptor_ModuleEntry) Reset() { - *x = SchemaDescriptor_ModuleEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_orm_v1alpha1_schema_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SchemaDescriptor_ModuleEntry) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SchemaDescriptor_ModuleEntry) ProtoMessage() {} - -// Deprecated: Use SchemaDescriptor_ModuleEntry.ProtoReflect.Descriptor instead. -func (*SchemaDescriptor_ModuleEntry) Descriptor() ([]byte, []int) { - return file_cosmos_orm_v1alpha1_schema_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *SchemaDescriptor_ModuleEntry) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *SchemaDescriptor_ModuleEntry) GetPrefix() []byte { +func (x *ModuleSchemaDescriptor) GetPrefix() []byte { if x != nil { return x.Prefix } return nil } -func (x *SchemaDescriptor_ModuleEntry) GetFiles() []*SchemaDescriptor_FileEntry { - if x != nil { - return x.Files - } - return nil -} - // FileEntry describes an ORM file used in a module. -type SchemaDescriptor_FileEntry struct { +type ModuleSchemaDescriptor_FileEntry struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1806,45 +1238,79 @@ 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"` + // proto_file_name is the name of a file .proto in that contains + // table definitions. The .proto file must be in a package that the + // module has referenced using cosmos.app.v1.ModuleDescriptor.use_package. + ProtoFileName string `protobuf:"bytes,2,opt,name=proto_file_name,json=protoFileName,proto3" json:"proto_file_name,omitempty"` + // storage_type optionally indicates the type of storage this file's + // tables should used. If it is left unspecified, the default KV-storage + // of the app will be used. + StorageType StorageType `protobuf:"varint,3,opt,name=storage_type,json=storageType,proto3,enum=cosmos.orm.v1alpha1.StorageType" json:"storage_type,omitempty"` } -func (x *SchemaDescriptor_FileEntry) Reset() { - *x = SchemaDescriptor_FileEntry{} +func (x *ModuleSchemaDescriptor_FileEntry) Reset() { + *x = ModuleSchemaDescriptor_FileEntry{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_orm_v1alpha1_schema_proto_msgTypes[2] + mi := &file_cosmos_orm_v1alpha1_schema_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *SchemaDescriptor_FileEntry) String() string { +func (x *ModuleSchemaDescriptor_FileEntry) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SchemaDescriptor_FileEntry) ProtoMessage() {} +func (*ModuleSchemaDescriptor_FileEntry) ProtoMessage() {} -// Deprecated: Use SchemaDescriptor_FileEntry.ProtoReflect.Descriptor instead. -func (*SchemaDescriptor_FileEntry) Descriptor() ([]byte, []int) { - return file_cosmos_orm_v1alpha1_schema_proto_rawDescGZIP(), []int{0, 1} +// Deprecated: Use ModuleSchemaDescriptor_FileEntry.ProtoReflect.Descriptor instead. +func (*ModuleSchemaDescriptor_FileEntry) Descriptor() ([]byte, []int) { + return file_cosmos_orm_v1alpha1_schema_proto_rawDescGZIP(), []int{0, 0} } -func (x *SchemaDescriptor_FileEntry) GetId() uint32 { +func (x *ModuleSchemaDescriptor_FileEntry) GetId() uint32 { if x != nil { return x.Id } return 0 } -func (x *SchemaDescriptor_FileEntry) GetFileName() string { +func (x *ModuleSchemaDescriptor_FileEntry) GetProtoFileName() string { if x != nil { - return x.FileName + return x.ProtoFileName } return "" } +func (x *ModuleSchemaDescriptor_FileEntry) GetStorageType() StorageType { + if x != nil { + return x.StorageType + } + return StorageType_STORAGE_TYPE_DEFAULT_UNSPECIFIED +} + +var file_cosmos_orm_v1alpha1_schema_proto_extTypes = []protoimpl.ExtensionInfo{ + { + ExtendedType: (*descriptorpb.MessageOptions)(nil), + ExtensionType: (*ModuleSchemaDescriptor)(nil), + Field: 104503792, + Name: "cosmos.orm.v1alpha1.module_schema", + Tag: "bytes,104503792,opt,name=module_schema", + Filename: "cosmos/orm/v1alpha1/schema.proto", + }, +} + +// Extension fields to descriptorpb.MessageOptions. +var ( + // module_schema is used to define the ORM schema for an app module. + // All module config messages that use module_schema must also declare + // themselves as app module config messages using the cosmos.app.v1.is_module + // option. + // + // optional cosmos.orm.v1alpha1.ModuleSchemaDescriptor module_schema = 104503792; + E_ModuleSchema = &file_cosmos_orm_v1alpha1_schema_proto_extTypes[0] +) + var File_cosmos_orm_v1alpha1_schema_proto protoreflect.FileDescriptor var file_cosmos_orm_v1alpha1_schema_proto_rawDesc = []byte{ @@ -1853,43 +1319,56 @@ var file_cosmos_orm_v1alpha1_schema_proto_rawDesc = []byte{ 0x74, 0x6f, 0x12, 0x13, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd6, 0x02, 0x0a, 0x10, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x38, - 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x65, - 0x74, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x07, 0x6d, 0x6f, 0x64, 0x75, - 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x93, 0x02, 0x0a, 0x16, 0x4d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x6f, 0x72, 0x12, 0x56, 0x0a, 0x0b, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x66, + 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, - 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x6d, 0x6f, - 0x64, 0x75, 0x6c, 0x65, 0x73, 0x1a, 0x80, 0x01, 0x0a, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, - 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x12, 0x45, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x1a, 0x38, 0x0a, 0x09, 0x46, 0x69, 0x6c, 0x65, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, - 0x6d, 0x65, 0x42, 0xd6, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0b, - 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x40, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x3b, 0x6f, 0x72, 0x6d, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, - 0x02, 0x03, 0x43, 0x4f, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x4f, - 0x72, 0x6d, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x13, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4f, 0x72, 0x6d, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4f, 0x72, 0x6d, 0x5c, 0x56, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x4f, 0x72, - 0x6d, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x0a, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x1a, 0x88, 0x01, 0x0a, 0x09, 0x46, 0x69, 0x6c, 0x65, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5f, 0x66, 0x69, 0x6c, 0x65, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x46, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x43, 0x0a, 0x0c, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2a, + 0x9d, 0x01, 0x0a, 0x0b, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x24, 0x0a, 0x20, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x4d, 0x4f, 0x52, 0x59, 0x10, 0x01, 0x12, 0x1a, + 0x0a, 0x16, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, + 0x52, 0x41, 0x4e, 0x53, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, + 0x4f, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x44, 0x45, 0x58, + 0x10, 0x03, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x04, 0x3a, + 0x74, 0x0a, 0x0d, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0xf0, 0xb3, 0xea, 0x31, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x0c, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x53, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x42, 0xd6, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x42, 0x0b, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6f, 0x72, 0x6d, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x4f, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x4f, 0x72, 0x6d, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, + 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4f, 0x72, 0x6d, 0x5c, 0x56, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4f, 0x72, + 0x6d, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, + 0x3a, 0x4f, 0x72, 0x6d, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1904,22 +1383,24 @@ func file_cosmos_orm_v1alpha1_schema_proto_rawDescGZIP() []byte { return file_cosmos_orm_v1alpha1_schema_proto_rawDescData } -var file_cosmos_orm_v1alpha1_schema_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_cosmos_orm_v1alpha1_schema_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_cosmos_orm_v1alpha1_schema_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_cosmos_orm_v1alpha1_schema_proto_goTypes = []interface{}{ - (*SchemaDescriptor)(nil), // 0: cosmos.orm.v1alpha1.SchemaDescriptor - (*SchemaDescriptor_ModuleEntry)(nil), // 1: cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry - (*SchemaDescriptor_FileEntry)(nil), // 2: cosmos.orm.v1alpha1.SchemaDescriptor.FileEntry - (*descriptorpb.FileDescriptorSet)(nil), // 3: google.protobuf.FileDescriptorSet + (StorageType)(0), // 0: cosmos.orm.v1alpha1.StorageType + (*ModuleSchemaDescriptor)(nil), // 1: cosmos.orm.v1alpha1.ModuleSchemaDescriptor + (*ModuleSchemaDescriptor_FileEntry)(nil), // 2: cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry + (*descriptorpb.MessageOptions)(nil), // 3: google.protobuf.MessageOptions } var file_cosmos_orm_v1alpha1_schema_proto_depIdxs = []int32{ - 3, // 0: cosmos.orm.v1alpha1.SchemaDescriptor.files:type_name -> google.protobuf.FileDescriptorSet - 1, // 1: cosmos.orm.v1alpha1.SchemaDescriptor.modules:type_name -> cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry - 2, // 2: cosmos.orm.v1alpha1.SchemaDescriptor.ModuleEntry.files:type_name -> cosmos.orm.v1alpha1.SchemaDescriptor.FileEntry - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 2, // 0: cosmos.orm.v1alpha1.ModuleSchemaDescriptor.schema_file:type_name -> cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry + 0, // 1: cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry.storage_type:type_name -> cosmos.orm.v1alpha1.StorageType + 3, // 2: cosmos.orm.v1alpha1.module_schema:extendee -> google.protobuf.MessageOptions + 1, // 3: cosmos.orm.v1alpha1.module_schema:type_name -> cosmos.orm.v1alpha1.ModuleSchemaDescriptor + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 3, // [3:4] is the sub-list for extension type_name + 2, // [2:3] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_cosmos_orm_v1alpha1_schema_proto_init() } @@ -1929,7 +1410,7 @@ func file_cosmos_orm_v1alpha1_schema_proto_init() { } if !protoimpl.UnsafeEnabled { file_cosmos_orm_v1alpha1_schema_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SchemaDescriptor); i { + switch v := v.(*ModuleSchemaDescriptor); i { case 0: return &v.state case 1: @@ -1941,19 +1422,7 @@ func file_cosmos_orm_v1alpha1_schema_proto_init() { } } file_cosmos_orm_v1alpha1_schema_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SchemaDescriptor_ModuleEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_orm_v1alpha1_schema_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SchemaDescriptor_FileEntry); i { + switch v := v.(*ModuleSchemaDescriptor_FileEntry); i { case 0: return &v.state case 1: @@ -1970,14 +1439,16 @@ func file_cosmos_orm_v1alpha1_schema_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_orm_v1alpha1_schema_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, + NumEnums: 1, + NumMessages: 2, + NumExtensions: 1, NumServices: 0, }, GoTypes: file_cosmos_orm_v1alpha1_schema_proto_goTypes, DependencyIndexes: file_cosmos_orm_v1alpha1_schema_proto_depIdxs, + EnumInfos: file_cosmos_orm_v1alpha1_schema_proto_enumTypes, MessageInfos: file_cosmos_orm_v1alpha1_schema_proto_msgTypes, + ExtensionInfos: file_cosmos_orm_v1alpha1_schema_proto_extTypes, }.Build() File_cosmos_orm_v1alpha1_schema_proto = out.File file_cosmos_orm_v1alpha1_schema_proto_rawDesc = nil diff --git a/proto/cosmos/app/module/v1alpha1/module.proto b/proto/cosmos/app/module/v1alpha1/module.proto index 5d9e95d33..6c9c55a5d 100644 --- a/proto/cosmos/app/module/v1alpha1/module.proto +++ b/proto/cosmos/app/module/v1alpha1/module.proto @@ -6,7 +6,7 @@ import "cosmos/app/v1alpha1/module.proto"; // Module is the module config object for the cosmos.app v1 app module. message Module { - option (cosmos.app.v1alpha1.is_module) = { + option (cosmos.app.v1alpha1.module) = { go_import: "github.com/cosmos/cosmos-sdk/app" use_package: { name: "cosmos.app.v1alpha1" diff --git a/proto/cosmos/app/v1alpha1/module.proto b/proto/cosmos/app/v1alpha1/module.proto index 32b472dfe..599078d7e 100644 --- a/proto/cosmos/app/v1alpha1/module.proto +++ b/proto/cosmos/app/v1alpha1/module.proto @@ -5,14 +5,14 @@ package cosmos.app.v1alpha1; import "google/protobuf/descriptor.proto"; extend google.protobuf.MessageOptions { - // is_module indicates that this proto type is a config object for an app module + // module indicates that this proto type is a config object for an app module // and optionally provides other descriptive information about the module. // It is recommended that a new module config object and go module is versioned // for every state machine breaking version of a module. The recommended // pattern for doing this is to put module config objects in a separate proto // package from the API they expose. Ex: the cosmos.group.v1 API would be // exposed by module configs cosmos.group.module.v1, cosmos.group.module.v2, etc. - ModuleDescriptor is_module = 57193479; + ModuleDescriptor module = 57193479; } // ModuleDescriptor describes an app module. diff --git a/proto/cosmos/orm/module/v1alpha1/module.proto b/proto/cosmos/orm/module/v1alpha1/module.proto new file mode 100644 index 000000000..cb7bbbeea --- /dev/null +++ b/proto/cosmos/orm/module/v1alpha1/module.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; + +package cosmos.orm.module.v1alpha1; + +import "cosmos/app/v1alpha1/module.proto"; + +// Module defines the ORM module which adds providers to the app container for +// module-scoped DB's. In the future it may provide gRPC services for interacting +// with ORM data. +message Module { + option (cosmos.app.v1alpha1.module) = { + go_import: "github.com/cosmos/cosmos-sdk/orm" + }; +} diff --git a/proto/cosmos/orm/v1alpha1/orm.proto b/proto/cosmos/orm/v1alpha1/orm.proto index 88a947d63..644e5de26 100644 --- a/proto/cosmos/orm/v1alpha1/orm.proto +++ b/proto/cosmos/orm/v1alpha1/orm.proto @@ -72,12 +72,6 @@ message PrimaryKeyDescriptor { // auto-incrementing integer. If this is set to true fields must only // contain one field of that is of type uint64. bool auto_increment = 2; - - // 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. - string references = 3; } // PrimaryKeyDescriptor describes a table secondary index. @@ -101,16 +95,6 @@ message SecondaryIndexDescriptor { // unique specifies that this an unique index. bool unique = 3; - - // 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. - string references = 4; } // TableDescriptor describes an ORM singleton table which has at most one instance. diff --git a/proto/cosmos/orm/v1alpha1/schema.proto b/proto/cosmos/orm/v1alpha1/schema.proto index 46bc6ba8f..30f9e3a99 100644 --- a/proto/cosmos/orm/v1alpha1/schema.proto +++ b/proto/cosmos/orm/v1alpha1/schema.proto @@ -4,31 +4,17 @@ package cosmos.orm.v1alpha1; import "google/protobuf/descriptor.proto"; -// SchemaDescriptor describes an ORM schema that contains all the information -// needed for a dynamic client to decode the stored data. -message SchemaDescriptor { +extend google.protobuf.MessageOptions { + // module_schema is used to define the ORM schema for an app module. + // All module config messages that use module_schema must also declare + // themselves as app module config messages using the cosmos.app.v1.is_module + // option. + ModuleSchemaDescriptor module_schema = 104503792; +} - // 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. - google.protobuf.FileDescriptorSet files = 1; - - // modules is the set of modules in the schema. - repeated ModuleEntry modules = 2; - - // ModuleEntry describes a single module's schema. - message ModuleEntry { - // name is the name of the module. In the multi-store model this name is - // used to locate the module's store. - string name = 1; - - // prefix is an optional prefix that precedes all keys in this module's - // store. - bytes prefix = 2; - - // files describes the schema files used in this module. - repeated FileEntry files = 3; - } +// ModuleSchemaDescriptor describe's a module's ORM schema. +message ModuleSchemaDescriptor { + repeated FileEntry schema_file = 1; // FileEntry describes an ORM file used in a module. message FileEntry { @@ -36,8 +22,55 @@ message SchemaDescriptor { // table keys specified in the file's tables. uint32 id = 1; - // file_name is the name of a file in the FileDescriptor set that contains - // table definitions. - string file_name = 2; + // proto_file_name is the name of a file .proto in that contains + // table definitions. The .proto file must be in a package that the + // module has referenced using cosmos.app.v1.ModuleDescriptor.use_package. + string proto_file_name = 2; + + // storage_type optionally indicates the type of storage this file's + // tables should used. If it is left unspecified, the default KV-storage + // of the app will be used. + StorageType storage_type = 3; } + + // prefix is an optional prefix that precedes all keys in this module's + // store. + bytes prefix = 2; +} + +// StorageType +enum StorageType { + // STORAGE_TYPE_DEFAULT_UNSPECIFIED indicates the persistent + // KV-storage where primary key entries are stored in merkle-tree + // backed commitment storage and indexes and seqs are stored in + // fast index storage. Note that the Cosmos SDK before store/v2 + // does not support this. + STORAGE_TYPE_DEFAULT_UNSPECIFIED = 0; + + // STORAGE_TYPE_MEMORY indicates in-memory storage that will be + // reloaded every time an app restarts. Tables with this type of storage + // will by default be ignored when importing and exporting a module's + // state from JSON. + STORAGE_TYPE_MEMORY = 1; + + // STORAGE_TYPE_TRANSIENT indicates transient storage that is reset + // at the end of every block. Tables with this type of storage + // will by default be ignored when importing and exporting a module's + // state from JSON. + STORAGE_TYPE_TRANSIENT = 2; + + // STORAGE_TYPE_INDEX indicates persistent storage which is not backed + // by a merkle-tree and won't affect the app hash. Note that the Cosmos SDK + // before store/v2 does not support this. + STORAGE_TYPE_INDEX = 3; + + // STORAGE_TYPE_INDEX indicates persistent storage which is backed by + // a merkle-tree. With this type of storage, both primary and index keys + // will affect the app hash and this is generally less efficient + // than using STORAGE_TYPE_DEFAULT_UNSPECIFIED which separates index + // keys into index storage. Note that modules built with the + // Cosmos SDK before store/v2 must specify STORAGE_TYPE_COMMITMENT + // instead of STORAGE_TYPE_DEFAULT_UNSPECIFIED or STORAGE_TYPE_INDEX + // because this is the only type of persistent storage available. + STORAGE_TYPE_COMMITMENT = 4; }