From 5c5a462f86de579b07ae1c3f75af6a6d29df9967 Mon Sep 17 00:00:00 2001 From: worstell Date: Wed, 10 Jul 2024 12:24:37 -0700 Subject: [PATCH] feat: support external types with type widening (#2035) unreverts and fixes #2030 --- .gitignore | 2 +- backend/controller/dal/testdata/go/fsm/go.sum | 51 +- .../ingress/ingress_integration_test.go | 5 + .../testdata/go/httpingress/httpingress.go | 8 + .../leases/testdata/go/leases/go.sum | 51 +- .../sql/testdata/go/database/go.sum | 51 +- .../xyz/block/ftl/v1/schema/schema.pb.go | 1021 +++++++++-------- .../xyz/block/ftl/v1/schema/schema.proto | 8 + backend/schema/data.go | 6 +- backend/schema/jsonschema.go | 2 +- backend/schema/metadatatypemap.go | 34 + backend/schema/parser.go | 2 +- backend/schema/protobuf_dec.go | 7 + backend/schema/protobuf_enc.go | 3 + backend/schema/schema_test.go | 33 + backend/schema/typealias.go | 22 +- backend/schema/validate.go | 37 +- buildengine/build.go | 4 + buildengine/build_go_test.go | 6 +- buildengine/testdata/another/types.ftl.go | 17 - .../xyz/block/ftl/v1/schema/schema_pb.ts | 62 + .../.ftl.tmpl/go/main/main.go.tmpl | 14 +- .../compile/build-template/types.ftl.go.tmpl | 16 +- go-runtime/compile/build.go | 77 +- .../compile/compile_integration_test.go | 12 + go-runtime/compile/parser.go | 23 +- go-runtime/compile/schema_test.go | 27 +- .../compile/testdata/failing/child/child.go | 16 + .../compile/testdata/go/external/external.go | 21 + .../compile/testdata/go/external/ftl.toml | 2 + .../compile/testdata/go/external/go.mod | 7 + .../compile/testdata/go/external/go.sum | 0 go-runtime/compile/testdata/lib.go | 4 + .../compile/testdata/named/types.ftl.go | 3 - .../compile/testdata/namedext/types.ftl.go | 3 - go-runtime/compile/testdata/one/types.ftl.go | 24 - .../compile/testdata/parent/types.ftl.go | 3 - .../compile/testdata/pubsub/types.ftl.go | 3 - .../compile/testdata/subscriber/types.ftl.go | 3 - go-runtime/compile/testdata/two/two.go | 13 + go-runtime/compile/testdata/two/types.ftl.go | 15 - go-runtime/encoding/encoding.go | 8 + .../ftl/ftltest/testdata/go/pubsub/go.sum | 51 +- .../ftl/ftltest/testdata/go/subscriber/go.sum | 51 +- .../ftl/ftltest/testdata/go/verbtypes/go.sum | 51 +- .../ftl/ftltest/testdata/go/wrapped/go.sum | 51 +- go-runtime/ftl/reflection/singleton.go | 5 + go-runtime/ftl/reflection/type_registry.go | 20 +- go-runtime/ftl/testdata/go/mapper/go.sum | 51 +- .../ftl/testdata/go/typeregistry/go.sum | 4 + go-runtime/schema/common/common.go | 33 +- go-runtime/schema/common/directive.go | 27 +- go-runtime/schema/common/error.go | 4 + go-runtime/schema/common/fact.go | 8 +- go-runtime/schema/extract.go | 73 +- go-runtime/schema/finalize/analyzer.go | 3 +- go-runtime/schema/metadata/analyzer.go | 19 +- go-runtime/schema/transitive/analyzer.go | 23 +- go-runtime/schema/typealias/analyzer.go | 80 +- lsp/logger.go | 8 +- 60 files changed, 1469 insertions(+), 819 deletions(-) create mode 100644 backend/schema/metadatatypemap.go delete mode 100644 buildengine/testdata/another/types.ftl.go create mode 100644 go-runtime/compile/testdata/go/external/external.go create mode 100644 go-runtime/compile/testdata/go/external/ftl.toml create mode 100644 go-runtime/compile/testdata/go/external/go.mod create mode 100644 go-runtime/compile/testdata/go/external/go.sum delete mode 100644 go-runtime/compile/testdata/named/types.ftl.go delete mode 100644 go-runtime/compile/testdata/namedext/types.ftl.go delete mode 100644 go-runtime/compile/testdata/one/types.ftl.go delete mode 100644 go-runtime/compile/testdata/parent/types.ftl.go delete mode 100644 go-runtime/compile/testdata/pubsub/types.ftl.go delete mode 100644 go-runtime/compile/testdata/subscriber/types.ftl.go delete mode 100644 go-runtime/compile/testdata/two/types.ftl.go diff --git a/.gitignore b/.gitignore index 31dcf4448..fe884d1d6 100644 --- a/.gitignore +++ b/.gitignore @@ -24,7 +24,7 @@ testdata/**/go.work.sum # Leaving old _ftl for now to avoid old stuff getting checked in **/testdata/**/_ftl **/examples/**/_ftl -**/examples/**/types.ftl.go +**/types.ftl.go **/testdata/**/.ftl **/examples/**/.ftl /.ftl diff --git a/backend/controller/dal/testdata/go/fsm/go.sum b/backend/controller/dal/testdata/go/fsm/go.sum index 4439403ab..131aab36b 100644 --- a/backend/controller/dal/testdata/go/fsm/go.sum +++ b/backend/controller/dal/testdata/go/fsm/go.sum @@ -22,38 +22,35 @@ github.com/alecthomas/types v0.16.0 h1:o9+JSwCRB6DDaWDeR/Mg7v/zh3R+MlknM6DrnDyY7 github.com/alecthomas/types v0.16.0/go.mod h1:Tswm0qQpjpVq8rn70OquRsUtFxbQKub/8TMyYYGI0+k= github.com/alessio/shellescape v1.4.2 h1:MHPfaU+ddJ0/bYWpgIeUnQUqKrlJ1S7BfEYPM4uEoM0= github.com/alessio/shellescape v1.4.2/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= -github.com/aws/aws-sdk-go-v2 v1.30.0 h1:6qAwtzlfcTtcL8NHtbDQAqgM5s6NDipQTkPxyH/6kAA= -github.com/aws/aws-sdk-go-v2 v1.30.0/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= +github.com/amacneil/dbmate/v2 v2.17.0 h1:S3qW9d2C/CitY7Cvw9cgDxwjQCfn9xknBbP38onG7fY= +github.com/amacneil/dbmate/v2 v2.17.0/go.mod h1:YglDzfwUTF0nruRyTxwgJP3oALTbh6hFnWVAO+IuDQc= +github.com/aws/aws-sdk-go-v2 v1.30.1 h1:4y/5Dvfrhd1MxRDD77SrfsDaj8kUkkljU7XE83NPV+o= github.com/aws/aws-sdk-go-v2 v1.30.1/go.mod h1:nIQjQVp5sfpQcTc9mPSr1B0PaWK5ByX9MOoDadSN4lc= -github.com/aws/aws-sdk-go-v2/config v1.27.21 h1:yPX3pjGCe2hJsetlmGNB4Mngu7UPmvWPzzWCv1+boeM= -github.com/aws/aws-sdk-go-v2/config v1.27.21/go.mod h1:4XtlEU6DzNai8RMbjSF5MgGZtYvrhBP/aKZcRtZAVdM= -github.com/aws/aws-sdk-go-v2/credentials v1.17.21 h1:pjAqgzfgFhTv5grc7xPHtXCAaMapzmwA7aU+c/SZQGw= -github.com/aws/aws-sdk-go-v2/credentials v1.17.21/go.mod h1:nhK6PtBlfHTUDVmBLr1dg+WHCOCK+1Fu/WQyVHPsgNQ= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.8 h1:FR+oWPFb/8qMVYMWN98bUZAGqPvLHiyqg1wqQGfUAXY= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.8/go.mod h1:EgSKcHiuuakEIxJcKGzVNWh5srVAQ3jKaSrBGRYvM48= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.12 h1:SJ04WXGTwnHlWIODtC5kJzKbeuHt+OUNOgKg7nfnUGw= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.12/go.mod h1:FkpvXhA92gb3GE9LD6Og0pHHycTxW7xGpnEh5E7Opwo= +github.com/aws/aws-sdk-go-v2/config v1.27.23 h1:Cr/gJEa9NAS7CDAjbnB7tHYb3aLZI2gVggfmSAasDac= +github.com/aws/aws-sdk-go-v2/config v1.27.23/go.mod h1:WMMYHqLCFu5LH05mFOF5tsq1PGEMfKbu083VKqLCd0o= +github.com/aws/aws-sdk-go-v2/credentials v1.17.23 h1:G1CfmLVoO2TdQ8z9dW+JBc/r8+MqyPQhXCafNZcXVZo= +github.com/aws/aws-sdk-go-v2/credentials v1.17.23/go.mod h1:V/DvSURn6kKgcuKEk4qwSwb/fZ2d++FFARtWSbXnLqY= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.9 h1:Aznqksmd6Rfv2HQN9cpqIV/lQRMaIpJkLLaJ1ZI76no= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.9/go.mod h1:WQr3MY7AxGNxaqAtsDWn+fBxmd4XvLkzeqQ8P1VM0/w= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.13 h1:5SAoZ4jYpGH4721ZNoS1znQrhOfZinOhc4XuTXx/nVc= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.13/go.mod h1:+rdA6ZLpaSeM7tSg/B0IEDinCIBJGmW8rKDFkYpP04g= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.12 h1:hb5KgeYfObi5MHkSSZMEudnIvX30iB+E21evI4r6BnQ= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.12/go.mod h1:CroKe/eWJdyfy9Vx4rljP5wTUjNJfb+fPz1uMYUhEGM= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.13 h1:WIijqeaAO7TYFLbhsZmi2rgLEAtWOC1LhxCAVTJlSKw= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.13/go.mod h1:i+kbfa76PQbWw/ULoWnp51EYVWH4ENln76fLQE3lXT8= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.14 h1:zSDPny/pVnkqABXYRicYuPf9z2bTqfH13HT3v6UheIk= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.14/go.mod h1:3TTcI5JSzda1nw/pkVC9dhgLre0SNBFj2lYS4GctXKI= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.31.1 h1:fMhrWVym3nTAcf3eT9XsYcfN1kgQ/7ZuVLGHjPAn6Ms= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.31.1/go.mod h1:tBCf2+VgRT/Lk9KIlKpTxyCunzxHcP8BFPqcck5I9mM= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3 h1:dT3MqvGhSoaIhRseqw2I0yH81l7wiR2vjs57O51EAm8= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3/go.mod h1:GlAeCkHwugxdHaueRr4nhPuY+WW+gR8UjlcqzPr1SPI= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.15 h1:I9zMeF107l0rJrpnHpjEiiTSCKYAIw8mALiXcPsGBiA= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.15/go.mod h1:9xWJ3Q/S6Ojusz1UIkfycgD1mGirJfLLKqq3LPT7WN8= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.32.1 h1:ZoYRD8IJqPkzjBnpokiMNO6L/DQprtpVpD6k0YSaF5U= github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.32.1/go.mod h1:GlRarZzIMl9VDi0mLQt+qQOuEkVFPnTkkjyugV1uVa8= -github.com/aws/aws-sdk-go-v2/service/sso v1.21.1 h1:sd0BsnAvLH8gsp2e3cbaIr+9D7T1xugueQ7V/zUAsS4= -github.com/aws/aws-sdk-go-v2/service/sso v1.21.1/go.mod h1:lcQG/MmxydijbeTOp04hIuJwXGWPZGI3bwdFDGRTv14= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.25.1 h1:1uEFNNskK/I1KoZ9Q8wJxMz5V9jyBlsiaNrM7vA3YUQ= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.25.1/go.mod h1:z0P8K+cBIsFXUr5rzo/psUeJ20XjPN0+Nn8067Nd+E4= -github.com/aws/aws-sdk-go-v2/service/sts v1.29.1 h1:myX5CxqXE0QMZNja6FA1/FSE3Vu1rVmeUmpJMMzeZg0= -github.com/aws/aws-sdk-go-v2/service/sts v1.29.1/go.mod h1:N2mQiucsO0VwK9CYuS4/c2n6Smeh1v47Rz3dWCPFLdE= -github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q= -github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= +github.com/aws/aws-sdk-go-v2/service/sso v1.22.1 h1:p1GahKIjyMDZtiKoIn0/jAj/TkMzfzndDv5+zi2Mhgc= +github.com/aws/aws-sdk-go-v2/service/sso v1.22.1/go.mod h1:/vWdhoIoYA5hYoPZ6fm7Sv4d8701PiG5VKe8/pPJL60= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.1 h1:lCEv9f8f+zJ8kcFeAjRZsekLd/x5SAm96Cva+VbUdo8= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.1/go.mod h1:xyFHA4zGxgYkdD73VeezHt3vSKEG9EmFnGwoKlP00u4= +github.com/aws/aws-sdk-go-v2/service/sts v1.30.1 h1:+woJ607dllHJQtsnJLi52ycuqHMwlW+Wqm2Ppsfp4nQ= +github.com/aws/aws-sdk-go-v2/service/sts v1.30.1/go.mod h1:jiNR3JqT15Dm+QWq2SRgh0x0bCNSRP2L25+CqPNpJlQ= +github.com/aws/smithy-go v1.20.3 h1:ryHwveWzPV5BIof6fyDvor6V3iUL7nTfiTKXHiW05nE= github.com/aws/smithy-go v1.20.3/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -99,6 +96,8 @@ github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2E github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= +github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= +github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/multiformats/go-base36 v0.2.0 h1:lFsAbNOGeKtuKozrtBsAkSVhv1p9D0/qedU9rQyccr0= diff --git a/backend/controller/ingress/ingress_integration_test.go b/backend/controller/ingress/ingress_integration_test.go index 8ca60f433..8567582e2 100644 --- a/backend/controller/ingress/ingress_integration_test.go +++ b/backend/controller/ingress/ingress_integration_test.go @@ -134,6 +134,11 @@ func TestHttpIngress(t *testing.T) { assert.Equal(t, nil, resp.Headers["Access-Control-Allow-Methods"]) assert.Equal(t, nil, resp.Headers["Access-Control-Allow-Headers"]) }), + in.HttpCall(http.MethodGet, "/external", nil, in.JsonData(t, in.Obj{"message": "hello"}), func(t testing.TB, resp *in.HTTPResponse) { + assert.Equal(t, 200, resp.Status) + assert.Equal(t, []string{"application/json; charset=utf-8"}, resp.Headers["Content-Type"]) + assert.Equal(t, in.JsonData(t, in.Obj{"message": "hello"}), resp.BodyBytes) + }), ) } diff --git a/backend/controller/ingress/testdata/go/httpingress/httpingress.go b/backend/controller/ingress/testdata/go/httpingress/httpingress.go index 8085ddcdc..b3082d02d 100644 --- a/backend/controller/ingress/testdata/go/httpingress/httpingress.go +++ b/backend/controller/ingress/testdata/go/httpingress/httpingress.go @@ -6,6 +6,7 @@ import ( "ftl/builtin" + lib "github.com/TBD54566975/ftl/go-runtime/compile/testdata" "github.com/TBD54566975/ftl/go-runtime/ftl" // Import the FTL SDK. ) @@ -178,3 +179,10 @@ func ArrayData(ctx context.Context, req builtin.HttpRequest[[]ArrayType]) (built func TypeEnum(ctx context.Context, req builtin.HttpRequest[SumType]) (builtin.HttpResponse[SumType, string], error) { return builtin.HttpResponse[SumType, string]{Body: ftl.Some(req.Body)}, nil } + +type ExternalAlias lib.NonFTLType + +//ftl:ingress http GET /external +func External(ctx context.Context, req builtin.HttpRequest[ExternalAlias]) (builtin.HttpResponse[ExternalAlias, string], error) { + return builtin.HttpResponse[ExternalAlias, string]{Body: ftl.Some(req.Body)}, nil +} diff --git a/backend/controller/leases/testdata/go/leases/go.sum b/backend/controller/leases/testdata/go/leases/go.sum index 4439403ab..131aab36b 100644 --- a/backend/controller/leases/testdata/go/leases/go.sum +++ b/backend/controller/leases/testdata/go/leases/go.sum @@ -22,38 +22,35 @@ github.com/alecthomas/types v0.16.0 h1:o9+JSwCRB6DDaWDeR/Mg7v/zh3R+MlknM6DrnDyY7 github.com/alecthomas/types v0.16.0/go.mod h1:Tswm0qQpjpVq8rn70OquRsUtFxbQKub/8TMyYYGI0+k= github.com/alessio/shellescape v1.4.2 h1:MHPfaU+ddJ0/bYWpgIeUnQUqKrlJ1S7BfEYPM4uEoM0= github.com/alessio/shellescape v1.4.2/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= -github.com/aws/aws-sdk-go-v2 v1.30.0 h1:6qAwtzlfcTtcL8NHtbDQAqgM5s6NDipQTkPxyH/6kAA= -github.com/aws/aws-sdk-go-v2 v1.30.0/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= +github.com/amacneil/dbmate/v2 v2.17.0 h1:S3qW9d2C/CitY7Cvw9cgDxwjQCfn9xknBbP38onG7fY= +github.com/amacneil/dbmate/v2 v2.17.0/go.mod h1:YglDzfwUTF0nruRyTxwgJP3oALTbh6hFnWVAO+IuDQc= +github.com/aws/aws-sdk-go-v2 v1.30.1 h1:4y/5Dvfrhd1MxRDD77SrfsDaj8kUkkljU7XE83NPV+o= github.com/aws/aws-sdk-go-v2 v1.30.1/go.mod h1:nIQjQVp5sfpQcTc9mPSr1B0PaWK5ByX9MOoDadSN4lc= -github.com/aws/aws-sdk-go-v2/config v1.27.21 h1:yPX3pjGCe2hJsetlmGNB4Mngu7UPmvWPzzWCv1+boeM= -github.com/aws/aws-sdk-go-v2/config v1.27.21/go.mod h1:4XtlEU6DzNai8RMbjSF5MgGZtYvrhBP/aKZcRtZAVdM= -github.com/aws/aws-sdk-go-v2/credentials v1.17.21 h1:pjAqgzfgFhTv5grc7xPHtXCAaMapzmwA7aU+c/SZQGw= -github.com/aws/aws-sdk-go-v2/credentials v1.17.21/go.mod h1:nhK6PtBlfHTUDVmBLr1dg+WHCOCK+1Fu/WQyVHPsgNQ= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.8 h1:FR+oWPFb/8qMVYMWN98bUZAGqPvLHiyqg1wqQGfUAXY= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.8/go.mod h1:EgSKcHiuuakEIxJcKGzVNWh5srVAQ3jKaSrBGRYvM48= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.12 h1:SJ04WXGTwnHlWIODtC5kJzKbeuHt+OUNOgKg7nfnUGw= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.12/go.mod h1:FkpvXhA92gb3GE9LD6Og0pHHycTxW7xGpnEh5E7Opwo= +github.com/aws/aws-sdk-go-v2/config v1.27.23 h1:Cr/gJEa9NAS7CDAjbnB7tHYb3aLZI2gVggfmSAasDac= +github.com/aws/aws-sdk-go-v2/config v1.27.23/go.mod h1:WMMYHqLCFu5LH05mFOF5tsq1PGEMfKbu083VKqLCd0o= +github.com/aws/aws-sdk-go-v2/credentials v1.17.23 h1:G1CfmLVoO2TdQ8z9dW+JBc/r8+MqyPQhXCafNZcXVZo= +github.com/aws/aws-sdk-go-v2/credentials v1.17.23/go.mod h1:V/DvSURn6kKgcuKEk4qwSwb/fZ2d++FFARtWSbXnLqY= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.9 h1:Aznqksmd6Rfv2HQN9cpqIV/lQRMaIpJkLLaJ1ZI76no= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.9/go.mod h1:WQr3MY7AxGNxaqAtsDWn+fBxmd4XvLkzeqQ8P1VM0/w= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.13 h1:5SAoZ4jYpGH4721ZNoS1znQrhOfZinOhc4XuTXx/nVc= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.13/go.mod h1:+rdA6ZLpaSeM7tSg/B0IEDinCIBJGmW8rKDFkYpP04g= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.12 h1:hb5KgeYfObi5MHkSSZMEudnIvX30iB+E21evI4r6BnQ= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.12/go.mod h1:CroKe/eWJdyfy9Vx4rljP5wTUjNJfb+fPz1uMYUhEGM= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.13 h1:WIijqeaAO7TYFLbhsZmi2rgLEAtWOC1LhxCAVTJlSKw= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.13/go.mod h1:i+kbfa76PQbWw/ULoWnp51EYVWH4ENln76fLQE3lXT8= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.14 h1:zSDPny/pVnkqABXYRicYuPf9z2bTqfH13HT3v6UheIk= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.14/go.mod h1:3TTcI5JSzda1nw/pkVC9dhgLre0SNBFj2lYS4GctXKI= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.31.1 h1:fMhrWVym3nTAcf3eT9XsYcfN1kgQ/7ZuVLGHjPAn6Ms= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.31.1/go.mod h1:tBCf2+VgRT/Lk9KIlKpTxyCunzxHcP8BFPqcck5I9mM= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3 h1:dT3MqvGhSoaIhRseqw2I0yH81l7wiR2vjs57O51EAm8= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3/go.mod h1:GlAeCkHwugxdHaueRr4nhPuY+WW+gR8UjlcqzPr1SPI= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.15 h1:I9zMeF107l0rJrpnHpjEiiTSCKYAIw8mALiXcPsGBiA= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.15/go.mod h1:9xWJ3Q/S6Ojusz1UIkfycgD1mGirJfLLKqq3LPT7WN8= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.32.1 h1:ZoYRD8IJqPkzjBnpokiMNO6L/DQprtpVpD6k0YSaF5U= github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.32.1/go.mod h1:GlRarZzIMl9VDi0mLQt+qQOuEkVFPnTkkjyugV1uVa8= -github.com/aws/aws-sdk-go-v2/service/sso v1.21.1 h1:sd0BsnAvLH8gsp2e3cbaIr+9D7T1xugueQ7V/zUAsS4= -github.com/aws/aws-sdk-go-v2/service/sso v1.21.1/go.mod h1:lcQG/MmxydijbeTOp04hIuJwXGWPZGI3bwdFDGRTv14= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.25.1 h1:1uEFNNskK/I1KoZ9Q8wJxMz5V9jyBlsiaNrM7vA3YUQ= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.25.1/go.mod h1:z0P8K+cBIsFXUr5rzo/psUeJ20XjPN0+Nn8067Nd+E4= -github.com/aws/aws-sdk-go-v2/service/sts v1.29.1 h1:myX5CxqXE0QMZNja6FA1/FSE3Vu1rVmeUmpJMMzeZg0= -github.com/aws/aws-sdk-go-v2/service/sts v1.29.1/go.mod h1:N2mQiucsO0VwK9CYuS4/c2n6Smeh1v47Rz3dWCPFLdE= -github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q= -github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= +github.com/aws/aws-sdk-go-v2/service/sso v1.22.1 h1:p1GahKIjyMDZtiKoIn0/jAj/TkMzfzndDv5+zi2Mhgc= +github.com/aws/aws-sdk-go-v2/service/sso v1.22.1/go.mod h1:/vWdhoIoYA5hYoPZ6fm7Sv4d8701PiG5VKe8/pPJL60= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.1 h1:lCEv9f8f+zJ8kcFeAjRZsekLd/x5SAm96Cva+VbUdo8= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.1/go.mod h1:xyFHA4zGxgYkdD73VeezHt3vSKEG9EmFnGwoKlP00u4= +github.com/aws/aws-sdk-go-v2/service/sts v1.30.1 h1:+woJ607dllHJQtsnJLi52ycuqHMwlW+Wqm2Ppsfp4nQ= +github.com/aws/aws-sdk-go-v2/service/sts v1.30.1/go.mod h1:jiNR3JqT15Dm+QWq2SRgh0x0bCNSRP2L25+CqPNpJlQ= +github.com/aws/smithy-go v1.20.3 h1:ryHwveWzPV5BIof6fyDvor6V3iUL7nTfiTKXHiW05nE= github.com/aws/smithy-go v1.20.3/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -99,6 +96,8 @@ github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2E github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= +github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= +github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/multiformats/go-base36 v0.2.0 h1:lFsAbNOGeKtuKozrtBsAkSVhv1p9D0/qedU9rQyccr0= diff --git a/backend/controller/sql/testdata/go/database/go.sum b/backend/controller/sql/testdata/go/database/go.sum index 4439403ab..131aab36b 100644 --- a/backend/controller/sql/testdata/go/database/go.sum +++ b/backend/controller/sql/testdata/go/database/go.sum @@ -22,38 +22,35 @@ github.com/alecthomas/types v0.16.0 h1:o9+JSwCRB6DDaWDeR/Mg7v/zh3R+MlknM6DrnDyY7 github.com/alecthomas/types v0.16.0/go.mod h1:Tswm0qQpjpVq8rn70OquRsUtFxbQKub/8TMyYYGI0+k= github.com/alessio/shellescape v1.4.2 h1:MHPfaU+ddJ0/bYWpgIeUnQUqKrlJ1S7BfEYPM4uEoM0= github.com/alessio/shellescape v1.4.2/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= -github.com/aws/aws-sdk-go-v2 v1.30.0 h1:6qAwtzlfcTtcL8NHtbDQAqgM5s6NDipQTkPxyH/6kAA= -github.com/aws/aws-sdk-go-v2 v1.30.0/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= +github.com/amacneil/dbmate/v2 v2.17.0 h1:S3qW9d2C/CitY7Cvw9cgDxwjQCfn9xknBbP38onG7fY= +github.com/amacneil/dbmate/v2 v2.17.0/go.mod h1:YglDzfwUTF0nruRyTxwgJP3oALTbh6hFnWVAO+IuDQc= +github.com/aws/aws-sdk-go-v2 v1.30.1 h1:4y/5Dvfrhd1MxRDD77SrfsDaj8kUkkljU7XE83NPV+o= github.com/aws/aws-sdk-go-v2 v1.30.1/go.mod h1:nIQjQVp5sfpQcTc9mPSr1B0PaWK5ByX9MOoDadSN4lc= -github.com/aws/aws-sdk-go-v2/config v1.27.21 h1:yPX3pjGCe2hJsetlmGNB4Mngu7UPmvWPzzWCv1+boeM= -github.com/aws/aws-sdk-go-v2/config v1.27.21/go.mod h1:4XtlEU6DzNai8RMbjSF5MgGZtYvrhBP/aKZcRtZAVdM= -github.com/aws/aws-sdk-go-v2/credentials v1.17.21 h1:pjAqgzfgFhTv5grc7xPHtXCAaMapzmwA7aU+c/SZQGw= -github.com/aws/aws-sdk-go-v2/credentials v1.17.21/go.mod h1:nhK6PtBlfHTUDVmBLr1dg+WHCOCK+1Fu/WQyVHPsgNQ= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.8 h1:FR+oWPFb/8qMVYMWN98bUZAGqPvLHiyqg1wqQGfUAXY= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.8/go.mod h1:EgSKcHiuuakEIxJcKGzVNWh5srVAQ3jKaSrBGRYvM48= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.12 h1:SJ04WXGTwnHlWIODtC5kJzKbeuHt+OUNOgKg7nfnUGw= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.12/go.mod h1:FkpvXhA92gb3GE9LD6Og0pHHycTxW7xGpnEh5E7Opwo= +github.com/aws/aws-sdk-go-v2/config v1.27.23 h1:Cr/gJEa9NAS7CDAjbnB7tHYb3aLZI2gVggfmSAasDac= +github.com/aws/aws-sdk-go-v2/config v1.27.23/go.mod h1:WMMYHqLCFu5LH05mFOF5tsq1PGEMfKbu083VKqLCd0o= +github.com/aws/aws-sdk-go-v2/credentials v1.17.23 h1:G1CfmLVoO2TdQ8z9dW+JBc/r8+MqyPQhXCafNZcXVZo= +github.com/aws/aws-sdk-go-v2/credentials v1.17.23/go.mod h1:V/DvSURn6kKgcuKEk4qwSwb/fZ2d++FFARtWSbXnLqY= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.9 h1:Aznqksmd6Rfv2HQN9cpqIV/lQRMaIpJkLLaJ1ZI76no= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.9/go.mod h1:WQr3MY7AxGNxaqAtsDWn+fBxmd4XvLkzeqQ8P1VM0/w= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.13 h1:5SAoZ4jYpGH4721ZNoS1znQrhOfZinOhc4XuTXx/nVc= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.13/go.mod h1:+rdA6ZLpaSeM7tSg/B0IEDinCIBJGmW8rKDFkYpP04g= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.12 h1:hb5KgeYfObi5MHkSSZMEudnIvX30iB+E21evI4r6BnQ= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.12/go.mod h1:CroKe/eWJdyfy9Vx4rljP5wTUjNJfb+fPz1uMYUhEGM= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.13 h1:WIijqeaAO7TYFLbhsZmi2rgLEAtWOC1LhxCAVTJlSKw= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.13/go.mod h1:i+kbfa76PQbWw/ULoWnp51EYVWH4ENln76fLQE3lXT8= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.14 h1:zSDPny/pVnkqABXYRicYuPf9z2bTqfH13HT3v6UheIk= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.14/go.mod h1:3TTcI5JSzda1nw/pkVC9dhgLre0SNBFj2lYS4GctXKI= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.31.1 h1:fMhrWVym3nTAcf3eT9XsYcfN1kgQ/7ZuVLGHjPAn6Ms= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.31.1/go.mod h1:tBCf2+VgRT/Lk9KIlKpTxyCunzxHcP8BFPqcck5I9mM= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3 h1:dT3MqvGhSoaIhRseqw2I0yH81l7wiR2vjs57O51EAm8= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3/go.mod h1:GlAeCkHwugxdHaueRr4nhPuY+WW+gR8UjlcqzPr1SPI= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.15 h1:I9zMeF107l0rJrpnHpjEiiTSCKYAIw8mALiXcPsGBiA= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.15/go.mod h1:9xWJ3Q/S6Ojusz1UIkfycgD1mGirJfLLKqq3LPT7WN8= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.32.1 h1:ZoYRD8IJqPkzjBnpokiMNO6L/DQprtpVpD6k0YSaF5U= github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.32.1/go.mod h1:GlRarZzIMl9VDi0mLQt+qQOuEkVFPnTkkjyugV1uVa8= -github.com/aws/aws-sdk-go-v2/service/sso v1.21.1 h1:sd0BsnAvLH8gsp2e3cbaIr+9D7T1xugueQ7V/zUAsS4= -github.com/aws/aws-sdk-go-v2/service/sso v1.21.1/go.mod h1:lcQG/MmxydijbeTOp04hIuJwXGWPZGI3bwdFDGRTv14= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.25.1 h1:1uEFNNskK/I1KoZ9Q8wJxMz5V9jyBlsiaNrM7vA3YUQ= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.25.1/go.mod h1:z0P8K+cBIsFXUr5rzo/psUeJ20XjPN0+Nn8067Nd+E4= -github.com/aws/aws-sdk-go-v2/service/sts v1.29.1 h1:myX5CxqXE0QMZNja6FA1/FSE3Vu1rVmeUmpJMMzeZg0= -github.com/aws/aws-sdk-go-v2/service/sts v1.29.1/go.mod h1:N2mQiucsO0VwK9CYuS4/c2n6Smeh1v47Rz3dWCPFLdE= -github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q= -github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= +github.com/aws/aws-sdk-go-v2/service/sso v1.22.1 h1:p1GahKIjyMDZtiKoIn0/jAj/TkMzfzndDv5+zi2Mhgc= +github.com/aws/aws-sdk-go-v2/service/sso v1.22.1/go.mod h1:/vWdhoIoYA5hYoPZ6fm7Sv4d8701PiG5VKe8/pPJL60= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.1 h1:lCEv9f8f+zJ8kcFeAjRZsekLd/x5SAm96Cva+VbUdo8= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.1/go.mod h1:xyFHA4zGxgYkdD73VeezHt3vSKEG9EmFnGwoKlP00u4= +github.com/aws/aws-sdk-go-v2/service/sts v1.30.1 h1:+woJ607dllHJQtsnJLi52ycuqHMwlW+Wqm2Ppsfp4nQ= +github.com/aws/aws-sdk-go-v2/service/sts v1.30.1/go.mod h1:jiNR3JqT15Dm+QWq2SRgh0x0bCNSRP2L25+CqPNpJlQ= +github.com/aws/smithy-go v1.20.3 h1:ryHwveWzPV5BIof6fyDvor6V3iUL7nTfiTKXHiW05nE= github.com/aws/smithy-go v1.20.3/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -99,6 +96,8 @@ github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2E github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= +github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= +github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/multiformats/go-base36 v0.2.0 h1:lFsAbNOGeKtuKozrtBsAkSVhv1p9D0/qedU9rQyccr0= diff --git a/backend/protos/xyz/block/ftl/v1/schema/schema.pb.go b/backend/protos/xyz/block/ftl/v1/schema/schema.pb.go index 0ae5f2ade..8465d6b6f 100644 --- a/backend/protos/xyz/block/ftl/v1/schema/schema.pb.go +++ b/backend/protos/xyz/block/ftl/v1/schema/schema.pb.go @@ -1627,6 +1627,7 @@ type Metadata struct { // *Metadata_Alias // *Metadata_Retry // *Metadata_Subscriber + // *Metadata_TypeMap Value isMetadata_Value `protobuf_oneof:"value"` } @@ -1718,6 +1719,13 @@ func (x *Metadata) GetSubscriber() *MetadataSubscriber { return nil } +func (x *Metadata) GetTypeMap() *MetadataTypeMap { + if x, ok := x.GetValue().(*Metadata_TypeMap); ok { + return x.TypeMap + } + return nil +} + type isMetadata_Value interface { isMetadata_Value() } @@ -1750,6 +1758,10 @@ type Metadata_Subscriber struct { Subscriber *MetadataSubscriber `protobuf:"bytes,7,opt,name=subscriber,proto3,oneof"` } +type Metadata_TypeMap struct { + TypeMap *MetadataTypeMap `protobuf:"bytes,8,opt,name=typeMap,proto3,oneof"` +} + func (*Metadata_Calls) isMetadata_Value() {} func (*Metadata_Ingress) isMetadata_Value() {} @@ -1764,6 +1776,8 @@ func (*Metadata_Retry) isMetadata_Value() {} func (*Metadata_Subscriber) isMetadata_Value() {} +func (*Metadata_TypeMap) isMetadata_Value() {} + type MetadataAlias struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2189,6 +2203,69 @@ func (x *MetadataSubscriber) GetName() string { return "" } +type MetadataTypeMap struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Pos *Position `protobuf:"bytes,1,opt,name=pos,proto3,oneof" json:"pos,omitempty"` + Runtime string `protobuf:"bytes,2,opt,name=runtime,proto3" json:"runtime,omitempty"` + NativeName string `protobuf:"bytes,3,opt,name=nativeName,proto3" json:"nativeName,omitempty"` +} + +func (x *MetadataTypeMap) Reset() { + *x = MetadataTypeMap{} + if protoimpl.UnsafeEnabled { + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MetadataTypeMap) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MetadataTypeMap) ProtoMessage() {} + +func (x *MetadataTypeMap) ProtoReflect() protoreflect.Message { + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[30] + 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 MetadataTypeMap.ProtoReflect.Descriptor instead. +func (*MetadataTypeMap) Descriptor() ([]byte, []int) { + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{30} +} + +func (x *MetadataTypeMap) GetPos() *Position { + if x != nil { + return x.Pos + } + return nil +} + +func (x *MetadataTypeMap) GetRuntime() string { + if x != nil { + return x.Runtime + } + return "" +} + +func (x *MetadataTypeMap) GetNativeName() string { + if x != nil { + return x.NativeName + } + return "" +} + type Module struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2205,7 +2282,7 @@ type Module struct { func (x *Module) Reset() { *x = Module{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[30] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2218,7 +2295,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[30] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2231,7 +2308,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{30} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{31} } func (x *Module) GetRuntime() *ModuleRuntime { @@ -2288,7 +2365,7 @@ type Optional struct { func (x *Optional) Reset() { *x = Optional{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[31] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2301,7 +2378,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[31] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2314,7 +2391,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{31} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{32} } func (x *Optional) GetPos() *Position { @@ -2344,7 +2421,7 @@ type Position struct { func (x *Position) Reset() { *x = Position{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[32] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2357,7 +2434,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[32] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2370,7 +2447,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{32} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{33} } func (x *Position) GetFilename() string { @@ -2408,7 +2485,7 @@ type Ref struct { func (x *Ref) Reset() { *x = Ref{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[33] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2421,7 +2498,7 @@ func (x *Ref) String() string { func (*Ref) ProtoMessage() {} func (x *Ref) ProtoReflect() protoreflect.Message { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[33] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2434,7 +2511,7 @@ func (x *Ref) ProtoReflect() protoreflect.Message { // Deprecated: Use Ref.ProtoReflect.Descriptor instead. func (*Ref) Descriptor() ([]byte, []int) { - return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{33} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{34} } func (x *Ref) GetPos() *Position { @@ -2477,7 +2554,7 @@ type Schema struct { func (x *Schema) Reset() { *x = Schema{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[34] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2490,7 +2567,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[34] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2503,7 +2580,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{34} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{35} } func (x *Schema) GetPos() *Position { @@ -2534,7 +2611,7 @@ type Secret struct { func (x *Secret) Reset() { *x = Secret{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[35] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2547,7 +2624,7 @@ func (x *Secret) String() string { func (*Secret) ProtoMessage() {} func (x *Secret) ProtoReflect() protoreflect.Message { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[35] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2560,7 +2637,7 @@ func (x *Secret) ProtoReflect() protoreflect.Message { // Deprecated: Use Secret.ProtoReflect.Descriptor instead. func (*Secret) Descriptor() ([]byte, []int) { - return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{35} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{36} } func (x *Secret) GetPos() *Position { @@ -2602,7 +2679,7 @@ type String struct { func (x *String) Reset() { *x = String{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[36] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2615,7 +2692,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[36] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2628,7 +2705,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{36} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{37} } func (x *String) GetPos() *Position { @@ -2650,7 +2727,7 @@ type StringValue struct { func (x *StringValue) Reset() { *x = StringValue{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[37] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2663,7 +2740,7 @@ func (x *StringValue) String() string { func (*StringValue) ProtoMessage() {} func (x *StringValue) ProtoReflect() protoreflect.Message { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[37] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[38] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2676,7 +2753,7 @@ func (x *StringValue) ProtoReflect() protoreflect.Message { // Deprecated: Use StringValue.ProtoReflect.Descriptor instead. func (*StringValue) Descriptor() ([]byte, []int) { - return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{37} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{38} } func (x *StringValue) GetPos() *Position { @@ -2707,7 +2784,7 @@ type Subscription struct { func (x *Subscription) Reset() { *x = Subscription{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[38] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2720,7 +2797,7 @@ func (x *Subscription) String() string { func (*Subscription) ProtoMessage() {} func (x *Subscription) ProtoReflect() protoreflect.Message { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[38] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[39] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2733,7 +2810,7 @@ func (x *Subscription) ProtoReflect() protoreflect.Message { // Deprecated: Use Subscription.ProtoReflect.Descriptor instead. func (*Subscription) Descriptor() ([]byte, []int) { - return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{38} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{39} } func (x *Subscription) GetPos() *Position { @@ -2775,7 +2852,7 @@ type Time struct { func (x *Time) Reset() { *x = Time{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[39] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2788,7 +2865,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[39] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[40] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2801,7 +2878,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{39} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{40} } func (x *Time) GetPos() *Position { @@ -2826,7 +2903,7 @@ type Topic struct { func (x *Topic) Reset() { *x = Topic{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[40] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2839,7 +2916,7 @@ func (x *Topic) String() string { func (*Topic) ProtoMessage() {} func (x *Topic) ProtoReflect() protoreflect.Message { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[40] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[41] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2852,7 +2929,7 @@ func (x *Topic) ProtoReflect() protoreflect.Message { // Deprecated: Use Topic.ProtoReflect.Descriptor instead. func (*Topic) Descriptor() ([]byte, []int) { - return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{40} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{41} } func (x *Topic) GetPos() *Position { @@ -2915,7 +2992,7 @@ type Type struct { func (x *Type) Reset() { *x = Type{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[41] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2928,7 +3005,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[41] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[42] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2941,7 +3018,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{41} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{42} } func (m *Type) GetValue() isType_Value { @@ -3116,17 +3193,18 @@ type TypeAlias struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Pos *Position `protobuf:"bytes,1,opt,name=pos,proto3,oneof" json:"pos,omitempty"` - Comments []string `protobuf:"bytes,2,rep,name=comments,proto3" json:"comments,omitempty"` - Export bool `protobuf:"varint,3,opt,name=export,proto3" json:"export,omitempty"` - Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` - Type *Type `protobuf:"bytes,5,opt,name=type,proto3" json:"type,omitempty"` + Pos *Position `protobuf:"bytes,1,opt,name=pos,proto3,oneof" json:"pos,omitempty"` + Comments []string `protobuf:"bytes,2,rep,name=comments,proto3" json:"comments,omitempty"` + Export bool `protobuf:"varint,3,opt,name=export,proto3" json:"export,omitempty"` + Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` + Type *Type `protobuf:"bytes,5,opt,name=type,proto3" json:"type,omitempty"` + Metadata []*Metadata `protobuf:"bytes,6,rep,name=metadata,proto3" json:"metadata,omitempty"` } func (x *TypeAlias) Reset() { *x = TypeAlias{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[42] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3139,7 +3217,7 @@ func (x *TypeAlias) String() string { func (*TypeAlias) ProtoMessage() {} func (x *TypeAlias) ProtoReflect() protoreflect.Message { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[42] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[43] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3152,7 +3230,7 @@ func (x *TypeAlias) ProtoReflect() protoreflect.Message { // Deprecated: Use TypeAlias.ProtoReflect.Descriptor instead. func (*TypeAlias) Descriptor() ([]byte, []int) { - return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{42} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{43} } func (x *TypeAlias) GetPos() *Position { @@ -3190,6 +3268,13 @@ func (x *TypeAlias) GetType() *Type { return nil } +func (x *TypeAlias) GetMetadata() []*Metadata { + if x != nil { + return x.Metadata + } + return nil +} + type TypeParameter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3202,7 +3287,7 @@ type TypeParameter struct { func (x *TypeParameter) Reset() { *x = TypeParameter{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[43] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3215,7 +3300,7 @@ func (x *TypeParameter) String() string { func (*TypeParameter) ProtoMessage() {} func (x *TypeParameter) ProtoReflect() protoreflect.Message { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[43] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[44] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3228,7 +3313,7 @@ func (x *TypeParameter) ProtoReflect() protoreflect.Message { // Deprecated: Use TypeParameter.ProtoReflect.Descriptor instead. func (*TypeParameter) Descriptor() ([]byte, []int) { - return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{43} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{44} } func (x *TypeParameter) GetPos() *Position { @@ -3257,7 +3342,7 @@ type TypeValue struct { func (x *TypeValue) Reset() { *x = TypeValue{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[44] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3270,7 +3355,7 @@ func (x *TypeValue) String() string { func (*TypeValue) ProtoMessage() {} func (x *TypeValue) ProtoReflect() protoreflect.Message { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[44] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[45] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3283,7 +3368,7 @@ func (x *TypeValue) ProtoReflect() protoreflect.Message { // Deprecated: Use TypeValue.ProtoReflect.Descriptor instead. func (*TypeValue) Descriptor() ([]byte, []int) { - return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{44} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{45} } func (x *TypeValue) GetPos() *Position { @@ -3311,7 +3396,7 @@ type Unit struct { func (x *Unit) Reset() { *x = Unit{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[45] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3324,7 +3409,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[45] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[46] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3337,7 +3422,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{45} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{46} } func (x *Unit) GetPos() *Position { @@ -3363,7 +3448,7 @@ type Value struct { func (x *Value) Reset() { *x = Value{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[46] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3376,7 +3461,7 @@ func (x *Value) String() string { func (*Value) ProtoMessage() {} func (x *Value) ProtoReflect() protoreflect.Message { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[46] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[47] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3389,7 +3474,7 @@ func (x *Value) ProtoReflect() protoreflect.Message { // Deprecated: Use Value.ProtoReflect.Descriptor instead. func (*Value) Descriptor() ([]byte, []int) { - return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{46} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{47} } func (m *Value) GetValue() isValue_Value { @@ -3460,7 +3545,7 @@ type Verb struct { func (x *Verb) Reset() { *x = Verb{} if protoimpl.UnsafeEnabled { - mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[47] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3473,7 +3558,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[47] + mi := &file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[48] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3486,7 +3571,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{47} + return file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP(), []int{48} } func (x *Verb) GetRuntime() *VerbRuntime { @@ -3806,7 +3891,7 @@ var file_xyz_block_ftl_v1_schema_schema_proto_rawDesc = []byte{ 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, 0xfa, 0x03, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x5f, 0x70, 0x6f, 0x73, 0x22, 0xc0, 0x04, 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, 0x61, 0x64, @@ -3837,161 +3922,229 @@ var file_xyz_block_ftl_v1_schema_schema_proto_rawDesc = []byte{ 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, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x75, - 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x72, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x22, 0x7b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x41, 0x6c, 0x69, - 0x61, 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, - 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, - 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x6f, 0x73, 0x22, 0x85, - 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, 0x32, 0x0a, 0x05, 0x63, 0x61, - 0x6c, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, 0x79, 0x7a, 0x2e, + 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x72, 0x12, 0x44, 0x0a, 0x07, 0x74, 0x79, 0x70, 0x65, + 0x4d, 0x61, 0x70, 0x18, 0x08, 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, 0x52, 0x65, 0x66, 0x52, 0x05, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x42, 0x06, - 0x0a, 0x04, 0x5f, 0x70, 0x6f, 0x73, 0x22, 0x67, 0x0a, 0x0f, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x43, 0x72, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 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, 0x63, 0x72, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x63, 0x72, 0x6f, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x6f, 0x73, 0x22, - 0x89, 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, + 0x65, 0x6d, 0x61, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, + 0x4d, 0x61, 0x70, 0x48, 0x00, 0x52, 0x07, 0x74, 0x79, 0x70, 0x65, 0x4d, 0x61, 0x70, 0x42, 0x07, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x7b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x41, 0x6c, 0x69, 0x61, 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, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x42, 0x06, 0x0a, 0x04, + 0x5f, 0x70, 0x6f, 0x73, 0x22, 0x85, 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, 0x32, 0x0a, 0x05, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 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, 0x52, 0x65, 0x66, 0x52, 0x05, 0x63, + 0x61, 0x6c, 0x6c, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x6f, 0x73, 0x22, 0x67, 0x0a, 0x0f, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x43, 0x72, 0x6f, 0x6e, 0x4a, 0x6f, 0x62, 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, 0x63, 0x72, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x72, 0x6f, 0x6e, 0x42, 0x06, 0x0a, + 0x04, 0x5f, 0x70, 0x6f, 0x73, 0x22, 0x89, 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, 0x32, 0x0a, 0x05, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x18, 0x02, + 0x20, 0x03, 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, 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, - 0x32, 0x0a, 0x05, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 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, 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, + 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, 0xb6, 0x01, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x52, 0x65, 0x74, 0x72, 0x79, 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, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x48, 0x01, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, + 0x0a, 0x6d, 0x69, 0x6e, 0x42, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x6d, 0x69, 0x6e, 0x42, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x12, 0x1e, 0x0a, + 0x0a, 0x6d, 0x61, 0x78, 0x42, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x42, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x42, 0x06, 0x0a, + 0x04, 0x5f, 0x70, 0x6f, 0x73, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, + 0x6a, 0x0a, 0x12, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x53, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x62, 0x65, 0x72, 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, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x6f, 0x73, 0x22, 0x8d, 0x01, 0x0a, 0x0f, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x61, 0x70, 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, 0xb6, 0x01, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x74, - 0x72, 0x79, 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, 0x19, 0x0a, 0x05, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x69, 0x6e, 0x42, 0x61, - 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x69, 0x6e, - 0x42, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x42, 0x61, - 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x61, 0x78, - 0x42, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x6f, 0x73, 0x42, - 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x6a, 0x0a, 0x12, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x72, 0x12, + 0x00, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x88, 0x01, 0x01, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x75, 0x6e, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x75, 0x6e, 0x74, + 0x69, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x61, 0x6d, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x4e, + 0x61, 0x6d, 0x65, 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, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 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, + 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, 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, + 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, 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, 0xba, 0x01, 0x0a, 0x03, 0x52, 0x65, 0x66, 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, 0x16, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x45, + 0x0a, 0x0e, 0x74, 0x79, 0x70, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, + 0x18, 0x04, 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, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0e, 0x74, 0x79, 0x70, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x6f, 0x73, 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, 0xad, 0x01, 0x0a, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 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, 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, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x74, 0x79, + 0x70, 0x65, 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, 0x04, 0x74, 0x79, 0x70, 0x65, 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, 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, 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, 0xba, 0x01, 0x0a, 0x03, 0x52, - 0x65, 0x66, 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, 0x16, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x45, 0x0a, 0x0e, 0x74, 0x79, 0x70, 0x65, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 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, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x0e, 0x74, 0x79, 0x70, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x42, - 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x6f, 0x73, 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, + 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, 0x65, 0x0a, 0x0b, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 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, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x07, - 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x6f, 0x73, 0x22, - 0xad, 0x01, 0x0a, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 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, 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, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 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, 0x04, 0x74, 0x79, 0x70, 0x65, 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, + 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, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x6f, 0x73, 0x22, 0xb4, 0x01, 0x0a, 0x0c, 0x53, 0x75, 0x62, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 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, 0x65, 0x0a, 0x0b, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 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, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, - 0x6f, 0x73, 0x22, 0xb4, 0x01, 0x0a, 0x0c, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 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, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x04, 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, 0x52, 0x65, 0x66, + 0x52, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 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, 0xc6, 0x01, 0x0a, 0x05, 0x54, 0x6f, + 0x70, 0x69, 0x63, 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, 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, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x32, 0x0a, - 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, + 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x70, + 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x70, 0x6f, 0x72, + 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 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, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, + 0x6f, 0x73, 0x22, 0x9a, 0x05, 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, 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, 0x52, 0x65, 0x66, 0x52, 0x05, 0x74, 0x6f, 0x70, 0x69, - 0x63, 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, 0xc6, 0x01, 0x0a, 0x05, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x38, 0x0a, + 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, 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, 0x30, 0x0a, 0x03, + 0x61, 0x6e, 0x79, 0x18, 0x09, 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, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x03, 0x61, 0x6e, 0x79, 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, 0x30, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x18, 0x0b, 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, 0x52, 0x65, 0x66, 0x48, 0x00, + 0x52, 0x03, 0x72, 0x65, 0x66, 0x12, 0x3f, 0x0a, 0x08, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, + 0x6c, 0x18, 0x0c, 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, + 0x87, 0x02, 0x0a, 0x09, 0x54, 0x79, 0x70, 0x65, 0x41, 0x6c, 0x69, 0x61, 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, @@ -4000,129 +4153,79 @@ var file_xyz_block_ftl_v1_schema_schema_proto_rawDesc = []byte{ 0x6e, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x33, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 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, 0x05, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x6f, 0x73, 0x22, 0x9a, 0x05, 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, 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, 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, + 0x31, 0x0a, 0x04, 0x74, 0x79, 0x70, 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, 0x04, 0x74, 0x79, + 0x70, 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, 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x6f, 0x73, 0x22, 0x65, 0x0a, 0x0d, 0x54, 0x79, 0x70, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 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, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x6f, 0x73, + 0x22, 0x82, 0x01, 0x0a, 0x09, 0x54, 0x79, 0x70, 0x65, 0x56, 0x61, 0x6c, 0x75, 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, 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, 0x30, 0x0a, 0x03, 0x61, 0x6e, 0x79, 0x18, 0x09, 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, 0x41, 0x6e, - 0x79, 0x48, 0x00, 0x52, 0x03, 0x61, 0x6e, 0x79, 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, 0x30, 0x0a, - 0x03, 0x72, 0x65, 0x66, 0x18, 0x0b, 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, 0x52, 0x65, 0x66, 0x48, 0x00, 0x52, 0x03, 0x72, 0x65, 0x66, 0x12, - 0x3f, 0x0a, 0x08, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x0c, 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, 0xc8, 0x01, 0x0a, 0x09, 0x54, 0x79, - 0x70, 0x65, 0x41, 0x6c, 0x69, 0x61, 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, 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, 0x16, 0x0a, - 0x06, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, - 0x78, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, + 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, 0x33, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 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, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x42, 0x06, 0x0a, 0x04, - 0x5f, 0x70, 0x6f, 0x73, 0x22, 0x65, 0x0a, 0x0d, 0x54, 0x79, 0x70, 0x65, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 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, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x6f, 0x73, 0x22, 0x82, 0x01, 0x0a, 0x09, - 0x54, 0x79, 0x70, 0x65, 0x56, 0x61, 0x6c, 0x75, 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, 0x33, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 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, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x70, 0x6f, 0x73, - 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, + 0x61, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x06, 0x0a, + 0x04, 0x5f, 0x70, 0x6f, 0x73, 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, + 0xdf, 0x01, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x48, 0x0a, 0x0b, 0x73, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 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, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x3f, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 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, 0xdf, 0x01, 0x0a, 0x05, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x48, 0x0a, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x18, 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, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, - 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3f, - 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 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, 0x49, 0x6e, 0x74, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, - 0x42, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x22, 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, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x09, 0x74, 0x79, 0x70, 0x65, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x96, 0x03, 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, 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, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x37, - 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x07, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, + 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x42, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 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, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x09, 0x74, + 0x79, 0x70, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x22, 0x96, 0x03, 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, 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, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x6f, 0x72, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x08, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 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, 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, 0x07, 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, 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, 0x07, - 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, 0x4e, 0x50, 0x01, 0x5a, 0x4a, 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, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 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, + 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, 0x4e, 0x50, 0x01, 0x5a, 0x4a, + 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, 0x62, 0x61, 0x63, 0x6b, 0x65, + 0x6e, 0x64, 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 ( @@ -4138,7 +4241,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_rawDescGZIP() []byte { } var file_xyz_block_ftl_v1_schema_schema_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_xyz_block_ftl_v1_schema_schema_proto_msgTypes = make([]protoimpl.MessageInfo, 48) +var file_xyz_block_ftl_v1_schema_schema_proto_msgTypes = make([]protoimpl.MessageInfo, 49) var file_xyz_block_ftl_v1_schema_schema_proto_goTypes = []any{ (Error_ErrorLevel)(0), // 0: xyz.block.ftl.v1.schema.Error.ErrorLevel (*Any)(nil), // 1: xyz.block.ftl.v1.schema.Any @@ -4171,78 +4274,79 @@ var file_xyz_block_ftl_v1_schema_schema_proto_goTypes = []any{ (*MetadataIngress)(nil), // 28: xyz.block.ftl.v1.schema.MetadataIngress (*MetadataRetry)(nil), // 29: xyz.block.ftl.v1.schema.MetadataRetry (*MetadataSubscriber)(nil), // 30: xyz.block.ftl.v1.schema.MetadataSubscriber - (*Module)(nil), // 31: xyz.block.ftl.v1.schema.Module - (*Optional)(nil), // 32: xyz.block.ftl.v1.schema.Optional - (*Position)(nil), // 33: xyz.block.ftl.v1.schema.Position - (*Ref)(nil), // 34: xyz.block.ftl.v1.schema.Ref - (*Schema)(nil), // 35: xyz.block.ftl.v1.schema.Schema - (*Secret)(nil), // 36: xyz.block.ftl.v1.schema.Secret - (*String)(nil), // 37: xyz.block.ftl.v1.schema.String - (*StringValue)(nil), // 38: xyz.block.ftl.v1.schema.StringValue - (*Subscription)(nil), // 39: xyz.block.ftl.v1.schema.Subscription - (*Time)(nil), // 40: xyz.block.ftl.v1.schema.Time - (*Topic)(nil), // 41: xyz.block.ftl.v1.schema.Topic - (*Type)(nil), // 42: xyz.block.ftl.v1.schema.Type - (*TypeAlias)(nil), // 43: xyz.block.ftl.v1.schema.TypeAlias - (*TypeParameter)(nil), // 44: xyz.block.ftl.v1.schema.TypeParameter - (*TypeValue)(nil), // 45: xyz.block.ftl.v1.schema.TypeValue - (*Unit)(nil), // 46: xyz.block.ftl.v1.schema.Unit - (*Value)(nil), // 47: xyz.block.ftl.v1.schema.Value - (*Verb)(nil), // 48: xyz.block.ftl.v1.schema.Verb - (*ModuleRuntime)(nil), // 49: xyz.block.ftl.v1.schema.ModuleRuntime - (*VerbRuntime)(nil), // 50: xyz.block.ftl.v1.schema.VerbRuntime + (*MetadataTypeMap)(nil), // 31: xyz.block.ftl.v1.schema.MetadataTypeMap + (*Module)(nil), // 32: xyz.block.ftl.v1.schema.Module + (*Optional)(nil), // 33: xyz.block.ftl.v1.schema.Optional + (*Position)(nil), // 34: xyz.block.ftl.v1.schema.Position + (*Ref)(nil), // 35: xyz.block.ftl.v1.schema.Ref + (*Schema)(nil), // 36: xyz.block.ftl.v1.schema.Schema + (*Secret)(nil), // 37: xyz.block.ftl.v1.schema.Secret + (*String)(nil), // 38: xyz.block.ftl.v1.schema.String + (*StringValue)(nil), // 39: xyz.block.ftl.v1.schema.StringValue + (*Subscription)(nil), // 40: xyz.block.ftl.v1.schema.Subscription + (*Time)(nil), // 41: xyz.block.ftl.v1.schema.Time + (*Topic)(nil), // 42: xyz.block.ftl.v1.schema.Topic + (*Type)(nil), // 43: xyz.block.ftl.v1.schema.Type + (*TypeAlias)(nil), // 44: xyz.block.ftl.v1.schema.TypeAlias + (*TypeParameter)(nil), // 45: xyz.block.ftl.v1.schema.TypeParameter + (*TypeValue)(nil), // 46: xyz.block.ftl.v1.schema.TypeValue + (*Unit)(nil), // 47: xyz.block.ftl.v1.schema.Unit + (*Value)(nil), // 48: xyz.block.ftl.v1.schema.Value + (*Verb)(nil), // 49: xyz.block.ftl.v1.schema.Verb + (*ModuleRuntime)(nil), // 50: xyz.block.ftl.v1.schema.ModuleRuntime + (*VerbRuntime)(nil), // 51: xyz.block.ftl.v1.schema.VerbRuntime } var file_xyz_block_ftl_v1_schema_schema_proto_depIdxs = []int32{ - 33, // 0: xyz.block.ftl.v1.schema.Any.pos:type_name -> xyz.block.ftl.v1.schema.Position - 33, // 1: xyz.block.ftl.v1.schema.Array.pos:type_name -> xyz.block.ftl.v1.schema.Position - 42, // 2: xyz.block.ftl.v1.schema.Array.element:type_name -> xyz.block.ftl.v1.schema.Type - 33, // 3: xyz.block.ftl.v1.schema.Bool.pos:type_name -> xyz.block.ftl.v1.schema.Position - 33, // 4: xyz.block.ftl.v1.schema.Bytes.pos:type_name -> xyz.block.ftl.v1.schema.Position - 33, // 5: xyz.block.ftl.v1.schema.Config.pos:type_name -> xyz.block.ftl.v1.schema.Position - 42, // 6: xyz.block.ftl.v1.schema.Config.type:type_name -> xyz.block.ftl.v1.schema.Type - 33, // 7: xyz.block.ftl.v1.schema.Data.pos:type_name -> xyz.block.ftl.v1.schema.Position - 44, // 8: xyz.block.ftl.v1.schema.Data.typeParameters:type_name -> xyz.block.ftl.v1.schema.TypeParameter + 34, // 0: xyz.block.ftl.v1.schema.Any.pos:type_name -> xyz.block.ftl.v1.schema.Position + 34, // 1: xyz.block.ftl.v1.schema.Array.pos:type_name -> xyz.block.ftl.v1.schema.Position + 43, // 2: xyz.block.ftl.v1.schema.Array.element:type_name -> xyz.block.ftl.v1.schema.Type + 34, // 3: xyz.block.ftl.v1.schema.Bool.pos:type_name -> xyz.block.ftl.v1.schema.Position + 34, // 4: xyz.block.ftl.v1.schema.Bytes.pos:type_name -> xyz.block.ftl.v1.schema.Position + 34, // 5: xyz.block.ftl.v1.schema.Config.pos:type_name -> xyz.block.ftl.v1.schema.Position + 43, // 6: xyz.block.ftl.v1.schema.Config.type:type_name -> xyz.block.ftl.v1.schema.Type + 34, // 7: xyz.block.ftl.v1.schema.Data.pos:type_name -> xyz.block.ftl.v1.schema.Position + 45, // 8: xyz.block.ftl.v1.schema.Data.typeParameters:type_name -> xyz.block.ftl.v1.schema.TypeParameter 15, // 9: xyz.block.ftl.v1.schema.Data.fields:type_name -> xyz.block.ftl.v1.schema.Field 23, // 10: xyz.block.ftl.v1.schema.Data.metadata:type_name -> xyz.block.ftl.v1.schema.Metadata - 33, // 11: xyz.block.ftl.v1.schema.Database.pos:type_name -> xyz.block.ftl.v1.schema.Position + 34, // 11: xyz.block.ftl.v1.schema.Database.pos:type_name -> xyz.block.ftl.v1.schema.Position 6, // 12: xyz.block.ftl.v1.schema.Decl.data:type_name -> xyz.block.ftl.v1.schema.Data - 48, // 13: xyz.block.ftl.v1.schema.Decl.verb:type_name -> xyz.block.ftl.v1.schema.Verb + 49, // 13: xyz.block.ftl.v1.schema.Decl.verb:type_name -> xyz.block.ftl.v1.schema.Verb 7, // 14: xyz.block.ftl.v1.schema.Decl.database:type_name -> xyz.block.ftl.v1.schema.Database 9, // 15: xyz.block.ftl.v1.schema.Decl.enum:type_name -> xyz.block.ftl.v1.schema.Enum - 43, // 16: xyz.block.ftl.v1.schema.Decl.typeAlias:type_name -> xyz.block.ftl.v1.schema.TypeAlias + 44, // 16: xyz.block.ftl.v1.schema.Decl.typeAlias:type_name -> xyz.block.ftl.v1.schema.TypeAlias 5, // 17: xyz.block.ftl.v1.schema.Decl.config:type_name -> xyz.block.ftl.v1.schema.Config - 36, // 18: xyz.block.ftl.v1.schema.Decl.secret:type_name -> xyz.block.ftl.v1.schema.Secret + 37, // 18: xyz.block.ftl.v1.schema.Decl.secret:type_name -> xyz.block.ftl.v1.schema.Secret 13, // 19: xyz.block.ftl.v1.schema.Decl.fsm:type_name -> xyz.block.ftl.v1.schema.FSM - 41, // 20: xyz.block.ftl.v1.schema.Decl.topic:type_name -> xyz.block.ftl.v1.schema.Topic - 39, // 21: xyz.block.ftl.v1.schema.Decl.subscription:type_name -> xyz.block.ftl.v1.schema.Subscription - 33, // 22: xyz.block.ftl.v1.schema.Enum.pos:type_name -> xyz.block.ftl.v1.schema.Position - 42, // 23: xyz.block.ftl.v1.schema.Enum.type:type_name -> xyz.block.ftl.v1.schema.Type + 42, // 20: xyz.block.ftl.v1.schema.Decl.topic:type_name -> xyz.block.ftl.v1.schema.Topic + 40, // 21: xyz.block.ftl.v1.schema.Decl.subscription:type_name -> xyz.block.ftl.v1.schema.Subscription + 34, // 22: xyz.block.ftl.v1.schema.Enum.pos:type_name -> xyz.block.ftl.v1.schema.Position + 43, // 23: xyz.block.ftl.v1.schema.Enum.type:type_name -> xyz.block.ftl.v1.schema.Type 10, // 24: xyz.block.ftl.v1.schema.Enum.variants:type_name -> xyz.block.ftl.v1.schema.EnumVariant - 33, // 25: xyz.block.ftl.v1.schema.EnumVariant.pos:type_name -> xyz.block.ftl.v1.schema.Position - 47, // 26: xyz.block.ftl.v1.schema.EnumVariant.value:type_name -> xyz.block.ftl.v1.schema.Value - 33, // 27: xyz.block.ftl.v1.schema.Error.pos:type_name -> xyz.block.ftl.v1.schema.Position + 34, // 25: xyz.block.ftl.v1.schema.EnumVariant.pos:type_name -> xyz.block.ftl.v1.schema.Position + 48, // 26: xyz.block.ftl.v1.schema.EnumVariant.value:type_name -> xyz.block.ftl.v1.schema.Value + 34, // 27: xyz.block.ftl.v1.schema.Error.pos:type_name -> xyz.block.ftl.v1.schema.Position 0, // 28: xyz.block.ftl.v1.schema.Error.level:type_name -> xyz.block.ftl.v1.schema.Error.ErrorLevel 11, // 29: xyz.block.ftl.v1.schema.ErrorList.errors:type_name -> xyz.block.ftl.v1.schema.Error - 33, // 30: xyz.block.ftl.v1.schema.FSM.pos:type_name -> xyz.block.ftl.v1.schema.Position - 34, // 31: xyz.block.ftl.v1.schema.FSM.start:type_name -> xyz.block.ftl.v1.schema.Ref + 34, // 30: xyz.block.ftl.v1.schema.FSM.pos:type_name -> xyz.block.ftl.v1.schema.Position + 35, // 31: xyz.block.ftl.v1.schema.FSM.start:type_name -> xyz.block.ftl.v1.schema.Ref 14, // 32: xyz.block.ftl.v1.schema.FSM.transitions:type_name -> xyz.block.ftl.v1.schema.FSMTransition 23, // 33: xyz.block.ftl.v1.schema.FSM.metadata:type_name -> xyz.block.ftl.v1.schema.Metadata - 33, // 34: xyz.block.ftl.v1.schema.FSMTransition.pos:type_name -> xyz.block.ftl.v1.schema.Position - 34, // 35: xyz.block.ftl.v1.schema.FSMTransition.from:type_name -> xyz.block.ftl.v1.schema.Ref - 34, // 36: xyz.block.ftl.v1.schema.FSMTransition.to:type_name -> xyz.block.ftl.v1.schema.Ref - 33, // 37: xyz.block.ftl.v1.schema.Field.pos:type_name -> xyz.block.ftl.v1.schema.Position - 42, // 38: xyz.block.ftl.v1.schema.Field.type:type_name -> xyz.block.ftl.v1.schema.Type + 34, // 34: xyz.block.ftl.v1.schema.FSMTransition.pos:type_name -> xyz.block.ftl.v1.schema.Position + 35, // 35: xyz.block.ftl.v1.schema.FSMTransition.from:type_name -> xyz.block.ftl.v1.schema.Ref + 35, // 36: xyz.block.ftl.v1.schema.FSMTransition.to:type_name -> xyz.block.ftl.v1.schema.Ref + 34, // 37: xyz.block.ftl.v1.schema.Field.pos:type_name -> xyz.block.ftl.v1.schema.Position + 43, // 38: xyz.block.ftl.v1.schema.Field.type:type_name -> xyz.block.ftl.v1.schema.Type 23, // 39: xyz.block.ftl.v1.schema.Field.metadata:type_name -> xyz.block.ftl.v1.schema.Metadata - 33, // 40: xyz.block.ftl.v1.schema.Float.pos:type_name -> xyz.block.ftl.v1.schema.Position + 34, // 40: xyz.block.ftl.v1.schema.Float.pos:type_name -> xyz.block.ftl.v1.schema.Position 18, // 41: xyz.block.ftl.v1.schema.IngressPathComponent.ingressPathLiteral:type_name -> xyz.block.ftl.v1.schema.IngressPathLiteral 19, // 42: xyz.block.ftl.v1.schema.IngressPathComponent.ingressPathParameter:type_name -> xyz.block.ftl.v1.schema.IngressPathParameter - 33, // 43: xyz.block.ftl.v1.schema.IngressPathLiteral.pos:type_name -> xyz.block.ftl.v1.schema.Position - 33, // 44: xyz.block.ftl.v1.schema.IngressPathParameter.pos:type_name -> xyz.block.ftl.v1.schema.Position - 33, // 45: xyz.block.ftl.v1.schema.Int.pos:type_name -> xyz.block.ftl.v1.schema.Position - 33, // 46: xyz.block.ftl.v1.schema.IntValue.pos:type_name -> xyz.block.ftl.v1.schema.Position - 33, // 47: xyz.block.ftl.v1.schema.Map.pos:type_name -> xyz.block.ftl.v1.schema.Position - 42, // 48: xyz.block.ftl.v1.schema.Map.key:type_name -> xyz.block.ftl.v1.schema.Type - 42, // 49: xyz.block.ftl.v1.schema.Map.value:type_name -> xyz.block.ftl.v1.schema.Type + 34, // 43: xyz.block.ftl.v1.schema.IngressPathLiteral.pos:type_name -> xyz.block.ftl.v1.schema.Position + 34, // 44: xyz.block.ftl.v1.schema.IngressPathParameter.pos:type_name -> xyz.block.ftl.v1.schema.Position + 34, // 45: xyz.block.ftl.v1.schema.Int.pos:type_name -> xyz.block.ftl.v1.schema.Position + 34, // 46: xyz.block.ftl.v1.schema.IntValue.pos:type_name -> xyz.block.ftl.v1.schema.Position + 34, // 47: xyz.block.ftl.v1.schema.Map.pos:type_name -> xyz.block.ftl.v1.schema.Position + 43, // 48: xyz.block.ftl.v1.schema.Map.key:type_name -> xyz.block.ftl.v1.schema.Type + 43, // 49: xyz.block.ftl.v1.schema.Map.value:type_name -> xyz.block.ftl.v1.schema.Type 25, // 50: xyz.block.ftl.v1.schema.Metadata.calls:type_name -> xyz.block.ftl.v1.schema.MetadataCalls 28, // 51: xyz.block.ftl.v1.schema.Metadata.ingress:type_name -> xyz.block.ftl.v1.schema.MetadataIngress 26, // 52: xyz.block.ftl.v1.schema.Metadata.cronJob:type_name -> xyz.block.ftl.v1.schema.MetadataCronJob @@ -4250,65 +4354,68 @@ var file_xyz_block_ftl_v1_schema_schema_proto_depIdxs = []int32{ 24, // 54: xyz.block.ftl.v1.schema.Metadata.alias:type_name -> xyz.block.ftl.v1.schema.MetadataAlias 29, // 55: xyz.block.ftl.v1.schema.Metadata.retry:type_name -> xyz.block.ftl.v1.schema.MetadataRetry 30, // 56: xyz.block.ftl.v1.schema.Metadata.subscriber:type_name -> xyz.block.ftl.v1.schema.MetadataSubscriber - 33, // 57: xyz.block.ftl.v1.schema.MetadataAlias.pos:type_name -> xyz.block.ftl.v1.schema.Position - 33, // 58: xyz.block.ftl.v1.schema.MetadataCalls.pos:type_name -> xyz.block.ftl.v1.schema.Position - 34, // 59: xyz.block.ftl.v1.schema.MetadataCalls.calls:type_name -> xyz.block.ftl.v1.schema.Ref - 33, // 60: xyz.block.ftl.v1.schema.MetadataCronJob.pos:type_name -> xyz.block.ftl.v1.schema.Position - 33, // 61: xyz.block.ftl.v1.schema.MetadataDatabases.pos:type_name -> xyz.block.ftl.v1.schema.Position - 34, // 62: xyz.block.ftl.v1.schema.MetadataDatabases.calls:type_name -> xyz.block.ftl.v1.schema.Ref - 33, // 63: xyz.block.ftl.v1.schema.MetadataIngress.pos:type_name -> xyz.block.ftl.v1.schema.Position - 17, // 64: xyz.block.ftl.v1.schema.MetadataIngress.path:type_name -> xyz.block.ftl.v1.schema.IngressPathComponent - 33, // 65: xyz.block.ftl.v1.schema.MetadataRetry.pos:type_name -> xyz.block.ftl.v1.schema.Position - 33, // 66: xyz.block.ftl.v1.schema.MetadataSubscriber.pos:type_name -> xyz.block.ftl.v1.schema.Position - 49, // 67: xyz.block.ftl.v1.schema.Module.runtime:type_name -> xyz.block.ftl.v1.schema.ModuleRuntime - 33, // 68: xyz.block.ftl.v1.schema.Module.pos:type_name -> xyz.block.ftl.v1.schema.Position - 8, // 69: xyz.block.ftl.v1.schema.Module.decls:type_name -> xyz.block.ftl.v1.schema.Decl - 33, // 70: xyz.block.ftl.v1.schema.Optional.pos:type_name -> xyz.block.ftl.v1.schema.Position - 42, // 71: xyz.block.ftl.v1.schema.Optional.type:type_name -> xyz.block.ftl.v1.schema.Type - 33, // 72: xyz.block.ftl.v1.schema.Ref.pos:type_name -> xyz.block.ftl.v1.schema.Position - 42, // 73: xyz.block.ftl.v1.schema.Ref.typeParameters:type_name -> xyz.block.ftl.v1.schema.Type - 33, // 74: xyz.block.ftl.v1.schema.Schema.pos:type_name -> xyz.block.ftl.v1.schema.Position - 31, // 75: xyz.block.ftl.v1.schema.Schema.modules:type_name -> xyz.block.ftl.v1.schema.Module - 33, // 76: xyz.block.ftl.v1.schema.Secret.pos:type_name -> xyz.block.ftl.v1.schema.Position - 42, // 77: xyz.block.ftl.v1.schema.Secret.type:type_name -> xyz.block.ftl.v1.schema.Type - 33, // 78: xyz.block.ftl.v1.schema.String.pos:type_name -> xyz.block.ftl.v1.schema.Position - 33, // 79: xyz.block.ftl.v1.schema.StringValue.pos:type_name -> xyz.block.ftl.v1.schema.Position - 33, // 80: xyz.block.ftl.v1.schema.Subscription.pos:type_name -> xyz.block.ftl.v1.schema.Position - 34, // 81: xyz.block.ftl.v1.schema.Subscription.topic:type_name -> xyz.block.ftl.v1.schema.Ref - 33, // 82: xyz.block.ftl.v1.schema.Time.pos:type_name -> xyz.block.ftl.v1.schema.Position - 33, // 83: xyz.block.ftl.v1.schema.Topic.pos:type_name -> xyz.block.ftl.v1.schema.Position - 42, // 84: xyz.block.ftl.v1.schema.Topic.event:type_name -> xyz.block.ftl.v1.schema.Type - 20, // 85: xyz.block.ftl.v1.schema.Type.int:type_name -> xyz.block.ftl.v1.schema.Int - 16, // 86: xyz.block.ftl.v1.schema.Type.float:type_name -> xyz.block.ftl.v1.schema.Float - 37, // 87: xyz.block.ftl.v1.schema.Type.string:type_name -> xyz.block.ftl.v1.schema.String - 4, // 88: xyz.block.ftl.v1.schema.Type.bytes:type_name -> xyz.block.ftl.v1.schema.Bytes - 3, // 89: xyz.block.ftl.v1.schema.Type.bool:type_name -> xyz.block.ftl.v1.schema.Bool - 40, // 90: xyz.block.ftl.v1.schema.Type.time:type_name -> xyz.block.ftl.v1.schema.Time - 2, // 91: xyz.block.ftl.v1.schema.Type.array:type_name -> xyz.block.ftl.v1.schema.Array - 22, // 92: xyz.block.ftl.v1.schema.Type.map:type_name -> xyz.block.ftl.v1.schema.Map - 1, // 93: xyz.block.ftl.v1.schema.Type.any:type_name -> xyz.block.ftl.v1.schema.Any - 46, // 94: xyz.block.ftl.v1.schema.Type.unit:type_name -> xyz.block.ftl.v1.schema.Unit - 34, // 95: xyz.block.ftl.v1.schema.Type.ref:type_name -> xyz.block.ftl.v1.schema.Ref - 32, // 96: xyz.block.ftl.v1.schema.Type.optional:type_name -> xyz.block.ftl.v1.schema.Optional - 33, // 97: xyz.block.ftl.v1.schema.TypeAlias.pos:type_name -> xyz.block.ftl.v1.schema.Position - 42, // 98: xyz.block.ftl.v1.schema.TypeAlias.type:type_name -> xyz.block.ftl.v1.schema.Type - 33, // 99: xyz.block.ftl.v1.schema.TypeParameter.pos:type_name -> xyz.block.ftl.v1.schema.Position - 33, // 100: xyz.block.ftl.v1.schema.TypeValue.pos:type_name -> xyz.block.ftl.v1.schema.Position - 42, // 101: xyz.block.ftl.v1.schema.TypeValue.value:type_name -> xyz.block.ftl.v1.schema.Type - 33, // 102: xyz.block.ftl.v1.schema.Unit.pos:type_name -> xyz.block.ftl.v1.schema.Position - 38, // 103: xyz.block.ftl.v1.schema.Value.stringValue:type_name -> xyz.block.ftl.v1.schema.StringValue - 21, // 104: xyz.block.ftl.v1.schema.Value.intValue:type_name -> xyz.block.ftl.v1.schema.IntValue - 45, // 105: xyz.block.ftl.v1.schema.Value.typeValue:type_name -> xyz.block.ftl.v1.schema.TypeValue - 50, // 106: xyz.block.ftl.v1.schema.Verb.runtime:type_name -> xyz.block.ftl.v1.schema.VerbRuntime - 33, // 107: xyz.block.ftl.v1.schema.Verb.pos:type_name -> xyz.block.ftl.v1.schema.Position - 42, // 108: xyz.block.ftl.v1.schema.Verb.request:type_name -> xyz.block.ftl.v1.schema.Type - 42, // 109: xyz.block.ftl.v1.schema.Verb.response:type_name -> xyz.block.ftl.v1.schema.Type - 23, // 110: xyz.block.ftl.v1.schema.Verb.metadata:type_name -> xyz.block.ftl.v1.schema.Metadata - 111, // [111:111] is the sub-list for method output_type - 111, // [111:111] is the sub-list for method input_type - 111, // [111:111] is the sub-list for extension type_name - 111, // [111:111] is the sub-list for extension extendee - 0, // [0:111] is the sub-list for field type_name + 31, // 57: xyz.block.ftl.v1.schema.Metadata.typeMap:type_name -> xyz.block.ftl.v1.schema.MetadataTypeMap + 34, // 58: xyz.block.ftl.v1.schema.MetadataAlias.pos:type_name -> xyz.block.ftl.v1.schema.Position + 34, // 59: xyz.block.ftl.v1.schema.MetadataCalls.pos:type_name -> xyz.block.ftl.v1.schema.Position + 35, // 60: xyz.block.ftl.v1.schema.MetadataCalls.calls:type_name -> xyz.block.ftl.v1.schema.Ref + 34, // 61: xyz.block.ftl.v1.schema.MetadataCronJob.pos:type_name -> xyz.block.ftl.v1.schema.Position + 34, // 62: xyz.block.ftl.v1.schema.MetadataDatabases.pos:type_name -> xyz.block.ftl.v1.schema.Position + 35, // 63: xyz.block.ftl.v1.schema.MetadataDatabases.calls:type_name -> xyz.block.ftl.v1.schema.Ref + 34, // 64: xyz.block.ftl.v1.schema.MetadataIngress.pos:type_name -> xyz.block.ftl.v1.schema.Position + 17, // 65: xyz.block.ftl.v1.schema.MetadataIngress.path:type_name -> xyz.block.ftl.v1.schema.IngressPathComponent + 34, // 66: xyz.block.ftl.v1.schema.MetadataRetry.pos:type_name -> xyz.block.ftl.v1.schema.Position + 34, // 67: xyz.block.ftl.v1.schema.MetadataSubscriber.pos:type_name -> xyz.block.ftl.v1.schema.Position + 34, // 68: xyz.block.ftl.v1.schema.MetadataTypeMap.pos:type_name -> xyz.block.ftl.v1.schema.Position + 50, // 69: xyz.block.ftl.v1.schema.Module.runtime:type_name -> xyz.block.ftl.v1.schema.ModuleRuntime + 34, // 70: xyz.block.ftl.v1.schema.Module.pos:type_name -> xyz.block.ftl.v1.schema.Position + 8, // 71: xyz.block.ftl.v1.schema.Module.decls:type_name -> xyz.block.ftl.v1.schema.Decl + 34, // 72: xyz.block.ftl.v1.schema.Optional.pos:type_name -> xyz.block.ftl.v1.schema.Position + 43, // 73: xyz.block.ftl.v1.schema.Optional.type:type_name -> xyz.block.ftl.v1.schema.Type + 34, // 74: xyz.block.ftl.v1.schema.Ref.pos:type_name -> xyz.block.ftl.v1.schema.Position + 43, // 75: xyz.block.ftl.v1.schema.Ref.typeParameters:type_name -> xyz.block.ftl.v1.schema.Type + 34, // 76: xyz.block.ftl.v1.schema.Schema.pos:type_name -> xyz.block.ftl.v1.schema.Position + 32, // 77: xyz.block.ftl.v1.schema.Schema.modules:type_name -> xyz.block.ftl.v1.schema.Module + 34, // 78: xyz.block.ftl.v1.schema.Secret.pos:type_name -> xyz.block.ftl.v1.schema.Position + 43, // 79: xyz.block.ftl.v1.schema.Secret.type:type_name -> xyz.block.ftl.v1.schema.Type + 34, // 80: xyz.block.ftl.v1.schema.String.pos:type_name -> xyz.block.ftl.v1.schema.Position + 34, // 81: xyz.block.ftl.v1.schema.StringValue.pos:type_name -> xyz.block.ftl.v1.schema.Position + 34, // 82: xyz.block.ftl.v1.schema.Subscription.pos:type_name -> xyz.block.ftl.v1.schema.Position + 35, // 83: xyz.block.ftl.v1.schema.Subscription.topic:type_name -> xyz.block.ftl.v1.schema.Ref + 34, // 84: xyz.block.ftl.v1.schema.Time.pos:type_name -> xyz.block.ftl.v1.schema.Position + 34, // 85: xyz.block.ftl.v1.schema.Topic.pos:type_name -> xyz.block.ftl.v1.schema.Position + 43, // 86: xyz.block.ftl.v1.schema.Topic.event:type_name -> xyz.block.ftl.v1.schema.Type + 20, // 87: xyz.block.ftl.v1.schema.Type.int:type_name -> xyz.block.ftl.v1.schema.Int + 16, // 88: xyz.block.ftl.v1.schema.Type.float:type_name -> xyz.block.ftl.v1.schema.Float + 38, // 89: xyz.block.ftl.v1.schema.Type.string:type_name -> xyz.block.ftl.v1.schema.String + 4, // 90: xyz.block.ftl.v1.schema.Type.bytes:type_name -> xyz.block.ftl.v1.schema.Bytes + 3, // 91: xyz.block.ftl.v1.schema.Type.bool:type_name -> xyz.block.ftl.v1.schema.Bool + 41, // 92: xyz.block.ftl.v1.schema.Type.time:type_name -> xyz.block.ftl.v1.schema.Time + 2, // 93: xyz.block.ftl.v1.schema.Type.array:type_name -> xyz.block.ftl.v1.schema.Array + 22, // 94: xyz.block.ftl.v1.schema.Type.map:type_name -> xyz.block.ftl.v1.schema.Map + 1, // 95: xyz.block.ftl.v1.schema.Type.any:type_name -> xyz.block.ftl.v1.schema.Any + 47, // 96: xyz.block.ftl.v1.schema.Type.unit:type_name -> xyz.block.ftl.v1.schema.Unit + 35, // 97: xyz.block.ftl.v1.schema.Type.ref:type_name -> xyz.block.ftl.v1.schema.Ref + 33, // 98: xyz.block.ftl.v1.schema.Type.optional:type_name -> xyz.block.ftl.v1.schema.Optional + 34, // 99: xyz.block.ftl.v1.schema.TypeAlias.pos:type_name -> xyz.block.ftl.v1.schema.Position + 43, // 100: xyz.block.ftl.v1.schema.TypeAlias.type:type_name -> xyz.block.ftl.v1.schema.Type + 23, // 101: xyz.block.ftl.v1.schema.TypeAlias.metadata:type_name -> xyz.block.ftl.v1.schema.Metadata + 34, // 102: xyz.block.ftl.v1.schema.TypeParameter.pos:type_name -> xyz.block.ftl.v1.schema.Position + 34, // 103: xyz.block.ftl.v1.schema.TypeValue.pos:type_name -> xyz.block.ftl.v1.schema.Position + 43, // 104: xyz.block.ftl.v1.schema.TypeValue.value:type_name -> xyz.block.ftl.v1.schema.Type + 34, // 105: xyz.block.ftl.v1.schema.Unit.pos:type_name -> xyz.block.ftl.v1.schema.Position + 39, // 106: xyz.block.ftl.v1.schema.Value.stringValue:type_name -> xyz.block.ftl.v1.schema.StringValue + 21, // 107: xyz.block.ftl.v1.schema.Value.intValue:type_name -> xyz.block.ftl.v1.schema.IntValue + 46, // 108: xyz.block.ftl.v1.schema.Value.typeValue:type_name -> xyz.block.ftl.v1.schema.TypeValue + 51, // 109: xyz.block.ftl.v1.schema.Verb.runtime:type_name -> xyz.block.ftl.v1.schema.VerbRuntime + 34, // 110: xyz.block.ftl.v1.schema.Verb.pos:type_name -> xyz.block.ftl.v1.schema.Position + 43, // 111: xyz.block.ftl.v1.schema.Verb.request:type_name -> xyz.block.ftl.v1.schema.Type + 43, // 112: xyz.block.ftl.v1.schema.Verb.response:type_name -> xyz.block.ftl.v1.schema.Type + 23, // 113: xyz.block.ftl.v1.schema.Verb.metadata:type_name -> xyz.block.ftl.v1.schema.Metadata + 114, // [114:114] is the sub-list for method output_type + 114, // [114:114] is the sub-list for method input_type + 114, // [114:114] is the sub-list for extension type_name + 114, // [114:114] is the sub-list for extension extendee + 0, // [0:114] is the sub-list for field type_name } func init() { file_xyz_block_ftl_v1_schema_schema_proto_init() } @@ -4679,7 +4786,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*Module); i { + switch v := v.(*MetadataTypeMap); i { case 0: return &v.state case 1: @@ -4691,7 +4798,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*Optional); i { + switch v := v.(*Module); i { case 0: return &v.state case 1: @@ -4703,7 +4810,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*Position); i { + switch v := v.(*Optional); i { case 0: return &v.state case 1: @@ -4715,7 +4822,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[33].Exporter = func(v any, i int) any { - switch v := v.(*Ref); i { + switch v := v.(*Position); i { case 0: return &v.state case 1: @@ -4727,7 +4834,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[34].Exporter = func(v any, i int) any { - switch v := v.(*Schema); i { + switch v := v.(*Ref); i { case 0: return &v.state case 1: @@ -4739,7 +4846,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[35].Exporter = func(v any, i int) any { - switch v := v.(*Secret); i { + switch v := v.(*Schema); i { case 0: return &v.state case 1: @@ -4751,7 +4858,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[36].Exporter = func(v any, i int) any { - switch v := v.(*String); i { + switch v := v.(*Secret); i { case 0: return &v.state case 1: @@ -4763,7 +4870,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[37].Exporter = func(v any, i int) any { - switch v := v.(*StringValue); i { + switch v := v.(*String); i { case 0: return &v.state case 1: @@ -4775,7 +4882,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[38].Exporter = func(v any, i int) any { - switch v := v.(*Subscription); i { + switch v := v.(*StringValue); i { case 0: return &v.state case 1: @@ -4787,7 +4894,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[39].Exporter = func(v any, i int) any { - switch v := v.(*Time); i { + switch v := v.(*Subscription); i { case 0: return &v.state case 1: @@ -4799,7 +4906,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[40].Exporter = func(v any, i int) any { - switch v := v.(*Topic); i { + switch v := v.(*Time); i { case 0: return &v.state case 1: @@ -4811,7 +4918,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[41].Exporter = func(v any, i int) any { - switch v := v.(*Type); i { + switch v := v.(*Topic); i { case 0: return &v.state case 1: @@ -4823,7 +4930,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[42].Exporter = func(v any, i int) any { - switch v := v.(*TypeAlias); i { + switch v := v.(*Type); i { case 0: return &v.state case 1: @@ -4835,7 +4942,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[43].Exporter = func(v any, i int) any { - switch v := v.(*TypeParameter); i { + switch v := v.(*TypeAlias); i { case 0: return &v.state case 1: @@ -4847,7 +4954,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[44].Exporter = func(v any, i int) any { - switch v := v.(*TypeValue); i { + switch v := v.(*TypeParameter); i { case 0: return &v.state case 1: @@ -4859,7 +4966,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*Unit); i { + switch v := v.(*TypeValue); i { case 0: return &v.state case 1: @@ -4871,7 +4978,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*Value); i { + switch v := v.(*Unit); i { case 0: return &v.state case 1: @@ -4883,6 +4990,18 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { } } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[47].Exporter = func(v any, i int) any { + switch v := v.(*Value); 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[48].Exporter = func(v any, i int) any { switch v := v.(*Verb); i { case 0: return &v.state @@ -4937,6 +5056,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { (*Metadata_Alias)(nil), (*Metadata_Retry)(nil), (*Metadata_Subscriber)(nil), + (*Metadata_TypeMap)(nil), } file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[23].OneofWrappers = []any{} file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[24].OneofWrappers = []any{} @@ -4947,7 +5067,7 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[29].OneofWrappers = []any{} file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[30].OneofWrappers = []any{} file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[31].OneofWrappers = []any{} - file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[33].OneofWrappers = []any{} + file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[32].OneofWrappers = []any{} file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[34].OneofWrappers = []any{} file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[35].OneofWrappers = []any{} file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[36].OneofWrappers = []any{} @@ -4955,7 +5075,8 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[38].OneofWrappers = []any{} file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[39].OneofWrappers = []any{} file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[40].OneofWrappers = []any{} - file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[41].OneofWrappers = []any{ + file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[41].OneofWrappers = []any{} + file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[42].OneofWrappers = []any{ (*Type_Int)(nil), (*Type_Float)(nil), (*Type_String_)(nil), @@ -4969,23 +5090,23 @@ func file_xyz_block_ftl_v1_schema_schema_proto_init() { (*Type_Ref)(nil), (*Type_Optional)(nil), } - file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[42].OneofWrappers = []any{} file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[43].OneofWrappers = []any{} file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[44].OneofWrappers = []any{} file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[45].OneofWrappers = []any{} - file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[46].OneofWrappers = []any{ + file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[46].OneofWrappers = []any{} + file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[47].OneofWrappers = []any{ (*Value_StringValue)(nil), (*Value_IntValue)(nil), (*Value_TypeValue)(nil), } - file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[47].OneofWrappers = []any{} + file_xyz_block_ftl_v1_schema_schema_proto_msgTypes[48].OneofWrappers = []any{} 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: 1, - NumMessages: 48, + NumMessages: 49, NumExtensions: 0, NumServices: 0, }, diff --git a/backend/protos/xyz/block/ftl/v1/schema/schema.proto b/backend/protos/xyz/block/ftl/v1/schema/schema.proto index bdc786070..053ce3911 100644 --- a/backend/protos/xyz/block/ftl/v1/schema/schema.proto +++ b/backend/protos/xyz/block/ftl/v1/schema/schema.proto @@ -166,6 +166,7 @@ message Metadata { MetadataAlias alias = 5; MetadataRetry retry = 6; MetadataSubscriber subscriber = 7; + MetadataTypeMap typeMap = 8; } } @@ -209,6 +210,12 @@ message MetadataSubscriber { string name = 2; } +message MetadataTypeMap { + optional Position pos = 1; + string runtime = 2; + string nativeName = 3; +} + message Module { optional ModuleRuntime runtime = 31634; @@ -300,6 +307,7 @@ message TypeAlias { bool export = 3; string name = 4; Type type = 5; + repeated Metadata metadata = 6; } message TypeParameter { diff --git a/backend/schema/data.go b/backend/schema/data.go index bd07e2ba9..a5327fab6 100644 --- a/backend/schema/data.go +++ b/backend/schema/data.go @@ -123,7 +123,7 @@ func (d *Data) Monomorphise(ref *Ref) (*Data, error) { *MetadataIngress, *MetadataCronJob, *MetadataAlias, *Module, *Schema, *String, *Time, Type, *TypeParameter, *Unit, *Verb, *Enum, *EnumVariant, Value, *IntValue, *StringValue, *TypeValue, Symbol, - Named, *FSM, *FSMTransition, *TypeAlias, *Topic, *Subscription, *MetadataSubscriber: + Named, *FSM, *FSMTransition, *TypeAlias, *Topic, *Subscription, *MetadataSubscriber, *MetadataTypeMap: } return next() }) @@ -137,7 +137,7 @@ func (d *Data) Position() Position { return d.Pos } func (*Data) schemaDecl() {} func (*Data) schemaSymbol() {} func (d *Data) schemaChildren() []Node { - children := make([]Node, 0, len(d.Fields)+len(d.Metadata)) + children := make([]Node, 0, len(d.Fields)+len(d.Metadata)+len(d.TypeParameters)) for _, t := range d.TypeParameters { children = append(children, t) } @@ -188,6 +188,7 @@ func (d *Data) ToProto() proto.Message { TypeParameters: nodeListToProto[*schemapb.TypeParameter](d.TypeParameters), Fields: nodeListToProto[*schemapb.Field](d.Fields), Comments: d.Comments, + Metadata: metadataListToProto(d.Metadata), } } @@ -200,6 +201,7 @@ func DataFromProto(s *schemapb.Data) *Data { TypeParameters: typeParametersToSchema(s.TypeParameters), Fields: fieldListToSchema(s.Fields), Comments: s.Comments, + Metadata: metadataListToSchema(s.Metadata), } } diff --git a/backend/schema/jsonschema.go b/backend/schema/jsonschema.go index d2a80cbb3..bd0d17c2d 100644 --- a/backend/schema/jsonschema.go +++ b/backend/schema/jsonschema.go @@ -193,7 +193,7 @@ func nodeToJSSchema(node Node, refs map[RefKey]*Ref) *jsonschema.Schema { *MetadataAlias, IngressPathComponent, *IngressPathLiteral, *IngressPathParameter, *Module, *Schema, Type, *Database, *Verb, *EnumVariant, *MetadataCronJob, Value, *StringValue, *IntValue, *TypeValue, *Config, *Secret, Symbol, Named, - *FSM, *FSMTransition, *MetadataRetry, *Topic, *Subscription, *MetadataSubscriber: + *FSM, *FSMTransition, *MetadataRetry, *Topic, *Subscription, *MetadataSubscriber, *MetadataTypeMap: panic(fmt.Sprintf("unsupported node type %T", node)) default: diff --git a/backend/schema/metadatatypemap.go b/backend/schema/metadatatypemap.go new file mode 100644 index 000000000..a91e25110 --- /dev/null +++ b/backend/schema/metadatatypemap.go @@ -0,0 +1,34 @@ +package schema + +import ( + "fmt" + + schemapb "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/schema" + "google.golang.org/protobuf/reflect/protoreflect" +) + +type MetadataTypeMap struct { + Pos Position `parser:"" protobuf:"1,optional"` + + Runtime string `parser:"'+' 'typemap' @('go' | 'kotlin')" protobuf:"2"` + NativeName string `parser:"@String" protobuf:"3"` +} + +var _ Metadata = (*MetadataTypeMap)(nil) + +func (m *MetadataTypeMap) Position() Position { return m.Pos } + +func (m *MetadataTypeMap) String() string { + return fmt.Sprintf("+typemap %s %q", m.Runtime, m.NativeName) +} + +func (m *MetadataTypeMap) ToProto() protoreflect.ProtoMessage { + return &schemapb.MetadataTypeMap{ + Pos: posToProto(m.Pos), + Runtime: m.Runtime, + NativeName: m.NativeName, + } +} + +func (m *MetadataTypeMap) schemaChildren() []Node { return nil } +func (m *MetadataTypeMap) schemaMetadata() {} diff --git a/backend/schema/parser.go b/backend/schema/parser.go index c3e7289a3..6059cde4c 100644 --- a/backend/schema/parser.go +++ b/backend/schema/parser.go @@ -21,7 +21,7 @@ var ( &Ref{}, } typeUnion = append(nonOptionalTypeUnion, &Optional{}) - metadataUnion = []Metadata{&MetadataCalls{}, &MetadataIngress{}, &MetadataCronJob{}, &MetadataDatabases{}, &MetadataAlias{}, &MetadataRetry{}, &MetadataSubscriber{}} + metadataUnion = []Metadata{&MetadataCalls{}, &MetadataIngress{}, &MetadataCronJob{}, &MetadataDatabases{}, &MetadataAlias{}, &MetadataRetry{}, &MetadataSubscriber{}, &MetadataTypeMap{}} ingressUnion = []IngressPathComponent{&IngressPathLiteral{}, &IngressPathParameter{}} valueUnion = []Value{&StringValue{}, &IntValue{}, &TypeValue{}} diff --git a/backend/schema/protobuf_dec.go b/backend/schema/protobuf_dec.go index ce73448a4..842e17687 100644 --- a/backend/schema/protobuf_dec.go +++ b/backend/schema/protobuf_dec.go @@ -171,6 +171,13 @@ func metadataToSchema(s *schemapb.Metadata) Metadata { Name: s.Subscriber.Name, } + case *schemapb.Metadata_TypeMap: + return &MetadataTypeMap{ + Pos: posFromProto(s.TypeMap.Pos), + Runtime: s.TypeMap.Runtime, + NativeName: s.TypeMap.NativeName, + } + default: panic(fmt.Sprintf("unhandled metadata type: %T", s)) } diff --git a/backend/schema/protobuf_enc.go b/backend/schema/protobuf_enc.go index 552bf9343..09baf3525 100644 --- a/backend/schema/protobuf_enc.go +++ b/backend/schema/protobuf_enc.go @@ -99,6 +99,9 @@ func metadataListToProto(nodes []Metadata) []*schemapb.Metadata { case *MetadataSubscriber: v = &schemapb.Metadata_Subscriber{Subscriber: n.ToProto().(*schemapb.MetadataSubscriber)} + case *MetadataTypeMap: + v = &schemapb.Metadata_TypeMap{TypeMap: n.ToProto().(*schemapb.MetadataTypeMap)} + default: panic(fmt.Sprintf("unhandled metadata type %T", n)) } diff --git a/backend/schema/schema_test.go b/backend/schema/schema_test.go index 1ff32252c..3394e5176 100644 --- a/backend/schema/schema_test.go +++ b/backend/schema/schema_test.go @@ -121,6 +121,12 @@ module payments { verb paid(payments.OnlinePaymentPaid) Unit } + +module typealias { + typealias NonFtlType Any + +typemap go "github.com/foo/bar.Type" + +typemap kotlin "com.foo.bar.Type" +} ` assert.Equal(t, normaliseString(expected), normaliseString(testSchema.String())) } @@ -1012,6 +1018,19 @@ var testSchema = MustValidate(&Schema{ }, }, }, + { + Name: "typealias", + Decls: []Decl{ + &TypeAlias{ + Name: "NonFtlType", + Type: &Any{}, + Metadata: []Metadata{ + &MetadataTypeMap{Runtime: "go", NativeName: "github.com/foo/bar.Type"}, + &MetadataTypeMap{Runtime: "kotlin", NativeName: "com.foo.bar.Type"}, + }, + }, + }, + }, }, }) @@ -1031,3 +1050,17 @@ func TestRetryParsing(t *testing.T) { assert.Equal(t, time.Second*time.Duration(tt.seconds), duration) } } + +func TestParseTypeMap(t *testing.T) { + input := ` + module typealias { + typealias NonFtlType Any + +typemap go "github.com/foo/bar.Type" + +typemap kotlin "com.foo.bar.Type" + } + ` + actual, err := ParseModuleString("", input) + assert.NoError(t, err) + actual = Normalise(actual) + assert.Equal(t, testSchema.Modules[4], actual, assert.Exclude[Position]()) +} diff --git a/backend/schema/typealias.go b/backend/schema/typealias.go index 3fc878659..38d95c102 100644 --- a/backend/schema/typealias.go +++ b/backend/schema/typealias.go @@ -12,10 +12,11 @@ import ( type TypeAlias struct { Pos Position `parser:"" protobuf:"1,optional"` - Comments []string `parser:"@Comment*" protobuf:"2"` - Export bool `parser:"@'export'?" protobuf:"3"` - Name string `parser:"'typealias' @Ident" protobuf:"4"` - Type Type `parser:"@@" protobuf:"5"` + Comments []string `parser:"@Comment*" protobuf:"2"` + Export bool `parser:"@'export'?" protobuf:"3"` + Name string `parser:"'typealias' @Ident" protobuf:"4"` + Type Type `parser:"@@" protobuf:"5"` + Metadata []Metadata `parser:"@@*" protobuf:"6"` } var _ Decl = (*TypeAlias)(nil) @@ -30,17 +31,20 @@ func (t *TypeAlias) String() string { fmt.Fprint(w, "export ") } fmt.Fprintf(w, "typealias %s %s", t.Name, t.Type) + fmt.Fprint(w, indent(encodeMetadata(t.Metadata))) return w.String() } func (*TypeAlias) schemaDecl() {} func (*TypeAlias) schemaSymbol() {} func (t *TypeAlias) schemaChildren() []Node { - if t.Type == nil { - return []Node{} + children := make([]Node, 0, len(t.Metadata)+1) + for _, m := range t.Metadata { + children = append(children, m) } - return []Node{ - t.Type, + if t.Type != nil { + children = append(children, t.Type) } + return children } func (t *TypeAlias) ToProto() proto.Message { return &schemapb.TypeAlias{ @@ -49,6 +53,7 @@ func (t *TypeAlias) ToProto() proto.Message { Name: t.Name, Export: t.Export, Type: TypeToProto(t.Type), + Metadata: metadataListToProto(t.Metadata), } } @@ -62,5 +67,6 @@ func TypeAliasFromProto(s *schemapb.TypeAlias) *TypeAlias { Export: s.Export, Comments: s.Comments, Type: TypeFromProto(s.Type), + Metadata: metadataListToSchema(s.Metadata), } } diff --git a/backend/schema/validate.go b/backend/schema/validate.go index 970ec14a7..6936eb3be 100644 --- a/backend/schema/validate.go +++ b/backend/schema/validate.go @@ -168,7 +168,7 @@ func ValidateModuleInSchema(schema *Schema, m optional.Option[*Module]) (*Schema } ingress[key] = n - case *MetadataCronJob, *MetadataRetry, *MetadataCalls, *MetadataDatabases, *MetadataAlias: + case *MetadataCronJob, *MetadataRetry, *MetadataCalls, *MetadataDatabases, *MetadataAlias, *MetadataTypeMap: } } @@ -224,7 +224,7 @@ func ValidateModuleInSchema(schema *Schema, m optional.Option[*Module]) (*Schema *MetadataIngress, *MetadataAlias, *Module, *Optional, *Schema, *TypeAlias, *String, *Time, Type, *Unit, *Any, *TypeParameter, *EnumVariant, *MetadataRetry, Value, *IntValue, *StringValue, *TypeValue, *Config, *Secret, Symbol, Named, - *MetadataSubscriber, *Subscription, *Topic: + *MetadataSubscriber, *Subscription, *Topic, *MetadataTypeMap: } return next() }) @@ -352,12 +352,19 @@ func ValidateModule(module *Module) error { merr = append(merr, errorf(n, "invalid name: must consist of only letters, numbers and underscores, and start with a letter.")) } + case *TypeAlias: + for _, md := range n.Metadata { + if _, ok := md.(*MetadataTypeMap); !ok { + merr = append(merr, errorf(md, "metadata %q is not valid on type aliases", strings.TrimSpace(md.String()))) + } + } + case *Array, *Bool, *Database, *Float, *Int, *Time, *Map, *Module, *Schema, *String, *Bytes, *MetadataCalls, *MetadataDatabases, *MetadataIngress, *MetadataCronJob, *MetadataAlias, IngressPathComponent, *IngressPathLiteral, *IngressPathParameter, *Optional, *Unit, *Any, *TypeParameter, *Enum, *EnumVariant, *IntValue, *StringValue, *TypeValue, - *FSM, *Config, *FSMTransition, *Secret, *TypeAlias, *MetadataRetry, *MetadataSubscriber: + *FSM, *Config, *FSMTransition, *Secret, *MetadataRetry, *MetadataSubscriber, *MetadataTypeMap: case Named, Symbol, Type, Metadata, Value, Decl: // Union types. } @@ -589,7 +596,7 @@ func validateVerbMetadata(scopes Scopes, module *Module, n *Verb) (merr []error) case *MetadataSubscriber: subErrs := validateVerbSubscriptions(module, n, md, scopes, optional.None[*Schema]()) merr = append(merr, subErrs...) - case *MetadataCalls, *MetadataDatabases, *MetadataAlias: + case *MetadataCalls, *MetadataDatabases, *MetadataAlias, *MetadataTypeMap: } } return @@ -632,17 +639,31 @@ func validateIngressRequestOrResponse(scopes Scopes, module *Module, n *Verb, re return } body = bodySym.Symbol - switch t := bodySym.Symbol.(type) { + err = validatePayloadType(bodySym.Symbol, r, n, reqOrResp) + if err != nil { + merr = append(merr, err) + } + return +} + +func validatePayloadType(n Node, r Type, v *Verb, reqOrResp string) error { + switch t := n.(type) { case *Bytes, *String, *Data, *Unit, *Float, *Int, *Bool, *Map, *Array: // Valid HTTP response payload types. + case *TypeAlias: + // allow aliases of external types + if len(t.Metadata) > 0 { + return nil + } + return validatePayloadType(t.Type, r, v, reqOrResp) case *Enum: // Type enums are valid but value enums are not. if t.IsValueEnum() { - merr = append(merr, errorf(r, "ingress verb %s: %s type %s must have a body of bytes, string, data structure, unit, float, int, bool, map, or array not enum %s", n.Name, reqOrResp, r, t.Name)) + return errorf(r, "ingress verb %s: %s type %s must have a body of bytes, string, data structure, unit, float, int, bool, map, or array not enum %s", v.Name, reqOrResp, r, t.Name) } default: - merr = append(merr, errorf(r, "ingress verb %s: %s type %s must have a body of bytes, string, data structure, unit, float, int, bool, map, or array not %s", n.Name, reqOrResp, r, bodySym.Symbol)) + return errorf(r, "ingress verb %s: %s type %s must have a body of bytes, string, data structure, unit, float, int, bool, map, or array not %s", v.Name, reqOrResp, r, n) } - return + return nil } func validateVerbSubscriptions(module *Module, v *Verb, md *MetadataSubscriber, scopes Scopes, schema optional.Option[*Schema]) (merr []error) { diff --git a/buildengine/build.go b/buildengine/build.go index 3a50e0522..a2a32a43d 100644 --- a/buildengine/build.go +++ b/buildengine/build.go @@ -66,6 +66,10 @@ func buildModule(ctx context.Context, projectRootDir string, sch *schema.Schema, } schema.SortErrorsByPosition(errorList.Errors) for _, e := range errorList.Errors { + if e.Level == schema.WARN { + logger.Log(log.Entry{Level: log.Warn, Message: e.Error(), Error: e}) + continue + } errs = append(errs, e) } diff --git a/buildengine/build_go_test.go b/buildengine/build_go_test.go index cdfd9c821..def7eea67 100644 --- a/buildengine/build_go_test.go +++ b/buildengine/build_go_test.go @@ -40,9 +40,9 @@ func TestExternalType(t *testing.T) { } testBuild(t, bctx, "", "unsupported external type", []assertion{ assertBuildProtoErrors( - "unsupported external type \"time.Month\"", - "unsupported type \"time.Month\" for field \"Month\"", - "unsupported response type \"ftl/external.ExternalResponse\"", + `unsupported external type "time.Month"`, + `unsupported type "time.Month" for field "Month"`, + `unsupported response type "ftl/external.ExternalResponse"`, ), }) } diff --git a/buildengine/testdata/another/types.ftl.go b/buildengine/testdata/another/types.ftl.go deleted file mode 100644 index cc9fc61e0..000000000 --- a/buildengine/testdata/another/types.ftl.go +++ /dev/null @@ -1,17 +0,0 @@ -// Code generated by FTL. DO NOT EDIT. -package another - -import "github.com/TBD54566975/ftl/go-runtime/ftl/reflection" - -func init() { - reflection.Register( - reflection.SumType[SecondTypeEnum]( - *new(One), - *new(Two), - ), - reflection.SumType[TypeEnum]( - *new(A), - *new(B), - ), - ) -} 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 fa512831b..7539c2a42 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 @@ -1226,6 +1226,12 @@ export class Metadata extends Message { */ value: MetadataSubscriber; case: "subscriber"; + } | { + /** + * @generated from field: xyz.block.ftl.v1.schema.MetadataTypeMap typeMap = 8; + */ + value: MetadataTypeMap; + case: "typeMap"; } | { case: undefined; value?: undefined } = { case: undefined }; constructor(data?: PartialMessage) { @@ -1243,6 +1249,7 @@ export class Metadata extends Message { { no: 5, name: "alias", kind: "message", T: MetadataAlias, oneof: "value" }, { no: 6, name: "retry", kind: "message", T: MetadataRetry, oneof: "value" }, { no: 7, name: "subscriber", kind: "message", T: MetadataSubscriber, oneof: "value" }, + { no: 8, name: "typeMap", kind: "message", T: MetadataTypeMap, oneof: "value" }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): Metadata { @@ -1593,6 +1600,55 @@ export class MetadataSubscriber extends Message { } } +/** + * @generated from message xyz.block.ftl.v1.schema.MetadataTypeMap + */ +export class MetadataTypeMap extends Message { + /** + * @generated from field: optional xyz.block.ftl.v1.schema.Position pos = 1; + */ + pos?: Position; + + /** + * @generated from field: string runtime = 2; + */ + runtime = ""; + + /** + * @generated from field: string nativeName = 3; + */ + nativeName = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.schema.MetadataTypeMap"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "pos", kind: "message", T: Position, opt: true }, + { no: 2, name: "runtime", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "nativeName", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): MetadataTypeMap { + return new MetadataTypeMap().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): MetadataTypeMap { + return new MetadataTypeMap().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): MetadataTypeMap { + return new MetadataTypeMap().fromJsonString(jsonString, options); + } + + static equals(a: MetadataTypeMap | PlainMessage | undefined, b: MetadataTypeMap | PlainMessage | undefined): boolean { + return proto3.util.equals(MetadataTypeMap, a, b); + } +} + /** * @generated from message xyz.block.ftl.v1.schema.Module */ @@ -2287,6 +2343,11 @@ export class TypeAlias extends Message { */ type?: Type; + /** + * @generated from field: repeated xyz.block.ftl.v1.schema.Metadata metadata = 6; + */ + metadata: Metadata[] = []; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -2300,6 +2361,7 @@ export class TypeAlias extends Message { { no: 3, name: "export", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, { no: 4, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 5, name: "type", kind: "message", T: Type }, + { no: 6, name: "metadata", kind: "message", T: Metadata, repeated: true }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): TypeAlias { diff --git a/go-runtime/compile/build-template/.ftl.tmpl/go/main/main.go.tmpl b/go-runtime/compile/build-template/.ftl.tmpl/go/main/main.go.tmpl index f61d39960..b28fb7a8f 100644 --- a/go-runtime/compile/build-template/.ftl.tmpl/go/main/main.go.tmpl +++ b/go-runtime/compile/build-template/.ftl.tmpl/go/main/main.go.tmpl @@ -4,9 +4,14 @@ package main import ( "context" +{{- range .ExternalGoTypes }} + + {{.Import}} +{{- end}} + "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/ftlv1connect" "github.com/TBD54566975/ftl/common/plugin" -{{- if .SumTypes }} +{{- if or .SumTypes .ExternalGoTypes }} "github.com/TBD54566975/ftl/go-runtime/ftl/reflection" {{- end }} "github.com/TBD54566975/ftl/go-runtime/server" @@ -14,7 +19,7 @@ import ( "ftl/{{.}}" {{- end}} ) -{{- if .SumTypes}} +{{- if or .SumTypes .ExternalGoTypes }} func init() { reflection.Register( @@ -24,6 +29,11 @@ func init() { *new({{.Type}}), {{- end}} ), +{{- end}} +{{- range .ExternalGoTypes}} + {{- range .Types}} + reflection.ExternalType(*new({{.}})), + {{- end}} {{- end}} ) } diff --git a/go-runtime/compile/build-template/types.ftl.go.tmpl b/go-runtime/compile/build-template/types.ftl.go.tmpl index 2b45c2fd0..c474a4c96 100644 --- a/go-runtime/compile/build-template/types.ftl.go.tmpl +++ b/go-runtime/compile/build-template/types.ftl.go.tmpl @@ -1,7 +1,14 @@ // Code generated by FTL. DO NOT EDIT. package {{.Name}} -{{if .LocalSumTypes }} -import "github.com/TBD54566975/ftl/go-runtime/ftl/reflection" + +{{- if or .LocalSumTypes .ExternalGoTypes }} + +import ( +{{- range .ExternalGoTypes }} + {{.Import}} +{{end}} + "github.com/TBD54566975/ftl/go-runtime/ftl/reflection" +) func init() { reflection.Register( @@ -11,6 +18,11 @@ func init() { *new({{.Name}}), {{- end}} ), +{{- end}} +{{- range .ExternalGoTypes}} + {{- range .Types}} + reflection.ExternalType(*new({{.}})), + {{- end}} {{- end}} ) } diff --git a/go-runtime/compile/build.go b/go-runtime/compile/build.go index d0276905e..da4aae55e 100644 --- a/go-runtime/compile/build.go +++ b/go-runtime/compile/build.go @@ -64,6 +64,7 @@ type mainModuleContext struct { Replacements []*modfile.Replace SumTypes []goSumType LocalSumTypes []goSumType + ExternalGoTypes []goExternalType } type goSumType struct { @@ -77,6 +78,11 @@ type goSumTypeVariant struct { SchemaType schema.Type } +type goExternalType struct { + Import string + Types []string +} + type ModifyFilesTransaction interface { Begin() error ModifiedFiles(paths ...string) error @@ -186,6 +192,7 @@ func Build(ctx context.Context, projectRootDir, moduleDir string, sch *schema.Sc } goVerbs = append(goVerbs, goverb) } + sumTypes, goExternalTypes := getRegisteredTypes(result.Module, sch, result.NativeNames) if err := internal.ScaffoldZip(buildTemplateFiles(), moduleDir, mainModuleContext{ GoVersion: goModVersion, FTLVersion: ftlVersion, @@ -193,8 +200,9 @@ func Build(ctx context.Context, projectRootDir, moduleDir string, sch *schema.Sc SharedModulesPaths: sharedModulesPaths, Verbs: goVerbs, Replacements: replacements, - SumTypes: getSumTypes(result.Module, sch, result.NativeNames), + SumTypes: sumTypes, LocalSumTypes: getLocalSumTypes(result.Module), + ExternalGoTypes: goExternalTypes, }, scaffolder.Exclude("^go.mod$"), scaffolder.Functions(funcs)); err != nil { return err } @@ -631,12 +639,17 @@ func getLocalSumTypes(module *schema.Module) []goSumType { return out } -func getSumTypes(module *schema.Module, sch *schema.Schema, nativeNames NativeNames) []goSumType { +func getRegisteredTypes(module *schema.Module, sch *schema.Schema, nativeNames NativeNames) ([]goSumType, []goExternalType) { sumTypes := make(map[string]goSumType) + goExternalTypes := make(map[string][]string) for _, d := range module.Decls { - if e, ok := d.(*schema.Enum); ok && !e.IsValueEnum() { - variants := make([]goSumTypeVariant, 0, len(e.Variants)) - for _, v := range e.Variants { + switch d := d.(type) { + case *schema.Enum: + if d.IsValueEnum() { + continue + } + variants := make([]goSumTypeVariant, 0, len(d.Variants)) + for _, v := range d.Variants { variants = append(variants, goSumTypeVariant{ //nolint:forcetypeassert Name: v.Name, Type: nativeNames[v], @@ -648,6 +661,22 @@ func getSumTypes(module *schema.Module, sch *schema.Schema, nativeNames NativeNa Discriminator: nativeNames[d], Variants: variants, } + case *schema.TypeAlias: + var fqName string + for _, m := range d.Metadata { + if m, ok := m.(*schema.MetadataTypeMap); ok && m.Runtime == "go" { + fqName = m.NativeName + } + } + if fqName == "" { + continue + } + im, typ := getGoExternalType(fqName) + if _, ok := goExternalTypes[im]; !ok { + goExternalTypes[im] = []string{} + } + goExternalTypes[im] = append(goExternalTypes[im], typ) + default: } } @@ -671,7 +700,43 @@ func getSumTypes(module *schema.Module, sch *schema.Schema, nativeNames NativeNa slices.SortFunc(out, func(a, b goSumType) int { return strings.Compare(a.Discriminator, b.Discriminator) }) - return out + + var externalTypes []goExternalType + for im, types := range goExternalTypes { + externalTypes = append(externalTypes, goExternalType{ + Import: im, + Types: types, + }) + } + return out, externalTypes +} + +func getGoExternalType(fqName string) (_import string, _type string) { + // package and directory names are the same (dir=bar, pkg=bar): "github.com/foo/bar.A" + // package and directory names differ (dir=bar, pkg=baz): "github.com/foo/bar.baz.A" + parts := strings.Split(fqName, "/") + lastPart := parts[len(parts)-1] + pkgParts := strings.Split(lastPart, ".") + if len(pkgParts) < 2 { + panic("unexpected Go qualified name format: " + fqName) + } + + dirName := pkgParts[0] + typeName := pkgParts[len(pkgParts)-1] + pkg := pkgParts[len(pkgParts)-2] + + // translate the fqName to a valid import + // e.g.: + // "github.com/foo/bar.A" -> "github.com/foo/bar" + // "github.com/foo/bar.baz.A" -> "baz github.com/foo/bar" (aliased because package and directory path differ) + dirPath := strings.TrimSuffix(fqName, lastPart) + dirName + im := fmt.Sprintf("%q", dirPath) + if len(pkgParts) > 2 { + // import has an alias with the real package name: `import baz "github.com/foo/bar"` + im = fmt.Sprintf("%s %s", pkg, im) + } + + return im, fmt.Sprintf("%s.%s", pkg, typeName) } type externalEnum struct { diff --git a/go-runtime/compile/compile_integration_test.go b/go-runtime/compile/compile_integration_test.go index 5ea28de3d..35102a56a 100644 --- a/go-runtime/compile/compile_integration_test.go +++ b/go-runtime/compile/compile_integration_test.go @@ -5,6 +5,8 @@ package compile_test import ( "testing" + "github.com/alecthomas/assert/v2" + in "github.com/TBD54566975/ftl/integration" ) @@ -35,3 +37,13 @@ func TestUndefinedExportedDecls(t *testing.T) { ), ) } + +func TestNonFTLTypes(t *testing.T) { + in.Run(t, "", + in.CopyModule("external"), + in.Deploy("external"), + in.Call("external", "echo", in.Obj{"message": "hello"}, func(t testing.TB, response in.Obj) { + assert.Equal(t, "hello", response["message"]) + }), + ) +} diff --git a/go-runtime/compile/parser.go b/go-runtime/compile/parser.go index 3d782eb64..a72f241a8 100644 --- a/go-runtime/compile/parser.go +++ b/go-runtime/compile/parser.go @@ -263,13 +263,34 @@ func (d *directiveExport) String() string { return "ftl:export" } +// DirectiveTypeMap is used to declare a native type to deserialize to in a given runtime. +type directiveTypeMap struct { + Pos schema.Position + + Runtime string `parser:"'typemap' @('go' | 'kotlin')"` + NativeName string `parser:"@String"` +} + +func (*directiveTypeMap) directive() {} + +func (d *directiveTypeMap) String() string { + return fmt.Sprintf("typemap %s %q", d.Runtime, d.NativeName) +} +func (d *directiveTypeMap) SetPosition(pos schema.Position) { + d.Pos = pos +} +func (d *directiveTypeMap) GetPosition() schema.Position { + return d.Pos +} + var directiveParser = participle.MustBuild[directiveWrapper]( participle.Lexer(schema.Lexer), participle.Elide("Whitespace"), participle.Unquote(), participle.UseLookahead(2), participle.Union[directive](&directiveVerb{}, &directiveData{}, &directiveEnum{}, &directiveTypeAlias{}, - &directiveIngress{}, &directiveCronJob{}, &directiveRetry{}, &directiveSubscriber{}, &directiveExport{}), + &directiveIngress{}, &directiveCronJob{}, &directiveRetry{}, &directiveSubscriber{}, &directiveExport{}, + &directiveTypeMap{}), participle.Union[schema.IngressPathComponent](&schema.IngressPathLiteral{}, &schema.IngressPathParameter{}), ) diff --git a/go-runtime/compile/schema_test.go b/go-runtime/compile/schema_test.go index 15316157c..cf2728c3b 100644 --- a/go-runtime/compile/schema_test.go +++ b/go-runtime/compile/schema_test.go @@ -188,9 +188,19 @@ func TestExtractModuleSchemaTwo(t *testing.T) { r, err := ExtractModuleSchema("testdata/two", &schema.Schema{}) assert.NoError(t, err) - assert.Equal(t, r.Errors, nil) + for _, e := range r.Errors { + // only warns + assert.True(t, e.Level == schema.WARN) + } actual := schema.Normalise(r.Module) expected := `module two { + typealias ExternalAlias Any + +typemap kotlin "com.foo.bar.NonFTLType" + +typemap go "github.com/TBD54566975/ftl/go-runtime/compile/testdata.lib.NonFTLType" + + typealias TransitiveAlias Any + +typemap go "github.com/TBD54566975/ftl/go-runtime/compile/testdata.lib.NonFTLType" + export enum TwoEnum: String { Red = "Red" Blue = "Blue" @@ -207,6 +217,11 @@ func TestExtractModuleSchemaTwo(t *testing.T) { export data Exported { } + data NonFtlField { + field two.ExternalAlias + transitive two.TransitiveAlias + } + export data Payload { body T } @@ -522,13 +537,14 @@ func TestErrorReporting(t *testing.T) { return str }) expected := []string{ - // failing/child/child.go - `4:2-6: unsupported type "uint64" for field "Body"`, - - // failing/failing.go + `6:2-6: unsupported type "uint64" for field "Body"`, + `11:2-2: unsupported external type "github.com/TBD54566975/ftl/go-runtime/compile/testdata.lib.NonFTLType"`, + `11:2-7: unsupported type "github.com/TBD54566975/ftl/go-runtime/compile/testdata.NonFTLType" for field "Field"`, `13:13-34: expected string literal for argument at index 0`, + `16:6-41: declared type github.com/blah.lib.NonFTLType in typemap does not match native type github.com/TBD54566975/ftl/go-runtime/compile/testdata.lib.NonFTLType`, `16:18-52: duplicate config declaration at 15:18-52`, `19:18-52: duplicate secret declaration at 18:18-52`, + `21:6-6: multiple Go type mappings found for "ftl/failing/child.MultipleMappings"`, `22:14-44: duplicate database declaration at 21:14-44`, `25:2-10: unsupported type "error" for field "BadParam"`, `28:2-17: unsupported type "uint64" for field "AnotherBadParam"`, @@ -565,7 +581,6 @@ func TestErrorReporting(t *testing.T) { `124:21-60: config and secret names must be valid identifiers`, `130:1-1: schema declaration contains conflicting directives`, `130:1-26: only one directive expected when directive "ftl:enum" is present, found multiple`, - `130:1-26: only one directive expected when directive "ftl:typealias" is present, found multiple`, `146:1-35: type can not be a variant of more than 1 type enums (TypeEnum1, TypeEnum2)`, `152:27-27: enum discriminator "TypeEnum3" cannot contain exported methods`, `155:1-35: enum discriminator "NoMethodsTypeEnum" must define at least one method`, diff --git a/go-runtime/compile/testdata/failing/child/child.go b/go-runtime/compile/testdata/failing/child/child.go index b0294f36b..581697e91 100644 --- a/go-runtime/compile/testdata/failing/child/child.go +++ b/go-runtime/compile/testdata/failing/child/child.go @@ -1,5 +1,21 @@ package child +import lib "github.com/TBD54566975/ftl/go-runtime/compile/testdata" + type BadChildStruct struct { Body uint64 } + +//ftl:data +type UnaliasedExternalType struct { + Field lib.NonFTLType +} + +//ftl:typealias +//ftl:typemap go "github.com/blah.lib.NonFTLType" +type WrongMappingExternal lib.NonFTLType + +//ftl:typealias +//ftl:typemap go "github.com/TBD54566975/ftl/go-runtime/compile/testdata.lib.NonFTLType" +//ftl:typemap go "github.com/TBD54566975/ftl/go-runtime/compile/testdata.lib.NonFTLType" +type MultipleMappings lib.NonFTLType diff --git a/go-runtime/compile/testdata/go/external/external.go b/go-runtime/compile/testdata/go/external/external.go new file mode 100644 index 000000000..66f921a34 --- /dev/null +++ b/go-runtime/compile/testdata/go/external/external.go @@ -0,0 +1,21 @@ +package external + +import ( + "context" + + lib "github.com/TBD54566975/ftl/go-runtime/compile/testdata" +) + +type AliasedExternal lib.NonFTLType + +//ftl:enum +type TypeEnum interface{ tag() } + +type ExternalTypeVariant AliasedExternal + +func (ExternalTypeVariant) tag() {} + +//ftl:verb +func Echo(ctx context.Context, req AliasedExternal) (AliasedExternal, error) { + return req, nil +} \ No newline at end of file diff --git a/go-runtime/compile/testdata/go/external/ftl.toml b/go-runtime/compile/testdata/go/external/ftl.toml new file mode 100644 index 000000000..8dacc4493 --- /dev/null +++ b/go-runtime/compile/testdata/go/external/ftl.toml @@ -0,0 +1,2 @@ +module = "external" +language = "go" diff --git a/go-runtime/compile/testdata/go/external/go.mod b/go-runtime/compile/testdata/go/external/go.mod new file mode 100644 index 000000000..27297e876 --- /dev/null +++ b/go-runtime/compile/testdata/go/external/go.mod @@ -0,0 +1,7 @@ +module ftl/external + +go 1.22.2 + +require github.com/TBD54566975/ftl v0.206.1 + +replace github.com/TBD54566975/ftl => ./../../../../.. diff --git a/go-runtime/compile/testdata/go/external/go.sum b/go-runtime/compile/testdata/go/external/go.sum new file mode 100644 index 000000000..e69de29bb diff --git a/go-runtime/compile/testdata/lib.go b/go-runtime/compile/testdata/lib.go index 6032f8278..04bad6a59 100644 --- a/go-runtime/compile/testdata/lib.go +++ b/go-runtime/compile/testdata/lib.go @@ -11,3 +11,7 @@ type Response struct { func OtherFunc(ctx context.Context, req Request) (Response, error) { return Response{}, nil } + +type NonFTLType struct { + Message string +} diff --git a/go-runtime/compile/testdata/named/types.ftl.go b/go-runtime/compile/testdata/named/types.ftl.go deleted file mode 100644 index 705843cbe..000000000 --- a/go-runtime/compile/testdata/named/types.ftl.go +++ /dev/null @@ -1,3 +0,0 @@ -// Code generated by FTL. DO NOT EDIT. -package named - diff --git a/go-runtime/compile/testdata/namedext/types.ftl.go b/go-runtime/compile/testdata/namedext/types.ftl.go deleted file mode 100644 index d08d78d1d..000000000 --- a/go-runtime/compile/testdata/namedext/types.ftl.go +++ /dev/null @@ -1,3 +0,0 @@ -// Code generated by FTL. DO NOT EDIT. -package namedext - diff --git a/go-runtime/compile/testdata/one/types.ftl.go b/go-runtime/compile/testdata/one/types.ftl.go deleted file mode 100644 index e1c3e825d..000000000 --- a/go-runtime/compile/testdata/one/types.ftl.go +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by FTL. DO NOT EDIT. -package one - -import "github.com/TBD54566975/ftl/go-runtime/ftl/reflection" - -func init() { - reflection.Register( - reflection.SumType[BlobOrList]( - *new(Blob), - *new(List), - ), - reflection.SumType[PrivateEnum]( - *new(ExportedStruct), - *new(PrivateStruct), - *new(WithoutDirectiveStruct), - ), - reflection.SumType[TypeEnum]( - *new(Option), - *new(InlineStruct), - *new(AliasedStruct), - *new(ValueEnum), - ), - ) -} diff --git a/go-runtime/compile/testdata/parent/types.ftl.go b/go-runtime/compile/testdata/parent/types.ftl.go deleted file mode 100644 index ab06f9854..000000000 --- a/go-runtime/compile/testdata/parent/types.ftl.go +++ /dev/null @@ -1,3 +0,0 @@ -// Code generated by FTL. DO NOT EDIT. -package parent - diff --git a/go-runtime/compile/testdata/pubsub/types.ftl.go b/go-runtime/compile/testdata/pubsub/types.ftl.go deleted file mode 100644 index d8ff9262c..000000000 --- a/go-runtime/compile/testdata/pubsub/types.ftl.go +++ /dev/null @@ -1,3 +0,0 @@ -// Code generated by FTL. DO NOT EDIT. -package pubsub - diff --git a/go-runtime/compile/testdata/subscriber/types.ftl.go b/go-runtime/compile/testdata/subscriber/types.ftl.go deleted file mode 100644 index 532a6f47c..000000000 --- a/go-runtime/compile/testdata/subscriber/types.ftl.go +++ /dev/null @@ -1,3 +0,0 @@ -// Code generated by FTL. DO NOT EDIT. -package subscriber - diff --git a/go-runtime/compile/testdata/two/two.go b/go-runtime/compile/testdata/two/two.go index bc2d0579f..715555697 100644 --- a/go-runtime/compile/testdata/two/two.go +++ b/go-runtime/compile/testdata/two/two.go @@ -3,6 +3,7 @@ package two import ( "context" + lib "github.com/TBD54566975/ftl/go-runtime/compile/testdata" "github.com/TBD54566975/ftl/go-runtime/ftl" ) @@ -66,3 +67,15 @@ func ReturnsUser(ctx context.Context) (UserResponse, error) { }, }, nil } + +//ftl:data +type NonFTLField struct { + Field ExternalAlias + Transitive TransitiveAlias +} + +//ftl:typealias +//ftl:typemap kotlin "com.foo.bar.NonFTLType" +type ExternalAlias lib.NonFTLType + +type TransitiveAlias lib.NonFTLType diff --git a/go-runtime/compile/testdata/two/types.ftl.go b/go-runtime/compile/testdata/two/types.ftl.go deleted file mode 100644 index 78b9faf11..000000000 --- a/go-runtime/compile/testdata/two/types.ftl.go +++ /dev/null @@ -1,15 +0,0 @@ -// Code generated by FTL. DO NOT EDIT. -package two - -import "github.com/TBD54566975/ftl/go-runtime/ftl/reflection" - -func init() { - reflection.Register( - reflection.SumType[TypeEnum]( - *new(Scalar), - *new(List), - *new(Exported), - *new(WithoutDirective), - ), - ) -} diff --git a/go-runtime/encoding/encoding.go b/go-runtime/encoding/encoding.go index 1989bb378..f35098b00 100644 --- a/go-runtime/encoding/encoding.go +++ b/go-runtime/encoding/encoding.go @@ -47,6 +47,10 @@ func encodeValue(v reflect.Value, w *bytes.Buffer) error { t := v.Type() // Special-cased types switch { + case reflection.IsKnownExternalType(t): + // external types use the stdlib JSON encoding + fallthrough + case t == reflect.TypeFor[time.Time](): data, err := json.Marshal(v.Interface()) if err != nil { @@ -245,6 +249,10 @@ func decodeValue(d *json.Decoder, v reflect.Value) error { t := v.Type() // Special-case types switch { + case reflection.IsKnownExternalType(t): + // external types use the stdlib JSON decoding + fallthrough + case t == reflect.TypeFor[time.Time](): return d.Decode(v.Addr().Interface()) diff --git a/go-runtime/ftl/ftltest/testdata/go/pubsub/go.sum b/go-runtime/ftl/ftltest/testdata/go/pubsub/go.sum index 4439403ab..131aab36b 100644 --- a/go-runtime/ftl/ftltest/testdata/go/pubsub/go.sum +++ b/go-runtime/ftl/ftltest/testdata/go/pubsub/go.sum @@ -22,38 +22,35 @@ github.com/alecthomas/types v0.16.0 h1:o9+JSwCRB6DDaWDeR/Mg7v/zh3R+MlknM6DrnDyY7 github.com/alecthomas/types v0.16.0/go.mod h1:Tswm0qQpjpVq8rn70OquRsUtFxbQKub/8TMyYYGI0+k= github.com/alessio/shellescape v1.4.2 h1:MHPfaU+ddJ0/bYWpgIeUnQUqKrlJ1S7BfEYPM4uEoM0= github.com/alessio/shellescape v1.4.2/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= -github.com/aws/aws-sdk-go-v2 v1.30.0 h1:6qAwtzlfcTtcL8NHtbDQAqgM5s6NDipQTkPxyH/6kAA= -github.com/aws/aws-sdk-go-v2 v1.30.0/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= +github.com/amacneil/dbmate/v2 v2.17.0 h1:S3qW9d2C/CitY7Cvw9cgDxwjQCfn9xknBbP38onG7fY= +github.com/amacneil/dbmate/v2 v2.17.0/go.mod h1:YglDzfwUTF0nruRyTxwgJP3oALTbh6hFnWVAO+IuDQc= +github.com/aws/aws-sdk-go-v2 v1.30.1 h1:4y/5Dvfrhd1MxRDD77SrfsDaj8kUkkljU7XE83NPV+o= github.com/aws/aws-sdk-go-v2 v1.30.1/go.mod h1:nIQjQVp5sfpQcTc9mPSr1B0PaWK5ByX9MOoDadSN4lc= -github.com/aws/aws-sdk-go-v2/config v1.27.21 h1:yPX3pjGCe2hJsetlmGNB4Mngu7UPmvWPzzWCv1+boeM= -github.com/aws/aws-sdk-go-v2/config v1.27.21/go.mod h1:4XtlEU6DzNai8RMbjSF5MgGZtYvrhBP/aKZcRtZAVdM= -github.com/aws/aws-sdk-go-v2/credentials v1.17.21 h1:pjAqgzfgFhTv5grc7xPHtXCAaMapzmwA7aU+c/SZQGw= -github.com/aws/aws-sdk-go-v2/credentials v1.17.21/go.mod h1:nhK6PtBlfHTUDVmBLr1dg+WHCOCK+1Fu/WQyVHPsgNQ= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.8 h1:FR+oWPFb/8qMVYMWN98bUZAGqPvLHiyqg1wqQGfUAXY= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.8/go.mod h1:EgSKcHiuuakEIxJcKGzVNWh5srVAQ3jKaSrBGRYvM48= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.12 h1:SJ04WXGTwnHlWIODtC5kJzKbeuHt+OUNOgKg7nfnUGw= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.12/go.mod h1:FkpvXhA92gb3GE9LD6Og0pHHycTxW7xGpnEh5E7Opwo= +github.com/aws/aws-sdk-go-v2/config v1.27.23 h1:Cr/gJEa9NAS7CDAjbnB7tHYb3aLZI2gVggfmSAasDac= +github.com/aws/aws-sdk-go-v2/config v1.27.23/go.mod h1:WMMYHqLCFu5LH05mFOF5tsq1PGEMfKbu083VKqLCd0o= +github.com/aws/aws-sdk-go-v2/credentials v1.17.23 h1:G1CfmLVoO2TdQ8z9dW+JBc/r8+MqyPQhXCafNZcXVZo= +github.com/aws/aws-sdk-go-v2/credentials v1.17.23/go.mod h1:V/DvSURn6kKgcuKEk4qwSwb/fZ2d++FFARtWSbXnLqY= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.9 h1:Aznqksmd6Rfv2HQN9cpqIV/lQRMaIpJkLLaJ1ZI76no= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.9/go.mod h1:WQr3MY7AxGNxaqAtsDWn+fBxmd4XvLkzeqQ8P1VM0/w= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.13 h1:5SAoZ4jYpGH4721ZNoS1znQrhOfZinOhc4XuTXx/nVc= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.13/go.mod h1:+rdA6ZLpaSeM7tSg/B0IEDinCIBJGmW8rKDFkYpP04g= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.12 h1:hb5KgeYfObi5MHkSSZMEudnIvX30iB+E21evI4r6BnQ= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.12/go.mod h1:CroKe/eWJdyfy9Vx4rljP5wTUjNJfb+fPz1uMYUhEGM= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.13 h1:WIijqeaAO7TYFLbhsZmi2rgLEAtWOC1LhxCAVTJlSKw= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.13/go.mod h1:i+kbfa76PQbWw/ULoWnp51EYVWH4ENln76fLQE3lXT8= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.14 h1:zSDPny/pVnkqABXYRicYuPf9z2bTqfH13HT3v6UheIk= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.14/go.mod h1:3TTcI5JSzda1nw/pkVC9dhgLre0SNBFj2lYS4GctXKI= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.31.1 h1:fMhrWVym3nTAcf3eT9XsYcfN1kgQ/7ZuVLGHjPAn6Ms= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.31.1/go.mod h1:tBCf2+VgRT/Lk9KIlKpTxyCunzxHcP8BFPqcck5I9mM= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3 h1:dT3MqvGhSoaIhRseqw2I0yH81l7wiR2vjs57O51EAm8= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3/go.mod h1:GlAeCkHwugxdHaueRr4nhPuY+WW+gR8UjlcqzPr1SPI= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.15 h1:I9zMeF107l0rJrpnHpjEiiTSCKYAIw8mALiXcPsGBiA= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.15/go.mod h1:9xWJ3Q/S6Ojusz1UIkfycgD1mGirJfLLKqq3LPT7WN8= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.32.1 h1:ZoYRD8IJqPkzjBnpokiMNO6L/DQprtpVpD6k0YSaF5U= github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.32.1/go.mod h1:GlRarZzIMl9VDi0mLQt+qQOuEkVFPnTkkjyugV1uVa8= -github.com/aws/aws-sdk-go-v2/service/sso v1.21.1 h1:sd0BsnAvLH8gsp2e3cbaIr+9D7T1xugueQ7V/zUAsS4= -github.com/aws/aws-sdk-go-v2/service/sso v1.21.1/go.mod h1:lcQG/MmxydijbeTOp04hIuJwXGWPZGI3bwdFDGRTv14= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.25.1 h1:1uEFNNskK/I1KoZ9Q8wJxMz5V9jyBlsiaNrM7vA3YUQ= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.25.1/go.mod h1:z0P8K+cBIsFXUr5rzo/psUeJ20XjPN0+Nn8067Nd+E4= -github.com/aws/aws-sdk-go-v2/service/sts v1.29.1 h1:myX5CxqXE0QMZNja6FA1/FSE3Vu1rVmeUmpJMMzeZg0= -github.com/aws/aws-sdk-go-v2/service/sts v1.29.1/go.mod h1:N2mQiucsO0VwK9CYuS4/c2n6Smeh1v47Rz3dWCPFLdE= -github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q= -github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= +github.com/aws/aws-sdk-go-v2/service/sso v1.22.1 h1:p1GahKIjyMDZtiKoIn0/jAj/TkMzfzndDv5+zi2Mhgc= +github.com/aws/aws-sdk-go-v2/service/sso v1.22.1/go.mod h1:/vWdhoIoYA5hYoPZ6fm7Sv4d8701PiG5VKe8/pPJL60= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.1 h1:lCEv9f8f+zJ8kcFeAjRZsekLd/x5SAm96Cva+VbUdo8= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.1/go.mod h1:xyFHA4zGxgYkdD73VeezHt3vSKEG9EmFnGwoKlP00u4= +github.com/aws/aws-sdk-go-v2/service/sts v1.30.1 h1:+woJ607dllHJQtsnJLi52ycuqHMwlW+Wqm2Ppsfp4nQ= +github.com/aws/aws-sdk-go-v2/service/sts v1.30.1/go.mod h1:jiNR3JqT15Dm+QWq2SRgh0x0bCNSRP2L25+CqPNpJlQ= +github.com/aws/smithy-go v1.20.3 h1:ryHwveWzPV5BIof6fyDvor6V3iUL7nTfiTKXHiW05nE= github.com/aws/smithy-go v1.20.3/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -99,6 +96,8 @@ github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2E github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= +github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= +github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/multiformats/go-base36 v0.2.0 h1:lFsAbNOGeKtuKozrtBsAkSVhv1p9D0/qedU9rQyccr0= diff --git a/go-runtime/ftl/ftltest/testdata/go/subscriber/go.sum b/go-runtime/ftl/ftltest/testdata/go/subscriber/go.sum index 4439403ab..131aab36b 100644 --- a/go-runtime/ftl/ftltest/testdata/go/subscriber/go.sum +++ b/go-runtime/ftl/ftltest/testdata/go/subscriber/go.sum @@ -22,38 +22,35 @@ github.com/alecthomas/types v0.16.0 h1:o9+JSwCRB6DDaWDeR/Mg7v/zh3R+MlknM6DrnDyY7 github.com/alecthomas/types v0.16.0/go.mod h1:Tswm0qQpjpVq8rn70OquRsUtFxbQKub/8TMyYYGI0+k= github.com/alessio/shellescape v1.4.2 h1:MHPfaU+ddJ0/bYWpgIeUnQUqKrlJ1S7BfEYPM4uEoM0= github.com/alessio/shellescape v1.4.2/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= -github.com/aws/aws-sdk-go-v2 v1.30.0 h1:6qAwtzlfcTtcL8NHtbDQAqgM5s6NDipQTkPxyH/6kAA= -github.com/aws/aws-sdk-go-v2 v1.30.0/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= +github.com/amacneil/dbmate/v2 v2.17.0 h1:S3qW9d2C/CitY7Cvw9cgDxwjQCfn9xknBbP38onG7fY= +github.com/amacneil/dbmate/v2 v2.17.0/go.mod h1:YglDzfwUTF0nruRyTxwgJP3oALTbh6hFnWVAO+IuDQc= +github.com/aws/aws-sdk-go-v2 v1.30.1 h1:4y/5Dvfrhd1MxRDD77SrfsDaj8kUkkljU7XE83NPV+o= github.com/aws/aws-sdk-go-v2 v1.30.1/go.mod h1:nIQjQVp5sfpQcTc9mPSr1B0PaWK5ByX9MOoDadSN4lc= -github.com/aws/aws-sdk-go-v2/config v1.27.21 h1:yPX3pjGCe2hJsetlmGNB4Mngu7UPmvWPzzWCv1+boeM= -github.com/aws/aws-sdk-go-v2/config v1.27.21/go.mod h1:4XtlEU6DzNai8RMbjSF5MgGZtYvrhBP/aKZcRtZAVdM= -github.com/aws/aws-sdk-go-v2/credentials v1.17.21 h1:pjAqgzfgFhTv5grc7xPHtXCAaMapzmwA7aU+c/SZQGw= -github.com/aws/aws-sdk-go-v2/credentials v1.17.21/go.mod h1:nhK6PtBlfHTUDVmBLr1dg+WHCOCK+1Fu/WQyVHPsgNQ= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.8 h1:FR+oWPFb/8qMVYMWN98bUZAGqPvLHiyqg1wqQGfUAXY= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.8/go.mod h1:EgSKcHiuuakEIxJcKGzVNWh5srVAQ3jKaSrBGRYvM48= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.12 h1:SJ04WXGTwnHlWIODtC5kJzKbeuHt+OUNOgKg7nfnUGw= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.12/go.mod h1:FkpvXhA92gb3GE9LD6Og0pHHycTxW7xGpnEh5E7Opwo= +github.com/aws/aws-sdk-go-v2/config v1.27.23 h1:Cr/gJEa9NAS7CDAjbnB7tHYb3aLZI2gVggfmSAasDac= +github.com/aws/aws-sdk-go-v2/config v1.27.23/go.mod h1:WMMYHqLCFu5LH05mFOF5tsq1PGEMfKbu083VKqLCd0o= +github.com/aws/aws-sdk-go-v2/credentials v1.17.23 h1:G1CfmLVoO2TdQ8z9dW+JBc/r8+MqyPQhXCafNZcXVZo= +github.com/aws/aws-sdk-go-v2/credentials v1.17.23/go.mod h1:V/DvSURn6kKgcuKEk4qwSwb/fZ2d++FFARtWSbXnLqY= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.9 h1:Aznqksmd6Rfv2HQN9cpqIV/lQRMaIpJkLLaJ1ZI76no= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.9/go.mod h1:WQr3MY7AxGNxaqAtsDWn+fBxmd4XvLkzeqQ8P1VM0/w= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.13 h1:5SAoZ4jYpGH4721ZNoS1znQrhOfZinOhc4XuTXx/nVc= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.13/go.mod h1:+rdA6ZLpaSeM7tSg/B0IEDinCIBJGmW8rKDFkYpP04g= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.12 h1:hb5KgeYfObi5MHkSSZMEudnIvX30iB+E21evI4r6BnQ= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.12/go.mod h1:CroKe/eWJdyfy9Vx4rljP5wTUjNJfb+fPz1uMYUhEGM= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.13 h1:WIijqeaAO7TYFLbhsZmi2rgLEAtWOC1LhxCAVTJlSKw= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.13/go.mod h1:i+kbfa76PQbWw/ULoWnp51EYVWH4ENln76fLQE3lXT8= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.14 h1:zSDPny/pVnkqABXYRicYuPf9z2bTqfH13HT3v6UheIk= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.14/go.mod h1:3TTcI5JSzda1nw/pkVC9dhgLre0SNBFj2lYS4GctXKI= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.31.1 h1:fMhrWVym3nTAcf3eT9XsYcfN1kgQ/7ZuVLGHjPAn6Ms= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.31.1/go.mod h1:tBCf2+VgRT/Lk9KIlKpTxyCunzxHcP8BFPqcck5I9mM= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3 h1:dT3MqvGhSoaIhRseqw2I0yH81l7wiR2vjs57O51EAm8= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3/go.mod h1:GlAeCkHwugxdHaueRr4nhPuY+WW+gR8UjlcqzPr1SPI= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.15 h1:I9zMeF107l0rJrpnHpjEiiTSCKYAIw8mALiXcPsGBiA= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.15/go.mod h1:9xWJ3Q/S6Ojusz1UIkfycgD1mGirJfLLKqq3LPT7WN8= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.32.1 h1:ZoYRD8IJqPkzjBnpokiMNO6L/DQprtpVpD6k0YSaF5U= github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.32.1/go.mod h1:GlRarZzIMl9VDi0mLQt+qQOuEkVFPnTkkjyugV1uVa8= -github.com/aws/aws-sdk-go-v2/service/sso v1.21.1 h1:sd0BsnAvLH8gsp2e3cbaIr+9D7T1xugueQ7V/zUAsS4= -github.com/aws/aws-sdk-go-v2/service/sso v1.21.1/go.mod h1:lcQG/MmxydijbeTOp04hIuJwXGWPZGI3bwdFDGRTv14= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.25.1 h1:1uEFNNskK/I1KoZ9Q8wJxMz5V9jyBlsiaNrM7vA3YUQ= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.25.1/go.mod h1:z0P8K+cBIsFXUr5rzo/psUeJ20XjPN0+Nn8067Nd+E4= -github.com/aws/aws-sdk-go-v2/service/sts v1.29.1 h1:myX5CxqXE0QMZNja6FA1/FSE3Vu1rVmeUmpJMMzeZg0= -github.com/aws/aws-sdk-go-v2/service/sts v1.29.1/go.mod h1:N2mQiucsO0VwK9CYuS4/c2n6Smeh1v47Rz3dWCPFLdE= -github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q= -github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= +github.com/aws/aws-sdk-go-v2/service/sso v1.22.1 h1:p1GahKIjyMDZtiKoIn0/jAj/TkMzfzndDv5+zi2Mhgc= +github.com/aws/aws-sdk-go-v2/service/sso v1.22.1/go.mod h1:/vWdhoIoYA5hYoPZ6fm7Sv4d8701PiG5VKe8/pPJL60= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.1 h1:lCEv9f8f+zJ8kcFeAjRZsekLd/x5SAm96Cva+VbUdo8= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.1/go.mod h1:xyFHA4zGxgYkdD73VeezHt3vSKEG9EmFnGwoKlP00u4= +github.com/aws/aws-sdk-go-v2/service/sts v1.30.1 h1:+woJ607dllHJQtsnJLi52ycuqHMwlW+Wqm2Ppsfp4nQ= +github.com/aws/aws-sdk-go-v2/service/sts v1.30.1/go.mod h1:jiNR3JqT15Dm+QWq2SRgh0x0bCNSRP2L25+CqPNpJlQ= +github.com/aws/smithy-go v1.20.3 h1:ryHwveWzPV5BIof6fyDvor6V3iUL7nTfiTKXHiW05nE= github.com/aws/smithy-go v1.20.3/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -99,6 +96,8 @@ github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2E github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= +github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= +github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/multiformats/go-base36 v0.2.0 h1:lFsAbNOGeKtuKozrtBsAkSVhv1p9D0/qedU9rQyccr0= diff --git a/go-runtime/ftl/ftltest/testdata/go/verbtypes/go.sum b/go-runtime/ftl/ftltest/testdata/go/verbtypes/go.sum index 4439403ab..131aab36b 100644 --- a/go-runtime/ftl/ftltest/testdata/go/verbtypes/go.sum +++ b/go-runtime/ftl/ftltest/testdata/go/verbtypes/go.sum @@ -22,38 +22,35 @@ github.com/alecthomas/types v0.16.0 h1:o9+JSwCRB6DDaWDeR/Mg7v/zh3R+MlknM6DrnDyY7 github.com/alecthomas/types v0.16.0/go.mod h1:Tswm0qQpjpVq8rn70OquRsUtFxbQKub/8TMyYYGI0+k= github.com/alessio/shellescape v1.4.2 h1:MHPfaU+ddJ0/bYWpgIeUnQUqKrlJ1S7BfEYPM4uEoM0= github.com/alessio/shellescape v1.4.2/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= -github.com/aws/aws-sdk-go-v2 v1.30.0 h1:6qAwtzlfcTtcL8NHtbDQAqgM5s6NDipQTkPxyH/6kAA= -github.com/aws/aws-sdk-go-v2 v1.30.0/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= +github.com/amacneil/dbmate/v2 v2.17.0 h1:S3qW9d2C/CitY7Cvw9cgDxwjQCfn9xknBbP38onG7fY= +github.com/amacneil/dbmate/v2 v2.17.0/go.mod h1:YglDzfwUTF0nruRyTxwgJP3oALTbh6hFnWVAO+IuDQc= +github.com/aws/aws-sdk-go-v2 v1.30.1 h1:4y/5Dvfrhd1MxRDD77SrfsDaj8kUkkljU7XE83NPV+o= github.com/aws/aws-sdk-go-v2 v1.30.1/go.mod h1:nIQjQVp5sfpQcTc9mPSr1B0PaWK5ByX9MOoDadSN4lc= -github.com/aws/aws-sdk-go-v2/config v1.27.21 h1:yPX3pjGCe2hJsetlmGNB4Mngu7UPmvWPzzWCv1+boeM= -github.com/aws/aws-sdk-go-v2/config v1.27.21/go.mod h1:4XtlEU6DzNai8RMbjSF5MgGZtYvrhBP/aKZcRtZAVdM= -github.com/aws/aws-sdk-go-v2/credentials v1.17.21 h1:pjAqgzfgFhTv5grc7xPHtXCAaMapzmwA7aU+c/SZQGw= -github.com/aws/aws-sdk-go-v2/credentials v1.17.21/go.mod h1:nhK6PtBlfHTUDVmBLr1dg+WHCOCK+1Fu/WQyVHPsgNQ= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.8 h1:FR+oWPFb/8qMVYMWN98bUZAGqPvLHiyqg1wqQGfUAXY= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.8/go.mod h1:EgSKcHiuuakEIxJcKGzVNWh5srVAQ3jKaSrBGRYvM48= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.12 h1:SJ04WXGTwnHlWIODtC5kJzKbeuHt+OUNOgKg7nfnUGw= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.12/go.mod h1:FkpvXhA92gb3GE9LD6Og0pHHycTxW7xGpnEh5E7Opwo= +github.com/aws/aws-sdk-go-v2/config v1.27.23 h1:Cr/gJEa9NAS7CDAjbnB7tHYb3aLZI2gVggfmSAasDac= +github.com/aws/aws-sdk-go-v2/config v1.27.23/go.mod h1:WMMYHqLCFu5LH05mFOF5tsq1PGEMfKbu083VKqLCd0o= +github.com/aws/aws-sdk-go-v2/credentials v1.17.23 h1:G1CfmLVoO2TdQ8z9dW+JBc/r8+MqyPQhXCafNZcXVZo= +github.com/aws/aws-sdk-go-v2/credentials v1.17.23/go.mod h1:V/DvSURn6kKgcuKEk4qwSwb/fZ2d++FFARtWSbXnLqY= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.9 h1:Aznqksmd6Rfv2HQN9cpqIV/lQRMaIpJkLLaJ1ZI76no= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.9/go.mod h1:WQr3MY7AxGNxaqAtsDWn+fBxmd4XvLkzeqQ8P1VM0/w= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.13 h1:5SAoZ4jYpGH4721ZNoS1znQrhOfZinOhc4XuTXx/nVc= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.13/go.mod h1:+rdA6ZLpaSeM7tSg/B0IEDinCIBJGmW8rKDFkYpP04g= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.12 h1:hb5KgeYfObi5MHkSSZMEudnIvX30iB+E21evI4r6BnQ= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.12/go.mod h1:CroKe/eWJdyfy9Vx4rljP5wTUjNJfb+fPz1uMYUhEGM= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.13 h1:WIijqeaAO7TYFLbhsZmi2rgLEAtWOC1LhxCAVTJlSKw= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.13/go.mod h1:i+kbfa76PQbWw/ULoWnp51EYVWH4ENln76fLQE3lXT8= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.14 h1:zSDPny/pVnkqABXYRicYuPf9z2bTqfH13HT3v6UheIk= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.14/go.mod h1:3TTcI5JSzda1nw/pkVC9dhgLre0SNBFj2lYS4GctXKI= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.31.1 h1:fMhrWVym3nTAcf3eT9XsYcfN1kgQ/7ZuVLGHjPAn6Ms= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.31.1/go.mod h1:tBCf2+VgRT/Lk9KIlKpTxyCunzxHcP8BFPqcck5I9mM= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3 h1:dT3MqvGhSoaIhRseqw2I0yH81l7wiR2vjs57O51EAm8= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3/go.mod h1:GlAeCkHwugxdHaueRr4nhPuY+WW+gR8UjlcqzPr1SPI= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.15 h1:I9zMeF107l0rJrpnHpjEiiTSCKYAIw8mALiXcPsGBiA= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.15/go.mod h1:9xWJ3Q/S6Ojusz1UIkfycgD1mGirJfLLKqq3LPT7WN8= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.32.1 h1:ZoYRD8IJqPkzjBnpokiMNO6L/DQprtpVpD6k0YSaF5U= github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.32.1/go.mod h1:GlRarZzIMl9VDi0mLQt+qQOuEkVFPnTkkjyugV1uVa8= -github.com/aws/aws-sdk-go-v2/service/sso v1.21.1 h1:sd0BsnAvLH8gsp2e3cbaIr+9D7T1xugueQ7V/zUAsS4= -github.com/aws/aws-sdk-go-v2/service/sso v1.21.1/go.mod h1:lcQG/MmxydijbeTOp04hIuJwXGWPZGI3bwdFDGRTv14= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.25.1 h1:1uEFNNskK/I1KoZ9Q8wJxMz5V9jyBlsiaNrM7vA3YUQ= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.25.1/go.mod h1:z0P8K+cBIsFXUr5rzo/psUeJ20XjPN0+Nn8067Nd+E4= -github.com/aws/aws-sdk-go-v2/service/sts v1.29.1 h1:myX5CxqXE0QMZNja6FA1/FSE3Vu1rVmeUmpJMMzeZg0= -github.com/aws/aws-sdk-go-v2/service/sts v1.29.1/go.mod h1:N2mQiucsO0VwK9CYuS4/c2n6Smeh1v47Rz3dWCPFLdE= -github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q= -github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= +github.com/aws/aws-sdk-go-v2/service/sso v1.22.1 h1:p1GahKIjyMDZtiKoIn0/jAj/TkMzfzndDv5+zi2Mhgc= +github.com/aws/aws-sdk-go-v2/service/sso v1.22.1/go.mod h1:/vWdhoIoYA5hYoPZ6fm7Sv4d8701PiG5VKe8/pPJL60= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.1 h1:lCEv9f8f+zJ8kcFeAjRZsekLd/x5SAm96Cva+VbUdo8= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.1/go.mod h1:xyFHA4zGxgYkdD73VeezHt3vSKEG9EmFnGwoKlP00u4= +github.com/aws/aws-sdk-go-v2/service/sts v1.30.1 h1:+woJ607dllHJQtsnJLi52ycuqHMwlW+Wqm2Ppsfp4nQ= +github.com/aws/aws-sdk-go-v2/service/sts v1.30.1/go.mod h1:jiNR3JqT15Dm+QWq2SRgh0x0bCNSRP2L25+CqPNpJlQ= +github.com/aws/smithy-go v1.20.3 h1:ryHwveWzPV5BIof6fyDvor6V3iUL7nTfiTKXHiW05nE= github.com/aws/smithy-go v1.20.3/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -99,6 +96,8 @@ github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2E github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= +github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= +github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/multiformats/go-base36 v0.2.0 h1:lFsAbNOGeKtuKozrtBsAkSVhv1p9D0/qedU9rQyccr0= diff --git a/go-runtime/ftl/ftltest/testdata/go/wrapped/go.sum b/go-runtime/ftl/ftltest/testdata/go/wrapped/go.sum index 4439403ab..131aab36b 100644 --- a/go-runtime/ftl/ftltest/testdata/go/wrapped/go.sum +++ b/go-runtime/ftl/ftltest/testdata/go/wrapped/go.sum @@ -22,38 +22,35 @@ github.com/alecthomas/types v0.16.0 h1:o9+JSwCRB6DDaWDeR/Mg7v/zh3R+MlknM6DrnDyY7 github.com/alecthomas/types v0.16.0/go.mod h1:Tswm0qQpjpVq8rn70OquRsUtFxbQKub/8TMyYYGI0+k= github.com/alessio/shellescape v1.4.2 h1:MHPfaU+ddJ0/bYWpgIeUnQUqKrlJ1S7BfEYPM4uEoM0= github.com/alessio/shellescape v1.4.2/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= -github.com/aws/aws-sdk-go-v2 v1.30.0 h1:6qAwtzlfcTtcL8NHtbDQAqgM5s6NDipQTkPxyH/6kAA= -github.com/aws/aws-sdk-go-v2 v1.30.0/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= +github.com/amacneil/dbmate/v2 v2.17.0 h1:S3qW9d2C/CitY7Cvw9cgDxwjQCfn9xknBbP38onG7fY= +github.com/amacneil/dbmate/v2 v2.17.0/go.mod h1:YglDzfwUTF0nruRyTxwgJP3oALTbh6hFnWVAO+IuDQc= +github.com/aws/aws-sdk-go-v2 v1.30.1 h1:4y/5Dvfrhd1MxRDD77SrfsDaj8kUkkljU7XE83NPV+o= github.com/aws/aws-sdk-go-v2 v1.30.1/go.mod h1:nIQjQVp5sfpQcTc9mPSr1B0PaWK5ByX9MOoDadSN4lc= -github.com/aws/aws-sdk-go-v2/config v1.27.21 h1:yPX3pjGCe2hJsetlmGNB4Mngu7UPmvWPzzWCv1+boeM= -github.com/aws/aws-sdk-go-v2/config v1.27.21/go.mod h1:4XtlEU6DzNai8RMbjSF5MgGZtYvrhBP/aKZcRtZAVdM= -github.com/aws/aws-sdk-go-v2/credentials v1.17.21 h1:pjAqgzfgFhTv5grc7xPHtXCAaMapzmwA7aU+c/SZQGw= -github.com/aws/aws-sdk-go-v2/credentials v1.17.21/go.mod h1:nhK6PtBlfHTUDVmBLr1dg+WHCOCK+1Fu/WQyVHPsgNQ= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.8 h1:FR+oWPFb/8qMVYMWN98bUZAGqPvLHiyqg1wqQGfUAXY= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.8/go.mod h1:EgSKcHiuuakEIxJcKGzVNWh5srVAQ3jKaSrBGRYvM48= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.12 h1:SJ04WXGTwnHlWIODtC5kJzKbeuHt+OUNOgKg7nfnUGw= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.12/go.mod h1:FkpvXhA92gb3GE9LD6Og0pHHycTxW7xGpnEh5E7Opwo= +github.com/aws/aws-sdk-go-v2/config v1.27.23 h1:Cr/gJEa9NAS7CDAjbnB7tHYb3aLZI2gVggfmSAasDac= +github.com/aws/aws-sdk-go-v2/config v1.27.23/go.mod h1:WMMYHqLCFu5LH05mFOF5tsq1PGEMfKbu083VKqLCd0o= +github.com/aws/aws-sdk-go-v2/credentials v1.17.23 h1:G1CfmLVoO2TdQ8z9dW+JBc/r8+MqyPQhXCafNZcXVZo= +github.com/aws/aws-sdk-go-v2/credentials v1.17.23/go.mod h1:V/DvSURn6kKgcuKEk4qwSwb/fZ2d++FFARtWSbXnLqY= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.9 h1:Aznqksmd6Rfv2HQN9cpqIV/lQRMaIpJkLLaJ1ZI76no= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.9/go.mod h1:WQr3MY7AxGNxaqAtsDWn+fBxmd4XvLkzeqQ8P1VM0/w= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.13 h1:5SAoZ4jYpGH4721ZNoS1znQrhOfZinOhc4XuTXx/nVc= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.13/go.mod h1:+rdA6ZLpaSeM7tSg/B0IEDinCIBJGmW8rKDFkYpP04g= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.12 h1:hb5KgeYfObi5MHkSSZMEudnIvX30iB+E21evI4r6BnQ= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.12/go.mod h1:CroKe/eWJdyfy9Vx4rljP5wTUjNJfb+fPz1uMYUhEGM= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.13 h1:WIijqeaAO7TYFLbhsZmi2rgLEAtWOC1LhxCAVTJlSKw= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.13/go.mod h1:i+kbfa76PQbWw/ULoWnp51EYVWH4ENln76fLQE3lXT8= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.14 h1:zSDPny/pVnkqABXYRicYuPf9z2bTqfH13HT3v6UheIk= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.14/go.mod h1:3TTcI5JSzda1nw/pkVC9dhgLre0SNBFj2lYS4GctXKI= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.31.1 h1:fMhrWVym3nTAcf3eT9XsYcfN1kgQ/7ZuVLGHjPAn6Ms= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.31.1/go.mod h1:tBCf2+VgRT/Lk9KIlKpTxyCunzxHcP8BFPqcck5I9mM= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3 h1:dT3MqvGhSoaIhRseqw2I0yH81l7wiR2vjs57O51EAm8= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3/go.mod h1:GlAeCkHwugxdHaueRr4nhPuY+WW+gR8UjlcqzPr1SPI= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.15 h1:I9zMeF107l0rJrpnHpjEiiTSCKYAIw8mALiXcPsGBiA= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.15/go.mod h1:9xWJ3Q/S6Ojusz1UIkfycgD1mGirJfLLKqq3LPT7WN8= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.32.1 h1:ZoYRD8IJqPkzjBnpokiMNO6L/DQprtpVpD6k0YSaF5U= github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.32.1/go.mod h1:GlRarZzIMl9VDi0mLQt+qQOuEkVFPnTkkjyugV1uVa8= -github.com/aws/aws-sdk-go-v2/service/sso v1.21.1 h1:sd0BsnAvLH8gsp2e3cbaIr+9D7T1xugueQ7V/zUAsS4= -github.com/aws/aws-sdk-go-v2/service/sso v1.21.1/go.mod h1:lcQG/MmxydijbeTOp04hIuJwXGWPZGI3bwdFDGRTv14= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.25.1 h1:1uEFNNskK/I1KoZ9Q8wJxMz5V9jyBlsiaNrM7vA3YUQ= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.25.1/go.mod h1:z0P8K+cBIsFXUr5rzo/psUeJ20XjPN0+Nn8067Nd+E4= -github.com/aws/aws-sdk-go-v2/service/sts v1.29.1 h1:myX5CxqXE0QMZNja6FA1/FSE3Vu1rVmeUmpJMMzeZg0= -github.com/aws/aws-sdk-go-v2/service/sts v1.29.1/go.mod h1:N2mQiucsO0VwK9CYuS4/c2n6Smeh1v47Rz3dWCPFLdE= -github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q= -github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= +github.com/aws/aws-sdk-go-v2/service/sso v1.22.1 h1:p1GahKIjyMDZtiKoIn0/jAj/TkMzfzndDv5+zi2Mhgc= +github.com/aws/aws-sdk-go-v2/service/sso v1.22.1/go.mod h1:/vWdhoIoYA5hYoPZ6fm7Sv4d8701PiG5VKe8/pPJL60= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.1 h1:lCEv9f8f+zJ8kcFeAjRZsekLd/x5SAm96Cva+VbUdo8= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.1/go.mod h1:xyFHA4zGxgYkdD73VeezHt3vSKEG9EmFnGwoKlP00u4= +github.com/aws/aws-sdk-go-v2/service/sts v1.30.1 h1:+woJ607dllHJQtsnJLi52ycuqHMwlW+Wqm2Ppsfp4nQ= +github.com/aws/aws-sdk-go-v2/service/sts v1.30.1/go.mod h1:jiNR3JqT15Dm+QWq2SRgh0x0bCNSRP2L25+CqPNpJlQ= +github.com/aws/smithy-go v1.20.3 h1:ryHwveWzPV5BIof6fyDvor6V3iUL7nTfiTKXHiW05nE= github.com/aws/smithy-go v1.20.3/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -99,6 +96,8 @@ github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2E github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= +github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= +github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/multiformats/go-base36 v0.2.0 h1:lFsAbNOGeKtuKozrtBsAkSVhv1p9D0/qedU9rQyccr0= diff --git a/go-runtime/ftl/reflection/singleton.go b/go-runtime/ftl/reflection/singleton.go index bc2f060dd..4272ef061 100644 --- a/go-runtime/ftl/reflection/singleton.go +++ b/go-runtime/ftl/reflection/singleton.go @@ -48,3 +48,8 @@ func GetDiscriminatorByVariant(variant reflect.Type) optional.Option[reflect.Typ func IsSumTypeDiscriminator(discriminator reflect.Type) bool { return singletonTypeRegistry.isSumTypeDiscriminator(discriminator) } + +func IsKnownExternalType(t reflect.Type) bool { + _, ok := singletonTypeRegistry.externalTypes[t] + return ok +} diff --git a/go-runtime/ftl/reflection/type_registry.go b/go-runtime/ftl/reflection/type_registry.go index 8c603a2e8..20cdb1e50 100644 --- a/go-runtime/ftl/reflection/type_registry.go +++ b/go-runtime/ftl/reflection/type_registry.go @@ -3,9 +3,8 @@ package reflection import ( "reflect" - "github.com/alecthomas/types/optional" - "github.com/TBD54566975/ftl/backend/schema" + "github.com/alecthomas/types/optional" ) // TypeRegistry is used for dynamic type resolution at runtime. It stores associations between sum type discriminators @@ -16,6 +15,7 @@ type TypeRegistry struct { sumTypes map[reflect.Type][]sumTypeVariant variantsToDiscriminators map[reflect.Type]reflect.Type fsm map[string]ReflectedFSM + externalTypes map[reflect.Type]struct{} } type sumTypeVariant struct { @@ -54,6 +54,14 @@ func FSM(name string, transitions ...Transition) Registree { return func(t *TypeRegistry) { t.registerFSM(name, transitions) } } +// ExternalType adds a non-FTL type to the type registry. +func ExternalType(goType any) Registree { + return func(t *TypeRegistry) { + typ := reflect.TypeOf(goType) + t.externalTypes[typ] = struct{}{} + } +} + // newTypeRegistry creates a new [TypeRegistry] for instantiating types by their qualified // name at runtime. func newTypeRegistry(options ...Registree) *TypeRegistry { @@ -61,6 +69,7 @@ func newTypeRegistry(options ...Registree) *TypeRegistry { sumTypes: map[reflect.Type][]sumTypeVariant{}, variantsToDiscriminators: map[reflect.Type]reflect.Type{}, fsm: map[string]ReflectedFSM{}, + externalTypes: map[reflect.Type]struct{}{}, } for _, o := range options { o(t) @@ -140,10 +149,5 @@ func (t *TypeRegistry) getVariantByType(discriminator reflect.Type, variantType } func (t *TypeRegistry) getSumTypeVariants(discriminator reflect.Type) optional.Option[[]sumTypeVariant] { - variants, ok := t.sumTypes[discriminator] - if !ok { - return optional.None[[]sumTypeVariant]() - } - - return optional.Some(variants) + return optional.Zero(t.sumTypes[discriminator]) } diff --git a/go-runtime/ftl/testdata/go/mapper/go.sum b/go-runtime/ftl/testdata/go/mapper/go.sum index 4439403ab..131aab36b 100644 --- a/go-runtime/ftl/testdata/go/mapper/go.sum +++ b/go-runtime/ftl/testdata/go/mapper/go.sum @@ -22,38 +22,35 @@ github.com/alecthomas/types v0.16.0 h1:o9+JSwCRB6DDaWDeR/Mg7v/zh3R+MlknM6DrnDyY7 github.com/alecthomas/types v0.16.0/go.mod h1:Tswm0qQpjpVq8rn70OquRsUtFxbQKub/8TMyYYGI0+k= github.com/alessio/shellescape v1.4.2 h1:MHPfaU+ddJ0/bYWpgIeUnQUqKrlJ1S7BfEYPM4uEoM0= github.com/alessio/shellescape v1.4.2/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= -github.com/aws/aws-sdk-go-v2 v1.30.0 h1:6qAwtzlfcTtcL8NHtbDQAqgM5s6NDipQTkPxyH/6kAA= -github.com/aws/aws-sdk-go-v2 v1.30.0/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= +github.com/amacneil/dbmate/v2 v2.17.0 h1:S3qW9d2C/CitY7Cvw9cgDxwjQCfn9xknBbP38onG7fY= +github.com/amacneil/dbmate/v2 v2.17.0/go.mod h1:YglDzfwUTF0nruRyTxwgJP3oALTbh6hFnWVAO+IuDQc= +github.com/aws/aws-sdk-go-v2 v1.30.1 h1:4y/5Dvfrhd1MxRDD77SrfsDaj8kUkkljU7XE83NPV+o= github.com/aws/aws-sdk-go-v2 v1.30.1/go.mod h1:nIQjQVp5sfpQcTc9mPSr1B0PaWK5ByX9MOoDadSN4lc= -github.com/aws/aws-sdk-go-v2/config v1.27.21 h1:yPX3pjGCe2hJsetlmGNB4Mngu7UPmvWPzzWCv1+boeM= -github.com/aws/aws-sdk-go-v2/config v1.27.21/go.mod h1:4XtlEU6DzNai8RMbjSF5MgGZtYvrhBP/aKZcRtZAVdM= -github.com/aws/aws-sdk-go-v2/credentials v1.17.21 h1:pjAqgzfgFhTv5grc7xPHtXCAaMapzmwA7aU+c/SZQGw= -github.com/aws/aws-sdk-go-v2/credentials v1.17.21/go.mod h1:nhK6PtBlfHTUDVmBLr1dg+WHCOCK+1Fu/WQyVHPsgNQ= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.8 h1:FR+oWPFb/8qMVYMWN98bUZAGqPvLHiyqg1wqQGfUAXY= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.8/go.mod h1:EgSKcHiuuakEIxJcKGzVNWh5srVAQ3jKaSrBGRYvM48= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.12 h1:SJ04WXGTwnHlWIODtC5kJzKbeuHt+OUNOgKg7nfnUGw= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.12/go.mod h1:FkpvXhA92gb3GE9LD6Og0pHHycTxW7xGpnEh5E7Opwo= +github.com/aws/aws-sdk-go-v2/config v1.27.23 h1:Cr/gJEa9NAS7CDAjbnB7tHYb3aLZI2gVggfmSAasDac= +github.com/aws/aws-sdk-go-v2/config v1.27.23/go.mod h1:WMMYHqLCFu5LH05mFOF5tsq1PGEMfKbu083VKqLCd0o= +github.com/aws/aws-sdk-go-v2/credentials v1.17.23 h1:G1CfmLVoO2TdQ8z9dW+JBc/r8+MqyPQhXCafNZcXVZo= +github.com/aws/aws-sdk-go-v2/credentials v1.17.23/go.mod h1:V/DvSURn6kKgcuKEk4qwSwb/fZ2d++FFARtWSbXnLqY= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.9 h1:Aznqksmd6Rfv2HQN9cpqIV/lQRMaIpJkLLaJ1ZI76no= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.9/go.mod h1:WQr3MY7AxGNxaqAtsDWn+fBxmd4XvLkzeqQ8P1VM0/w= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.13 h1:5SAoZ4jYpGH4721ZNoS1znQrhOfZinOhc4XuTXx/nVc= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.13/go.mod h1:+rdA6ZLpaSeM7tSg/B0IEDinCIBJGmW8rKDFkYpP04g= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.12 h1:hb5KgeYfObi5MHkSSZMEudnIvX30iB+E21evI4r6BnQ= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.12/go.mod h1:CroKe/eWJdyfy9Vx4rljP5wTUjNJfb+fPz1uMYUhEGM= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.13 h1:WIijqeaAO7TYFLbhsZmi2rgLEAtWOC1LhxCAVTJlSKw= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.13/go.mod h1:i+kbfa76PQbWw/ULoWnp51EYVWH4ENln76fLQE3lXT8= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.14 h1:zSDPny/pVnkqABXYRicYuPf9z2bTqfH13HT3v6UheIk= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.14/go.mod h1:3TTcI5JSzda1nw/pkVC9dhgLre0SNBFj2lYS4GctXKI= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.31.1 h1:fMhrWVym3nTAcf3eT9XsYcfN1kgQ/7ZuVLGHjPAn6Ms= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.31.1/go.mod h1:tBCf2+VgRT/Lk9KIlKpTxyCunzxHcP8BFPqcck5I9mM= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3 h1:dT3MqvGhSoaIhRseqw2I0yH81l7wiR2vjs57O51EAm8= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.3/go.mod h1:GlAeCkHwugxdHaueRr4nhPuY+WW+gR8UjlcqzPr1SPI= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.15 h1:I9zMeF107l0rJrpnHpjEiiTSCKYAIw8mALiXcPsGBiA= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.15/go.mod h1:9xWJ3Q/S6Ojusz1UIkfycgD1mGirJfLLKqq3LPT7WN8= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.32.1 h1:ZoYRD8IJqPkzjBnpokiMNO6L/DQprtpVpD6k0YSaF5U= github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.32.1/go.mod h1:GlRarZzIMl9VDi0mLQt+qQOuEkVFPnTkkjyugV1uVa8= -github.com/aws/aws-sdk-go-v2/service/sso v1.21.1 h1:sd0BsnAvLH8gsp2e3cbaIr+9D7T1xugueQ7V/zUAsS4= -github.com/aws/aws-sdk-go-v2/service/sso v1.21.1/go.mod h1:lcQG/MmxydijbeTOp04hIuJwXGWPZGI3bwdFDGRTv14= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.25.1 h1:1uEFNNskK/I1KoZ9Q8wJxMz5V9jyBlsiaNrM7vA3YUQ= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.25.1/go.mod h1:z0P8K+cBIsFXUr5rzo/psUeJ20XjPN0+Nn8067Nd+E4= -github.com/aws/aws-sdk-go-v2/service/sts v1.29.1 h1:myX5CxqXE0QMZNja6FA1/FSE3Vu1rVmeUmpJMMzeZg0= -github.com/aws/aws-sdk-go-v2/service/sts v1.29.1/go.mod h1:N2mQiucsO0VwK9CYuS4/c2n6Smeh1v47Rz3dWCPFLdE= -github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q= -github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= +github.com/aws/aws-sdk-go-v2/service/sso v1.22.1 h1:p1GahKIjyMDZtiKoIn0/jAj/TkMzfzndDv5+zi2Mhgc= +github.com/aws/aws-sdk-go-v2/service/sso v1.22.1/go.mod h1:/vWdhoIoYA5hYoPZ6fm7Sv4d8701PiG5VKe8/pPJL60= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.1 h1:lCEv9f8f+zJ8kcFeAjRZsekLd/x5SAm96Cva+VbUdo8= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.1/go.mod h1:xyFHA4zGxgYkdD73VeezHt3vSKEG9EmFnGwoKlP00u4= +github.com/aws/aws-sdk-go-v2/service/sts v1.30.1 h1:+woJ607dllHJQtsnJLi52ycuqHMwlW+Wqm2Ppsfp4nQ= +github.com/aws/aws-sdk-go-v2/service/sts v1.30.1/go.mod h1:jiNR3JqT15Dm+QWq2SRgh0x0bCNSRP2L25+CqPNpJlQ= +github.com/aws/smithy-go v1.20.3 h1:ryHwveWzPV5BIof6fyDvor6V3iUL7nTfiTKXHiW05nE= github.com/aws/smithy-go v1.20.3/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -99,6 +96,8 @@ github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2E github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= +github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= +github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/multiformats/go-base36 v0.2.0 h1:lFsAbNOGeKtuKozrtBsAkSVhv1p9D0/qedU9rQyccr0= diff --git a/go-runtime/ftl/testdata/go/typeregistry/go.sum b/go-runtime/ftl/testdata/go/typeregistry/go.sum index 3dcbbe661..131aab36b 100644 --- a/go-runtime/ftl/testdata/go/typeregistry/go.sum +++ b/go-runtime/ftl/testdata/go/typeregistry/go.sum @@ -22,6 +22,8 @@ github.com/alecthomas/types v0.16.0 h1:o9+JSwCRB6DDaWDeR/Mg7v/zh3R+MlknM6DrnDyY7 github.com/alecthomas/types v0.16.0/go.mod h1:Tswm0qQpjpVq8rn70OquRsUtFxbQKub/8TMyYYGI0+k= github.com/alessio/shellescape v1.4.2 h1:MHPfaU+ddJ0/bYWpgIeUnQUqKrlJ1S7BfEYPM4uEoM0= github.com/alessio/shellescape v1.4.2/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= +github.com/amacneil/dbmate/v2 v2.17.0 h1:S3qW9d2C/CitY7Cvw9cgDxwjQCfn9xknBbP38onG7fY= +github.com/amacneil/dbmate/v2 v2.17.0/go.mod h1:YglDzfwUTF0nruRyTxwgJP3oALTbh6hFnWVAO+IuDQc= github.com/aws/aws-sdk-go-v2 v1.30.1 h1:4y/5Dvfrhd1MxRDD77SrfsDaj8kUkkljU7XE83NPV+o= github.com/aws/aws-sdk-go-v2 v1.30.1/go.mod h1:nIQjQVp5sfpQcTc9mPSr1B0PaWK5ByX9MOoDadSN4lc= github.com/aws/aws-sdk-go-v2/config v1.27.23 h1:Cr/gJEa9NAS7CDAjbnB7tHYb3aLZI2gVggfmSAasDac= @@ -94,6 +96,8 @@ github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2E github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= +github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= +github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/multiformats/go-base36 v0.2.0 h1:lFsAbNOGeKtuKozrtBsAkSVhv1p9D0/qedU9rQyccr0= diff --git a/go-runtime/schema/common/common.go b/go-runtime/schema/common/common.go index 07d159c87..46b3ac1c0 100644 --- a/go-runtime/schema/common/common.go +++ b/go-runtime/schema/common/common.go @@ -260,7 +260,7 @@ func GetObjectForNode(typesInfo *types.Info, node ast.Node) optional.Option[type return optional.Some(obj) } -func GetTypeForNode(node ast.Node, info *types.Info) types.Type { +func GetTypeInfoForNode(node ast.Node, info *types.Info) types.Type { switch n := node.(type) { case *ast.Ident: if obj := info.ObjectOf(n); obj != nil { @@ -290,7 +290,7 @@ func GetTypeForNode(node ast.Node, info *types.Info) types.Type { } case *ast.GenDecl: for _, spec := range n.Specs { - if t := GetTypeForNode(spec, info); t != nil { + if t := GetTypeInfoForNode(spec, info); t != nil { return t } } @@ -306,8 +306,9 @@ func extractRef(pass *analysis.Pass, pos token.Pos, named *types.Named) optional } nodePath := named.Obj().Pkg().Path() - if !IsPathInPkg(pass.Pkg, nodePath) && !strings.HasPrefix(named.Obj().Pkg().Path(), "ftl/") { - NoEndColumnErrorf(pass, pos, "unsupported external type %q", named.Obj().Pkg().Path()+"."+named.Obj().Name()) + if !IsPathInPkg(pass.Pkg, nodePath) && IsExternalType(named.Obj()) { + //TODO: link to external type docs + NoEndColumnErrorf(pass, pos, "unsupported external type %q", GetNativeName(named.Obj())) return optional.None[schema.Type]() } @@ -322,6 +323,7 @@ func extractRef(pass *analysis.Pass, pos token.Pos, named *types.Named) optional Module: moduleName, Name: strcase.ToUpperCamel(named.Obj().Name()), } + for i := range named.TypeArgs().Len() { typeArg, ok := ExtractType(pass, pos, named.TypeArgs().At(i)).Get() if !ok { @@ -404,6 +406,17 @@ func ExtractTypeForNode(pass *analysis.Pass, obj types.Object, node ast.Node, in } return ExtractType(pass, node.Pos(), index) default: // Data ref + if strings.HasPrefix(im.Path(), pass.Pkg.Path()) { + // subpackage, same module + return ExtractType(pass, node.Pos(), pass.TypesInfo.TypeOf(typ.Sel)) + } + + if !IsPathInPkg(pass.Pkg, im.Path()) && !strings.HasPrefix(im.Path(), "ftl/") { + // Non-FTL + return optional.Some[schema.Type](&schema.Any{}) + } + + // FTL, different module externalModuleName, err := FtlModuleFromGoPackage(im.Path()) if err != nil { return optional.None[schema.Type]() @@ -422,7 +435,7 @@ func ExtractTypeForNode(pass *analysis.Pass, obj types.Object, node ast.Node, in } default: - variantNode := GetTypeForNode(node, pass.TypesInfo) + variantNode := GetTypeInfoForNode(node, pass.TypesInfo) if _, ok := variantNode.(*types.Struct); ok { variantNode = obj.Type() } @@ -453,5 +466,13 @@ func isLocalRef(pass *analysis.Pass, ref *schema.Ref) bool { } func GetNativeName(obj types.Object) string { - return obj.Pkg().Path() + "." + obj.Name() + fqName := obj.Pkg().Path() + if parts := strings.Split(obj.Pkg().Path(), "/"); parts[len(parts)-1] != obj.Pkg().Name() { + fqName = fqName + "." + obj.Pkg().Name() + } + return fqName + "." + obj.Name() +} + +func IsExternalType(obj types.Object) bool { + return !strings.HasPrefix(obj.Pkg().Path(), "ftl/") } diff --git a/go-runtime/schema/common/directive.go b/go-runtime/schema/common/directive.go index 47c68fd44..76fb2f999 100644 --- a/go-runtime/schema/common/directive.go +++ b/go-runtime/schema/common/directive.go @@ -275,13 +275,38 @@ func (d *DirectiveExport) GetPosition() token.Pos { } func (*DirectiveExport) MustAnnotate() []ast.Node { return []ast.Node{&ast.GenDecl{}} } +// DirectiveTypeMap is used to declare a native type to deserialize to in a given runtime. +type DirectiveTypeMap struct { + Pos token.Pos + + Runtime string `parser:"'typemap' @('go' | 'kotlin')"` + NativeName string `parser:"@String"` +} + +func (*DirectiveTypeMap) directive() {} + +func (d *DirectiveTypeMap) String() string { + return fmt.Sprintf("typemap %s %q", d.Runtime, d.NativeName) +} +func (*DirectiveTypeMap) GetTypeName() string { return "typemap" } +func (d *DirectiveTypeMap) SetPosition(pos token.Pos) { + d.Pos = pos +} +func (d *DirectiveTypeMap) GetPosition() token.Pos { + return d.Pos +} +func (*DirectiveTypeMap) MustAnnotate() []ast.Node { + return []ast.Node{&ast.GenDecl{}} +} + var directiveParser = participle.MustBuild[directiveWrapper]( participle.Lexer(schema.Lexer), participle.Elide("Whitespace"), participle.Unquote(), participle.UseLookahead(2), participle.Union[Directive](&DirectiveVerb{}, &DirectiveData{}, &DirectiveEnum{}, &DirectiveTypeAlias{}, - &DirectiveIngress{}, &DirectiveCronJob{}, &DirectiveRetry{}, &DirectiveSubscriber{}, &DirectiveExport{}), + &DirectiveIngress{}, &DirectiveCronJob{}, &DirectiveRetry{}, &DirectiveSubscriber{}, &DirectiveExport{}, + &DirectiveTypeMap{}), participle.Union[schema.IngressPathComponent](&schema.IngressPathLiteral{}, &schema.IngressPathParameter{}), ) diff --git a/go-runtime/schema/common/error.go b/go-runtime/schema/common/error.go index a475600b7..f7d1649f9 100644 --- a/go-runtime/schema/common/error.go +++ b/go-runtime/schema/common/error.go @@ -31,6 +31,10 @@ func (e DiagnosticCategory) ToErrorLevel() schema.ErrorLevel { } } +func NoEndColumnWarnf(pass *analysis.Pass, pos token.Pos, format string, args ...interface{}) { + pass.Report(analysis.Diagnostic{Pos: pos, End: pos, Message: fmt.Sprintf(format, args...), Category: string(Warn)}) +} + func Errorf(pass *analysis.Pass, node ast.Node, format string, args ...interface{}) { errorfAtPos(pass, node.Pos(), node.End(), format, args...) } diff --git a/go-runtime/schema/common/fact.go b/go-runtime/schema/common/fact.go index 2b47232e2..3e8cd9189 100644 --- a/go-runtime/schema/common/fact.go +++ b/go-runtime/schema/common/fact.go @@ -5,7 +5,6 @@ import ( "reflect" "github.com/alecthomas/types/optional" - sets "github.com/deckarep/golang-set/v2" "github.com/TBD54566975/ftl/backend/schema" "github.com/TBD54566975/golang-tools/go/analysis" @@ -41,11 +40,6 @@ type SchemaFactValue interface { // ExtractedDecl is a fact for associating an object with an extracted schema decl. type ExtractedDecl struct { Decl schema.Decl - // ShouldInclude is true if the object should be included in the schema. - // We extract all objects by default, but some objects may not actually be referenced in the schema. - ShouldInclude bool - // Refs is a list of objects that the object references. - Refs sets.Set[types.Object] } func (*ExtractedDecl) schemaFactValue() {} @@ -73,7 +67,7 @@ func (*FailedExtraction) schemaFactValue() {} // MarkSchemaDecl marks the given object as having been extracted to the given schema node. func MarkSchemaDecl(pass *analysis.Pass, obj types.Object, decl schema.Decl) { fact := newFact(pass) - fact.Set(&ExtractedDecl{Decl: decl, Refs: sets.NewSet[types.Object]()}) + fact.Set(&ExtractedDecl{Decl: decl}) pass.ExportObjectFact(obj, fact) } diff --git a/go-runtime/schema/extract.go b/go-runtime/schema/extract.go index bb75038e9..1e4707532 100644 --- a/go-runtime/schema/extract.go +++ b/go-runtime/schema/extract.go @@ -4,6 +4,7 @@ import ( "fmt" "go/types" + "github.com/alecthomas/types/optional" "golang.org/x/exp/maps" "github.com/TBD54566975/ftl/backend/schema" @@ -91,6 +92,19 @@ func analyzersWithDependencies() []*analysis.Analyzer { return as } +type refResultType int + +const ( + failed refResultType = iota + widened +) + +type refResult struct { + typ refResultType + obj types.Object + fqName optional.Option[string] +} + // the run will produce finalizer results for all packages it executes on, so we need to aggregate the results into a // single schema func combineAllPackageResults(results map[*analysis.Analyzer][]any, diagnostics []analysis.SimpleDiagnostic) (Result, error) { @@ -102,7 +116,7 @@ func combineAllPackageResults(results map[*analysis.Analyzer][]any, diagnostics NativeNames: make(map[schema.Node]string), Errors: diagnosticsToSchemaErrors(diagnostics), } - failedRefs := make(map[schema.RefKey]types.Object) + refResults := make(map[schema.RefKey]refResult) extractedDecls := make(map[schema.Decl]types.Object) for _, r := range fResults { fr, ok := r.(finalize.Result) @@ -119,21 +133,37 @@ func combineAllPackageResults(results map[*analysis.Analyzer][]any, diagnostics combined.Module.Comments = fr.ModuleComments } } - maps.Copy(failedRefs, fr.Failed) + copyFailedRefs(refResults, fr.Failed) maps.Copy(extractedDecls, fr.Extracted) } combined.Module.AddDecls(maps.Keys(extractedDecls)) for decl, obj := range extractedDecls { + if ta, ok := decl.(*schema.TypeAlias); ok && len(ta.Metadata) > 0 { + fqName, err := goQualifiedNameForWidenedType(obj, ta.Metadata) + if err != nil { + combined.Errors = append(combined.Errors, &schema.Error{Pos: ta.Position(), EndColumn: ta.Pos.Column, + Msg: err.Error(), Level: schema.ERROR}) + continue + } + refResults[schema.RefKey{Module: combined.Module.Name, Name: ta.Name}] = + refResult{typ: widened, obj: obj, fqName: optional.Some(fqName)} + } combined.NativeNames[decl] = common.GetNativeName(obj) } - combined.Errors = append(combined.Errors, propagateTypeErrors(combined.Module, failedRefs)...) + combined.Errors = append(combined.Errors, propagateTypeErrors(combined.Module, refResults)...) schema.SortErrorsByPosition(combined.Errors) updateVisibility(combined.Module) // TODO: validate schema once we have the full schema here return combined, nil } +func copyFailedRefs(parsedRefs map[schema.RefKey]refResult, failedRefs map[schema.RefKey]types.Object) { + for ref, obj := range failedRefs { + parsedRefs[ref] = refResult{typ: failed, obj: obj} + } +} + // updateVisibility traverses the module schema via refs and updates visibility as needed. func updateVisibility(module *schema.Module) { for _, d := range module.Decls { @@ -182,7 +212,10 @@ func updateTransitiveVisibility(d schema.Decl, module *schema.Module) { // propagateTypeErrors propagates type errors to referencing nodes. This improves error messaging for the LSP client by // surfacing errors all the way up the schema chain. -func propagateTypeErrors(module *schema.Module, failedRefs map[schema.RefKey]types.Object) []*schema.Error { +func propagateTypeErrors( + module *schema.Module, + refResults map[schema.RefKey]refResult, +) []*schema.Error { var errs []*schema.Error _ = schema.VisitWithParent(module, nil, func(n schema.Node, p schema.Node, next func() error) error { //nolint:errcheck if p == nil { @@ -192,8 +225,15 @@ func propagateTypeErrors(module *schema.Module, failedRefs map[schema.RefKey]typ if !ok { return next() } - if obj, ok := failedRefs[ref.ToRefKey()]; ok { - refNativeName := common.GetNativeName(obj) + + result, ok := refResults[ref.ToRefKey()] + if !ok { + return next() + } + + switch result.typ { + case failed: + refNativeName := common.GetNativeName(result.obj) switch pt := p.(type) { case *schema.Verb: if pt.Request == n { @@ -211,7 +251,11 @@ func propagateTypeErrors(module *schema.Module, failedRefs map[schema.RefKey]typ errs = append(errs, schema.Errorf(p.Position(), p.Position().Column, "unsupported type %q", refNativeName)) } + case widened: + errs = append(errs, schema.Warnf(n.Position(), n.Position().Column, "external type %q will be "+ + "widened to Any", result.fqName.MustGet())) } + return next() }) return errs @@ -249,3 +293,20 @@ func simplePosToSchemaPos(pos analysis.SimplePosition) schema.Position { Column: pos.Column, } } + +func goQualifiedNameForWidenedType(obj types.Object, metadata []schema.Metadata) (string, error) { + var nativeName string + for _, m := range metadata { + if m, ok := m.(*schema.MetadataTypeMap); ok && m.Runtime == "go" { + if nativeName != "" { + return "", fmt.Errorf("multiple Go type mappings found for %q", common.GetNativeName(obj)) + } + nativeName = m.NativeName + } + } + if nativeName == "" { + return "", fmt.Errorf("missing Go native name in typemapped alias for %q", + common.GetNativeName(obj)) + } + return nativeName, nil +} diff --git a/go-runtime/schema/finalize/analyzer.go b/go-runtime/schema/finalize/analyzer.go index ce193244e..53f7eb09e 100644 --- a/go-runtime/schema/finalize/analyzer.go +++ b/go-runtime/schema/finalize/analyzer.go @@ -7,6 +7,7 @@ import ( "strings" "github.com/TBD54566975/ftl/backend/schema" + "github.com/TBD54566975/ftl/backend/schema/strcase" "github.com/TBD54566975/ftl/go-runtime/schema/common" "github.com/TBD54566975/golang-tools/go/analysis" "github.com/TBD54566975/golang-tools/go/analysis/passes/inspect" @@ -47,7 +48,7 @@ func Run(pass *analysis.Pass) (interface{}, error) { extracted[f.Decl] = obj } case *common.FailedExtraction: - failed[schema.RefKey{Module: moduleName, Name: obj.Name()}] = obj + failed[schema.RefKey{Module: moduleName, Name: strcase.ToUpperCamel(obj.Name())}] = obj } } return Result{ diff --git a/go-runtime/schema/metadata/analyzer.go b/go-runtime/schema/metadata/analyzer.go index cb0334cda..ae16ce138 100644 --- a/go-runtime/schema/metadata/analyzer.go +++ b/go-runtime/schema/metadata/analyzer.go @@ -69,7 +69,7 @@ func extractMetadata(pass *analysis.Pass, node ast.Node, doc *ast.CommentGroup) var metadata []schema.Metadata for _, dir := range directives { var newSchType schema.Decl - if found.Contains(dir.GetTypeName()) { + if found.Contains(dir.GetTypeName()) && !canRepeatDirective(dir) { common.Errorf(pass, node, `expected exactly one "ftl:%s" directive but found multiple`, dir.GetTypeName()) continue @@ -125,6 +125,13 @@ func extractMetadata(pass *analysis.Pass, node ast.Node, doc *ast.CommentGroup) Pos: common.GoPosToSchemaPos(pass.Fset, dt.Pos), Name: dt.Name, }) + case *common.DirectiveTypeMap: + newSchType = &schema.TypeAlias{} + metadata = append(metadata, &schema.MetadataTypeMap{ + Pos: common.GoPosToSchemaPos(pass.Fset, dt.GetPosition()), + Runtime: dt.Runtime, + NativeName: dt.NativeName, + }) case *common.DirectiveVerb: newSchType = &schema.Verb{} case *common.DirectiveData: @@ -133,11 +140,10 @@ func extractMetadata(pass *analysis.Pass, node ast.Node, doc *ast.CommentGroup) case *common.DirectiveEnum: requireOnlyDirective(pass, node, directives, dt.GetTypeName()) newSchType = &schema.Enum{} - case *common.DirectiveTypeAlias: - requireOnlyDirective(pass, node, directives, dt.GetTypeName()) - newSchType = &schema.TypeAlias{} case *common.DirectiveExport: requireOnlyDirective(pass, node, directives, dt.GetTypeName()) + case *common.DirectiveTypeAlias: + newSchType = &schema.TypeAlias{} } declType = updateDeclType(pass, node.Pos(), declType, newSchType) } @@ -188,6 +194,11 @@ func isAnnotatingValidGoNode(dir common.Directive, node ast.Node) bool { return false } +func canRepeatDirective(dir common.Directive) bool { + _, ok := dir.(*common.DirectiveTypeMap) + return ok +} + // TODO: fix - this doesn't work for member functions. // // func getDuplicate(pass *analysis.Pass, name string, newMd *common.ExtractedMetadata) optional.Option[types.Object] { diff --git a/go-runtime/schema/transitive/analyzer.go b/go-runtime/schema/transitive/analyzer.go index c7b44d0d0..030bba4e0 100644 --- a/go-runtime/schema/transitive/analyzer.go +++ b/go-runtime/schema/transitive/analyzer.go @@ -29,12 +29,7 @@ type Fact = common.DefaultFact[Tag] // common.NeedsExtraction. This allows us to identify objects for extraction that are not explicitly // annotated with an FTL directive. func Extract(pass *analysis.Pass) (interface{}, error) { - needsExtraction := sets.NewSet[types.Object]() - for obj, fact := range common.MergeAllFacts(pass) { - if _, ok := fact.Get().(*common.NeedsExtraction); ok { - needsExtraction.Add(obj) - } - } + needsExtraction := getNeedsExtraction(pass, common.MergeAllFacts(pass)) for !needsExtraction.IsEmpty() { extractTransitive(pass, needsExtraction) needsExtraction = refreshNeedsExtraction(pass) @@ -43,17 +38,25 @@ func Extract(pass *analysis.Pass) (interface{}, error) { } func refreshNeedsExtraction(pass *analysis.Pass) sets.Set[types.Object] { - facts := sets.NewSet[types.Object]() + facts := make(map[types.Object]common.SchemaFact) for _, fact := range pass.AllObjectFacts() { f, ok := fact.Fact.(common.SchemaFact) if !ok { continue } - if _, ok := f.Get().(*common.NeedsExtraction); ok && fact.Object.Pkg().Path() == pass.Pkg.Path() { - facts.Add(fact.Object) + facts[fact.Object] = f + } + return getNeedsExtraction(pass, facts) +} + +func getNeedsExtraction(pass *analysis.Pass, facts map[types.Object]common.SchemaFact) sets.Set[types.Object] { + needsExtraction := sets.NewSet[types.Object]() + for obj, fact := range facts { + if _, ok := fact.Get().(*common.NeedsExtraction); ok && obj.Pkg().Path() == pass.Pkg.Path() { + needsExtraction.Add(obj) } } - return facts + return needsExtraction } func extractTransitive(pass *analysis.Pass, needsExtraction sets.Set[types.Object]) { diff --git a/go-runtime/schema/typealias/analyzer.go b/go-runtime/schema/typealias/analyzer.go index 36c6103cf..d89d4ab86 100644 --- a/go-runtime/schema/typealias/analyzer.go +++ b/go-runtime/schema/typealias/analyzer.go @@ -3,6 +3,7 @@ package typealias import ( "go/ast" "go/types" + "strings" "github.com/alecthomas/types/optional" @@ -16,14 +17,11 @@ import ( var Extractor = common.NewDeclExtractor[*schema.TypeAlias, *ast.TypeSpec]("typealias", Extract) func Extract(pass *analysis.Pass, node *ast.TypeSpec, obj types.Object) optional.Option[*schema.TypeAlias] { - schType, ok := common.ExtractTypeForNode(pass, obj, node, nil).Get() + schType, ok := common.ExtractTypeForNode(pass, obj, node.Type, nil).Get() if !ok { return optional.None[*schema.TypeAlias]() } - // type aliases must have an underlying type, and the type cannot be a reference to the alias itself. - if common.IsSelfReference(pass, obj, schType) { - return optional.None[*schema.TypeAlias]() - } + alias := &schema.TypeAlias{ Pos: common.GoPosToSchemaPos(pass.Fset, node.Pos()), Name: strcase.ToUpperCamel(obj.Name()), @@ -32,6 +30,78 @@ func Extract(pass *analysis.Pass, node *ast.TypeSpec, obj types.Object) optional if md, ok := common.GetFactForObject[*common.ExtractedMetadata](pass, obj).Get(); ok { alias.Comments = md.Comments alias.Export = md.IsExported + alias.Metadata = md.Metadata + + if len(md.Metadata) > 0 { + hasGoTypeMap := false + nativeName := qualifiedNameFromSelectorExpr(pass, node.Type) + if nativeName == "" { + return optional.None[*schema.TypeAlias]() + } + for _, m := range md.Metadata { + if mt, ok := m.(*schema.MetadataTypeMap); ok { + if mt.Runtime != "go" { + continue + } + if nativeName != mt.NativeName { + common.Errorf(pass, node, "declared type %s in typemap does not match native type %s", + mt.NativeName, nativeName) + return optional.None[*schema.TypeAlias]() + } + hasGoTypeMap = true + } else { + common.Errorf(pass, node, "unexpected directive on typealias %s", m) + } + } + + // if this alias contains any type mappings, implicitly add a Go type mapping if not already present + if !hasGoTypeMap { + alias.Metadata = append(alias.Metadata, &schema.MetadataTypeMap{ + Pos: common.GoPosToSchemaPos(pass.Fset, obj.Pos()), + Runtime: "go", + NativeName: nativeName, + }) + } + alias.Type = &schema.Any{} + return optional.Some(alias) + } + } else if _, ok := alias.Type.(*schema.Any); ok && + !strings.HasPrefix(qualifiedNameFromSelectorExpr(pass, node.Type), "ftl") { + alias.Metadata = append(alias.Metadata, &schema.MetadataTypeMap{ + Pos: common.GoPosToSchemaPos(pass.Fset, obj.Pos()), + Runtime: "go", + NativeName: qualifiedNameFromSelectorExpr(pass, node.Type), + }) + return optional.Some(alias) + } + + // type aliases must have an underlying type, and the type cannot be a reference to the alias itself. + if common.IsSelfReference(pass, obj, schType) { + return optional.None[*schema.TypeAlias]() } + return optional.Some(alias) } + +func qualifiedNameFromSelectorExpr(pass *analysis.Pass, node ast.Node) string { + se, ok := node.(*ast.SelectorExpr) + if !ok { + return "" + } + ident, ok := se.X.(*ast.Ident) + if !ok { + return "" + } + for _, im := range pass.Pkg.Imports() { + if im.Name() != ident.Name { + continue + } + fqName := im.Path() + if parts := strings.Split(im.Path(), "/"); parts[len(parts)-1] != ident.Name { + // if package differs from the directory name, add the package name to the fqName + fqName = fqName + "." + ident.Name + } + return fqName + "." + se.Sel.Name + } + return "" +} diff --git a/lsp/logger.go b/lsp/logger.go index 1c696735b..82b9ac770 100644 --- a/lsp/logger.go +++ b/lsp/logger.go @@ -15,8 +15,14 @@ func NewLogSink(server *Server) *LogSink { } func (l *LogSink) Log(entry log.Entry) error { - if entry.Level == log.Error { + switch entry.Level { + case log.Error: l.server.post(entry.Error) + case log.Warn: + if entry.Error != nil { + l.server.post(entry.Error) + } + default: } return nil }