diff --git a/backend/schema/database.go b/backend/schema/database.go new file mode 100644 index 0000000000..954cba76ff --- /dev/null +++ b/backend/schema/database.go @@ -0,0 +1,52 @@ +package schema + +import ( + "fmt" + "strings" + + "google.golang.org/protobuf/proto" + + schemapb "github.com/TBD54566975/ftl/protos/xyz/block/ftl/v1/schema" +) + +type Database struct { + Pos Position `parser:"" protobuf:"1,optional"` + + Comments []string `parser:"@Comment*" protobuf:"3"` + Name string `parser:"'database' @Ident" protobuf:"2"` +} + +var _ Decl = (*Database)(nil) + +// schemaDecl implements Decl +func (*Database) schemaDecl() {} +func (d *Database) schemaChildren() []Node { return nil } +func (d *Database) String() string { + w := &strings.Builder{} + fmt.Fprint(w, encodeComments(d.Comments)) + fmt.Fprintf(w, "database %s", d.Name) + return w.String() +} + +func (d *Database) ToProto() proto.Message { + return &schemapb.Database{ + Pos: posToProto(d.Pos), + Name: d.Name, + Comments: d.Comments, + } +} +func DatabaseToSchema(s *schemapb.Database) *Database { + return &Database{ + Pos: posFromProto(s.Pos), + Name: s.Name, + Comments: s.Comments, + } +} + +func databaseListToSchema(s []*schemapb.Database) []*Database { + var out []*Database + for _, n := range s { + out = append(out, DatabaseToSchema(n)) + } + return out +} diff --git a/backend/schema/jsonschema.go b/backend/schema/jsonschema.go index 2ff8f0987b..ce8a44a2c9 100644 --- a/backend/schema/jsonschema.go +++ b/backend/schema/jsonschema.go @@ -126,9 +126,9 @@ func nodeToJSSchema(node Node, dataRefs map[DataRef]bool) *jsonschema.Schema { {TypeObject: &jsonschema.Schema{Type: &jsonschema.Type{SimpleTypes: &null}}}, }} - case Decl, *Field, Metadata, *MetadataCalls, *MetadataIngress, + case Decl, *Field, Metadata, *MetadataCalls, *MetadataDatabases, *MetadataIngress, IngressPathComponent, *IngressPathLiteral, *IngressPathParameter, *Module, - *Schema, Type, *Verb, *VerbRef, *SourceRef, *SinkRef: + *Schema, Type, *Database, *Verb, *VerbRef, *SourceRef, *SinkRef: panic(fmt.Sprintf("unsupported node type %T", node)) default: diff --git a/backend/schema/metadatadatabases.go b/backend/schema/metadatadatabases.go new file mode 100644 index 0000000000..baf3e69e7e --- /dev/null +++ b/backend/schema/metadatadatabases.go @@ -0,0 +1,55 @@ +package schema + +import ( + "fmt" + "strings" + + "google.golang.org/protobuf/proto" + + schemapb "github.com/TBD54566975/ftl/protos/xyz/block/ftl/v1/schema" +) + +type MetadataDatabases struct { + Pos Position `parser:"" protobuf:"1,optional"` + + Calls []*Database `parser:"'database' 'calls' @@ (',' @@)*" protobuf:"2"` +} + +var _ Metadata = (*MetadataDatabases)(nil) + +func (m *MetadataDatabases) String() string { + out := &strings.Builder{} + fmt.Fprint(out, "database calls ") + w := 6 + for i, call := range m.Calls { + if i > 0 { + fmt.Fprint(out, ", ") + w += 2 + } + str := call.String() + if w+len(str) > 70 { + w = 6 + fmt.Fprint(out, "\n ") + } + w += len(str) + fmt.Fprint(out, str) + } + fmt.Fprintln(out) + return out.String() +} + +func (m *MetadataDatabases) schemaChildren() []Node { + out := make([]Node, 0, len(m.Calls)) + for _, ref := range m.Calls { + out = append(out, ref) + } + return out +} +func (*MetadataDatabases) schemaMetadata() {} + +func (m *MetadataDatabases) ToProto() proto.Message { + return &schemapb.MetadataDatabases{ + Pos: posToProto(m.Pos), + Calls: nodeListToProto[*schemapb.Database](m.Calls), + } +} diff --git a/backend/schema/normalise.go b/backend/schema/normalise.go index e55f7fef5c..0a2377b81a 100644 --- a/backend/schema/normalise.go +++ b/backend/schema/normalise.go @@ -32,6 +32,9 @@ func Normalise[T Node](n T) T { c.Fields = normaliseSlice(c.Fields) c.Metadata = normaliseSlice(c.Metadata) + case *Database: + c.Pos = zero + case *DataRef: c.Pos = zero @@ -77,6 +80,10 @@ func Normalise[T Node](n T) T { c.Pos = zero c.Calls = normaliseSlice(c.Calls) + case *MetadataDatabases: + c.Pos = zero + c.Calls = normaliseSlice(c.Calls) + case *MetadataIngress: c.Pos = zero c.Path = normaliseSlice(c.Path) diff --git a/backend/schema/parser.go b/backend/schema/parser.go index cf6a7ed401..19574144a9 100644 --- a/backend/schema/parser.go +++ b/backend/schema/parser.go @@ -12,13 +12,13 @@ import ( ) var ( - declUnion = []Decl{&Data{}, &Verb{}} + declUnion = []Decl{&Data{}, &Verb{}, &Database{}} nonOptionalTypeUnion = []Type{ &Int{}, &Float{}, &String{}, &Bytes{}, &Bool{}, &Time{}, &Array{}, &Map{}, &DataRef{}, &Unit{}, } typeUnion = append(nonOptionalTypeUnion, &Optional{}) - metadataUnion = []Metadata{&MetadataCalls{}, &MetadataIngress{}} + metadataUnion = []Metadata{&MetadataCalls{}, &MetadataIngress{}, &MetadataDatabases{}} ingressUnion = []IngressPathComponent{&IngressPathLiteral{}, &IngressPathParameter{}} // Used by protobuf generation. diff --git a/backend/schema/protobuf_dec.go b/backend/schema/protobuf_dec.go index 63f0241bd4..bf58d081f6 100644 --- a/backend/schema/protobuf_dec.go +++ b/backend/schema/protobuf_dec.go @@ -25,6 +25,8 @@ func declListToSchema(s []*schemapb.Decl) []Decl { out = append(out, VerbToSchema(n.Verb)) case *schemapb.Decl_Data: out = append(out, DataToSchema(n.Data)) + case *schemapb.Decl_Database: + out = append(out, DatabaseToSchema(n.Database)) } } return out @@ -74,6 +76,12 @@ func metadataToSchema(s *schemapb.Metadata) Metadata { Calls: verbRefListToSchema(s.Calls.Calls), } + case *schemapb.Metadata_Databases: + return &MetadataDatabases{ + Pos: posFromProto(s.Databases.Pos), + Calls: databaseListToSchema(s.Databases.Calls), + } + case *schemapb.Metadata_Ingress: return &MetadataIngress{ Pos: posFromProto(s.Ingress.Pos), diff --git a/backend/schema/protobuf_enc.go b/backend/schema/protobuf_enc.go index 1e58a89f25..702f63ea9e 100644 --- a/backend/schema/protobuf_enc.go +++ b/backend/schema/protobuf_enc.go @@ -30,6 +30,8 @@ func declListToProto(nodes []Decl) []*schemapb.Decl { v = &schemapb.Decl_Verb{Verb: n.ToProto().(*schemapb.Verb)} case *Data: v = &schemapb.Decl_Data{Data: n.ToProto().(*schemapb.Data)} + case *Database: + v = &schemapb.Decl_Database{Database: n.ToProto().(*schemapb.Database)} } out[i] = &schemapb.Decl{Value: v} } @@ -44,6 +46,9 @@ func metadataListToProto(nodes []Metadata) []*schemapb.Metadata { case *MetadataCalls: v = &schemapb.Metadata_Calls{Calls: n.ToProto().(*schemapb.MetadataCalls)} + case *MetadataDatabases: + v = &schemapb.Metadata_Databases{Databases: n.ToProto().(*schemapb.MetadataDatabases)} + case *MetadataIngress: v = &schemapb.Metadata_Ingress{Ingress: n.ToProto().(*schemapb.MetadataIngress)} diff --git a/backend/schema/validate.go b/backend/schema/validate.go index 53f58c3b88..295c770bf5 100644 --- a/backend/schema/validate.go +++ b/backend/schema/validate.go @@ -179,9 +179,9 @@ func ValidateModule(module *Module) error { } } - case *Array, *Bool, *DataRef, *Field, *Float, *Int, + case *Array, *Bool, *DataRef, *Database, *Field, *Float, *Int, *Time, *Map, *Module, *Schema, *String, *Bytes, *VerbRef, - *MetadataCalls, *MetadataIngress, IngressPathComponent, + *MetadataCalls, *MetadataDatabases, *MetadataIngress, IngressPathComponent, *IngressPathLiteral, *IngressPathParameter, *Optional, *SourceRef, *SinkRef, *Unit: case Type, Metadata, Decl: // Union sql. diff --git a/examples/kotlin/pom.xml b/examples/kotlin/pom.xml index f519f4c2f0..4a71f73a5a 100644 --- a/examples/kotlin/pom.xml +++ b/examples/kotlin/pom.xml @@ -34,6 +34,11 @@ ftl-runtime ${ftl.version} + + org.postgresql + postgresql + 42.7.1 + diff --git a/frontend/src/protos/xyz/block/ftl/v1/schema/schema_pb.ts b/frontend/src/protos/xyz/block/ftl/v1/schema/schema_pb.ts index 4deaf37521..327c833571 100644 --- a/frontend/src/protos/xyz/block/ftl/v1/schema/schema_pb.ts +++ b/frontend/src/protos/xyz/block/ftl/v1/schema/schema_pb.ts @@ -383,6 +383,55 @@ export class Data extends Message { } } +/** + * @generated from message xyz.block.ftl.v1.schema.Database + */ +export class Database extends Message { + /** + * @generated from field: optional xyz.block.ftl.v1.schema.Position pos = 1; + */ + pos?: Position; + + /** + * @generated from field: string name = 2; + */ + name = ""; + + /** + * @generated from field: repeated string comments = 3; + */ + comments: string[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.schema.Database"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "pos", kind: "message", T: Position, opt: true }, + { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "comments", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Database { + return new Database().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Database { + return new Database().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Database { + return new Database().fromJsonString(jsonString, options); + } + + static equals(a: Database | PlainMessage | undefined, b: Database | PlainMessage | undefined): boolean { + return proto3.util.equals(Database, a, b); + } +} + /** * @generated from message xyz.block.ftl.v1.schema.Decl */ @@ -402,6 +451,12 @@ export class Decl extends Message { */ value: Verb; case: "verb"; + } | { + /** + * @generated from field: xyz.block.ftl.v1.schema.Database database = 3; + */ + value: Database; + case: "database"; } | { case: undefined; value?: undefined } = { case: undefined }; constructor(data?: PartialMessage) { @@ -414,6 +469,7 @@ export class Decl extends Message { static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "data", kind: "message", T: Data, oneof: "value" }, { no: 2, name: "verb", kind: "message", T: Verb, oneof: "value" }, + { no: 3, name: "database", kind: "message", T: Database, oneof: "value" }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): Decl { @@ -766,6 +822,12 @@ export class Metadata extends Message { */ value: MetadataIngress; case: "ingress"; + } | { + /** + * @generated from field: xyz.block.ftl.v1.schema.MetadataDatabases databases = 3; + */ + value: MetadataDatabases; + case: "databases"; } | { case: undefined; value?: undefined } = { case: undefined }; constructor(data?: PartialMessage) { @@ -778,6 +840,7 @@ export class Metadata extends Message { static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "calls", kind: "message", T: MetadataCalls, oneof: "value" }, { no: 2, name: "ingress", kind: "message", T: MetadataIngress, oneof: "value" }, + { no: 3, name: "databases", kind: "message", T: MetadataDatabases, oneof: "value" }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): Metadata { @@ -840,6 +903,49 @@ export class MetadataCalls extends Message { } } +/** + * @generated from message xyz.block.ftl.v1.schema.MetadataDatabases + */ +export class MetadataDatabases extends Message { + /** + * @generated from field: optional xyz.block.ftl.v1.schema.Position pos = 1; + */ + pos?: Position; + + /** + * @generated from field: repeated xyz.block.ftl.v1.schema.Database calls = 2; + */ + calls: Database[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.schema.MetadataDatabases"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "pos", kind: "message", T: Position, opt: true }, + { no: 2, name: "calls", kind: "message", T: Database, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): MetadataDatabases { + return new MetadataDatabases().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): MetadataDatabases { + return new MetadataDatabases().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): MetadataDatabases { + return new MetadataDatabases().fromJsonString(jsonString, options); + } + + static equals(a: MetadataDatabases | PlainMessage | undefined, b: MetadataDatabases | PlainMessage | undefined): boolean { + return proto3.util.equals(MetadataDatabases, a, b); + } +} + /** * @generated from message xyz.block.ftl.v1.schema.MetadataIngress */ diff --git a/integration/integration_test.go b/integration/integration_test.go index c500897bf6..113c6a9159 100644 --- a/integration/integration_test.go +++ b/integration/integration_test.go @@ -5,7 +5,9 @@ package integration import ( "bytes" "context" + "database/sql" "encoding/json" + "errors" "fmt" "os" "path/filepath" @@ -14,10 +16,10 @@ import ( "testing" "time" - "errors" - "connectrpc.com/connect" "github.com/alecthomas/assert/v2" + _ "github.com/amacneil/dbmate/v2/pkg/driver/postgres" + _ "github.com/jackc/pgx/v5/stdlib" // SQL driver "golang.org/x/exp/maps" "github.com/TBD54566975/ftl/backend/common/exec" @@ -26,6 +28,7 @@ import ( ftlv1 "github.com/TBD54566975/ftl/protos/xyz/block/ftl/v1" "github.com/TBD54566975/ftl/protos/xyz/block/ftl/v1/ftlv1connect" schemapb "github.com/TBD54566975/ftl/protos/xyz/block/ftl/v1/schema" + "github.com/TBD54566975/scaffolder" ) const integrationTestTimeout = time.Second * 60 @@ -90,6 +93,12 @@ func TestIntegration(t *testing.T) { assert.True(t, regexp.MustCompile(`^Hello, Alice!`).MatchString(message), "%q does not match %q", message, `^Hello, Alice!`) }), }}, + {name: "UseKotlinDbConn", assertions: assertions{ + setUpModuleDb(filepath.Join(modulesDir, "ftl-module-echo3")), + run(".", "ftl", "deploy", filepath.Join(modulesDir, "ftl-module-echo3")), + call("dbtest", "create", obj{"data": "Hello"}, func(t testing.TB, resp obj) {}), + validateModuleDb(), + }}, {name: "SchemaGenerateJS", assertions: assertions{ run(".", "ftl", "schema", "generate", "integration/testdata/schema-generate", "build/schema-generate"), filesExist(file{"build/schema-generate/test.txt", "olleh"}), @@ -221,6 +230,71 @@ func call[Resp any](module, verb string, req obj, onResponse func(t testing.TB, } } +func setUpModuleDb(dir string) assertion { + os.Setenv("FTL_POSTGRES_DSN_dbtest_testdb", "postgres://postgres:secret@localhost:54320/testdb?sslmode=disable") + return func(t testing.TB, ic itContext) error { + db, err := sql.Open("pgx", "postgres://postgres:secret@localhost:54320/ftl?sslmode=disable") + assert.NoError(t, err) + t.Cleanup(func() { + err := db.Close() + if err != nil { + t.Fatal(err) + } + }) + + err = db.Ping() + assert.NoError(t, err) + + var exists bool + query := `SELECT EXISTS(SELECT datname FROM pg_catalog.pg_database WHERE datname = $1);` + err = db.QueryRow(query, "testdb").Scan(&exists) + assert.NoError(t, err) + if !exists { + db.Exec("CREATE DATABASE testdb;") + } + + // add DbTest.kt with a new verb that uses the db + err = scaffolder.Scaffold( + filepath.Join(ic.rootDir, "integration/testdata/database"), + filepath.Join(dir, "src/main/kotlin/ftl/dbtest"), + ic, + ) + assert.NoError(t, err) + + return nil + } +} + +func validateModuleDb() assertion { + return func(t testing.TB, ic itContext) error { + db, err := sql.Open("pgx", "postgres://postgres:secret@localhost:54320/testdb?sslmode=disable") + assert.NoError(t, err) + t.Cleanup(func() { + err := db.Close() + if err != nil { + t.Fatal(err) + } + }) + + err = db.Ping() + assert.NoError(t, err) + + rows, err := db.Query("SELECT data FROM requests") + assert.NoError(t, err) + + for rows.Next() { + var data string + err := rows.Scan(&data) + assert.NoError(t, err) + if data == "Hello" { + return nil + } + } + + return errors.New("data not found") + } +} + type itContext struct { context.Context tmpDir string diff --git a/integration/testdata/database/DbTest.kt b/integration/testdata/database/DbTest.kt new file mode 100644 index 0000000000..cc074307e5 --- /dev/null +++ b/integration/testdata/database/DbTest.kt @@ -0,0 +1,35 @@ +package ftl.dbtest + +import xyz.block.ftl.Context +import xyz.block.ftl.Verb +import xyz.block.ftl.Database + +data class DbRequest(val data: String?) +data class DbResponse(val message: String? = "ok") + +val db = Database("testdb") + +class DbTest { + @Verb + fun create(context: Context, req: DbRequest): DbResponse { + persistRequest(req) + return DbResponse() + } + + fun persistRequest(req: DbRequest) { + db.conn { + it.prepareStatement( + """ + CREATE TABLE IF NOT EXISTS requests + ( + data TEXT, + created_at TIMESTAMPTZ NOT NULL DEFAULT (NOW() AT TIME ZONE 'utc'), + updated_at TIMESTAMPTZ NOT NULL DEFAULT (NOW() AT TIME ZONE 'utc') + ); + """ + ).execute() + it.prepareStatement("INSERT INTO requests (data) VALUES ('${req.data}');") + .execute() + } + } +} diff --git a/kotlin-runtime/ftl-runtime/src/main/kotlin/xyz/block/ftl/Database.kt b/kotlin-runtime/ftl-runtime/src/main/kotlin/xyz/block/ftl/Database.kt new file mode 100644 index 0000000000..185272d55b --- /dev/null +++ b/kotlin-runtime/ftl-runtime/src/main/kotlin/xyz/block/ftl/Database.kt @@ -0,0 +1,63 @@ +package xyz.block.ftl + +import xyz.block.ftl.logging.Logging +import java.net.URI +import java.sql.Connection +import java.sql.DriverManager + +private const val FTL_DSN_VAR_PREFIX = "FTL_POSTGRES_DSN" + +/** + * `Database` is a simple wrapper around the JDBC driver manager that provides a connection to the database specified + * by the FTL_POSTGRES_DSN__ environment variable. + */ +class Database(private val name: String) { + private val logger = Logging.logger(Database::class) + private val moduleName: String = Thread.currentThread().stackTrace[2]?.let { + val components = it.className.split(".") + require(components.first() == "ftl") { + "Expected Database to be declared in package ftl., but was $it" + } + + return@let components[1] + } ?: throw IllegalStateException("Could not determine module name from Database declaration") + + fun conn(block: (c: Connection) -> R): R { + return try { + val envVar = listOf(FTL_DSN_VAR_PREFIX, moduleName, name).joinToString("_") + val dsn = System.getenv(envVar) + require(dsn != null) { "$envVar environment variable not set" } + + DriverManager.getConnection(dsnToJdbcUrl(dsn)).use { + block(it) + } + } catch (e: Exception) { + logger.error("Could not connect to database", e) + throw e + } + } + + private fun dsnToJdbcUrl(dsn: String): String { + val uri = URI(dsn) + val scheme = uri.scheme ?: throw IllegalArgumentException("Missing scheme in DSN.") + val userInfo = uri.userInfo?.split(":") ?: throw IllegalArgumentException("Missing userInfo in DSN.") + val user = userInfo.firstOrNull() ?: throw IllegalArgumentException("Missing user in userInfo.") + val password = if (userInfo.size > 1) userInfo[1] else "" + val host = uri.host ?: throw IllegalArgumentException("Missing host in DSN.") + val port = if (uri.port != -1) uri.port.toString() else throw IllegalArgumentException("Missing port in DSN.") + val database = uri.path.trimStart('/') + val parameters = uri.query?.replace("&", "?") ?: "" + + val jdbcScheme = when (scheme) { + "postgres" -> "jdbc:postgresql" + else -> throw IllegalArgumentException("Unsupported scheme: $scheme") + } + + val jdbcUrl = "$jdbcScheme://$host:$port/$database?$parameters" + return if (user.isNotBlank() && password.isNotBlank()) { + "$jdbcUrl&user=$user&password=$password" + } else { + jdbcUrl + } + } +} diff --git a/kotlin-runtime/ftl-runtime/src/main/kotlin/xyz/block/ftl/schemaextractor/ExtractSchemaRule.kt b/kotlin-runtime/ftl-runtime/src/main/kotlin/xyz/block/ftl/schemaextractor/ExtractSchemaRule.kt index 9429992eb4..f3130587c4 100644 --- a/kotlin-runtime/ftl-runtime/src/main/kotlin/xyz/block/ftl/schemaextractor/ExtractSchemaRule.kt +++ b/kotlin-runtime/ftl-runtime/src/main/kotlin/xyz/block/ftl/schemaextractor/ExtractSchemaRule.kt @@ -3,9 +3,11 @@ package xyz.block.ftl.schemaextractor import io.gitlab.arturbosch.detekt.api.* import io.gitlab.arturbosch.detekt.api.internal.RequiresTypeResolution import io.gitlab.arturbosch.detekt.rules.fqNameOrNull +import org.jetbrains.kotlin.cfg.getDeclarationDescriptorIncludingConstructors import org.jetbrains.kotlin.cfg.getElementParentDeclaration import org.jetbrains.kotlin.com.intellij.psi.PsiElement import org.jetbrains.kotlin.descriptors.ClassDescriptor +import org.jetbrains.kotlin.descriptors.impl.referencedProperty import org.jetbrains.kotlin.diagnostics.DiagnosticUtils.getLineAndColumnInPsiFile import org.jetbrains.kotlin.diagnostics.PsiDiagnosticUtils.LineAndColumn import org.jetbrains.kotlin.js.descriptorUtils.getKotlinTypeFqName @@ -23,6 +25,7 @@ import org.jetbrains.kotlin.types.typeUtil.requiresTypeAliasExpansion import org.jetbrains.kotlin.utils.addToStdlib.ifNotEmpty import xyz.block.ftl.* import xyz.block.ftl.Context +import xyz.block.ftl.Database import xyz.block.ftl.v1.schema.* import xyz.block.ftl.v1.schema.Array import xyz.block.ftl.v1.schema.Verb @@ -186,7 +189,11 @@ class SchemaExtractor( ) val moduleData = ModuleData( - decls = mutableSetOf(Decl(verb = verb), *extractDataDeclarations().toTypedArray()), + decls = mutableSetOf( + Decl(verb = verb), + *extractDataDeclarations().toTypedArray(), + *extractDatabases().toTypedArray(), + ), comments = module.comments() ) modules[currentModuleName]?.decls?.addAll(moduleData.decls) ?: run { @@ -194,6 +201,33 @@ class SchemaExtractor( } } + private fun extractDatabases(): Set { + return verb.containingKtFile.declarations + .filter { + (it as? KtProperty) + ?.getDeclarationDescriptorIncludingConstructors(bindingContext)?.referencedProperty?.returnType + ?.fqNameOrNull()?.asString() == Database::class.qualifiedName + } + .flatMap { it.children.asSequence() } + .map { + val sourcePos = it.getLineAndColumn() + val dbName = (it as? KtCallExpression).getResolvedCall(bindingContext)?.valueArguments?.entries?.single { e -> + e.key.name.asString() == "name" + } + ?.value?.toString() + ?.trim('"') + requireNotNull(dbName) { "$sourcePos $dbName Could not extract database name" } + + Decl( + database = xyz.block.ftl.v1.schema.Database( + pos = sourcePos.toPosition(verb.containingKtFile.name), + name = dbName + ) + ) + } + .toSet() + } + private fun extractDataDeclarations(): Set { return verb.containingKtFile.children .filter { (it is KtClass && it.isData()) || it is KtTypeAlias } diff --git a/kotlin-runtime/scaffolding/pom.xml b/kotlin-runtime/scaffolding/pom.xml index ea1f5fe2cb..a5a0a61720 100644 --- a/kotlin-runtime/scaffolding/pom.xml +++ b/kotlin-runtime/scaffolding/pom.xml @@ -35,6 +35,11 @@ ftl-runtime ${ftl.version} + + org.postgresql + postgresql + 42.7.1 + diff --git a/protos/xyz/block/ftl/v1/schema/schema.pb.go b/protos/xyz/block/ftl/v1/schema/schema.pb.go index 003d510680..55a91fdc92 100644 --- a/protos/xyz/block/ftl/v1/schema/schema.pb.go +++ b/protos/xyz/block/ftl/v1/schema/schema.pb.go @@ -502,6 +502,69 @@ func (x *Data) GetComments() []string { return nil } +type Database struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Pos *Position `protobuf:"bytes,1,opt,name=pos,proto3,oneof" json:"pos,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Comments []string `protobuf:"bytes,3,rep,name=comments,proto3" json:"comments,omitempty"` +} + +func (x *Database) Reset() { + *x = Database{} + if protoimpl.UnsafeEnabled { + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Database) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Database) ProtoMessage() {} + +func (x *Database) ProtoReflect() protoreflect.Message { + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[8] + 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) +} + +// Deprecated: Use Database.ProtoReflect.Descriptor instead. +func (*Database) Descriptor() ([]byte, []int) { + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{8} +} + +func (x *Database) GetPos() *Position { + if x != nil { + return x.Pos + } + return nil +} + +func (x *Database) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Database) GetComments() []string { + if x != nil { + return x.Comments + } + return nil +} + type Decl struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -511,13 +574,14 @@ type Decl struct { // // *Decl_Data // *Decl_Verb + // *Decl_Database Value isDecl_Value `protobuf_oneof:"value"` } func (x *Decl) Reset() { *x = Decl{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[8] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -530,7 +594,7 @@ func (x *Decl) String() string { func (*Decl) ProtoMessage() {} func (x *Decl) ProtoReflect() protoreflect.Message { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[8] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -543,7 +607,7 @@ func (x *Decl) ProtoReflect() protoreflect.Message { // Deprecated: Use Decl.ProtoReflect.Descriptor instead. func (*Decl) Descriptor() ([]byte, []int) { - return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{8} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{9} } func (m *Decl) GetValue() isDecl_Value { @@ -567,6 +631,13 @@ func (x *Decl) GetVerb() *Verb { return nil } +func (x *Decl) GetDatabase() *Database { + if x, ok := x.GetValue().(*Decl_Database); ok { + return x.Database + } + return nil +} + type isDecl_Value interface { isDecl_Value() } @@ -579,10 +650,16 @@ type Decl_Verb struct { Verb *Verb `protobuf:"bytes,2,opt,name=verb,proto3,oneof"` } +type Decl_Database struct { + Database *Database `protobuf:"bytes,3,opt,name=database,proto3,oneof"` +} + func (*Decl_Data) isDecl_Value() {} func (*Decl_Verb) isDecl_Value() {} +func (*Decl_Database) isDecl_Value() {} + type Field struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -597,7 +674,7 @@ type Field struct { func (x *Field) Reset() { *x = Field{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[9] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -610,7 +687,7 @@ func (x *Field) String() string { func (*Field) ProtoMessage() {} func (x *Field) ProtoReflect() protoreflect.Message { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[9] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -623,7 +700,7 @@ func (x *Field) ProtoReflect() protoreflect.Message { // Deprecated: Use Field.ProtoReflect.Descriptor instead. func (*Field) Descriptor() ([]byte, []int) { - return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{9} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{10} } func (x *Field) GetPos() *Position { @@ -665,7 +742,7 @@ type Float struct { func (x *Float) Reset() { *x = Float{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[10] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -678,7 +755,7 @@ func (x *Float) String() string { func (*Float) ProtoMessage() {} func (x *Float) ProtoReflect() protoreflect.Message { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[10] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -691,7 +768,7 @@ func (x *Float) ProtoReflect() protoreflect.Message { // Deprecated: Use Float.ProtoReflect.Descriptor instead. func (*Float) Descriptor() ([]byte, []int) { - return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{10} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{11} } func (x *Float) GetPos() *Position { @@ -716,7 +793,7 @@ type IngressPathComponent struct { func (x *IngressPathComponent) Reset() { *x = IngressPathComponent{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[11] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -729,7 +806,7 @@ func (x *IngressPathComponent) String() string { func (*IngressPathComponent) ProtoMessage() {} func (x *IngressPathComponent) ProtoReflect() protoreflect.Message { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[11] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -742,7 +819,7 @@ func (x *IngressPathComponent) ProtoReflect() protoreflect.Message { // Deprecated: Use IngressPathComponent.ProtoReflect.Descriptor instead. func (*IngressPathComponent) Descriptor() ([]byte, []int) { - return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{11} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{12} } func (m *IngressPathComponent) GetValue() isIngressPathComponent_Value { @@ -794,7 +871,7 @@ type IngressPathLiteral struct { func (x *IngressPathLiteral) Reset() { *x = IngressPathLiteral{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[12] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -807,7 +884,7 @@ func (x *IngressPathLiteral) String() string { func (*IngressPathLiteral) ProtoMessage() {} func (x *IngressPathLiteral) ProtoReflect() protoreflect.Message { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[12] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -820,7 +897,7 @@ func (x *IngressPathLiteral) ProtoReflect() protoreflect.Message { // Deprecated: Use IngressPathLiteral.ProtoReflect.Descriptor instead. func (*IngressPathLiteral) Descriptor() ([]byte, []int) { - return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{12} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{13} } func (x *IngressPathLiteral) GetPos() *Position { @@ -849,7 +926,7 @@ type IngressPathParameter struct { func (x *IngressPathParameter) Reset() { *x = IngressPathParameter{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[13] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -862,7 +939,7 @@ func (x *IngressPathParameter) String() string { func (*IngressPathParameter) ProtoMessage() {} func (x *IngressPathParameter) ProtoReflect() protoreflect.Message { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[13] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -875,7 +952,7 @@ func (x *IngressPathParameter) ProtoReflect() protoreflect.Message { // Deprecated: Use IngressPathParameter.ProtoReflect.Descriptor instead. func (*IngressPathParameter) Descriptor() ([]byte, []int) { - return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{13} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{14} } func (x *IngressPathParameter) GetPos() *Position { @@ -903,7 +980,7 @@ type Int struct { func (x *Int) Reset() { *x = Int{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[14] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -916,7 +993,7 @@ func (x *Int) String() string { func (*Int) ProtoMessage() {} func (x *Int) ProtoReflect() protoreflect.Message { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[14] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -929,7 +1006,7 @@ func (x *Int) ProtoReflect() protoreflect.Message { // Deprecated: Use Int.ProtoReflect.Descriptor instead. func (*Int) Descriptor() ([]byte, []int) { - return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{14} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{15} } func (x *Int) GetPos() *Position { @@ -952,7 +1029,7 @@ type Map struct { func (x *Map) Reset() { *x = Map{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[15] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -965,7 +1042,7 @@ func (x *Map) String() string { func (*Map) ProtoMessage() {} func (x *Map) ProtoReflect() protoreflect.Message { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[15] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -978,7 +1055,7 @@ func (x *Map) ProtoReflect() protoreflect.Message { // Deprecated: Use Map.ProtoReflect.Descriptor instead. func (*Map) Descriptor() ([]byte, []int) { - return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{15} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{16} } func (x *Map) GetPos() *Position { @@ -1011,13 +1088,14 @@ type Metadata struct { // // *Metadata_Calls // *Metadata_Ingress + // *Metadata_Databases Value isMetadata_Value `protobuf_oneof:"value"` } func (x *Metadata) Reset() { *x = Metadata{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[16] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1030,7 +1108,7 @@ func (x *Metadata) String() string { func (*Metadata) ProtoMessage() {} func (x *Metadata) ProtoReflect() protoreflect.Message { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[16] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1043,7 +1121,7 @@ func (x *Metadata) ProtoReflect() protoreflect.Message { // Deprecated: Use Metadata.ProtoReflect.Descriptor instead. func (*Metadata) Descriptor() ([]byte, []int) { - return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{16} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{17} } func (m *Metadata) GetValue() isMetadata_Value { @@ -1067,6 +1145,13 @@ func (x *Metadata) GetIngress() *MetadataIngress { return nil } +func (x *Metadata) GetDatabases() *MetadataDatabases { + if x, ok := x.GetValue().(*Metadata_Databases); ok { + return x.Databases + } + return nil +} + type isMetadata_Value interface { isMetadata_Value() } @@ -1079,10 +1164,16 @@ type Metadata_Ingress struct { Ingress *MetadataIngress `protobuf:"bytes,2,opt,name=ingress,proto3,oneof"` } +type Metadata_Databases struct { + Databases *MetadataDatabases `protobuf:"bytes,3,opt,name=databases,proto3,oneof"` +} + func (*Metadata_Calls) isMetadata_Value() {} func (*Metadata_Ingress) isMetadata_Value() {} +func (*Metadata_Databases) isMetadata_Value() {} + type MetadataCalls struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1095,7 +1186,7 @@ type MetadataCalls struct { func (x *MetadataCalls) Reset() { *x = MetadataCalls{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[17] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1108,7 +1199,7 @@ func (x *MetadataCalls) String() string { func (*MetadataCalls) ProtoMessage() {} func (x *MetadataCalls) ProtoReflect() protoreflect.Message { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[17] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1121,7 +1212,7 @@ func (x *MetadataCalls) ProtoReflect() protoreflect.Message { // Deprecated: Use MetadataCalls.ProtoReflect.Descriptor instead. func (*MetadataCalls) Descriptor() ([]byte, []int) { - return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{17} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{18} } func (x *MetadataCalls) GetPos() *Position { @@ -1138,6 +1229,61 @@ func (x *MetadataCalls) GetCalls() []*VerbRef { return nil } +type MetadataDatabases struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Pos *Position `protobuf:"bytes,1,opt,name=pos,proto3,oneof" json:"pos,omitempty"` + Calls []*Database `protobuf:"bytes,2,rep,name=calls,proto3" json:"calls,omitempty"` +} + +func (x *MetadataDatabases) Reset() { + *x = MetadataDatabases{} + if protoimpl.UnsafeEnabled { + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MetadataDatabases) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MetadataDatabases) ProtoMessage() {} + +func (x *MetadataDatabases) ProtoReflect() protoreflect.Message { + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[19] + 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) +} + +// Deprecated: Use MetadataDatabases.ProtoReflect.Descriptor instead. +func (*MetadataDatabases) Descriptor() ([]byte, []int) { + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{19} +} + +func (x *MetadataDatabases) GetPos() *Position { + if x != nil { + return x.Pos + } + return nil +} + +func (x *MetadataDatabases) GetCalls() []*Database { + if x != nil { + return x.Calls + } + return nil +} + type MetadataIngress struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1152,7 +1298,7 @@ type MetadataIngress struct { func (x *MetadataIngress) Reset() { *x = MetadataIngress{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[18] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1165,7 +1311,7 @@ func (x *MetadataIngress) String() string { func (*MetadataIngress) ProtoMessage() {} func (x *MetadataIngress) ProtoReflect() protoreflect.Message { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[18] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1178,7 +1324,7 @@ func (x *MetadataIngress) ProtoReflect() protoreflect.Message { // Deprecated: Use MetadataIngress.ProtoReflect.Descriptor instead. func (*MetadataIngress) Descriptor() ([]byte, []int) { - return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{18} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{20} } func (x *MetadataIngress) GetPos() *Position { @@ -1225,7 +1371,7 @@ type Module struct { func (x *Module) Reset() { *x = Module{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[19] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1238,7 +1384,7 @@ func (x *Module) String() string { func (*Module) ProtoMessage() {} func (x *Module) ProtoReflect() protoreflect.Message { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[19] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1251,7 +1397,7 @@ func (x *Module) ProtoReflect() protoreflect.Message { // Deprecated: Use Module.ProtoReflect.Descriptor instead. func (*Module) Descriptor() ([]byte, []int) { - return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{19} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{21} } func (x *Module) GetRuntime() *ModuleRuntime { @@ -1308,7 +1454,7 @@ type Optional struct { func (x *Optional) Reset() { *x = Optional{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[20] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1321,7 +1467,7 @@ func (x *Optional) String() string { func (*Optional) ProtoMessage() {} func (x *Optional) ProtoReflect() protoreflect.Message { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[20] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1334,7 +1480,7 @@ func (x *Optional) ProtoReflect() protoreflect.Message { // Deprecated: Use Optional.ProtoReflect.Descriptor instead. func (*Optional) Descriptor() ([]byte, []int) { - return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{20} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{22} } func (x *Optional) GetPos() *Position { @@ -1364,7 +1510,7 @@ type Position struct { func (x *Position) Reset() { *x = Position{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[21] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1377,7 +1523,7 @@ func (x *Position) String() string { func (*Position) ProtoMessage() {} func (x *Position) ProtoReflect() protoreflect.Message { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[21] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1390,7 +1536,7 @@ func (x *Position) ProtoReflect() protoreflect.Message { // Deprecated: Use Position.ProtoReflect.Descriptor instead. func (*Position) Descriptor() ([]byte, []int) { - return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{21} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{23} } func (x *Position) GetFilename() string { @@ -1426,7 +1572,7 @@ type Schema struct { func (x *Schema) Reset() { *x = Schema{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[22] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1439,7 +1585,7 @@ func (x *Schema) String() string { func (*Schema) ProtoMessage() {} func (x *Schema) ProtoReflect() protoreflect.Message { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[22] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1452,7 +1598,7 @@ func (x *Schema) ProtoReflect() protoreflect.Message { // Deprecated: Use Schema.ProtoReflect.Descriptor instead. func (*Schema) Descriptor() ([]byte, []int) { - return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{22} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{24} } func (x *Schema) GetPos() *Position { @@ -1480,7 +1626,7 @@ type String struct { func (x *String) Reset() { *x = String{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[23] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1493,7 +1639,7 @@ func (x *String) String() string { func (*String) ProtoMessage() {} func (x *String) ProtoReflect() protoreflect.Message { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[23] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1506,7 +1652,7 @@ func (x *String) ProtoReflect() protoreflect.Message { // Deprecated: Use String.ProtoReflect.Descriptor instead. func (*String) Descriptor() ([]byte, []int) { - return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{23} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{25} } func (x *String) GetPos() *Position { @@ -1527,7 +1673,7 @@ type Time struct { func (x *Time) Reset() { *x = Time{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[24] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1540,7 +1686,7 @@ func (x *Time) String() string { func (*Time) ProtoMessage() {} func (x *Time) ProtoReflect() protoreflect.Message { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[24] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1553,7 +1699,7 @@ func (x *Time) ProtoReflect() protoreflect.Message { // Deprecated: Use Time.ProtoReflect.Descriptor instead. func (*Time) Descriptor() ([]byte, []int) { - return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{24} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{26} } func (x *Time) GetPos() *Position { @@ -1587,7 +1733,7 @@ type Type struct { func (x *Type) Reset() { *x = Type{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[25] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1600,7 +1746,7 @@ func (x *Type) String() string { func (*Type) ProtoMessage() {} func (x *Type) ProtoReflect() protoreflect.Message { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[25] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1613,7 +1759,7 @@ func (x *Type) ProtoReflect() protoreflect.Message { // Deprecated: Use Type.ProtoReflect.Descriptor instead. func (*Type) Descriptor() ([]byte, []int) { - return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{25} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{27} } func (m *Type) GetValue() isType_Value { @@ -1781,7 +1927,7 @@ type Unit struct { func (x *Unit) Reset() { *x = Unit{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[26] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1794,7 +1940,7 @@ func (x *Unit) String() string { func (*Unit) ProtoMessage() {} func (x *Unit) ProtoReflect() protoreflect.Message { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[26] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1807,7 +1953,7 @@ func (x *Unit) ProtoReflect() protoreflect.Message { // Deprecated: Use Unit.ProtoReflect.Descriptor instead. func (*Unit) Descriptor() ([]byte, []int) { - return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{26} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{28} } func (x *Unit) GetPos() *Position { @@ -1834,7 +1980,7 @@ type Verb struct { func (x *Verb) Reset() { *x = Verb{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[27] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1847,7 +1993,7 @@ func (x *Verb) String() string { func (*Verb) ProtoMessage() {} func (x *Verb) ProtoReflect() protoreflect.Message { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[27] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1860,7 +2006,7 @@ func (x *Verb) ProtoReflect() protoreflect.Message { // Deprecated: Use Verb.ProtoReflect.Descriptor instead. func (*Verb) Descriptor() ([]byte, []int) { - return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{27} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{29} } func (x *Verb) GetRuntime() *VerbRuntime { @@ -1984,14 +2130,26 @@ var file_xyz_block_ftl_v1_schema_schema_proto_rawDesc = []byte{ 0x61, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x6f, 0x73, 0x22, 0x79, 0x0a, 0x04, 0x44, 0x65, 0x63, 0x6c, - 0x12, 0x33, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, - 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, - 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x33, 0x0a, 0x04, 0x76, 0x65, 0x72, 0x62, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, - 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x56, 0x65, - 0x72, 0x62, 0x48, 0x00, 0x52, 0x04, 0x76, 0x65, 0x72, 0x62, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, + 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x6f, 0x73, 0x22, 0x7c, 0x0a, 0x08, 0x44, 0x61, 0x74, 0x61, + 0x62, 0x61, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, + 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x50, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x88, 0x01, 0x01, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x06, + 0x0a, 0x04, 0x5f, 0x70, 0x6f, 0x73, 0x22, 0xba, 0x01, 0x0a, 0x04, 0x44, 0x65, 0x63, 0x6c, 0x12, + 0x33, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, + 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, + 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x33, 0x0a, 0x04, 0x76, 0x65, 0x72, 0x62, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, + 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x56, 0x65, 0x72, + 0x62, 0x48, 0x00, 0x52, 0x04, 0x76, 0x65, 0x72, 0x62, 0x12, 0x3f, 0x0a, 0x08, 0x64, 0x61, 0x74, + 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x79, + 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x48, 0x00, + 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xac, 0x01, 0x0a, 0x05, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x38, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, @@ -2051,7 +2209,7 @@ var file_xyz_block_ftl_v1_schema_schema_proto_rawDesc = []byte{ 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x06, - 0x0a, 0x04, 0x5f, 0x70, 0x6f, 0x73, 0x22, 0x99, 0x01, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x0a, 0x04, 0x5f, 0x70, 0x6f, 0x73, 0x22, 0xe5, 0x01, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3e, 0x0a, 0x05, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4d, 0x65, 0x74, @@ -2060,152 +2218,166 @@ var file_xyz_block_ftl_v1_schema_schema_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, - 0x52, 0x07, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x22, 0x89, 0x01, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x43, - 0x61, 0x6c, 0x6c, 0x73, 0x12, 0x38, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x52, 0x07, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4a, 0x0a, 0x09, 0x64, 0x61, 0x74, + 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x78, + 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x44, + 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x48, 0x00, 0x52, 0x09, 0x64, 0x61, 0x74, 0x61, + 0x62, 0x61, 0x73, 0x65, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x89, + 0x01, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x43, 0x61, 0x6c, 0x6c, 0x73, + 0x12, 0x38, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, + 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x48, 0x00, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x05, 0x63, 0x61, + 0x6c, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x78, 0x79, 0x7a, 0x2e, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x2e, 0x56, 0x65, 0x72, 0x62, 0x52, 0x65, 0x66, 0x52, 0x05, 0x63, 0x61, 0x6c, + 0x6c, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x6f, 0x73, 0x22, 0x8e, 0x01, 0x0a, 0x11, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, + 0x12, 0x38, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, + 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x48, 0x00, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x05, 0x63, 0x61, + 0x6c, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x79, 0x7a, 0x2e, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x05, 0x63, 0x61, + 0x6c, 0x6c, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x6f, 0x73, 0x22, 0xc2, 0x01, 0x0a, 0x0f, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x38, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, + 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, + 0x00, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x88, 0x01, 0x01, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, + 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x41, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, + 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x49, 0x6e, + 0x67, 0x72, 0x65, 0x73, 0x73, 0x50, 0x61, 0x74, 0x68, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x6f, 0x73, + 0x22, 0x9e, 0x02, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x47, 0x0a, 0x07, 0x72, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x92, 0xf7, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, + 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, + 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x48, 0x00, 0x52, 0x07, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x50, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x88, 0x01, 0x01, 0x12, 0x36, - 0x0a, 0x05, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, - 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, - 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x56, 0x65, 0x72, 0x62, 0x52, 0x65, 0x66, 0x52, - 0x05, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x6f, 0x73, 0x22, 0xc2, - 0x01, 0x0a, 0x0f, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x49, 0x6e, 0x67, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x38, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x21, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, - 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x88, 0x01, 0x01, 0x12, 0x12, 0x0a, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x41, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, + 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x01, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x88, 0x01, 0x01, 0x12, 0x1a, + 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x75, + 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x62, 0x75, 0x69, + 0x6c, 0x74, 0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x05, 0x64, 0x65, 0x63, 0x6c, + 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x52, 0x05, 0x64, 0x65, 0x63, 0x6c, 0x73, 0x42, 0x0a, 0x0a, + 0x08, 0x5f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x6f, + 0x73, 0x22, 0x8d, 0x01, 0x0a, 0x08, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x12, 0x38, + 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x79, + 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, + 0x52, 0x03, 0x70, 0x6f, 0x73, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x2e, 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x50, 0x61, 0x74, 0x68, 0x43, 0x6f, 0x6d, 0x70, - 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x42, 0x06, 0x0a, 0x04, 0x5f, - 0x70, 0x6f, 0x73, 0x22, 0x9e, 0x02, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x47, - 0x0a, 0x07, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x92, 0xf7, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x26, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, - 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4d, 0x6f, 0x64, 0x75, - 0x6c, 0x65, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x48, 0x00, 0x52, 0x07, 0x72, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x01, + 0x2e, 0x54, 0x79, 0x70, 0x65, 0x48, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, + 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x6f, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x22, 0x52, 0x0a, 0x08, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, + 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, + 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x22, 0x85, 0x01, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x12, 0x38, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, + 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x48, 0x00, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x88, 0x01, 0x01, 0x12, 0x39, 0x0a, 0x07, 0x6d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x78, 0x79, + 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x07, 0x6d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x6f, 0x73, 0x22, 0x4a, 0x0a, + 0x06, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x50, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x01, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x88, 0x01, - 0x01, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x18, 0x0a, - 0x07, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, - 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x05, 0x64, - 0x65, 0x63, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x78, 0x79, 0x7a, - 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x52, 0x05, 0x64, 0x65, 0x63, 0x6c, 0x73, - 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x06, 0x0a, 0x04, - 0x5f, 0x70, 0x6f, 0x73, 0x22, 0x8d, 0x01, 0x0a, 0x08, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, - 0x6c, 0x12, 0x38, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x88, 0x01, + 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x6f, 0x73, 0x22, 0x48, 0x0a, 0x04, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x38, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x48, 0x00, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, + 0x6e, 0x48, 0x00, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x88, 0x01, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, + 0x70, 0x6f, 0x73, 0x22, 0xf4, 0x04, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x30, 0x0a, 0x03, + 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x48, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x88, 0x01, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x6f, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x22, 0x52, 0x0a, 0x08, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, - 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x22, 0x85, 0x01, 0x0a, 0x06, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x12, 0x38, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x21, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, - 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x88, 0x01, 0x01, 0x12, 0x39, 0x0a, - 0x07, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, - 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, - 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, - 0x07, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x6f, 0x73, - 0x22, 0x4a, 0x0a, 0x06, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x03, 0x70, 0x6f, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, + 0x65, 0x6d, 0x61, 0x2e, 0x49, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x03, 0x69, 0x6e, 0x74, 0x12, 0x36, + 0x0a, 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, + 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x48, 0x00, 0x52, + 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x39, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x48, 0x00, 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x12, 0x36, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, + 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73, + 0x48, 0x00, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x04, 0x62, 0x6f, 0x6f, + 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x03, 0x70, 0x6f, - 0x73, 0x88, 0x01, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x6f, 0x73, 0x22, 0x48, 0x0a, 0x04, - 0x54, 0x69, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, - 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x50, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x88, 0x01, 0x01, 0x42, 0x06, - 0x0a, 0x04, 0x5f, 0x70, 0x6f, 0x73, 0x22, 0xf4, 0x04, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x30, 0x0a, 0x03, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, + 0x61, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x48, 0x00, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x12, 0x33, + 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x49, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x03, 0x69, 0x6e, - 0x74, 0x12, 0x36, 0x0a, 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1e, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, - 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x46, 0x6c, 0x6f, 0x61, 0x74, - 0x48, 0x00, 0x52, 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x39, 0x0a, 0x06, 0x73, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x78, 0x79, 0x7a, 0x2e, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x48, 0x00, 0x52, 0x04, 0x74, + 0x69, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x61, 0x72, 0x72, 0x61, 0x79, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, + 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x41, 0x72, 0x72, + 0x61, 0x79, 0x48, 0x00, 0x52, 0x05, 0x61, 0x72, 0x72, 0x61, 0x79, 0x12, 0x30, 0x0a, 0x03, 0x6d, + 0x61, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x2e, 0x4d, 0x61, 0x70, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x12, 0x3c, 0x0a, + 0x07, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x66, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, + 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, + 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x66, + 0x48, 0x00, 0x52, 0x07, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x66, 0x12, 0x33, 0x0a, 0x04, 0x75, + 0x6e, 0x69, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x48, 0x00, 0x52, 0x06, 0x73, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x12, 0x36, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, - 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x42, 0x79, - 0x74, 0x65, 0x73, 0x48, 0x00, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x04, - 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x78, 0x79, 0x7a, - 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x48, 0x00, 0x52, 0x04, 0x62, 0x6f, 0x6f, - 0x6c, 0x12, 0x33, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, - 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x48, 0x00, - 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x61, 0x72, 0x72, 0x61, 0x79, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, - 0x41, 0x72, 0x72, 0x61, 0x79, 0x48, 0x00, 0x52, 0x05, 0x61, 0x72, 0x72, 0x61, 0x79, 0x12, 0x30, - 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, 0x79, - 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4d, 0x61, 0x70, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, - 0x12, 0x3c, 0x0a, 0x07, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x66, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, - 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, - 0x52, 0x65, 0x66, 0x48, 0x00, 0x52, 0x07, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x66, 0x12, 0x33, - 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x78, - 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x55, 0x6e, 0x69, 0x74, 0x48, 0x00, 0x52, 0x04, 0x75, - 0x6e, 0x69, 0x74, 0x12, 0x3f, 0x0a, 0x08, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x08, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x61, 0x6c, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x48, 0x0a, - 0x04, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x38, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x65, 0x6d, 0x61, 0x2e, 0x55, 0x6e, 0x69, 0x74, 0x48, 0x00, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, + 0x12, 0x3f, 0x0a, 0x08, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, - 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x50, 0x6f, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x88, 0x01, 0x01, 0x42, - 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x6f, 0x73, 0x22, 0xfe, 0x02, 0x0a, 0x04, 0x56, 0x65, 0x72, 0x62, - 0x12, 0x45, 0x0a, 0x07, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x92, 0xf7, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, - 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x56, 0x65, - 0x72, 0x62, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x48, 0x00, 0x52, 0x07, 0x72, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x50, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x01, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x88, 0x01, - 0x01, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x12, 0x37, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, - 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x08, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x78, - 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x6f, 0x73, 0x42, 0x46, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x42, 0x44, 0x35, 0x34, 0x35, 0x36, - 0x36, 0x39, 0x37, 0x35, 0x2f, 0x66, 0x74, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, - 0x78, 0x79, 0x7a, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x66, 0x74, 0x6c, 0x2f, 0x76, 0x31, - 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x3b, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x70, 0x62, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x08, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, + 0x6c, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x48, 0x0a, 0x04, 0x55, 0x6e, + 0x69, 0x74, 0x12, 0x38, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x21, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, + 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x88, 0x01, 0x01, 0x42, 0x06, 0x0a, 0x04, + 0x5f, 0x70, 0x6f, 0x73, 0x22, 0xfe, 0x02, 0x0a, 0x04, 0x56, 0x65, 0x72, 0x62, 0x12, 0x45, 0x0a, + 0x07, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x92, 0xf7, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, + 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x56, 0x65, 0x72, 0x62, 0x52, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x48, 0x00, 0x52, 0x07, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, + 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x50, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x01, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x88, 0x01, 0x01, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x37, + 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, + 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x06, 0x0a, + 0x04, 0x5f, 0x70, 0x6f, 0x73, 0x42, 0x46, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x42, 0x44, 0x35, 0x34, 0x35, 0x36, 0x36, 0x39, 0x37, + 0x35, 0x2f, 0x66, 0x74, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x78, 0x79, 0x7a, + 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x66, 0x74, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x3b, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x70, 0x62, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2220,7 +2392,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP() []byte { return file_xyz_block_ftl_v1_schema_schema_proto_rawDescData } -var file_xyz_block_ftl_v1_schema_schema_proto_msgTypes = make([]protoimpl.MessageInfo, 28) +var file_xyz_block_ftl_v1_schema_schema_proto_msgTypes = make([]protoimpl.MessageInfo, 30) var file_xyz_block_ftl_v1_schema_schema_proto_goTypes = []interface{}{ (*DataRef)(nil), // 0: xyz.block.ftl.v1.schema.DataRef (*SinkRef)(nil), // 1: xyz.block.ftl.v1.schema.SinkRef @@ -2230,91 +2402,98 @@ var file_xyz_block_ftl_v1_schema_schema_proto_goTypes = []interface{}{ (*Bool)(nil), // 5: xyz.block.ftl.v1.schema.Bool (*Bytes)(nil), // 6: xyz.block.ftl.v1.schema.Bytes (*Data)(nil), // 7: xyz.block.ftl.v1.schema.Data - (*Decl)(nil), // 8: xyz.block.ftl.v1.schema.Decl - (*Field)(nil), // 9: xyz.block.ftl.v1.schema.Field - (*Float)(nil), // 10: xyz.block.ftl.v1.schema.Float - (*IngressPathComponent)(nil), // 11: xyz.block.ftl.v1.schema.IngressPathComponent - (*IngressPathLiteral)(nil), // 12: xyz.block.ftl.v1.schema.IngressPathLiteral - (*IngressPathParameter)(nil), // 13: xyz.block.ftl.v1.schema.IngressPathParameter - (*Int)(nil), // 14: xyz.block.ftl.v1.schema.Int - (*Map)(nil), // 15: xyz.block.ftl.v1.schema.Map - (*Metadata)(nil), // 16: xyz.block.ftl.v1.schema.Metadata - (*MetadataCalls)(nil), // 17: xyz.block.ftl.v1.schema.MetadataCalls - (*MetadataIngress)(nil), // 18: xyz.block.ftl.v1.schema.MetadataIngress - (*Module)(nil), // 19: xyz.block.ftl.v1.schema.Module - (*Optional)(nil), // 20: xyz.block.ftl.v1.schema.Optional - (*Position)(nil), // 21: xyz.block.ftl.v1.schema.Position - (*Schema)(nil), // 22: xyz.block.ftl.v1.schema.Schema - (*String)(nil), // 23: xyz.block.ftl.v1.schema.String - (*Time)(nil), // 24: xyz.block.ftl.v1.schema.Time - (*Type)(nil), // 25: xyz.block.ftl.v1.schema.Type - (*Unit)(nil), // 26: xyz.block.ftl.v1.schema.Unit - (*Verb)(nil), // 27: xyz.block.ftl.v1.schema.Verb - (*ModuleRuntime)(nil), // 28: xyz.block.ftl.v1.schema.ModuleRuntime - (*VerbRuntime)(nil), // 29: xyz.block.ftl.v1.schema.VerbRuntime + (*Database)(nil), // 8: xyz.block.ftl.v1.schema.Database + (*Decl)(nil), // 9: xyz.block.ftl.v1.schema.Decl + (*Field)(nil), // 10: xyz.block.ftl.v1.schema.Field + (*Float)(nil), // 11: xyz.block.ftl.v1.schema.Float + (*IngressPathComponent)(nil), // 12: xyz.block.ftl.v1.schema.IngressPathComponent + (*IngressPathLiteral)(nil), // 13: xyz.block.ftl.v1.schema.IngressPathLiteral + (*IngressPathParameter)(nil), // 14: xyz.block.ftl.v1.schema.IngressPathParameter + (*Int)(nil), // 15: xyz.block.ftl.v1.schema.Int + (*Map)(nil), // 16: xyz.block.ftl.v1.schema.Map + (*Metadata)(nil), // 17: xyz.block.ftl.v1.schema.Metadata + (*MetadataCalls)(nil), // 18: xyz.block.ftl.v1.schema.MetadataCalls + (*MetadataDatabases)(nil), // 19: xyz.block.ftl.v1.schema.MetadataDatabases + (*MetadataIngress)(nil), // 20: xyz.block.ftl.v1.schema.MetadataIngress + (*Module)(nil), // 21: xyz.block.ftl.v1.schema.Module + (*Optional)(nil), // 22: xyz.block.ftl.v1.schema.Optional + (*Position)(nil), // 23: xyz.block.ftl.v1.schema.Position + (*Schema)(nil), // 24: xyz.block.ftl.v1.schema.Schema + (*String)(nil), // 25: xyz.block.ftl.v1.schema.String + (*Time)(nil), // 26: xyz.block.ftl.v1.schema.Time + (*Type)(nil), // 27: xyz.block.ftl.v1.schema.Type + (*Unit)(nil), // 28: xyz.block.ftl.v1.schema.Unit + (*Verb)(nil), // 29: xyz.block.ftl.v1.schema.Verb + (*ModuleRuntime)(nil), // 30: xyz.block.ftl.v1.schema.ModuleRuntime + (*VerbRuntime)(nil), // 31: xyz.block.ftl.v1.schema.VerbRuntime } var file_xyz_block_ftl_v1_schema_schema_proto_depIdxs = []int32{ - 21, // 0: xyz.block.ftl.v1.schema.DataRef.pos:type_name -> xyz.block.ftl.v1.schema.Position - 21, // 1: xyz.block.ftl.v1.schema.SinkRef.pos:type_name -> xyz.block.ftl.v1.schema.Position - 21, // 2: xyz.block.ftl.v1.schema.SourceRef.pos:type_name -> xyz.block.ftl.v1.schema.Position - 21, // 3: xyz.block.ftl.v1.schema.VerbRef.pos:type_name -> xyz.block.ftl.v1.schema.Position - 21, // 4: xyz.block.ftl.v1.schema.Array.pos:type_name -> xyz.block.ftl.v1.schema.Position - 25, // 5: xyz.block.ftl.v1.schema.Array.element:type_name -> xyz.block.ftl.v1.schema.Type - 21, // 6: xyz.block.ftl.v1.schema.Bool.pos:type_name -> xyz.block.ftl.v1.schema.Position - 21, // 7: xyz.block.ftl.v1.schema.Bytes.pos:type_name -> xyz.block.ftl.v1.schema.Position - 21, // 8: xyz.block.ftl.v1.schema.Data.pos:type_name -> xyz.block.ftl.v1.schema.Position - 9, // 9: xyz.block.ftl.v1.schema.Data.fields:type_name -> xyz.block.ftl.v1.schema.Field - 16, // 10: xyz.block.ftl.v1.schema.Data.metadata:type_name -> xyz.block.ftl.v1.schema.Metadata - 7, // 11: xyz.block.ftl.v1.schema.Decl.data:type_name -> xyz.block.ftl.v1.schema.Data - 27, // 12: xyz.block.ftl.v1.schema.Decl.verb:type_name -> xyz.block.ftl.v1.schema.Verb - 21, // 13: xyz.block.ftl.v1.schema.Field.pos:type_name -> xyz.block.ftl.v1.schema.Position - 25, // 14: xyz.block.ftl.v1.schema.Field.type:type_name -> xyz.block.ftl.v1.schema.Type - 21, // 15: xyz.block.ftl.v1.schema.Float.pos:type_name -> xyz.block.ftl.v1.schema.Position - 12, // 16: xyz.block.ftl.v1.schema.IngressPathComponent.ingressPathLiteral:type_name -> xyz.block.ftl.v1.schema.IngressPathLiteral - 13, // 17: xyz.block.ftl.v1.schema.IngressPathComponent.ingressPathParameter:type_name -> xyz.block.ftl.v1.schema.IngressPathParameter - 21, // 18: xyz.block.ftl.v1.schema.IngressPathLiteral.pos:type_name -> xyz.block.ftl.v1.schema.Position - 21, // 19: xyz.block.ftl.v1.schema.IngressPathParameter.pos:type_name -> xyz.block.ftl.v1.schema.Position - 21, // 20: xyz.block.ftl.v1.schema.Int.pos:type_name -> xyz.block.ftl.v1.schema.Position - 21, // 21: xyz.block.ftl.v1.schema.Map.pos:type_name -> xyz.block.ftl.v1.schema.Position - 25, // 22: xyz.block.ftl.v1.schema.Map.key:type_name -> xyz.block.ftl.v1.schema.Type - 25, // 23: xyz.block.ftl.v1.schema.Map.value:type_name -> xyz.block.ftl.v1.schema.Type - 17, // 24: xyz.block.ftl.v1.schema.Metadata.calls:type_name -> xyz.block.ftl.v1.schema.MetadataCalls - 18, // 25: xyz.block.ftl.v1.schema.Metadata.ingress:type_name -> xyz.block.ftl.v1.schema.MetadataIngress - 21, // 26: xyz.block.ftl.v1.schema.MetadataCalls.pos:type_name -> xyz.block.ftl.v1.schema.Position - 3, // 27: xyz.block.ftl.v1.schema.MetadataCalls.calls:type_name -> xyz.block.ftl.v1.schema.VerbRef - 21, // 28: xyz.block.ftl.v1.schema.MetadataIngress.pos:type_name -> xyz.block.ftl.v1.schema.Position - 11, // 29: xyz.block.ftl.v1.schema.MetadataIngress.path:type_name -> xyz.block.ftl.v1.schema.IngressPathComponent - 28, // 30: xyz.block.ftl.v1.schema.Module.runtime:type_name -> xyz.block.ftl.v1.schema.ModuleRuntime - 21, // 31: xyz.block.ftl.v1.schema.Module.pos:type_name -> xyz.block.ftl.v1.schema.Position - 8, // 32: xyz.block.ftl.v1.schema.Module.decls:type_name -> xyz.block.ftl.v1.schema.Decl - 21, // 33: xyz.block.ftl.v1.schema.Optional.pos:type_name -> xyz.block.ftl.v1.schema.Position - 25, // 34: xyz.block.ftl.v1.schema.Optional.type:type_name -> xyz.block.ftl.v1.schema.Type - 21, // 35: xyz.block.ftl.v1.schema.Schema.pos:type_name -> xyz.block.ftl.v1.schema.Position - 19, // 36: xyz.block.ftl.v1.schema.Schema.modules:type_name -> xyz.block.ftl.v1.schema.Module - 21, // 37: xyz.block.ftl.v1.schema.String.pos:type_name -> xyz.block.ftl.v1.schema.Position - 21, // 38: xyz.block.ftl.v1.schema.Time.pos:type_name -> xyz.block.ftl.v1.schema.Position - 14, // 39: xyz.block.ftl.v1.schema.Type.int:type_name -> xyz.block.ftl.v1.schema.Int - 10, // 40: xyz.block.ftl.v1.schema.Type.float:type_name -> xyz.block.ftl.v1.schema.Float - 23, // 41: xyz.block.ftl.v1.schema.Type.string:type_name -> xyz.block.ftl.v1.schema.String - 6, // 42: xyz.block.ftl.v1.schema.Type.bytes:type_name -> xyz.block.ftl.v1.schema.Bytes - 5, // 43: xyz.block.ftl.v1.schema.Type.bool:type_name -> xyz.block.ftl.v1.schema.Bool - 24, // 44: xyz.block.ftl.v1.schema.Type.time:type_name -> xyz.block.ftl.v1.schema.Time - 4, // 45: xyz.block.ftl.v1.schema.Type.array:type_name -> xyz.block.ftl.v1.schema.Array - 15, // 46: xyz.block.ftl.v1.schema.Type.map:type_name -> xyz.block.ftl.v1.schema.Map - 0, // 47: xyz.block.ftl.v1.schema.Type.dataRef:type_name -> xyz.block.ftl.v1.schema.DataRef - 26, // 48: xyz.block.ftl.v1.schema.Type.unit:type_name -> xyz.block.ftl.v1.schema.Unit - 20, // 49: xyz.block.ftl.v1.schema.Type.optional:type_name -> xyz.block.ftl.v1.schema.Optional - 21, // 50: xyz.block.ftl.v1.schema.Unit.pos:type_name -> xyz.block.ftl.v1.schema.Position - 29, // 51: xyz.block.ftl.v1.schema.Verb.runtime:type_name -> xyz.block.ftl.v1.schema.VerbRuntime - 21, // 52: xyz.block.ftl.v1.schema.Verb.pos:type_name -> xyz.block.ftl.v1.schema.Position - 25, // 53: xyz.block.ftl.v1.schema.Verb.request:type_name -> xyz.block.ftl.v1.schema.Type - 25, // 54: xyz.block.ftl.v1.schema.Verb.response:type_name -> xyz.block.ftl.v1.schema.Type - 16, // 55: xyz.block.ftl.v1.schema.Verb.metadata:type_name -> xyz.block.ftl.v1.schema.Metadata - 56, // [56:56] is the sub-list for method output_type - 56, // [56:56] is the sub-list for method input_type - 56, // [56:56] is the sub-list for extension type_name - 56, // [56:56] is the sub-list for extension extendee - 0, // [0:56] is the sub-list for field type_name + 23, // 0: xyz.block.ftl.v1.schema.DataRef.pos:type_name -> xyz.block.ftl.v1.schema.Position + 23, // 1: xyz.block.ftl.v1.schema.SinkRef.pos:type_name -> xyz.block.ftl.v1.schema.Position + 23, // 2: xyz.block.ftl.v1.schema.SourceRef.pos:type_name -> xyz.block.ftl.v1.schema.Position + 23, // 3: xyz.block.ftl.v1.schema.VerbRef.pos:type_name -> xyz.block.ftl.v1.schema.Position + 23, // 4: xyz.block.ftl.v1.schema.Array.pos:type_name -> xyz.block.ftl.v1.schema.Position + 27, // 5: xyz.block.ftl.v1.schema.Array.element:type_name -> xyz.block.ftl.v1.schema.Type + 23, // 6: xyz.block.ftl.v1.schema.Bool.pos:type_name -> xyz.block.ftl.v1.schema.Position + 23, // 7: xyz.block.ftl.v1.schema.Bytes.pos:type_name -> xyz.block.ftl.v1.schema.Position + 23, // 8: xyz.block.ftl.v1.schema.Data.pos:type_name -> xyz.block.ftl.v1.schema.Position + 10, // 9: xyz.block.ftl.v1.schema.Data.fields:type_name -> xyz.block.ftl.v1.schema.Field + 17, // 10: xyz.block.ftl.v1.schema.Data.metadata:type_name -> xyz.block.ftl.v1.schema.Metadata + 23, // 11: xyz.block.ftl.v1.schema.Database.pos:type_name -> xyz.block.ftl.v1.schema.Position + 7, // 12: xyz.block.ftl.v1.schema.Decl.data:type_name -> xyz.block.ftl.v1.schema.Data + 29, // 13: xyz.block.ftl.v1.schema.Decl.verb:type_name -> xyz.block.ftl.v1.schema.Verb + 8, // 14: xyz.block.ftl.v1.schema.Decl.database:type_name -> xyz.block.ftl.v1.schema.Database + 23, // 15: xyz.block.ftl.v1.schema.Field.pos:type_name -> xyz.block.ftl.v1.schema.Position + 27, // 16: xyz.block.ftl.v1.schema.Field.type:type_name -> xyz.block.ftl.v1.schema.Type + 23, // 17: xyz.block.ftl.v1.schema.Float.pos:type_name -> xyz.block.ftl.v1.schema.Position + 13, // 18: xyz.block.ftl.v1.schema.IngressPathComponent.ingressPathLiteral:type_name -> xyz.block.ftl.v1.schema.IngressPathLiteral + 14, // 19: xyz.block.ftl.v1.schema.IngressPathComponent.ingressPathParameter:type_name -> xyz.block.ftl.v1.schema.IngressPathParameter + 23, // 20: xyz.block.ftl.v1.schema.IngressPathLiteral.pos:type_name -> xyz.block.ftl.v1.schema.Position + 23, // 21: xyz.block.ftl.v1.schema.IngressPathParameter.pos:type_name -> xyz.block.ftl.v1.schema.Position + 23, // 22: xyz.block.ftl.v1.schema.Int.pos:type_name -> xyz.block.ftl.v1.schema.Position + 23, // 23: xyz.block.ftl.v1.schema.Map.pos:type_name -> xyz.block.ftl.v1.schema.Position + 27, // 24: xyz.block.ftl.v1.schema.Map.key:type_name -> xyz.block.ftl.v1.schema.Type + 27, // 25: xyz.block.ftl.v1.schema.Map.value:type_name -> xyz.block.ftl.v1.schema.Type + 18, // 26: xyz.block.ftl.v1.schema.Metadata.calls:type_name -> xyz.block.ftl.v1.schema.MetadataCalls + 20, // 27: xyz.block.ftl.v1.schema.Metadata.ingress:type_name -> xyz.block.ftl.v1.schema.MetadataIngress + 19, // 28: xyz.block.ftl.v1.schema.Metadata.databases:type_name -> xyz.block.ftl.v1.schema.MetadataDatabases + 23, // 29: xyz.block.ftl.v1.schema.MetadataCalls.pos:type_name -> xyz.block.ftl.v1.schema.Position + 3, // 30: xyz.block.ftl.v1.schema.MetadataCalls.calls:type_name -> xyz.block.ftl.v1.schema.VerbRef + 23, // 31: xyz.block.ftl.v1.schema.MetadataDatabases.pos:type_name -> xyz.block.ftl.v1.schema.Position + 8, // 32: xyz.block.ftl.v1.schema.MetadataDatabases.calls:type_name -> xyz.block.ftl.v1.schema.Database + 23, // 33: xyz.block.ftl.v1.schema.MetadataIngress.pos:type_name -> xyz.block.ftl.v1.schema.Position + 12, // 34: xyz.block.ftl.v1.schema.MetadataIngress.path:type_name -> xyz.block.ftl.v1.schema.IngressPathComponent + 30, // 35: xyz.block.ftl.v1.schema.Module.runtime:type_name -> xyz.block.ftl.v1.schema.ModuleRuntime + 23, // 36: xyz.block.ftl.v1.schema.Module.pos:type_name -> xyz.block.ftl.v1.schema.Position + 9, // 37: xyz.block.ftl.v1.schema.Module.decls:type_name -> xyz.block.ftl.v1.schema.Decl + 23, // 38: xyz.block.ftl.v1.schema.Optional.pos:type_name -> xyz.block.ftl.v1.schema.Position + 27, // 39: xyz.block.ftl.v1.schema.Optional.type:type_name -> xyz.block.ftl.v1.schema.Type + 23, // 40: xyz.block.ftl.v1.schema.Schema.pos:type_name -> xyz.block.ftl.v1.schema.Position + 21, // 41: xyz.block.ftl.v1.schema.Schema.modules:type_name -> xyz.block.ftl.v1.schema.Module + 23, // 42: xyz.block.ftl.v1.schema.String.pos:type_name -> xyz.block.ftl.v1.schema.Position + 23, // 43: xyz.block.ftl.v1.schema.Time.pos:type_name -> xyz.block.ftl.v1.schema.Position + 15, // 44: xyz.block.ftl.v1.schema.Type.int:type_name -> xyz.block.ftl.v1.schema.Int + 11, // 45: xyz.block.ftl.v1.schema.Type.float:type_name -> xyz.block.ftl.v1.schema.Float + 25, // 46: xyz.block.ftl.v1.schema.Type.string:type_name -> xyz.block.ftl.v1.schema.String + 6, // 47: xyz.block.ftl.v1.schema.Type.bytes:type_name -> xyz.block.ftl.v1.schema.Bytes + 5, // 48: xyz.block.ftl.v1.schema.Type.bool:type_name -> xyz.block.ftl.v1.schema.Bool + 26, // 49: xyz.block.ftl.v1.schema.Type.time:type_name -> xyz.block.ftl.v1.schema.Time + 4, // 50: xyz.block.ftl.v1.schema.Type.array:type_name -> xyz.block.ftl.v1.schema.Array + 16, // 51: xyz.block.ftl.v1.schema.Type.map:type_name -> xyz.block.ftl.v1.schema.Map + 0, // 52: xyz.block.ftl.v1.schema.Type.dataRef:type_name -> xyz.block.ftl.v1.schema.DataRef + 28, // 53: xyz.block.ftl.v1.schema.Type.unit:type_name -> xyz.block.ftl.v1.schema.Unit + 22, // 54: xyz.block.ftl.v1.schema.Type.optional:type_name -> xyz.block.ftl.v1.schema.Optional + 23, // 55: xyz.block.ftl.v1.schema.Unit.pos:type_name -> xyz.block.ftl.v1.schema.Position + 31, // 56: xyz.block.ftl.v1.schema.Verb.runtime:type_name -> xyz.block.ftl.v1.schema.VerbRuntime + 23, // 57: xyz.block.ftl.v1.schema.Verb.pos:type_name -> xyz.block.ftl.v1.schema.Position + 27, // 58: xyz.block.ftl.v1.schema.Verb.request:type_name -> xyz.block.ftl.v1.schema.Type + 27, // 59: xyz.block.ftl.v1.schema.Verb.response:type_name -> xyz.block.ftl.v1.schema.Type + 17, // 60: xyz.block.ftl.v1.schema.Verb.metadata:type_name -> xyz.block.ftl.v1.schema.Metadata + 61, // [61:61] is the sub-list for method output_type + 61, // [61:61] is the sub-list for method input_type + 61, // [61:61] is the sub-list for extension type_name + 61, // [61:61] is the sub-list for extension extendee + 0, // [0:61] is the sub-list for field type_name } func init() { file_xyz_block_ftl_v1_schema_schema_proto_init() } @@ -2421,7 +2600,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Decl); i { + switch v := v.(*Database); i { case 0: return &v.state case 1: @@ -2433,7 +2612,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Field); i { + switch v := v.(*Decl); i { case 0: return &v.state case 1: @@ -2445,7 +2624,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Float); i { + switch v := v.(*Field); i { case 0: return &v.state case 1: @@ -2457,7 +2636,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IngressPathComponent); i { + switch v := v.(*Float); i { case 0: return &v.state case 1: @@ -2469,7 +2648,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IngressPathLiteral); i { + switch v := v.(*IngressPathComponent); i { case 0: return &v.state case 1: @@ -2481,7 +2660,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IngressPathParameter); i { + switch v := v.(*IngressPathLiteral); i { case 0: return &v.state case 1: @@ -2493,7 +2672,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Int); i { + switch v := v.(*IngressPathParameter); i { case 0: return &v.state case 1: @@ -2505,7 +2684,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Map); i { + switch v := v.(*Int); i { case 0: return &v.state case 1: @@ -2517,7 +2696,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Metadata); i { + switch v := v.(*Map); i { case 0: return &v.state case 1: @@ -2529,7 +2708,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MetadataCalls); i { + switch v := v.(*Metadata); i { case 0: return &v.state case 1: @@ -2541,7 +2720,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MetadataIngress); i { + switch v := v.(*MetadataCalls); i { case 0: return &v.state case 1: @@ -2553,7 +2732,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Module); i { + switch v := v.(*MetadataDatabases); i { case 0: return &v.state case 1: @@ -2565,7 +2744,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Optional); i { + switch v := v.(*MetadataIngress); i { case 0: return &v.state case 1: @@ -2577,7 +2756,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Position); i { + switch v := v.(*Module); i { case 0: return &v.state case 1: @@ -2589,7 +2768,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Schema); i { + switch v := v.(*Optional); i { case 0: return &v.state case 1: @@ -2601,7 +2780,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*String); i { + switch v := v.(*Position); i { case 0: return &v.state case 1: @@ -2613,7 +2792,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Time); i { + switch v := v.(*Schema); i { case 0: return &v.state case 1: @@ -2625,7 +2804,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Type); i { + switch v := v.(*String); i { case 0: return &v.state case 1: @@ -2637,7 +2816,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Unit); i { + switch v := v.(*Time); i { case 0: return &v.state case 1: @@ -2649,6 +2828,30 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Type); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Unit); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Verb); i { case 0: return &v.state @@ -2669,32 +2872,36 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[5].OneofWrappers = []interface{}{} file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[6].OneofWrappers = []interface{}{} file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[7].OneofWrappers = []interface{}{} - file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[8].OneofWrappers = []interface{}{ + file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[8].OneofWrappers = []interface{}{} + file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[9].OneofWrappers = []interface{}{ (*Decl_Data)(nil), (*Decl_Verb)(nil), + (*Decl_Database)(nil), } - file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[9].OneofWrappers = []interface{}{} file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[10].OneofWrappers = []interface{}{} - file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[11].OneofWrappers = []interface{}{ + file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[11].OneofWrappers = []interface{}{} + file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[12].OneofWrappers = []interface{}{ (*IngressPathComponent_IngressPathLiteral)(nil), (*IngressPathComponent_IngressPathParameter)(nil), } - file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[12].OneofWrappers = []interface{}{} file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[13].OneofWrappers = []interface{}{} file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[14].OneofWrappers = []interface{}{} file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[15].OneofWrappers = []interface{}{} - file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[16].OneofWrappers = []interface{}{ + file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[16].OneofWrappers = []interface{}{} + file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[17].OneofWrappers = []interface{}{ (*Metadata_Calls)(nil), (*Metadata_Ingress)(nil), + (*Metadata_Databases)(nil), } - file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[17].OneofWrappers = []interface{}{} file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[18].OneofWrappers = []interface{}{} file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[19].OneofWrappers = []interface{}{} file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[20].OneofWrappers = []interface{}{} + file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[21].OneofWrappers = []interface{}{} file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[22].OneofWrappers = []interface{}{} - file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[23].OneofWrappers = []interface{}{} file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[24].OneofWrappers = []interface{}{} - file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[25].OneofWrappers = []interface{}{ + file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[25].OneofWrappers = []interface{}{} + file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[26].OneofWrappers = []interface{}{} + file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[27].OneofWrappers = []interface{}{ (*Type_Int)(nil), (*Type_Float)(nil), (*Type_String_)(nil), @@ -2707,15 +2914,15 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { (*Type_Unit)(nil), (*Type_Optional)(nil), } - file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[26].OneofWrappers = []interface{}{} - file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[27].OneofWrappers = []interface{}{} + file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[28].OneofWrappers = []interface{}{} + file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[29].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_xyz_block_ftl_v1_schema_schema_proto_rawDesc, NumEnums: 0, - NumMessages: 28, + NumMessages: 30, NumExtensions: 0, NumServices: 0, }, diff --git a/protos/xyz/block/ftl/v1/schema/schema.proto b/protos/xyz/block/ftl/v1/schema/schema.proto index b3ecc143e1..8fa3f58a0e 100644 --- a/protos/xyz/block/ftl/v1/schema/schema.proto +++ b/protos/xyz/block/ftl/v1/schema/schema.proto @@ -53,10 +53,17 @@ message Data { repeated string comments = 5; } +message Database { + optional Position pos = 1; + string name = 2; + repeated string comments = 3; +} + message Decl { oneof value { Data data = 1; Verb verb = 2; + Database database = 3; } } @@ -102,6 +109,7 @@ message Metadata { oneof value { MetadataCalls calls = 1; MetadataIngress ingress = 2; + MetadataDatabases databases = 3; } } @@ -110,6 +118,11 @@ message MetadataCalls { repeated VerbRef calls = 2; } +message MetadataDatabases { + optional Position pos = 1; + repeated Database calls = 2; +} + message MetadataIngress { optional Position pos = 1; string type = 2;