cosmos-sdk/api/cosmos/orm/v1alpha1/schema.proto

44 lines
1.4 KiB
Protocol Buffer

syntax = "proto3";
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 {
// 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;
}
// FileEntry describes an ORM file used in a module.
message FileEntry {
// id is a prefix that will be varint encoded and prepended to all the
// 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;
}
}