diff --git a/e2e/go.mod b/e2e/go.mod index bce40f9cb5..6b8dc369c6 100644 --- a/e2e/go.mod +++ b/e2e/go.mod @@ -5,15 +5,15 @@ go 1.23.1 replace github.com/authzed/spicedb => ../ require ( - github.com/authzed/authzed-go v1.1.0 + github.com/authzed/authzed-go v1.1.2-0.20241126204516-c77eef2fb814 github.com/authzed/grpcutil v0.0.0-20240123092924-129dc0a6a6e1 github.com/authzed/spicedb v1.29.5 github.com/brianvoe/gofakeit/v6 v6.23.2 github.com/ecordell/optgen v0.0.10-0.20230609182709-018141bf9698 github.com/jackc/pgx/v5 v5.7.1 - github.com/stretchr/testify v1.9.0 - golang.org/x/tools v0.24.0 - google.golang.org/grpc v1.67.1 + github.com/stretchr/testify v1.10.0 + golang.org/x/tools v0.27.0 + google.golang.org/grpc v1.68.0 mvdan.cc/gofumpt v0.7.0 ) @@ -48,7 +48,7 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect github.com/jzelinskie/stringz v0.0.3 // indirect @@ -62,15 +62,15 @@ require ( go.opentelemetry.io/otel v1.31.0 // indirect go.opentelemetry.io/otel/metric v1.31.0 // indirect go.opentelemetry.io/otel/trace v1.31.0 // indirect - golang.org/x/crypto v0.28.0 // indirect - golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e // indirect - golang.org/x/mod v0.21.0 // indirect - golang.org/x/net v0.30.0 // indirect - golang.org/x/sync v0.8.0 // indirect - golang.org/x/sys v0.26.0 // indirect - golang.org/x/text v0.19.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20241021214115-324edc3d5d38 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 // indirect - google.golang.org/protobuf v1.35.1 // indirect + golang.org/x/crypto v0.29.0 // indirect + golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect + golang.org/x/mod v0.22.0 // indirect + golang.org/x/net v0.31.0 // indirect + golang.org/x/sync v0.9.0 // indirect + golang.org/x/sys v0.27.0 // indirect + golang.org/x/text v0.20.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20241118233622-e639e219e697 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241118233622-e639e219e697 // indirect + google.golang.org/protobuf v1.35.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/e2e/go.sum b/e2e/go.sum index 05a0d26132..5214abf073 100644 --- a/e2e/go.sum +++ b/e2e/go.sum @@ -1,5 +1,5 @@ -cel.dev/expr v0.16.0 h1:yloc84fytn4zmJX2GU3TkXGsaieaV7dQ057Qs4sIG2Y= -cel.dev/expr v0.16.0/go.mod h1:TRSuuV7DlVCE/uwv5QbAiW/v8l5O8C4eEPHeu7gf7Sg= +cel.dev/expr v0.16.1 h1:NR0+oFYzR1CqLFhTAqg3ql59G9VfN8fKq1TCHJ6gq1g= +cel.dev/expr v0.16.1/go.mod h1:AsGA5zb3WruAEQeQng1RZdGEXmBj0jvMWh6l5SnNuC8= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.116.0 h1:B3fRrSDkLRt5qSHWe40ERJvhvnQwdZiHu0bJOpldweE= cloud.google.com/go v0.116.0/go.mod h1:cEPSRWPzZEswwdr9BxE6ChEn01dWlTaF05LiC2Xs70U= @@ -34,8 +34,8 @@ github.com/Masterminds/squirrel v1.5.4 h1:uUcX/aBc8O7Fg9kaISIUsHXdKuqehiXAMQTYX8 github.com/Masterminds/squirrel v1.5.4/go.mod h1:NNaOrjSoIDfDA40n7sr2tPNZRfjzjA400rg+riTZj10= github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI= github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g= -github.com/authzed/authzed-go v1.1.0 h1:aFy5mIwe9HzaRss0KmDXBhwAAN2LWIEoRNcPXTaLv8Y= -github.com/authzed/authzed-go v1.1.0/go.mod h1:Dxn8INsNSyeBZbWQ9CdQZfIdUyREhBmFNk95ys+ZFQs= +github.com/authzed/authzed-go v1.1.2-0.20241126204516-c77eef2fb814 h1:R/GMeuZp+dVfbN2TsbURO2Hgg60LdmwsYp+d4/sX5uA= +github.com/authzed/authzed-go v1.1.2-0.20241126204516-c77eef2fb814/go.mod h1:TjD9ihw987IUI98pcvgxM9+cgoNNZ3eKeCVG5AklExY= github.com/authzed/cel-go v0.20.2 h1:GlmLecGry7Z8HU0k+hmaHHUV05ZHrsFxduXHtIePvck= github.com/authzed/cel-go v0.20.2/go.mod h1:pJHVFWbqUHV1J+klQoZubdKswlbxcsbojda3mye9kiU= github.com/authzed/grpcutil v0.0.0-20240123092924-129dc0a6a6e1 h1:zBfQzia6Hz45pJBeURTrv1b6HezmejB6UmiGuBilHZM= @@ -94,8 +94,8 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cloudspannerecosystem/spanner-change-streams-tail v0.3.1 h1:76zSbhqkgwt8LXoWBzZqvnKq0gfDeDrQRwMvaLfp3bM= github.com/cloudspannerecosystem/spanner-change-streams-tail v0.3.1/go.mod h1:Fb3cQgYCLKQfjsJcw+wsalU2l/eJpbtHu2UKt12p+Mk= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/xds/go v0.0.0-20240822171458-6449f94b4d59 h1:fLZ97KE86ELjEYJCEUVzmbhfzDxHHGwBrDVMd4XL6Bs= -github.com/cncf/xds/go v0.0.0-20240822171458-6449f94b4d59/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= +github.com/cncf/xds/go v0.0.0-20240905190251-b4127c9b8d78 h1:QVw89YDxXxEe+l8gU8ETbOasdwEV+avkR75ZzsVV9WI= +github.com/cncf/xds/go v0.0.0-20240905190251-b4127c9b8d78/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/creasty/defaults v1.8.0 h1:z27FJxCAa0JKt3utc0sCImAEb+spPucmKoOdLHvHYKk= github.com/creasty/defaults v1.8.0/go.mod h1:iGzKe6pbEHnpMPtfDXZEr0NVxWnPTjb1bbDy08fPzYM= @@ -171,8 +171,8 @@ github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDa github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0 h1:pRhl55Yx1eC7BZ1N+BBWwnKaMyD8uC+34TLdndZMAKk= github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0/go.mod h1:XKMd7iuf/RGPSMJ/U4HP0zS2Z9Fh8Ps9a+6X26m/tmI= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0 h1:ad0vkEBuk23VJzZR9nkLVG0YAoN9coASF1GusYX6AlU= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0/go.mod h1:igFoXX2ELCW06bol23DWPB5BEWfZISOzSP5K2sbLea0= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0 h1:TmHmbvxPmaegwhDubVz0lICL0J5Ka2vwTzhoePEXsGE= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0/go.mod h1:qztMSjm835F2bXf+5HKAPIS5qsmQDqZna/PgVt4rWtI= github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE= github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= @@ -238,8 +238,8 @@ github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= -github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= -github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= @@ -267,8 +267,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= @@ -298,19 +298,19 @@ go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= -golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= +golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ= +golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e h1:I88y4caeGeuDQxgdoFPUq097j7kNfw6uvuiNxUBfcBk= -golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ= +golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk= +golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= -golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= +golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -319,18 +319,18 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= -golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= +golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo= +golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= -golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE= +golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= +golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -340,14 +340,14 @@ golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= -golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= +golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= +golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.26.0 h1:WEQa6V3Gja/BhNxg540hBip/kkaYtRg3cxg4oXSw4AU= +golang.org/x/term v0.26.0/go.mod h1:Si5m1o57C5nBNQo5z1iq+XDijt21BDBDp2bK0QI8e3E= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= -golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug= +golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ= golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -359,8 +359,8 @@ golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= -golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= +golang.org/x/tools v0.27.0 h1:qEKojBykQkQ4EynWy4S8Weg69NumxKdn40Fce3uc/8o= +golang.org/x/tools v0.27.0/go.mod h1:sUi0ZgbwW9ZPAq26Ekut+weQPR5eIM6GQLQ1Yjm1H0Q= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -374,19 +374,19 @@ google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98 google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20241015192408-796eee8c2d53 h1:Df6WuGvthPzc+JiQ/G+m+sNX24kc0aTBqoDN/0yyykE= google.golang.org/genproto v0.0.0-20241015192408-796eee8c2d53/go.mod h1:fheguH3Am2dGp1LfXkrvwqC/KlFq8F0nLq3LryOMrrE= -google.golang.org/genproto/googleapis/api v0.0.0-20241021214115-324edc3d5d38 h1:2oV8dfuIkM1Ti7DwXc0BJfnwr9csz4TDXI9EmiI+Rbw= -google.golang.org/genproto/googleapis/api v0.0.0-20241021214115-324edc3d5d38/go.mod h1:vuAjtvlwkDKF6L1GQ0SokiRLCGFfeBUXWr/aFFkHACc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 h1:zciRKQ4kBpFgpfC5QQCVtnnNAcLIqweL7plyZRQHVpI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= +google.golang.org/genproto/googleapis/api v0.0.0-20241118233622-e639e219e697 h1:pgr/4QbFyktUv9CtQ/Fq4gzEE6/Xs7iCXbktaGzLHbQ= +google.golang.org/genproto/googleapis/api v0.0.0-20241118233622-e639e219e697/go.mod h1:+D9ySVjN8nY8YCVjc5O7PZDIdZporIDY3KaGfJunh88= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241118233622-e639e219e697 h1:LWZqQOEjDyONlF1H6afSWpAL/znlREo2tHfLoe+8LMA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241118233622-e639e219e697/go.mod h1:5uTbfoYQed2U9p3KIj2/Zzm02PYhndfdmML0qC3q3FU= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= -google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= -google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= -google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/grpc v1.68.0 h1:aHQeeJbo8zAkAa3pRzrVjZlbz6uSfeOXlJNQM0RAbz0= +google.golang.org/grpc v1.68.0/go.mod h1:fmSPC5AsjSBCK54MyHRx48kpOti1/jRfOlwEWywNjWA= +google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= +google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= diff --git a/go.mod b/go.mod index a2e2b3ea57..3b2d99fc95 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/Masterminds/semver v1.5.0 github.com/Masterminds/squirrel v1.5.4 github.com/Yiling-J/theine-go v0.6.0 - github.com/authzed/authzed-go v1.1.0 + github.com/authzed/authzed-go v1.1.2-0.20241126204516-c77eef2fb814 github.com/authzed/consistent v0.1.0 github.com/authzed/grpcutil v0.0.0-20240123092924-129dc0a6a6e1 github.com/aws/aws-sdk-go v1.55.5 @@ -44,14 +44,14 @@ require ( github.com/go-sql-driver/mysql v1.8.1 github.com/gogo/protobuf v1.3.2 github.com/golang/snappy v0.0.4 - github.com/golangci/golangci-lint v1.61.0 + github.com/golangci/golangci-lint v1.62.0 github.com/google/go-cmp v0.6.0 github.com/google/go-github/v43 v43.0.0 github.com/google/uuid v1.6.0 github.com/gosimple/slug v1.14.0 github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1 github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0 - github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0 + github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0 github.com/hashicorp/go-memdb v1.3.4 github.com/hashicorp/go-multierror v1.1.1 github.com/influxdata/tdigest v0.0.1 @@ -92,7 +92,7 @@ require ( github.com/sourcegraph/jsonrpc2 v0.2.0 github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opencensus.io v0.24.0 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.56.0 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0 @@ -101,16 +101,16 @@ require ( go.opentelemetry.io/otel/trace v1.31.0 go.uber.org/atomic v1.11.0 go.uber.org/goleak v1.3.0 - golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e - golang.org/x/mod v0.21.0 - golang.org/x/sync v0.8.0 + golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 + golang.org/x/mod v0.22.0 + golang.org/x/sync v0.9.0 golang.org/x/time v0.7.0 golang.org/x/vuln v1.1.3 google.golang.org/api v0.203.0 - google.golang.org/genproto/googleapis/api v0.0.0-20241021214115-324edc3d5d38 - google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 - google.golang.org/grpc v1.67.1 - google.golang.org/protobuf v1.35.1 + google.golang.org/genproto/googleapis/api v0.0.0-20241118233622-e639e219e697 + google.golang.org/genproto/googleapis/rpc v0.0.0-20241118233622-e639e219e697 + google.golang.org/grpc v1.68.0 + google.golang.org/protobuf v1.35.2 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 resenje.org/singleflight v0.4.3 @@ -121,7 +121,7 @@ require ( 4d63.com/gocheckcompilerdirectives v1.2.1 // indirect 4d63.com/gochecknoglobals v0.2.1 // indirect buf.build/gen/go/gogo/protobuf/protocolbuffers/go v1.35.1-20210810001428-4df00b267f94.1 // indirect - cel.dev/expr v0.16.0 // indirect + cel.dev/expr v0.16.1 // indirect cloud.google.com/go v0.116.0 // indirect cloud.google.com/go/auth v0.9.9 // indirect cloud.google.com/go/auth/oauth2adapt v0.2.4 // indirect @@ -132,10 +132,10 @@ require ( dario.cat/mergo v1.0.0 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/4meepo/tagalign v1.3.4 // indirect - github.com/Abirdcfly/dupword v0.1.1 // indirect - github.com/Antonboom/errname v0.1.13 // indirect - github.com/Antonboom/nilnil v0.1.9 // indirect - github.com/Antonboom/testifylint v1.4.3 // indirect + github.com/Abirdcfly/dupword v0.1.3 // indirect + github.com/Antonboom/errname v1.0.0 // indirect + github.com/Antonboom/nilnil v1.0.0 // indirect + github.com/Antonboom/testifylint v1.5.0 // indirect github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c // indirect github.com/Crocmagnon/fatcontext v0.5.2 // indirect @@ -147,8 +147,8 @@ require ( github.com/Microsoft/go-winio v0.6.2 // indirect github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect github.com/OpenPeeDeeP/depguard/v2 v2.2.0 // indirect - github.com/alecthomas/go-check-sumtype v0.1.4 // indirect - github.com/alexkohler/nakedret/v2 v2.0.4 // indirect + github.com/alecthomas/go-check-sumtype v0.2.0 // indirect + github.com/alexkohler/nakedret/v2 v2.0.5 // indirect github.com/alexkohler/prealloc v1.0.0 // indirect github.com/alingse/asasalint v0.0.11 // indirect github.com/antlr4-go/antlr/v4 v4.13.0 // indirect @@ -167,11 +167,11 @@ require ( github.com/aws/smithy-go v1.22.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bits-and-blooms/bitset v1.10.0 // indirect - github.com/bkielbasa/cyclop v1.2.1 // indirect + github.com/bkielbasa/cyclop v1.2.3 // indirect github.com/blizzy78/varnamelen v0.8.0 // indirect github.com/bombsimon/wsl/v4 v4.4.1 // indirect - github.com/breml/bidichk v0.2.7 // indirect - github.com/breml/errchkjson v0.3.6 // indirect + github.com/breml/bidichk v0.3.2 // indirect + github.com/breml/errchkjson v0.4.0 // indirect github.com/butuzov/ireturn v0.3.0 // indirect github.com/butuzov/mirror v1.2.0 // indirect github.com/catenacyber/perfsprint v0.7.1 // indirect @@ -181,8 +181,8 @@ require ( github.com/charithe/durationcheck v0.0.10 // indirect github.com/chavacava/garif v0.1.0 // indirect github.com/cilium/ebpf v0.9.1 // indirect - github.com/ckaznocha/intrange v0.2.0 // indirect - github.com/cncf/xds/go v0.0.0-20240822171458-6449f94b4d59 // indirect + github.com/ckaznocha/intrange v0.2.1 // indirect + github.com/cncf/xds/go v0.0.0-20240905190251-b4127c9b8d78 // indirect github.com/containerd/cgroups/v3 v3.0.1 // indirect github.com/containerd/continuity v0.4.3 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect @@ -205,8 +205,8 @@ require ( github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/fzipp/gocyclo v0.6.0 // indirect github.com/gammazero/deque v0.2.1 // indirect - github.com/ghostiam/protogetter v0.3.6 // indirect - github.com/go-critic/go-critic v0.11.4 // indirect + github.com/ghostiam/protogetter v0.3.8 // indirect + github.com/go-critic/go-critic v0.11.5 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect github.com/go-logr/logr v1.4.2 // indirect @@ -221,7 +221,7 @@ require ( github.com/go-toolsmith/astp v1.1.0 // indirect github.com/go-toolsmith/strparse v1.1.0 // indirect github.com/go-toolsmith/typep v1.1.0 // indirect - github.com/go-viper/mapstructure/v2 v2.1.0 // indirect + github.com/go-viper/mapstructure/v2 v2.2.1 // indirect github.com/go-xmlfmt/xmlfmt v1.1.2 // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/godbus/dbus/v5 v5.0.6 // indirect @@ -229,6 +229,7 @@ require ( github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect + github.com/golangci/go-printf-func-name v0.1.0 // indirect github.com/golangci/gofmt v0.0.0-20240816233607-d8596aa466a9 // indirect github.com/golangci/misspell v0.6.0 // indirect github.com/golangci/modinfo v0.3.4 // indirect @@ -261,7 +262,6 @@ require ( github.com/jackc/puddle/v2 v2.2.2 // indirect github.com/jgautheron/goconst v1.7.1 // indirect github.com/jingyugao/rowserrcheck v1.1.1 // indirect - github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect github.com/jjti/go-spancheck v0.6.2 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/joho/godotenv v1.5.1 // indirect @@ -269,7 +269,7 @@ require ( github.com/json-iterator/go v1.1.12 // indirect github.com/julz/importas v0.1.0 // indirect github.com/karamaru-alpha/copyloopvar v1.1.0 // indirect - github.com/kisielk/errcheck v1.7.0 // indirect + github.com/kisielk/errcheck v1.8.0 // indirect github.com/kkHAIKE/contextcheck v1.1.5 // indirect github.com/klauspost/compress v1.17.9 // indirect github.com/klauspost/cpuid/v2 v2.0.9 // indirect @@ -278,11 +278,10 @@ require ( github.com/kyoh86/exportloopref v0.1.11 // indirect github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect - github.com/lasiar/canonicalheader v1.1.1 // indirect + github.com/lasiar/canonicalheader v1.1.2 // indirect github.com/ldez/gomoddirectives v0.2.4 // indirect github.com/ldez/tagliatelle v0.5.0 // indirect github.com/leonklingele/grouper v1.1.2 // indirect - github.com/lufeee/execinquery v1.2.1 // indirect github.com/macabu/inamedparam v0.1.3 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mailru/easyjson v0.7.7 // indirect @@ -291,7 +290,7 @@ require ( github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-runewidth v0.0.16 // indirect - github.com/mgechev/revive v1.3.9 // indirect + github.com/mgechev/revive v1.5.0 // indirect github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect @@ -306,11 +305,11 @@ require ( github.com/nakabonne/nestif v0.3.1 // indirect github.com/nishanths/exhaustive v0.12.0 // indirect github.com/nishanths/predeclared v0.2.2 // indirect - github.com/nunnatsa/ginkgolinter v0.16.2 // indirect + github.com/nunnatsa/ginkgolinter v0.18.0 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0 // indirect - github.com/opencontainers/runc v1.1.13 // indirect + github.com/opencontainers/runc v1.1.14 // indirect github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 // indirect github.com/pelletier/go-toml/v2 v2.2.3 // indirect github.com/pkg/errors v0.9.1 // indirect @@ -323,7 +322,9 @@ require ( github.com/quasilyte/gogrep v0.5.0 // indirect github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect + github.com/raeperd/recvcheck v0.1.2 // indirect github.com/rivo/uniseg v0.4.7 // indirect + github.com/rogpeppe/go-internal v1.13.1 // indirect github.com/ryancurrah/gomodguard v1.3.5 // indirect github.com/ryanrolds/sqlclosecheck v0.5.1 // indirect github.com/ryszard/goskiplist v0.0.0-20150312221310-2dfbae5fcf46 // indirect @@ -334,13 +335,13 @@ require ( github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect github.com/sashamelentyev/interfacebloat v1.1.0 // indirect github.com/sashamelentyev/usestdlibvars v1.27.0 // indirect - github.com/securego/gosec/v2 v2.21.2 // indirect + github.com/securego/gosec/v2 v2.21.4 // indirect github.com/shabbyrobe/gocovmerge v0.0.0-20190829150210-3e036491d500 // indirect github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/sivchari/containedctx v1.0.3 // indirect - github.com/sivchari/tenv v1.10.0 // indirect - github.com/sonatard/noctx v0.0.2 // indirect + github.com/sivchari/tenv v1.12.1 // indirect + github.com/sonatard/noctx v0.1.0 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/sourcegraph/go-diff v0.7.0 // indirect github.com/spf13/afero v1.11.0 // indirect @@ -352,14 +353,15 @@ require ( github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/tdakkota/asciicheck v0.2.0 // indirect - github.com/tetafro/godot v1.4.17 // indirect + github.com/tetafro/godot v1.4.18 // indirect github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 // indirect - github.com/timonwong/loggercheck v0.9.4 // indirect + github.com/timonwong/loggercheck v0.10.1 // indirect github.com/tomarrell/wrapcheck/v2 v2.9.0 // indirect github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect github.com/ultraware/funlen v0.1.0 // indirect github.com/ultraware/whitespace v0.1.1 // indirect github.com/uudashr/gocognit v1.1.3 // indirect + github.com/uudashr/iface v1.2.0 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect @@ -370,7 +372,7 @@ require ( github.com/ykadowak/zerologlint v0.1.5 // indirect github.com/zeebo/xxh3 v1.0.2 // indirect gitlab.com/bosi/decorder v0.4.2 // indirect - go-simpler.org/musttag v0.12.2 // indirect + go-simpler.org/musttag v0.13.0 // indirect go-simpler.org/sloglint v0.7.2 // indirect go.opentelemetry.io/contrib/detectors/gcp v1.29.0 // indirect go.opentelemetry.io/contrib/propagators/b3 v1.20.0 // indirect @@ -381,18 +383,18 @@ require ( go.opentelemetry.io/otel/metric v1.31.0 // indirect go.opentelemetry.io/otel/sdk/metric v1.29.0 // indirect go.opentelemetry.io/proto/otlp v1.3.1 // indirect - go.uber.org/automaxprocs v1.5.3 // indirect + go.uber.org/automaxprocs v1.6.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.26.0 // indirect - golang.org/x/crypto v0.28.0 // indirect - golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f // indirect - golang.org/x/net v0.30.0 // indirect - golang.org/x/oauth2 v0.23.0 // indirect - golang.org/x/sys v0.26.0 // indirect + golang.org/x/crypto v0.29.0 // indirect + golang.org/x/exp/typeparams v0.0.0-20240909161429-701f63a606c0 // indirect + golang.org/x/net v0.31.0 // indirect + golang.org/x/oauth2 v0.24.0 // indirect + golang.org/x/sys v0.27.0 // indirect golang.org/x/telemetry v0.0.0-20240522233618-39ace7a40ae7 // indirect - golang.org/x/term v0.25.0 // indirect - golang.org/x/text v0.19.0 // indirect - golang.org/x/tools v0.24.0 // indirect + golang.org/x/term v0.26.0 // indirect + golang.org/x/text v0.20.0 // indirect + golang.org/x/tools v0.27.0 // indirect google.golang.org/genproto v0.0.0-20241015192408-796eee8c2d53 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect diff --git a/go.sum b/go.sum index 3aa14f238b..adbd869fc0 100644 --- a/go.sum +++ b/go.sum @@ -6,8 +6,8 @@ buf.build/gen/go/gogo/protobuf/protocolbuffers/go v1.35.1-20210810001428-4df00b2 buf.build/gen/go/gogo/protobuf/protocolbuffers/go v1.35.1-20210810001428-4df00b267f94.1/go.mod h1:O+FjUnOImbZeixUyVWBXxBZUmf7KUzGZ/D67m4dyoew= buf.build/gen/go/prometheus/prometheus/protocolbuffers/go v1.35.1-20240802094132-5b212ab78fb7.1 h1:Y/q1NA+DV9Pny/BUh9yLWoP4N1nE4zLuw8ogrAuvobI= buf.build/gen/go/prometheus/prometheus/protocolbuffers/go v1.35.1-20240802094132-5b212ab78fb7.1/go.mod h1:49DISEVducXjEej5RDtFkJRjsTxiEKT9BilbBxplJ74= -cel.dev/expr v0.16.0 h1:yloc84fytn4zmJX2GU3TkXGsaieaV7dQ057Qs4sIG2Y= -cel.dev/expr v0.16.0/go.mod h1:TRSuuV7DlVCE/uwv5QbAiW/v8l5O8C4eEPHeu7gf7Sg= +cel.dev/expr v0.16.1 h1:NR0+oFYzR1CqLFhTAqg3ql59G9VfN8fKq1TCHJ6gq1g= +cel.dev/expr v0.16.1/go.mod h1:AsGA5zb3WruAEQeQng1RZdGEXmBj0jvMWh6l5SnNuC8= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= @@ -629,14 +629,14 @@ gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zum git.sr.ht/~sbinet/gg v0.3.1/go.mod h1:KGYtlADtqsqANL9ueOFkWymvzUvLMQllU5Ixo+8v3pc= github.com/4meepo/tagalign v1.3.4 h1:P51VcvBnf04YkHzjfclN6BbsopfJR5rxs1n+5zHt+w8= github.com/4meepo/tagalign v1.3.4/go.mod h1:M+pnkHH2vG8+qhE5bVc/zeP7HS/j910Fwa9TUSyZVI0= -github.com/Abirdcfly/dupword v0.1.1 h1:Bsxe0fIw6OwBtXMIncaTxCLHYO5BB+3mcsR5E8VXloY= -github.com/Abirdcfly/dupword v0.1.1/go.mod h1:B49AcJdTYYkpd4HjgAcutNGG9HZ2JWwKunH9Y2BA6sM= -github.com/Antonboom/errname v0.1.13 h1:JHICqsewj/fNckzrfVSe+T33svwQxmjC+1ntDsHOVvM= -github.com/Antonboom/errname v0.1.13/go.mod h1:uWyefRYRN54lBg6HseYCFhs6Qjcy41Y3Jl/dVhA87Ns= -github.com/Antonboom/nilnil v0.1.9 h1:eKFMejSxPSA9eLSensFmjW2XTgTwJMjZ8hUHtV4s/SQ= -github.com/Antonboom/nilnil v0.1.9/go.mod h1:iGe2rYwCq5/Me1khrysB4nwI7swQvjclR8/YRPl5ihQ= -github.com/Antonboom/testifylint v1.4.3 h1:ohMt6AHuHgttaQ1xb6SSnxCeK4/rnK7KKzbvs7DmEck= -github.com/Antonboom/testifylint v1.4.3/go.mod h1:+8Q9+AOLsz5ZiQiiYujJKs9mNz398+M6UgslP4qgJLA= +github.com/Abirdcfly/dupword v0.1.3 h1:9Pa1NuAsZvpFPi9Pqkd93I7LIYRURj+A//dFd5tgBeE= +github.com/Abirdcfly/dupword v0.1.3/go.mod h1:8VbB2t7e10KRNdwTVoxdBaxla6avbhGzb8sCTygUMhw= +github.com/Antonboom/errname v1.0.0 h1:oJOOWR07vS1kRusl6YRSlat7HFnb3mSfMl6sDMRoTBA= +github.com/Antonboom/errname v1.0.0/go.mod h1:gMOBFzK/vrTiXN9Oh+HFs+e6Ndl0eTFbtsRTSRdXyGI= +github.com/Antonboom/nilnil v1.0.0 h1:n+v+B12dsE5tbAqRODXmEKfZv9j2KcTBrp+LkoM4HZk= +github.com/Antonboom/nilnil v1.0.0/go.mod h1:fDJ1FSFoLN6yoG65ANb1WihItf6qt9PJVTn/s2IrcII= +github.com/Antonboom/testifylint v1.5.0 h1:dlUIsDMtCrZWUnvkaCz3quJCoIjaGi41GzjPBGkkJ8A= +github.com/Antonboom/testifylint v1.5.0/go.mod h1:wqaJbu0Blb5Wag2wv7Z5xt+CIV+eVLxtGZrlK13z3AE= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= @@ -679,8 +679,8 @@ github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3 github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b/go.mod h1:1KcenG0jGWcpt8ov532z81sp/kMMUG485J2InIOyADM= github.com/alecthomas/assert/v2 v2.2.2 h1:Z/iVC0xZfWTaFNE6bA3z07T86hd45Xe2eLt6WVy2bbk= github.com/alecthomas/assert/v2 v2.2.2/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ= -github.com/alecthomas/go-check-sumtype v0.1.4 h1:WCvlB3l5Vq5dZQTFmodqL2g68uHiSwwlWcT5a2FGK0c= -github.com/alecthomas/go-check-sumtype v0.1.4/go.mod h1:WyYPfhfkdhyrdaligV6svFopZV8Lqdzn5pyVBaV6jhQ= +github.com/alecthomas/go-check-sumtype v0.2.0 h1:Bo+e4DFf3rs7ME9w/0SU/g6nmzJaphduP8Cjiz0gbwY= +github.com/alecthomas/go-check-sumtype v0.2.0/go.mod h1:WyYPfhfkdhyrdaligV6svFopZV8Lqdzn5pyVBaV6jhQ= github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk= github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -689,8 +689,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/alexkohler/nakedret/v2 v2.0.4 h1:yZuKmjqGi0pSmjGpOC016LtPJysIL0WEUiaXW5SUnNg= -github.com/alexkohler/nakedret/v2 v2.0.4/go.mod h1:bF5i0zF2Wo2o4X4USt9ntUWve6JbFv02Ff4vlkmS/VU= +github.com/alexkohler/nakedret/v2 v2.0.5 h1:fP5qLgtwbx9EJE8dGEERT02YwS8En4r9nnZ71RK+EVU= +github.com/alexkohler/nakedret/v2 v2.0.5/go.mod h1:bF5i0zF2Wo2o4X4USt9ntUWve6JbFv02Ff4vlkmS/VU= github.com/alexkohler/prealloc v1.0.0 h1:Hbq0/3fJPQhNkN0dR95AVrr6R7tou91y0uHG5pOcUuw= github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= github.com/alingse/asasalint v0.0.11 h1:SFwnQXJ49Kx/1GghOFz1XGqHYKp21Kq1nHad/0WQRnw= @@ -706,8 +706,8 @@ github.com/ashanbrown/forbidigo v1.6.0 h1:D3aewfM37Yb3pxHujIPSpTf6oQk9sc9WZi8ger github.com/ashanbrown/forbidigo v1.6.0/go.mod h1:Y8j9jy9ZYAEHXdu723cUlraTqbzjKF1MUyfOKL+AjcU= github.com/ashanbrown/makezero v1.1.1 h1:iCQ87C0V0vSyO+M9E/FZYbu65auqH0lnsOkf5FcB28s= github.com/ashanbrown/makezero v1.1.1/go.mod h1:i1bJLCRSCHOcOa9Y6MyF2FTfMZMFdHvxKHxgO5Z1axI= -github.com/authzed/authzed-go v1.1.0 h1:aFy5mIwe9HzaRss0KmDXBhwAAN2LWIEoRNcPXTaLv8Y= -github.com/authzed/authzed-go v1.1.0/go.mod h1:Dxn8INsNSyeBZbWQ9CdQZfIdUyREhBmFNk95ys+ZFQs= +github.com/authzed/authzed-go v1.1.2-0.20241126204516-c77eef2fb814 h1:R/GMeuZp+dVfbN2TsbURO2Hgg60LdmwsYp+d4/sX5uA= +github.com/authzed/authzed-go v1.1.2-0.20241126204516-c77eef2fb814/go.mod h1:TjD9ihw987IUI98pcvgxM9+cgoNNZ3eKeCVG5AklExY= github.com/authzed/cel-go v0.20.2 h1:GlmLecGry7Z8HU0k+hmaHHUV05ZHrsFxduXHtIePvck= github.com/authzed/cel-go v0.20.2/go.mod h1:pJHVFWbqUHV1J+klQoZubdKswlbxcsbojda3mye9kiU= github.com/authzed/consistent v0.1.0 h1:tlh1wvKoRbjRhMm2P+X5WQQyR54SRoS4MyjLOg17Mp8= @@ -756,18 +756,18 @@ github.com/bits-and-blooms/bitset v1.10.0 h1:ePXTeiPEazB5+opbv5fr8umg2R/1NlzgDsy github.com/bits-and-blooms/bitset v1.10.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/bits-and-blooms/bloom/v3 v3.7.0 h1:VfknkqV4xI+PsaDIsoHueyxVDZrfvMn56jeWUzvzdls= github.com/bits-and-blooms/bloom/v3 v3.7.0/go.mod h1:VKlUSvp0lFIYqxJjzdnSsZEw4iHb1kOL2tfHTgyJBHg= -github.com/bkielbasa/cyclop v1.2.1 h1:AeF71HZDob1P2/pRm1so9cd1alZnrpyc4q2uP2l0gJY= -github.com/bkielbasa/cyclop v1.2.1/go.mod h1:K/dT/M0FPAiYjBgQGau7tz+3TMh4FWAEqlMhzFWCrgM= +github.com/bkielbasa/cyclop v1.2.3 h1:faIVMIGDIANuGPWH031CZJTi2ymOQBULs9H21HSMa5w= +github.com/bkielbasa/cyclop v1.2.3/go.mod h1:kHTwA9Q0uZqOADdupvcFJQtp/ksSnytRMe8ztxG8Fuo= github.com/blizzy78/varnamelen v0.8.0 h1:oqSblyuQvFsW1hbBHh1zfwrKe3kcSj0rnXkKzsQ089M= github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k= github.com/bombsimon/wsl/v4 v4.4.1 h1:jfUaCkN+aUpobrMO24zwyAMwMAV5eSziCkOKEauOLdw= github.com/bombsimon/wsl/v4 v4.4.1/go.mod h1:Xu/kDxGZTofQcDGCtQe9KCzhHphIe0fDuyWTxER9Feo= github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= -github.com/breml/bidichk v0.2.7 h1:dAkKQPLl/Qrk7hnP6P+E0xOodrq8Us7+U0o4UBOAlQY= -github.com/breml/bidichk v0.2.7/go.mod h1:YodjipAGI9fGcYM7II6wFvGhdMYsC5pHDlGzqvEW3tQ= -github.com/breml/errchkjson v0.3.6 h1:VLhVkqSBH96AvXEyclMR37rZslRrY2kcyq+31HCsVrA= -github.com/breml/errchkjson v0.3.6/go.mod h1:jhSDoFheAF2RSDOlCfhHO9KqhZgAYLyvHe7bRCX8f/U= +github.com/breml/bidichk v0.3.2 h1:xV4flJ9V5xWTqxL+/PMFF6dtJPvZLPsyixAoPe8BGJs= +github.com/breml/bidichk v0.3.2/go.mod h1:VzFLBxuYtT23z5+iVkamXO386OB+/sVwZOpIj6zXGos= +github.com/breml/errchkjson v0.4.0 h1:gftf6uWZMtIa/Is3XJgibewBm2ksAQSY/kABDNFTAdk= +github.com/breml/errchkjson v0.4.0/go.mod h1:AuBOSTHyLSaaAFlWsRSuRBIroCh3eh7ZHh5YeelDIk8= github.com/butuzov/ireturn v0.3.0 h1:hTjMqWw3y5JC3kpnC5vXmFJAWI/m31jaCYQqzkS6PL0= github.com/butuzov/ireturn v0.3.0/go.mod h1:A09nIiwiqzN/IoVo9ogpa0Hzi9fex1kd9PSD6edP5ZA= github.com/butuzov/mirror v1.2.0 h1:9YVK1qIjNspaqWutSv8gsge2e/Xpq1eqEkslEUHy5cs= @@ -803,8 +803,8 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/cilium/ebpf v0.9.1 h1:64sn2K3UKw8NbP/blsixRpF3nXuyhz/VjRlRzvlBRu4= github.com/cilium/ebpf v0.9.1/go.mod h1:+OhNOIXx/Fnu1IE8bJz2dzOA+VSfyTfdNUVdlQnxUFY= -github.com/ckaznocha/intrange v0.2.0 h1:FykcZuJ8BD7oX93YbO1UY9oZtkRbp+1/kJcDjkefYLs= -github.com/ckaznocha/intrange v0.2.0/go.mod h1:r5I7nUlAAG56xmkOpw4XVr16BXhwYTUdcuRFeevn1oE= +github.com/ckaznocha/intrange v0.2.1 h1:M07spnNEQoALOJhwrImSrJLaxwuiQK+hA2DeajBlwYk= +github.com/ckaznocha/intrange v0.2.1/go.mod h1:7NEhVyf8fzZO5Ds7CRaqPEm52Ut83hsTiL5zbER/HYk= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudspannerecosystem/spanner-change-streams-tail v0.3.1 h1:76zSbhqkgwt8LXoWBzZqvnKq0gfDeDrQRwMvaLfp3bM= github.com/cloudspannerecosystem/spanner-change-streams-tail v0.3.1/go.mod h1:Fb3cQgYCLKQfjsJcw+wsalU2l/eJpbtHu2UKt12p+Mk= @@ -821,8 +821,8 @@ github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20240822171458-6449f94b4d59 h1:fLZ97KE86ELjEYJCEUVzmbhfzDxHHGwBrDVMd4XL6Bs= -github.com/cncf/xds/go v0.0.0-20240822171458-6449f94b4d59/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= +github.com/cncf/xds/go v0.0.0-20240905190251-b4127c9b8d78 h1:QVw89YDxXxEe+l8gU8ETbOasdwEV+avkR75ZzsVV9WI= +github.com/cncf/xds/go v0.0.0-20240905190251-b4127c9b8d78/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= github.com/containerd/cgroups/v3 v3.0.1 h1:4hfGvu8rfGIwVIDd+nLzn/B9ZXx4BcCjzt5ToenJRaE= github.com/containerd/cgroups/v3 v3.0.1/go.mod h1:/vtwk1VXrtoa5AaZLkypuOJgA/6DyPMZHJPGQNtlHnw= github.com/containerd/continuity v0.4.3 h1:6HVkalIp+2u1ZLH1J/pYX2oBVXlJZvh1X1A7bEZ9Su8= @@ -921,10 +921,10 @@ github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlya github.com/gammazero/deque v0.2.1 h1:qSdsbG6pgp6nL7A0+K/B7s12mcCY/5l5SIUpMOl+dC0= github.com/gammazero/deque v0.2.1/go.mod h1:LFroj8x4cMYCukHJDbxFCkT+r9AndaJnFMuZDV34tuU= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/ghostiam/protogetter v0.3.6 h1:R7qEWaSgFCsy20yYHNIJsU9ZOb8TziSRRxuAOTVKeOk= -github.com/ghostiam/protogetter v0.3.6/go.mod h1:7lpeDnEJ1ZjL/YtyoN99ljO4z0pd3H0d18/t2dPBxHw= -github.com/go-critic/go-critic v0.11.4 h1:O7kGOCx0NDIni4czrkRIXTnit0mkyKOCePh3My6OyEU= -github.com/go-critic/go-critic v0.11.4/go.mod h1:2QAdo4iuLik5S9YG0rT4wcZ8QxwHYkrr6/2MWAiv/vc= +github.com/ghostiam/protogetter v0.3.8 h1:LYcXbYvybUyTIxN2Mj9h6rHrDZBDwZloPoKctWrFyJY= +github.com/ghostiam/protogetter v0.3.8/go.mod h1:WZ0nw9pfzsgxuRsPOFQomgDVSWtDLJRfQJEhsGbmQMA= +github.com/go-critic/go-critic v0.11.5 h1:TkDTOn5v7EEngMxu8KbuFqFR43USaaH8XRJLz1jhVYA= +github.com/go-critic/go-critic v0.11.5/go.mod h1:wu6U7ny9PiaHaZHcvMDmdysMqvDem162Rh3zWTrqk8M= github.com/go-errors/errors v1.5.1 h1:ZwEMSLRCapFLflTpT7NKaAc7ukJ8ZPEjzlxt8rPN8bk= github.com/go-errors/errors v1.5.1/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= @@ -992,8 +992,8 @@ github.com/go-toolsmith/strparse v1.1.0 h1:GAioeZUK9TGxnLS+qfdqNbA4z0SSm5zVNtCQi github.com/go-toolsmith/strparse v1.1.0/go.mod h1:7ksGy58fsaQkGQlY8WVoBFNyEPMGuJin1rfoPS4lBSQ= github.com/go-toolsmith/typep v1.1.0 h1:fIRYDyF+JywLfqzyhdiHzRop/GQDxxNhLGQ6gFUNHus= github.com/go-toolsmith/typep v1.1.0/go.mod h1:fVIw+7zjdsMxDA3ITWnH1yOiw1rnTQKCsF/sk2H/qig= -github.com/go-viper/mapstructure/v2 v2.1.0 h1:gHnMa2Y/pIxElCH2GlZZ1lZSsn6XMtufpGyP1XxdC/w= -github.com/go-viper/mapstructure/v2 v2.1.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss= +github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/go-xmlfmt/xmlfmt v1.1.2 h1:Nea7b4icn8s57fTx1M5AI4qQT5HEM3rVUO8MuE6g80U= github.com/go-xmlfmt/xmlfmt v1.1.2/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= @@ -1051,10 +1051,12 @@ github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= +github.com/golangci/go-printf-func-name v0.1.0 h1:dVokQP+NMTO7jwO4bwsRwLWeudOVUPPyAKJuzv8pEJU= +github.com/golangci/go-printf-func-name v0.1.0/go.mod h1:wqhWFH5mUdJQhweRnldEywnR5021wTdZSNgwYceV14s= github.com/golangci/gofmt v0.0.0-20240816233607-d8596aa466a9 h1:/1322Qns6BtQxUZDTAT4SdcoxknUki7IAoK4SAXr8ME= github.com/golangci/gofmt v0.0.0-20240816233607-d8596aa466a9/go.mod h1:Oesb/0uFAyWoaw1U1qS5zyjCg5NP9C9iwjnI4tIsXEE= -github.com/golangci/golangci-lint v1.61.0 h1:VvbOLaRVWmyxCnUIMTbf1kDsaJbTzH20FAMXTAlQGu8= -github.com/golangci/golangci-lint v1.61.0/go.mod h1:e4lztIrJJgLPhWvFPDkhiMwEFRrWlmFbrZea3FsJyN8= +github.com/golangci/golangci-lint v1.62.0 h1:/G0g+bi1BhmGJqLdNQkKBWjcim8HjOPc4tsKuHDOhcI= +github.com/golangci/golangci-lint v1.62.0/go.mod h1:jtoOhQcKTz8B6dGNFyfQV3WZkQk+YvBDewDtNpiAJts= github.com/golangci/misspell v0.6.0 h1:JCle2HUTNWirNlDIAUO44hUsKhOFqGPoC4LZxlaSXDs= github.com/golangci/misspell v0.6.0/go.mod h1:keMNyY6R9isGaSAu+4Q8NMBwMPkh15Gtc8UCVoDtAWo= github.com/golangci/modinfo v0.3.4 h1:oU5huX3fbxqQXdfspamej74DFX0kyGLkw1ppvXoJ8GA= @@ -1180,8 +1182,8 @@ github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0/go.mod h1:XKMd7iuf/RGPSMJ github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0 h1:ad0vkEBuk23VJzZR9nkLVG0YAoN9coASF1GusYX6AlU= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0/go.mod h1:igFoXX2ELCW06bol23DWPB5BEWfZISOzSP5K2sbLea0= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0 h1:TmHmbvxPmaegwhDubVz0lICL0J5Ka2vwTzhoePEXsGE= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0/go.mod h1:qztMSjm835F2bXf+5HKAPIS5qsmQDqZna/PgVt4rWtI= github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-immutable-radix v1.3.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -1229,8 +1231,6 @@ github.com/jgautheron/goconst v1.7.1 h1:VpdAG7Ca7yvvJk5n8dMwQhfEZJh95kl/Hl9S1OI5 github.com/jgautheron/goconst v1.7.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs= github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= -github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af h1:KA9BjwUk7KlCh6S9EAGWBt1oExIUv9WyNCiRz5amv48= -github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= github.com/jjti/go-spancheck v0.6.2 h1:iYtoxqPMzHUPp7St+5yA8+cONdyXD3ug6KK15n7Pklk= github.com/jjti/go-spancheck v0.6.2/go.mod h1:+X7lvIrR5ZdUTkxFYqzJ0abr8Sb5LOo80uOhWNqIrYA= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= @@ -1268,8 +1268,8 @@ github.com/karamaru-alpha/copyloopvar v1.1.0 h1:x7gNyKcC2vRBO1H2Mks5u1VxQtYvFiym github.com/karamaru-alpha/copyloopvar v1.1.0/go.mod h1:u7CIfztblY0jZLOQZgH3oYsJzpC2A7S6u/lfgSXHy0k= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/errcheck v1.7.0 h1:+SbscKmWJ5mOK/bO1zS60F5I9WwZDWOfRsC4RwfwRV0= -github.com/kisielk/errcheck v1.7.0/go.mod h1:1kLL+jV4e+CFfueBmI1dSK2ADDyQnlrnrY/FqKluHJQ= +github.com/kisielk/errcheck v1.8.0 h1:ZX/URYa7ilESY19ik/vBmCn6zdGQLxACwjAcWbHlYlg= +github.com/kisielk/errcheck v1.8.0/go.mod h1:1kLL+jV4e+CFfueBmI1dSK2ADDyQnlrnrY/FqKluHJQ= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkHAIKE/contextcheck v1.1.5 h1:CdnJh63tcDe53vG+RebdpdXJTc9atMgGqdx8LXxiilg= github.com/kkHAIKE/contextcheck v1.1.5/go.mod h1:O930cpht4xb1YQpK+1+AgoM3mFsvxr7uyFptcnWTYUA= @@ -1304,8 +1304,8 @@ github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 h1:SOEGU9fKiNWd/HOJuq github.com/lann/builder v0.0.0-20180802200727-47ae307949d0/go.mod h1:dXGbAdH5GtBTC4WfIxhKZfyBF/HBFgRZSWwZ9g/He9o= github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 h1:P6pPBnrTSX3DEVR4fDembhRWSsG5rVo6hYhAB/ADZrk= github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0/go.mod h1:vmVJ0l/dxyfGW6FmdpVm2joNMFikkuWg0EoCKLGUMNw= -github.com/lasiar/canonicalheader v1.1.1 h1:wC+dY9ZfiqiPwAexUApFush/csSPXeIi4QqyxXmng8I= -github.com/lasiar/canonicalheader v1.1.1/go.mod h1:cXkb3Dlk6XXy+8MVQnF23CYKWlyA7kfQhSw2CcZtZb0= +github.com/lasiar/canonicalheader v1.1.2 h1:vZ5uqwvDbyJCnMhmFYimgMZnJMjwljN5VGY0VKbMXb4= +github.com/lasiar/canonicalheader v1.1.2/go.mod h1:qJCeLFS0G/QlLQ506T+Fk/fWMa2VmBUiEI2cuMK4djI= github.com/ldez/gomoddirectives v0.2.4 h1:j3YjBIjEBbqZ0NKtBNzr8rtMHTOrLPeiwTkfUJZ3alg= github.com/ldez/gomoddirectives v0.2.4/go.mod h1:oWu9i62VcQDYp9EQ0ONTfqLNh+mDLWWDO+SO0qSQw5g= github.com/ldez/tagliatelle v0.5.0 h1:epgfuYt9v0CG3fms0pEgIMNPuFf/LpPIfjk4kyqSioo= @@ -1318,8 +1318,6 @@ github.com/lithammer/fuzzysearch v1.1.8 h1:/HIuJnjHuXS8bKaiTMeeDlW2/AyIWk2brx1V8 github.com/lithammer/fuzzysearch v1.1.8/go.mod h1:IdqeyBClc3FFqSzYq/MXESsS4S0FsZ5ajtkr5xPLts4= github.com/lthibault/jitterbug v2.0.0+incompatible h1:qouq51IKzlMx25+15jbxhC/d79YyTj0q6XFoptNqaUw= github.com/lthibault/jitterbug v2.0.0+incompatible/go.mod h1:2l7akWd27PScEs6YkjyUVj/8hKgNhbbQ3KiJgJtlf6o= -github.com/lufeee/execinquery v1.2.1 h1:hf0Ems4SHcUGBxpGN7Jz78z1ppVkP/837ZlETPCEtOM= -github.com/lufeee/execinquery v1.2.1/go.mod h1:EC7DrEKView09ocscGHC+apXMIaorh4xqSxS/dy8SbM= github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/lyft/protoc-gen-star/v2 v2.0.1/go.mod h1:RcCdONR2ScXaYnQC5tUzxzlpA3WVYF7/opLeUgcQs/o= @@ -1355,8 +1353,8 @@ github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4 github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/maypok86/otter v1.2.3 h1:jxyPD4ofCwtrQM5is5JNrdAs+6+JQkf/PREZd7JCVgg= github.com/maypok86/otter v1.2.3/go.mod h1:mKLfoI7v1HOmQMwFgX4QkRk23mX6ge3RDvjdHOWG4R4= -github.com/mgechev/revive v1.3.9 h1:18Y3R4a2USSBF+QZKFQwVkBROUda7uoBlkEuBD+YD1A= -github.com/mgechev/revive v1.3.9/go.mod h1:+uxEIr5UH0TjXWHTno3xh4u7eg6jDpXKzQccA9UGhHU= +github.com/mgechev/revive v1.5.0 h1:oaSmjA7rP8+HyoRuCgC531VHwnLH1AlJdjj+1AnQceQ= +github.com/mgechev/revive v1.5.0/go.mod h1:L6T3H8EoerRO86c7WuGpvohIUmiploGiyoYbtIWFmV8= github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ= @@ -1400,8 +1398,8 @@ github.com/nishanths/exhaustive v0.12.0 h1:vIY9sALmw6T/yxiASewa4TQcFsVYZQQRUQJhK github.com/nishanths/exhaustive v0.12.0/go.mod h1:mEZ95wPIZW+x8kC4TgC+9YCUgiST7ecevsVDTgc2obs= github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm/w98Vk= github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= -github.com/nunnatsa/ginkgolinter v0.16.2 h1:8iLqHIZvN4fTLDC0Ke9tbSZVcyVHoBs0HIbnVSxfHJk= -github.com/nunnatsa/ginkgolinter v0.16.2/go.mod h1:4tWRinDN1FeJgU+iJANW/kz7xKN5nYRAOfJDQUS9dOQ= +github.com/nunnatsa/ginkgolinter v0.18.0 h1:ZXO1wKhPg3A6LpbN5dMuqwhfOjN5c3ous8YdKOuqk9k= +github.com/nunnatsa/ginkgolinter v0.18.0/go.mod h1:vPrWafSULmjMGCMsfGA908if95VnHQNAahvSBOjTuWs= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo/v2 v2.20.2 h1:7NVCeyIWROIAheY21RLS+3j2bb52W0W82tkberYytp4= @@ -1412,8 +1410,8 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= -github.com/opencontainers/runc v1.1.13 h1:98S2srgG9vw0zWcDpFMn5TRrh8kLxa/5OFUstuUhmRs= -github.com/opencontainers/runc v1.1.13/go.mod h1:R016aXacfp/gwQBYw2FDGa9m+n6atbLWrYY8hNMT/sA= +github.com/opencontainers/runc v1.1.14 h1:rgSuzbmgz5DUJjeSnw337TxDbRuqjs6iqQck/2weR6w= +github.com/opencontainers/runc v1.1.14/go.mod h1:E4C2z+7BxR7GHXp0hAY53mek+x49X1LjPNeMTfRGvOA= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 h1:3snG66yBm59tKhhSPQrQ/0bCrv1LQbKt40LnUPiUxdc= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -1500,6 +1498,8 @@ github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 h1:TCg2WBOl github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 h1:M8mH9eK4OUR4lu7Gd+PU1fV2/qnDNfzT635KRSObncs= github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= +github.com/raeperd/recvcheck v0.1.2 h1:SjdquRsRXJc26eSonWIo8b7IMtKD3OAT2Lb5G3ZX1+4= +github.com/raeperd/recvcheck v0.1.2/go.mod h1:n04eYkwIR0JbgD73wT8wL4JjPC3wm0nFtzBnWNocnYU= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= @@ -1508,8 +1508,8 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= -github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= @@ -1550,8 +1550,8 @@ github.com/scylladb/go-set v1.0.2 h1:SkvlMCKhP0wyyct6j+0IHJkBkSZL+TDzZ4E7f7BCcRE github.com/scylladb/go-set v1.0.2/go.mod h1:DkpGd78rljTxKAnTDPFqXSGxvETQnJyuSOQwsHycqfs= github.com/sean-/sysexits v1.0.0 h1:FLf1xcUTBzTqUI1Nc77UwYPcoWgDM09lyMTt8+QCpbE= github.com/sean-/sysexits v1.0.0/go.mod h1:yRz1mwglmPHOlAm3+WGr40EV8qFg4hn8GE9MoNwoecg= -github.com/securego/gosec/v2 v2.21.2 h1:deZp5zmYf3TWwU7A7cR2+SolbTpZ3HQiwFqnzQyEl3M= -github.com/securego/gosec/v2 v2.21.2/go.mod h1:au33kg78rNseF5PwPnTWhuYBFf534bvJRvOrgZ/bFzU= +github.com/securego/gosec/v2 v2.21.4 h1:Le8MSj0PDmOnHJgUATjD96PaXRvCpKC+DGJvwyy0Mlk= +github.com/securego/gosec/v2 v2.21.4/go.mod h1:Jtb/MwRQfRxCXyCm1rfM1BEiiiTfUOdyzzAhlr6lUTA= github.com/sercand/kuberesolver/v5 v5.1.1 h1:CYH+d67G0sGBj7q5wLK61yzqJJ8gLLC8aeprPTHb6yY= github.com/sercand/kuberesolver/v5 v5.1.1/go.mod h1:Fs1KbKhVRnB2aDWN12NjKCB+RgYMWZJ294T3BtmVCpQ= github.com/shabbyrobe/gocovmerge v0.0.0-20190829150210-3e036491d500 h1:WnNuhiq+FOY3jNj6JXFT+eLN3CQ/oPIsDPRanvwsmbI= @@ -1569,10 +1569,10 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sivchari/containedctx v1.0.3 h1:x+etemjbsh2fB5ewm5FeLNi5bUjK0V8n0RB+Wwfd0XE= github.com/sivchari/containedctx v1.0.3/go.mod h1:c1RDvCbnJLtH4lLcYD/GqwiBSSf4F5Qk0xld2rBqzJ4= -github.com/sivchari/tenv v1.10.0 h1:g/hzMA+dBCKqGXgW8AV/1xIWhAvDrx0zFKNR48NFMg0= -github.com/sivchari/tenv v1.10.0/go.mod h1:tdY24masnVoZFxYrHv/nD6Tc8FbkEtAQEEziXpyMgqY= -github.com/sonatard/noctx v0.0.2 h1:L7Dz4De2zDQhW8S0t+KUjY0MAQJd6SgVwhzNIc4ok00= -github.com/sonatard/noctx v0.0.2/go.mod h1:kzFz+CzWSjQ2OzIm46uJZoXuBpa2+0y3T36U18dWqIo= +github.com/sivchari/tenv v1.12.1 h1:+E0QzjktdnExv/wwsnnyk4oqZBUfuh89YMQT1cyuvSY= +github.com/sivchari/tenv v1.12.1/go.mod h1:1LjSOUCc25snIr5n3DtGGrENhX3LuWefcplwVGC24mw= +github.com/sonatard/noctx v0.1.0 h1:JjqOc2WN16ISWAjAk8M5ej0RfExEXtkEyExl2hLW+OM= +github.com/sonatard/noctx v0.1.0/go.mod h1:0RvBxqY8D4j9cTTTWE8ylt2vqj2EPI8fHmrxHdsaZ2c= github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/sourcegraph/go-diff v0.7.0 h1:9uLlrd5T46OXs5qpp8L/MTltk0zikUGi0sNNyCpA8G0= @@ -1619,8 +1619,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/stvp/go-udp-testing v0.0.0-20201019212854-469649b16807/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= @@ -1630,12 +1630,12 @@ github.com/tenntenn/modver v1.0.1 h1:2klLppGhDgzJrScMpkj9Ujy3rXPUspSjAcev9tSEBgA github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0= github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3 h1:f+jULpRQGxTSkNYKJ51yaw6ChIqO+Je8UqsTKN/cDag= github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY= -github.com/tetafro/godot v1.4.17 h1:pGzu+Ye7ZUEFx7LHU0dAKmCOXWsPjl7qA6iMGndsjPs= -github.com/tetafro/godot v1.4.17/go.mod h1:2oVxTBSftRTh4+MVfUaUXR6bn2GDXCaMcOG4Dk3rfio= +github.com/tetafro/godot v1.4.18 h1:ouX3XGiziKDypbpXqShBfnNLTSjR8r3/HVzrtJ+bHlI= +github.com/tetafro/godot v1.4.18/go.mod h1:2oVxTBSftRTh4+MVfUaUXR6bn2GDXCaMcOG4Dk3rfio= github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 h1:quvGphlmUVU+nhpFa4gg4yJyTRJ13reZMDHrKwYw53M= github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966/go.mod h1:27bSVNWSBOHm+qRp1T9qzaIpsWEP6TbUnei/43HK+PQ= -github.com/timonwong/loggercheck v0.9.4 h1:HKKhqrjcVj8sxL7K77beXh0adEm6DLjV/QOGeMXEVi4= -github.com/timonwong/loggercheck v0.9.4/go.mod h1:caz4zlPcgvpEkXgVnAJGowHAMW2NwHaNlpS8xDbVhTg= +github.com/timonwong/loggercheck v0.10.1 h1:uVZYClxQFpw55eh+PIoqM7uAOHMrhVcDoWDery9R8Lg= +github.com/timonwong/loggercheck v0.10.1/go.mod h1:HEAWU8djynujaAVX7QI65Myb8qgfcZ1uKbdpg3ZzKl8= github.com/tomarrell/wrapcheck/v2 v2.9.0 h1:801U2YCAjLhdN8zhZ/7tdjB3EnAoRlJHt/s+9hijLQ4= github.com/tomarrell/wrapcheck/v2 v2.9.0/go.mod h1:g9vNIyhb5/9TQgumxQyOEqDHsmGYcGsVMOx/xGkqdMo= github.com/tommy-muehle/go-mnd/v2 v2.5.1 h1:NowYhSdyE/1zwK9QCLeRb6USWdoif80Ie+v+yU8u1Zw= @@ -1648,6 +1648,8 @@ github.com/ultraware/whitespace v0.1.1 h1:bTPOGejYFulW3PkcrqkeQwOd6NKOOXvmGD9bo/ github.com/ultraware/whitespace v0.1.1/go.mod h1:XcP1RLD81eV4BW8UhQlpaR+SDc2givTvyI8a586WjW8= github.com/uudashr/gocognit v1.1.3 h1:l+a111VcDbKfynh+airAy/DJQKaXh2m9vkoysMPSZyM= github.com/uudashr/gocognit v1.1.3/go.mod h1:aKH8/e8xbTRBwjbCkwZ8qt4l2EpKXl31KMHgSS+lZ2U= +github.com/uudashr/iface v1.2.0 h1:ECJjh5q/1Zmnv/2yFpWV6H3oMg5+Mo+vL0aqw9Gjazo= +github.com/uudashr/iface v1.2.0/go.mod h1:Ux/7d/rAF3owK4m53cTVXL4YoVHKNqnoOeQHn2xrlp0= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= @@ -1680,8 +1682,8 @@ gitlab.com/bosi/decorder v0.4.2 h1:qbQaV3zgwnBZ4zPMhGLW4KZe7A7NwxEhJx39R3shffo= gitlab.com/bosi/decorder v0.4.2/go.mod h1:muuhHoaJkA9QLcYHq4Mj8FJUwDZ+EirSHRiaTcTf6T8= go-simpler.org/assert v0.9.0 h1:PfpmcSvL7yAnWyChSjOz6Sp6m9j5lyK8Ok9pEL31YkQ= go-simpler.org/assert v0.9.0/go.mod h1:74Eqh5eI6vCK6Y5l3PI8ZYFXG4Sa+tkr70OIPJAUr28= -go-simpler.org/musttag v0.12.2 h1:J7lRc2ysXOq7eM8rwaTYnNrHd5JwjppzB6mScysB2Cs= -go-simpler.org/musttag v0.12.2/go.mod h1:uN1DVIasMTQKk6XSik7yrJoEysGtR2GRqvWnI9S7TYM= +go-simpler.org/musttag v0.13.0 h1:Q/YAW0AHvaoaIbsPj3bvEI5/QFP7w696IMUpnKXQfCE= +go-simpler.org/musttag v0.13.0/go.mod h1:FTzIGeK6OkKlUDVpj0iQUXZLUO1Js9+mvykDQy9C5yM= go-simpler.org/sloglint v0.7.2 h1:Wc9Em/Zeuu7JYpl+oKoYOsQSy2X560aVueCW/m6IijY= go-simpler.org/sloglint v0.7.2/go.mod h1:US+9C80ppl7VsThQclkM7BkCHQAzuz8kHLsW3ppuluo= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= @@ -1729,8 +1731,8 @@ go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8= -go.uber.org/automaxprocs v1.5.3/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= +go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= +go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= @@ -1751,8 +1753,8 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= -golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= +golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ= +golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1768,12 +1770,12 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e h1:I88y4caeGeuDQxgdoFPUq097j7kNfw6uvuiNxUBfcBk= -golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ= +golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk= +golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= -golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f h1:phY1HzDcf18Aq9A8KkmRtY9WvOFIxN8wgfvy6Zm1DV8= -golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/exp/typeparams v0.0.0-20240909161429-701f63a606c0 h1:bVwtbF629Xlyxk6xLQq2TDYmqP0uiWaet5LwRebuY0k= +golang.org/x/exp/typeparams v0.0.0-20240909161429-701f63a606c0/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -1819,8 +1821,8 @@ golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= -golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= +golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1882,8 +1884,8 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= -golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= -golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= +golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo= +golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1913,8 +1915,8 @@ golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= -golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= -golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE= +golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1931,8 +1933,8 @@ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= +golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -2027,8 +2029,8 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= +golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/telemetry v0.0.0-20240522233618-39ace7a40ae7 h1:FemxDzfMUcK2f3YY4H+05K9CDzbSVr2+q/JKN45pey0= golang.org/x/telemetry v0.0.0-20240522233618-39ace7a40ae7/go.mod h1:pRgIJT+bRLFKnoM1ldnzKoxTIn14Yxz928LQRYYgIN0= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -2040,8 +2042,8 @@ golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= -golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= -golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= +golang.org/x/term v0.26.0 h1:WEQa6V3Gja/BhNxg540hBip/kkaYtRg3cxg4oXSw4AU= +golang.org/x/term v0.26.0/go.mod h1:Si5m1o57C5nBNQo5z1iq+XDijt21BDBDp2bK0QI8e3E= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2058,8 +2060,8 @@ golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= -golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug= +golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -2146,8 +2148,8 @@ golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= -golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= -golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= +golang.org/x/tools v0.27.0 h1:qEKojBykQkQ4EynWy4S8Weg69NumxKdn40Fce3uc/8o= +golang.org/x/tools v0.27.0/go.mod h1:sUi0ZgbwW9ZPAq26Ekut+weQPR5eIM6GQLQ1Yjm1H0Q= golang.org/x/vuln v1.1.3 h1:NPGnvPOTgnjBc9HTaUx+nj+EaUYxl5SJOWqaDYGaFYw= golang.org/x/vuln v1.1.3/go.mod h1:7Le6Fadm5FOqE9C926BCD0g12NWyhg7cxV4BwcPFuNY= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -2372,10 +2374,10 @@ google.golang.org/genproto v0.0.0-20230331144136-dcfb400f0633/go.mod h1:UUQDJDOl google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= google.golang.org/genproto v0.0.0-20241015192408-796eee8c2d53 h1:Df6WuGvthPzc+JiQ/G+m+sNX24kc0aTBqoDN/0yyykE= google.golang.org/genproto v0.0.0-20241015192408-796eee8c2d53/go.mod h1:fheguH3Am2dGp1LfXkrvwqC/KlFq8F0nLq3LryOMrrE= -google.golang.org/genproto/googleapis/api v0.0.0-20241021214115-324edc3d5d38 h1:2oV8dfuIkM1Ti7DwXc0BJfnwr9csz4TDXI9EmiI+Rbw= -google.golang.org/genproto/googleapis/api v0.0.0-20241021214115-324edc3d5d38/go.mod h1:vuAjtvlwkDKF6L1GQ0SokiRLCGFfeBUXWr/aFFkHACc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 h1:zciRKQ4kBpFgpfC5QQCVtnnNAcLIqweL7plyZRQHVpI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= +google.golang.org/genproto/googleapis/api v0.0.0-20241118233622-e639e219e697 h1:pgr/4QbFyktUv9CtQ/Fq4gzEE6/Xs7iCXbktaGzLHbQ= +google.golang.org/genproto/googleapis/api v0.0.0-20241118233622-e639e219e697/go.mod h1:+D9ySVjN8nY8YCVjc5O7PZDIdZporIDY3KaGfJunh88= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241118233622-e639e219e697 h1:LWZqQOEjDyONlF1H6afSWpAL/znlREo2tHfLoe+8LMA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241118233622-e639e219e697/go.mod h1:5uTbfoYQed2U9p3KIj2/Zzm02PYhndfdmML0qC3q3FU= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -2417,8 +2419,8 @@ google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5v google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= -google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= -google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +google.golang.org/grpc v1.68.0 h1:aHQeeJbo8zAkAa3pRzrVjZlbz6uSfeOXlJNQM0RAbz0= +google.golang.org/grpc v1.68.0/go.mod h1:fmSPC5AsjSBCK54MyHRx48kpOti1/jRfOlwEWywNjWA= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -2437,8 +2439,8 @@ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= -google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= +google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/internal/caveats/errors.go b/internal/caveats/errors.go index 633735b789..06284f200c 100644 --- a/internal/caveats/errors.go +++ b/internal/caveats/errors.go @@ -15,26 +15,26 @@ import ( "github.com/authzed/spicedb/pkg/spiceerrors" ) -// EvaluationErr is an error in evaluation of a caveat expression. -type EvaluationErr struct { +// EvaluationError is an error in evaluation of a caveat expression. +type EvaluationError struct { error caveatExpr *core.CaveatExpression - evalErr caveats.EvaluationErr + evalErr caveats.EvaluationError } // MarshalZerologObject implements zerolog.LogObjectMarshaler -func (err EvaluationErr) MarshalZerologObject(e *zerolog.Event) { +func (err EvaluationError) MarshalZerologObject(e *zerolog.Event) { e.Err(err.error).Str("caveat_name", err.caveatExpr.GetCaveat().CaveatName).Interface("context", err.caveatExpr.GetCaveat().Context) } // DetailsMetadata returns the metadata for details for this error. -func (err EvaluationErr) DetailsMetadata() map[string]string { +func (err EvaluationError) DetailsMetadata() map[string]string { return spiceerrors.CombineMetadata(err.evalErr, map[string]string{ "caveat_name": err.caveatExpr.GetCaveat().CaveatName, }) } -func (err EvaluationErr) GRPCStatus() *status.Status { +func (err EvaluationError) GRPCStatus() *status.Status { return spiceerrors.WithCodeAndDetails( err, codes.InvalidArgument, @@ -45,8 +45,8 @@ func (err EvaluationErr) GRPCStatus() *status.Status { ) } -func NewEvaluationErr(caveatExpr *core.CaveatExpression, err caveats.EvaluationErr) EvaluationErr { - return EvaluationErr{ +func NewEvaluationError(caveatExpr *core.CaveatExpression, err caveats.EvaluationError) EvaluationError { + return EvaluationError{ fmt.Errorf("evaluation error for caveat %s: %w", caveatExpr.GetCaveat().CaveatName, err), caveatExpr, err, } } @@ -55,7 +55,7 @@ func NewEvaluationErr(caveatExpr *core.CaveatExpression, err caveats.EvaluationE type ParameterTypeError struct { error caveatExpr *core.CaveatExpression - conversionError *caveats.ParameterConversionErr + conversionError *caveats.ParameterConversionError } // MarshalZerologObject implements zerolog.LogObjectMarshaler @@ -94,7 +94,7 @@ func (err ParameterTypeError) GRPCStatus() *status.Status { } func NewParameterTypeError(caveatExpr *core.CaveatExpression, err error) ParameterTypeError { - conversionError := &caveats.ParameterConversionErr{} + conversionError := &caveats.ParameterConversionError{} if !errors.As(err, conversionError) { conversionError = nil } diff --git a/internal/caveats/run.go b/internal/caveats/run.go index 75cb17b6f7..030afa6de7 100644 --- a/internal/caveats/run.go +++ b/internal/caveats/run.go @@ -198,9 +198,9 @@ func runExpressionWithCaveats( result, err := caveats.EvaluateCaveat(compiled, typedParameters) if err != nil { - var evalErr caveats.EvaluationErr + var evalErr caveats.EvaluationError if errors.As(err, &evalErr) { - return nil, NewEvaluationErr(expr, evalErr) + return nil, NewEvaluationError(expr, evalErr) } return nil, err diff --git a/internal/caveats/run_test.go b/internal/caveats/run_test.go index 5c3d2e81d2..f4938741fa 100644 --- a/internal/caveats/run_test.go +++ b/internal/caveats/run_test.go @@ -559,5 +559,5 @@ func TestRunCaveatWithEmptyMap(t *testing.T) { caveats.RunCaveatExpressionNoDebugging, ) req.Error(err) - req.True(errors.As(err, &caveats.EvaluationErr{})) + req.True(errors.As(err, &caveats.EvaluationError{})) } diff --git a/internal/datastore/common/changes.go b/internal/datastore/common/changes.go index be6e34206b..fae28d467c 100644 --- a/internal/datastore/common/changes.go +++ b/internal/datastore/common/changes.go @@ -73,7 +73,7 @@ func (ch *Changes[R, K]) AddRelationshipChange( return err } - key := tuple.StringWithoutCaveat(rel) + key := tuple.StringWithoutCaveatOrExpiration(rel) switch op { case tuple.UpdateOperationTouch: diff --git a/internal/datastore/common/changes_test.go b/internal/datastore/common/changes_test.go index 8cbc09548a..d61df4791f 100644 --- a/internal/datastore/common/changes_test.go +++ b/internal/datastore/common/changes_test.go @@ -509,14 +509,14 @@ func TestHLCSameRevision(t *testing.T) { tuple.Touch(tuple.MustParse("document:foo#viewer@user:sarah")), } slices.SortFunc(expected, func(i, j tuple.RelationshipUpdate) int { - iStr := tuple.StringWithoutCaveat(i.Relationship) - jStr := tuple.StringWithoutCaveat(j.Relationship) + iStr := tuple.StringWithoutCaveatOrExpiration(i.Relationship) + jStr := tuple.StringWithoutCaveatOrExpiration(j.Relationship) return strings.Compare(iStr, jStr) }) slices.SortFunc(remaining[0].RelationshipChanges, func(i, j tuple.RelationshipUpdate) int { - iStr := tuple.StringWithoutCaveat(i.Relationship) - jStr := tuple.StringWithoutCaveat(j.Relationship) + iStr := tuple.StringWithoutCaveatOrExpiration(i.Relationship) + jStr := tuple.StringWithoutCaveatOrExpiration(j.Relationship) return strings.Compare(iStr, jStr) }) @@ -566,7 +566,7 @@ func TestMaximumSize(t *testing.T) { func TestMaximumSizeReplacement(t *testing.T) { ctx := context.Background() - ch := NewChanges(revisions.HLCKeyFunc, datastore.WatchRelationships|datastore.WatchSchema, 235) + ch := NewChanges(revisions.HLCKeyFunc, datastore.WatchRelationships|datastore.WatchSchema, 243) require.True(t, ch.IsEmpty()) rev0, err := revisions.HLCRevisionFromString("1") @@ -574,11 +574,11 @@ func TestMaximumSizeReplacement(t *testing.T) { err = ch.AddRelationshipChange(ctx, rev0, tuple.MustParse("document:foo#viewer@user:tom"), tuple.UpdateOperationTouch) require.NoError(t, err) - require.Equal(t, int64(235), ch.currentByteSize) + require.Equal(t, int64(243), ch.currentByteSize) err = ch.AddRelationshipChange(ctx, rev0, tuple.MustParse("document:foo#viewer@user:tom"), tuple.UpdateOperationDelete) require.NoError(t, err) - require.Equal(t, int64(235), ch.currentByteSize) + require.Equal(t, int64(243), ch.currentByteSize) } func TestCanonicalize(t *testing.T) { @@ -682,7 +682,7 @@ func canonicalize(in []datastore.RevisionChanges) []datastore.RevisionChanges { sort.Slice(outChanges, func(i, j int) bool { // Return if i < j left, right := outChanges[i], outChanges[j] - tupleCompareResult := strings.Compare(tuple.StringWithoutCaveat(left.Relationship), tuple.StringWithoutCaveat(right.Relationship)) + tupleCompareResult := strings.Compare(tuple.StringWithoutCaveatOrExpiration(left.Relationship), tuple.StringWithoutCaveatOrExpiration(right.Relationship)) if tupleCompareResult < 0 { return true } diff --git a/internal/datastore/common/errors.go b/internal/datastore/common/errors.go index dd47fb1f52..af0b229d7b 100644 --- a/internal/datastore/common/errors.go +++ b/internal/datastore/common/errors.go @@ -97,7 +97,7 @@ func (err CreateRelationshipExistsError) GRPCStatus() *status.Status { spiceerrors.ForReason( v1.ErrorReason_ERROR_REASON_ATTEMPT_TO_RECREATE_RELATIONSHIP, map[string]string{ - "relationship": tuple.V1StringRelationshipWithoutCaveat(relationship), + "relationship": tuple.V1StringRelationshipWithoutCaveatOrExpiration(relationship), "resource_type": relationship.Resource.ObjectType, "resource_object_id": relationship.Resource.ObjectId, "resource_relation": relationship.Relation, @@ -113,7 +113,7 @@ func (err CreateRelationshipExistsError) GRPCStatus() *status.Status { func NewCreateRelationshipExistsError(relationship *tuple.Relationship) error { msg := "could not CREATE one or more relationships, as they already existed. If this is persistent, please switch to TOUCH operations or specify a precondition" if relationship != nil { - msg = fmt.Sprintf("could not CREATE relationship `%s`, as it already existed. If this is persistent, please switch to TOUCH operations or specify a precondition", tuple.StringWithoutCaveat(*relationship)) + msg = fmt.Sprintf("could not CREATE relationship `%s`, as it already existed. If this is persistent, please switch to TOUCH operations or specify a precondition", tuple.StringWithoutCaveatOrExpiration(*relationship)) } return CreateRelationshipExistsError{ diff --git a/internal/datastore/crdb/crdb_test.go b/internal/datastore/crdb/crdb_test.go index 634d25691b..11e7991e0f 100644 --- a/internal/datastore/crdb/crdb_test.go +++ b/internal/datastore/crdb/crdb_test.go @@ -578,7 +578,7 @@ func RelationshipIntegrityWatchTest(t *testing.T, tester test.DatastoreTester) { select { case change, ok := <-changes: if !ok { - require.Fail("Timed out waiting for ErrWatchDisconnected") + require.Fail("Timed out waiting for WatchDisconnectedError") } rel := change.RelationshipChanges[0].Relationship diff --git a/internal/datastore/crdb/reader.go b/internal/datastore/crdb/reader.go index 0df1fc3e70..8ae6cc2946 100644 --- a/internal/datastore/crdb/reader.go +++ b/internal/datastore/crdb/reader.go @@ -166,7 +166,7 @@ func (cr *crdbReader) ReadNamespaceByName( ) (*core.NamespaceDefinition, datastore.Revision, error) { config, timestamp, err := cr.loadNamespace(ctx, cr.query, nsName) if err != nil { - if errors.As(err, &datastore.ErrNamespaceNotFound{}) { + if errors.As(err, &datastore.NamespaceNotFoundError{}) { return nil, datastore.NoRevision, err } return nil, datastore.NoRevision, fmt.Errorf(errUnableToReadConfig, err) diff --git a/internal/datastore/crdb/readwrite.go b/internal/datastore/crdb/readwrite.go index 1aafec83c4..2b70659acf 100644 --- a/internal/datastore/crdb/readwrite.go +++ b/internal/datastore/crdb/readwrite.go @@ -477,7 +477,7 @@ func (rwt *crdbReadWriteTXN) DeleteNamespaces(ctx context.Context, nsNames ...st for _, nsName := range nsNames { _, timestamp, err := rwt.loadNamespace(ctx, querier, nsName) if err != nil { - if errors.As(err, &datastore.ErrNamespaceNotFound{}) { + if errors.As(err, &datastore.NamespaceNotFoundError{}) { return err } return fmt.Errorf(errUnableToDeleteConfig, err) diff --git a/internal/datastore/memdb/errors.go b/internal/datastore/memdb/errors.go index 92343840a0..0ef4b8ba76 100644 --- a/internal/datastore/memdb/errors.go +++ b/internal/datastore/memdb/errors.go @@ -9,21 +9,21 @@ import ( "github.com/authzed/spicedb/pkg/spiceerrors" ) -// ErrSerializationMaxRetriesReached occurs when a write request has reached its maximum number +// SerializationMaxRetriesReachedError occurs when a write request has reached its maximum number // of retries due to serialization errors. -type ErrSerializationMaxRetriesReached struct { +type SerializationMaxRetriesReachedError struct { error } // NewSerializationMaxRetriesReachedErr constructs a new max retries reached error. func NewSerializationMaxRetriesReachedErr(baseErr error) error { - return ErrSerializationMaxRetriesReached{ + return SerializationMaxRetriesReachedError{ error: baseErr, } } // GRPCStatus implements retrieving the gRPC status for the error. -func (err ErrSerializationMaxRetriesReached) GRPCStatus() *status.Status { +func (err SerializationMaxRetriesReachedError) GRPCStatus() *status.Status { return spiceerrors.WithCodeAndDetails( err, codes.DeadlineExceeded, diff --git a/internal/datastore/mysql/reader.go b/internal/datastore/mysql/reader.go index 8d523f09e5..fe278ba078 100644 --- a/internal/datastore/mysql/reader.go +++ b/internal/datastore/mysql/reader.go @@ -220,7 +220,7 @@ func (mr *mysqlReader) ReadNamespaceByName(ctx context.Context, nsName string) ( loaded, version, err := loadNamespace(ctx, nsName, tx, mr.filterer(mr.ReadNamespaceQuery)) switch { - case errors.As(err, &datastore.ErrNamespaceNotFound{}): + case errors.As(err, &datastore.NamespaceNotFoundError{}): return nil, datastore.NoRevision, err case err == nil: return loaded, version, nil diff --git a/internal/datastore/mysql/readwrite.go b/internal/datastore/mysql/readwrite.go index 3ad0893760..9d3cae399c 100644 --- a/internal/datastore/mysql/readwrite.go +++ b/internal/datastore/mysql/readwrite.go @@ -182,7 +182,7 @@ func (rwt *mysqlReadWriteTXN) WriteRelationships(ctx context.Context, mutations // Collect all TOUCH and DELETE operations. CREATE is handled below. for _, mut := range mutations { rel := mut.Relationship - relString := tuple.StringWithoutCaveat(rel) + relString := tuple.StringWithoutCaveatOrExpiration(rel) switch mut.Operation { case tuple.UpdateOperationCreate: @@ -258,7 +258,7 @@ func (rwt *mysqlReadWriteTXN) WriteRelationships(ctx context.Context, mutations // if the relationship to be deleted is for a TOUCH operation and the caveat // name or context has not changed, then remove it from delete and create. - tplString := tuple.StringWithoutCaveat(foundRel) + tplString := tuple.StringWithoutCaveatOrExpiration(foundRel) if mut, ok := createAndTouchMutationsByRel[tplString]; ok { foundRel.OptionalCaveat, err = common.ContextualizedCaveatFrom(caveatName, caveatContext) if err != nil { @@ -453,7 +453,7 @@ func (rwt *mysqlReadWriteTXN) DeleteNamespaces(ctx context.Context, nsNames ...s baseQuery := rwt.ReadNamespaceQuery.Where(sq.Eq{colDeletedTxn: liveDeletedTxnID}) _, createdAt, err := loadNamespace(ctx, nsName, rwt.tx, baseQuery) switch { - case errors.As(err, &datastore.ErrNamespaceNotFound{}): + case errors.As(err, &datastore.NamespaceNotFoundError{}): // TODO(jzelinskie): return the name of the missing namespace return err case err == nil: diff --git a/internal/datastore/postgres/postgres_shared_test.go b/internal/datastore/postgres/postgres_shared_test.go index b1e59a7943..14cf25bcc2 100644 --- a/internal/datastore/postgres/postgres_shared_test.go +++ b/internal/datastore/postgres/postgres_shared_test.go @@ -1591,10 +1591,10 @@ func RevisionTimestampAndTransactionIDTest(t *testing.T, ds datastore.Datastore) errWait := time.NewTimer(waitForChangesTimeout) select { case err := <-errchan: - require.True(errors.As(err, &datastore.ErrWatchDisconnected{})) + require.True(errors.As(err, &datastore.WatchDisconnectedError{})) return case <-errWait.C: - require.Fail("Timed out waiting for ErrWatchDisconnected") + require.Fail("Timed out waiting for WatchDisconnectedError") } return } diff --git a/internal/datastore/postgres/reader.go b/internal/datastore/postgres/reader.go index b8c0448ebb..75c6cd7afb 100644 --- a/internal/datastore/postgres/reader.go +++ b/internal/datastore/postgres/reader.go @@ -208,7 +208,7 @@ func (r *pgReader) ReverseQueryRelationships( func (r *pgReader) ReadNamespaceByName(ctx context.Context, nsName string) (*core.NamespaceDefinition, datastore.Revision, error) { loaded, version, err := r.loadNamespace(ctx, nsName, r.query, r.filterer) switch { - case errors.As(err, &datastore.ErrNamespaceNotFound{}): + case errors.As(err, &datastore.NamespaceNotFoundError{}): return nil, datastore.NoRevision, err case err == nil: return loaded, version, nil diff --git a/internal/datastore/postgres/readwrite.go b/internal/datastore/postgres/readwrite.go index 69a16224df..7fad509195 100644 --- a/internal/datastore/postgres/readwrite.go +++ b/internal/datastore/postgres/readwrite.go @@ -198,7 +198,7 @@ func (rwt *pgReadWriteTXN) WriteRelationships(ctx context.Context, mutations []t case tuple.UpdateOperationTouch: touchInserts = appendForInsertion(touchInserts, rel) - touchMutationsByNonCaveat[tuple.StringWithoutCaveat(rel)] = mut + touchMutationsByNonCaveat[tuple.StringWithoutCaveatOrExpiration(rel)] = mut case tuple.UpdateOperationDelete: deleteClauses = append(deleteClauses, exactRelationshipClause(rel)) @@ -282,7 +282,7 @@ func (rwt *pgReadWriteTXN) WriteRelationships(ctx context.Context, mutations []t }, } - tplString := tuple.StringWithoutCaveat(rel) + tplString := tuple.StringWithoutCaveatOrExpiration(rel) _, ok := touchMutationsByNonCaveat[tplString] if !ok { return spiceerrors.MustBugf("missing expected completed TOUCH mutation") @@ -378,7 +378,7 @@ func (rwt *pgReadWriteTXN) WriteRelationships(ctx context.Context, mutations []t }, } - tplString := tuple.StringWithoutCaveat(deletedTpl) + tplString := tuple.StringWithoutCaveatOrExpiration(deletedTpl) mutation, ok := touchMutationsByNonCaveat[tplString] if !ok { // This did not represent a TOUCH operation. @@ -593,7 +593,7 @@ func (rwt *pgReadWriteTXN) DeleteNamespaces(ctx context.Context, nsNames ...stri for _, nsName := range nsNames { _, _, err := rwt.loadNamespace(ctx, nsName, querier, filterer) switch { - case errors.As(err, &datastore.ErrNamespaceNotFound{}): + case errors.As(err, &datastore.NamespaceNotFoundError{}): return err case err == nil: diff --git a/internal/datastore/proxy/readonly_test.go b/internal/datastore/proxy/readonly_test.go index dbc2b108eb..23f90612aa 100644 --- a/internal/datastore/proxy/readonly_test.go +++ b/internal/datastore/proxy/readonly_test.go @@ -36,17 +36,17 @@ func TestRWOperationErrors(t *testing.T) { rev, err := ds.ReadWriteTx(ctx, func(ctx context.Context, rwt datastore.ReadWriteTransaction) error { return rwt.DeleteNamespaces(ctx, "fake") }) - require.ErrorAs(err, &datastore.ErrReadOnly{}) + require.ErrorAs(err, &datastore.ReadOnlyError{}) require.Equal(datastore.NoRevision, rev) rev, err = ds.ReadWriteTx(ctx, func(ctx context.Context, rwt datastore.ReadWriteTransaction) error { return rwt.WriteNamespaces(ctx, &core.NamespaceDefinition{Name: "user"}) }) - require.ErrorAs(err, &datastore.ErrReadOnly{}) + require.ErrorAs(err, &datastore.ReadOnlyError{}) require.Equal(datastore.NoRevision, rev) rev, err = common.WriteRelationships(ctx, ds, tuple.UpdateOperationCreate, tuple.MustParse("user:test#boss@user:boss")) - require.ErrorAs(err, &datastore.ErrReadOnly{}) + require.ErrorAs(err, &datastore.ReadOnlyError{}) require.Equal(datastore.NoRevision, rev) } diff --git a/internal/datastore/proxy/replicated.go b/internal/datastore/proxy/replicated.go index 589ed51277..f24a65ac14 100644 --- a/internal/datastore/proxy/replicated.go +++ b/internal/datastore/proxy/replicated.go @@ -241,7 +241,7 @@ func (rr *checkingStableReader) determineSource(ctx context.Context) error { rr.choose.Do(func() { // If the revision is not known to the replica, use the primary instead. if err := rr.replica.CheckRevision(ctx, rr.rev); err != nil { - var irr datastore.ErrInvalidRevision + var irr datastore.InvalidRevisionError if errors.As(err, &irr) { if irr.Reason() == datastore.CouldNotDetermineRevision { log.Trace().Str("revision", rr.rev.String()).Err(err).Msg("replica does not contain the requested revision, using primary") diff --git a/internal/datastore/proxy/schemacaching/standardcache.go b/internal/datastore/proxy/schemacaching/standardcache.go index 8dc8ca4762..a1e355d190 100644 --- a/internal/datastore/proxy/schemacaching/standardcache.go +++ b/internal/datastore/proxy/schemacaching/standardcache.go @@ -174,7 +174,7 @@ func readAndCache[T schemaDefinition]( // sever the context so that another branch doesn't cancel the // single-flighted read loaded, updatedRev, err := reader(internaldatastore.SeparateContextWithTracing(ctx), name) - if err != nil && !errors.As(err, &datastore.ErrNamespaceNotFound{}) && !errors.As(err, &datastore.ErrCaveatNameNotFound{}) { + if err != nil && !errors.As(err, &datastore.NamespaceNotFoundError{}) && !errors.As(err, &datastore.CaveatNameNotFoundError{}) { // Propagate this error to the caller return nil, err } @@ -244,7 +244,7 @@ func readAndCacheInTransaction[T schemaDefinition]( entry = untypedEntry.(definitionEntry) } else { loaded, updatedRev, err := reader(ctx, name) - if err != nil && !errors.As(err, &datastore.ErrNamespaceNotFound{}) && !errors.As(err, &datastore.ErrCaveatNameNotFound{}) { + if err != nil && !errors.As(err, &datastore.NamespaceNotFoundError{}) && !errors.As(err, &datastore.CaveatNameNotFoundError{}) { // Propagate this error to the caller return *new(T), datastore.NoRevision, err } diff --git a/internal/datastore/proxy/schemacaching/standardcaching_test.go b/internal/datastore/proxy/schemacaching/standardcaching_test.go index 35fe59a045..be64722816 100644 --- a/internal/datastore/proxy/schemacaching/standardcaching_test.go +++ b/internal/datastore/proxy/schemacaching/standardcaching_test.go @@ -92,7 +92,7 @@ var testers = []testerDef{ return schemaDefs, nil }, - datastore.ErrNamespaceNotFound{}, + datastore.NamespaceNotFoundError{}, "WriteNamespaces", func(rwt datastore.ReadWriteTransaction, def datastore.SchemaDefinition) error { @@ -127,7 +127,7 @@ var testers = []testerDef{ return schemaDefs, nil }, - datastore.ErrCaveatNameNotFound{}, + datastore.CaveatNameNotFoundError{}, "WriteCaveats", func(rwt datastore.ReadWriteTransaction, def datastore.SchemaDefinition) error { diff --git a/internal/datastore/proxy/schemacaching/watchingcache.go b/internal/datastore/proxy/schemacaching/watchingcache.go index 2db8da5b0c..b0f8dc5f98 100644 --- a/internal/datastore/proxy/schemacaching/watchingcache.go +++ b/internal/datastore/proxy/schemacaching/watchingcache.go @@ -317,7 +317,7 @@ func (p *watchingCachingProxy) startSync(ctx context.Context) error { } case err := <-serrc: - var retryable datastore.ErrWatchRetryable + var retryable datastore.WatchRetryableError if errors.As(err, &retryable) && retryCount <= maximumRetryCount { log.Warn().Err(err).Msg("received retryable error in schema watch; sleeping for a bit and restarting watch") retryCount++ diff --git a/internal/datastore/proxy/schemacaching/watchingcache_test.go b/internal/datastore/proxy/schemacaching/watchingcache_test.go index 0e24f89fcf..8512e998ef 100644 --- a/internal/datastore/proxy/schemacaching/watchingcache_test.go +++ b/internal/datastore/proxy/schemacaching/watchingcache_test.go @@ -34,12 +34,12 @@ func TestWatchingCacheBasicOperation(t *testing.T) { // Ensure no namespaces are found. _, _, err := wcache.SnapshotReader(rev("1")).ReadNamespaceByName(context.Background(), "somenamespace") - require.ErrorAs(t, err, &datastore.ErrNamespaceNotFound{}) + require.ErrorAs(t, err, &datastore.NamespaceNotFoundError{}) require.False(t, wcache.namespaceCache.inFallbackMode) // Ensure a re-read also returns not found, even before a checkpoint is received. _, _, err = wcache.SnapshotReader(rev("1")).ReadNamespaceByName(context.Background(), "somenamespace") - require.ErrorAs(t, err, &datastore.ErrNamespaceNotFound{}) + require.ErrorAs(t, err, &datastore.NamespaceNotFoundError{}) // Send a checkpoint for revision 1. fakeDS.sendCheckpoint(rev("1")) @@ -97,7 +97,7 @@ func TestWatchingCacheBasicOperation(t *testing.T) { // Read at revision 5. _, _, err = wcache.SnapshotReader(rev("5")).ReadNamespaceByName(context.Background(), "somenamespace") require.Error(t, err) - require.ErrorAs(t, err, &datastore.ErrNamespaceNotFound{}, "missing not found in: %v", err) + require.ErrorAs(t, err, &datastore.NamespaceNotFoundError{}, "missing not found in: %v", err) // Lookup at revision 5. nsDefs, err = wcache.SnapshotReader(rev("5")).LookupNamespacesWithNames(context.Background(), []string{"somenamespace"}) @@ -142,7 +142,7 @@ func TestWatchingCacheParallelOperations(t *testing.T) { go (func() { // Read somenamespace (which should not be found) _, _, err := wcache.SnapshotReader(rev("1")).ReadNamespaceByName(context.Background(), "somenamespace") - require.ErrorAs(t, err, &datastore.ErrNamespaceNotFound{}) + require.ErrorAs(t, err, &datastore.NamespaceNotFoundError{}) require.False(t, wcache.namespaceCache.inFallbackMode) // Write somenamespace. @@ -159,12 +159,12 @@ func TestWatchingCacheParallelOperations(t *testing.T) { go (func() { // Read anothernamespace (which should not be found) _, _, err := wcache.SnapshotReader(rev("1")).ReadNamespaceByName(context.Background(), "anothernamespace") - require.ErrorAs(t, err, &datastore.ErrNamespaceNotFound{}) + require.ErrorAs(t, err, &datastore.NamespaceNotFoundError{}) require.False(t, wcache.namespaceCache.inFallbackMode) // Read again (which should still not be found) _, _, err = wcache.SnapshotReader(rev("3")).ReadNamespaceByName(context.Background(), "anothernamespace") - require.ErrorAs(t, err, &datastore.ErrNamespaceNotFound{}) + require.ErrorAs(t, err, &datastore.NamespaceNotFoundError{}) require.False(t, wcache.namespaceCache.inFallbackMode) wg.Done() @@ -253,7 +253,7 @@ func TestWatchingCacheFallbackToStandardCache(t *testing.T) { // Ensure the namespace is not found, but is cached in the fallback caching layer. r := rev("1") _, _, err = wcache.SnapshotReader(r).ReadNamespaceByName(context.Background(), "somenamespace") - require.ErrorAs(t, err, &datastore.ErrNamespaceNotFound{}) + require.ErrorAs(t, err, &datastore.NamespaceNotFoundError{}) require.False(t, wcache.namespaceCache.inFallbackMode) expectedKey := cache.StringKey("n:somenamespace@" + r.String()) @@ -265,7 +265,7 @@ func TestWatchingCacheFallbackToStandardCache(t *testing.T) { fakeDS.readsDisabled = true _, _, err = wcache.SnapshotReader(rev("1")).ReadNamespaceByName(context.Background(), "somenamespace") - require.ErrorAs(t, err, &datastore.ErrNamespaceNotFound{}) + require.ErrorAs(t, err, &datastore.NamespaceNotFoundError{}) require.False(t, wcache.namespaceCache.inFallbackMode) // Close the proxy and ensure the background goroutines are terminated. diff --git a/internal/dispatch/graph/errors.go b/internal/dispatch/graph/errors.go index ceddbab278..ecaf59a7bf 100644 --- a/internal/dispatch/graph/errors.go +++ b/internal/dispatch/graph/errors.go @@ -6,24 +6,24 @@ import ( "github.com/rs/zerolog" ) -// ErrNamespaceNotFound occurs when a namespace was not found. -type ErrNamespaceNotFound struct { +// NamespaceNotFoundError occurs when a namespace was not found. +type NamespaceNotFoundError struct { error namespaceName string } // NotFoundNamespaceName returns the name of the namespace that was not found. -func (err ErrNamespaceNotFound) NotFoundNamespaceName() string { +func (err NamespaceNotFoundError) NotFoundNamespaceName() string { return err.namespaceName } // MarshalZerologObject implements zerolog.LogObjectMarshaler -func (err ErrNamespaceNotFound) MarshalZerologObject(e *zerolog.Event) { +func (err NamespaceNotFoundError) MarshalZerologObject(e *zerolog.Event) { e.Err(err.error).Str("namespace", err.namespaceName) } // DetailsMetadata returns the metadata for details for this error. -func (err ErrNamespaceNotFound) DetailsMetadata() map[string]string { +func (err NamespaceNotFoundError) DetailsMetadata() map[string]string { return map[string]string{ "definition_name": err.namespaceName, } @@ -31,36 +31,36 @@ func (err ErrNamespaceNotFound) DetailsMetadata() map[string]string { // NewNamespaceNotFoundErr constructs a new namespace not found error. func NewNamespaceNotFoundErr(nsName string) error { - return ErrNamespaceNotFound{ + return NamespaceNotFoundError{ error: fmt.Errorf("object definition `%s` not found", nsName), namespaceName: nsName, } } -// ErrRelationNotFound occurs when a relation was not found under a namespace. -type ErrRelationNotFound struct { +// RelationNotFoundError occurs when a relation was not found under a namespace. +type RelationNotFoundError struct { error namespaceName string relationName string } // NamespaceName returns the name of the namespace in which the relation was not found. -func (err ErrRelationNotFound) NamespaceName() string { +func (err RelationNotFoundError) NamespaceName() string { return err.namespaceName } // NotFoundRelationName returns the name of the relation not found. -func (err ErrRelationNotFound) NotFoundRelationName() string { +func (err RelationNotFoundError) NotFoundRelationName() string { return err.relationName } // MarshalZerologObject implements zerolog.LogObjectMarshaler -func (err ErrRelationNotFound) MarshalZerologObject(e *zerolog.Event) { +func (err RelationNotFoundError) MarshalZerologObject(e *zerolog.Event) { e.Err(err.error).Str("namespace", err.namespaceName).Str("relation", err.relationName) } // DetailsMetadata returns the metadata for details for this error. -func (err ErrRelationNotFound) DetailsMetadata() map[string]string { +func (err RelationNotFoundError) DetailsMetadata() map[string]string { return map[string]string{ "definition_name": err.namespaceName, "relation_or_permission_name": err.relationName, @@ -69,7 +69,7 @@ func (err ErrRelationNotFound) DetailsMetadata() map[string]string { // NewRelationNotFoundErr constructs a new relation not found error. func NewRelationNotFoundErr(nsName string, relationName string) error { - return ErrRelationNotFound{ + return RelationNotFoundError{ error: fmt.Errorf("relation/permission `%s` not found under definition `%s`", relationName, nsName), namespaceName: nsName, relationName: relationName, diff --git a/internal/dispatch/graph/graph.go b/internal/dispatch/graph/graph.go index 9412e1837d..039af1a743 100644 --- a/internal/dispatch/graph/graph.go +++ b/internal/dispatch/graph/graph.go @@ -424,14 +424,14 @@ func (ld *localDispatcher) ReadyState() dispatch.ReadyState { } func rewriteNamespaceError(original error) error { - nsNotFound := datastore.ErrNamespaceNotFound{} + nsNotFound := datastore.NamespaceNotFoundError{} switch { case errors.As(original, &nsNotFound): return NewNamespaceNotFoundErr(nsNotFound.NotFoundNamespaceName()) - case errors.As(original, &ErrNamespaceNotFound{}): + case errors.As(original, &NamespaceNotFoundError{}): fallthrough - case errors.As(original, &ErrRelationNotFound{}): + case errors.As(original, &RelationNotFoundError{}): return original default: return fmt.Errorf(errDispatch, original) diff --git a/internal/graph/check.go b/internal/graph/check.go index 4d9a2d1562..b4bf4f614d 100644 --- a/internal/graph/check.go +++ b/internal/graph/check.go @@ -600,7 +600,7 @@ func (cc *ConcurrentChecker) checkComputedUserset(ctx context.Context, crc curre ds := datastoremw.MustFromContext(ctx).SnapshotReader(crc.parentReq.Revision) err := namespace.CheckNamespaceAndRelation(ctx, targetRR.Namespace, targetRR.Relation, true, ds) if err != nil { - if errors.As(err, &namespace.ErrRelationNotFound{}) { + if errors.As(err, &namespace.RelationNotFoundError{}) { return noMembers() } diff --git a/internal/graph/cursors.go b/internal/graph/cursors.go index 29fdaae32c..32834f11e2 100644 --- a/internal/graph/cursors.go +++ b/internal/graph/cursors.go @@ -188,7 +188,7 @@ func withDatastoreCursorInCursor[T any, Q any]( cursorRel := options.ToRelationship(itemsToBeProcessed[taskIndex].cursor) cursorSection := "" if cursorRel != nil { - cursorSection = tuple.StringWithoutCaveat(*cursorRel) + cursorSection = tuple.StringWithoutCaveatOrExpiration(*cursorRel) } currentCursor, err := ci.withOutgoingSection(cursorSection) diff --git a/internal/graph/errors.go b/internal/graph/errors.go index d93909511a..31577d95ee 100644 --- a/internal/graph/errors.go +++ b/internal/graph/errors.go @@ -15,76 +15,76 @@ import ( "github.com/authzed/spicedb/pkg/spiceerrors" ) -// ErrCheckFailure occurs when check failed in some manner. Note this should not apply to +// CheckFailureError occurs when check failed in some manner. Note this should not apply to // namespaces and relations not being found. -type ErrCheckFailure struct { +type CheckFailureError struct { error } -func (e ErrCheckFailure) Unwrap() error { +func (e CheckFailureError) Unwrap() error { return e.error } // NewCheckFailureErr constructs a new check failed error. func NewCheckFailureErr(baseErr error) error { - return ErrCheckFailure{ + return CheckFailureError{ error: fmt.Errorf("error performing check: %w", baseErr), } } -// ErrExpansionFailure occurs when expansion failed in some manner. Note this should not apply to +// ExpansionFailureError occurs when expansion failed in some manner. Note this should not apply to // namespaces and relations not being found. -type ErrExpansionFailure struct { +type ExpansionFailureError struct { error } -func (e ErrExpansionFailure) Unwrap() error { +func (e ExpansionFailureError) Unwrap() error { return e.error } // NewExpansionFailureErr constructs a new expansion failed error. func NewExpansionFailureErr(baseErr error) error { - return ErrExpansionFailure{ + return ExpansionFailureError{ error: fmt.Errorf("error performing expand: %w", baseErr), } } -// ErrAlwaysFail is returned when an internal error leads to an operation +// AlwaysFailError is returned when an internal error leads to an operation // guaranteed to fail. -type ErrAlwaysFail struct { +type AlwaysFailError struct { error } // NewAlwaysFailErr constructs a new always fail error. func NewAlwaysFailErr() error { - return ErrAlwaysFail{ + return AlwaysFailError{ error: errors.New("always fail"), } } -// ErrRelationNotFound occurs when a relation was not found under a namespace. -type ErrRelationNotFound struct { +// RelationNotFoundError occurs when a relation was not found under a namespace. +type RelationNotFoundError struct { error namespaceName string relationName string } // NamespaceName returns the name of the namespace in which the relation was not found. -func (err ErrRelationNotFound) NamespaceName() string { +func (err RelationNotFoundError) NamespaceName() string { return err.namespaceName } // NotFoundRelationName returns the name of the relation not found. -func (err ErrRelationNotFound) NotFoundRelationName() string { +func (err RelationNotFoundError) NotFoundRelationName() string { return err.relationName } -func (err ErrRelationNotFound) MarshalZerologObject(e *zerolog.Event) { +func (err RelationNotFoundError) MarshalZerologObject(e *zerolog.Event) { e.Err(err.error).Str("namespace", err.namespaceName).Str("relation", err.relationName) } // DetailsMetadata returns the metadata for details for this error. -func (err ErrRelationNotFound) DetailsMetadata() map[string]string { +func (err RelationNotFoundError) DetailsMetadata() map[string]string { return map[string]string{ "definition_name": err.namespaceName, "relation_or_permission_name": err.relationName, @@ -93,39 +93,39 @@ func (err ErrRelationNotFound) DetailsMetadata() map[string]string { // NewRelationNotFoundErr constructs a new relation not found error. func NewRelationNotFoundErr(nsName string, relationName string) error { - return ErrRelationNotFound{ + return RelationNotFoundError{ error: fmt.Errorf("relation/permission `%s` not found under definition `%s`", relationName, nsName), namespaceName: nsName, relationName: relationName, } } -var _ sharederrors.UnknownRelationError = ErrRelationNotFound{} +var _ sharederrors.UnknownRelationError = RelationNotFoundError{} -// ErrRelationMissingTypeInfo defines an error for when type information is missing from a relation +// RelationMissingTypeInfoError defines an error for when type information is missing from a relation // during a lookup. -type ErrRelationMissingTypeInfo struct { +type RelationMissingTypeInfoError struct { error namespaceName string relationName string } // NamespaceName returns the name of the namespace in which the relation was found. -func (err ErrRelationMissingTypeInfo) NamespaceName() string { +func (err RelationMissingTypeInfoError) NamespaceName() string { return err.namespaceName } // RelationName returns the name of the relation missing type information. -func (err ErrRelationMissingTypeInfo) RelationName() string { +func (err RelationMissingTypeInfoError) RelationName() string { return err.relationName } -func (err ErrRelationMissingTypeInfo) MarshalZerologObject(e *zerolog.Event) { +func (err RelationMissingTypeInfoError) MarshalZerologObject(e *zerolog.Event) { e.Err(err.error).Str("namespace", err.namespaceName).Str("relation", err.relationName) } // DetailsMetadata returns the metadata for details for this error. -func (err ErrRelationMissingTypeInfo) DetailsMetadata() map[string]string { +func (err RelationMissingTypeInfoError) DetailsMetadata() map[string]string { return map[string]string{ "definition_name": err.namespaceName, "relation_name": err.relationName, @@ -134,22 +134,22 @@ func (err ErrRelationMissingTypeInfo) DetailsMetadata() map[string]string { // NewRelationMissingTypeInfoErr constructs a new relation not missing type information error. func NewRelationMissingTypeInfoErr(nsName string, relationName string) error { - return ErrRelationMissingTypeInfo{ + return RelationMissingTypeInfoError{ error: fmt.Errorf("relation/permission `%s` under definition `%s` is missing type information", relationName, nsName), namespaceName: nsName, relationName: relationName, } } -// ErrWildcardNotAllowed occurs when a request sent has an invalid wildcard argument. -type ErrWildcardNotAllowed struct { +// WildcardNotAllowedError occurs when a request sent has an invalid wildcard argument. +type WildcardNotAllowedError struct { error fieldName string } // GRPCStatus implements retrieving the gRPC status for the error. -func (err ErrWildcardNotAllowed) GRPCStatus() *status.Status { +func (err WildcardNotAllowedError) GRPCStatus() *status.Status { return spiceerrors.WithCodeAndDetails( err, codes.InvalidArgument, @@ -164,42 +164,42 @@ func (err ErrWildcardNotAllowed) GRPCStatus() *status.Status { // NewWildcardNotAllowedErr constructs an error indicating that a wildcard was not allowed. func NewWildcardNotAllowedErr(message string, fieldName string) error { - return ErrWildcardNotAllowed{ + return WildcardNotAllowedError{ error: fmt.Errorf("invalid argument: %s", message), fieldName: fieldName, } } -// ErrUnimplemented is returned when some functionality is not yet supported. -type ErrUnimplemented struct { +// UnimplementedError is returned when some functionality is not yet supported. +type UnimplementedError struct { error } // NewUnimplementedErr constructs a new unimplemented error. func NewUnimplementedErr(baseErr error) error { - return ErrUnimplemented{ + return UnimplementedError{ error: baseErr, } } -func (e ErrUnimplemented) Unwrap() error { +func (e UnimplementedError) Unwrap() error { return e.error } -// ErrInvalidCursor is returned when a cursor is no longer valid. -type ErrInvalidCursor struct { +// InvalidCursorError is returned when a cursor is no longer valid. +type InvalidCursorError struct { error } // NewInvalidCursorErr constructs a new unimplemented error. func NewInvalidCursorErr(dispatchCursorVersion uint32, cursor *dispatch.Cursor) error { - return ErrInvalidCursor{ + return InvalidCursorError{ error: fmt.Errorf("the supplied cursor is no longer valid: found version %d, expected version %d", cursor.DispatchVersion, dispatchCursorVersion), } } // GRPCStatus implements retrieving the gRPC status for the error. -func (err ErrInvalidCursor) GRPCStatus() *status.Status { +func (err InvalidCursorError) GRPCStatus() *status.Status { return spiceerrors.WithCodeAndDetails( err, codes.InvalidArgument, diff --git a/internal/graph/expand.go b/internal/graph/expand.go index 09bef7340c..8dde8986e1 100644 --- a/internal/graph/expand.go +++ b/internal/graph/expand.go @@ -242,7 +242,7 @@ func (ce *ConcurrentExpander) expandComputedUserset(ctx context.Context, req Val ds := datastoremw.MustFromContext(ctx).SnapshotReader(req.Revision) err := namespace.CheckNamespaceAndRelation(ctx, start.ObjectType, cu.Relation, true, ds) if err != nil { - if errors.As(err, &namespace.ErrRelationNotFound{}) { + if errors.As(err, &namespace.RelationNotFoundError{}) { return emptyExpansion(req.ResourceAndRelation) } diff --git a/internal/graph/lookupsubjects.go b/internal/graph/lookupsubjects.go index c2f24ff483..c03b1f542f 100644 --- a/internal/graph/lookupsubjects.go +++ b/internal/graph/lookupsubjects.go @@ -162,7 +162,7 @@ func (cl *ConcurrentLookupSubjects) lookupViaComputed( ) error { ds := datastoremw.MustFromContext(ctx).SnapshotReader(parentRequest.Revision) if err := namespace.CheckNamespaceAndRelation(ctx, parentRequest.ResourceRelation.Namespace, cu.Relation, true, ds); err != nil { - if errors.As(err, &namespace.ErrRelationNotFound{}) { + if errors.As(err, &namespace.RelationNotFoundError{}) { return nil } @@ -249,7 +249,7 @@ func lookupViaIntersectionTupleToUserset( } if err := namespace.CheckNamespaceAndRelation(ctx, rel.Subject.ObjectType, ttu.GetComputedUserset().Relation, false, ds); err != nil { - if !errors.As(err, &namespace.ErrRelationNotFound{}) { + if !errors.As(err, &namespace.RelationNotFoundError{}) { return err } @@ -413,7 +413,7 @@ func lookupViaTupleToUserset[T relation]( // Map the found subject types by the computed userset relation, so that we dispatch to it. toDispatchByComputedRelationType, err := toDispatchByTuplesetType.Map(func(resourceType *core.RelationReference) (*core.RelationReference, error) { if err := namespace.CheckNamespaceAndRelation(ctx, resourceType.Namespace, ttu.GetComputedUserset().Relation, false, ds); err != nil { - if errors.As(err, &namespace.ErrRelationNotFound{}) { + if errors.As(err, &namespace.RelationNotFoundError{}) { return nil, nil } diff --git a/internal/namespace/caveats.go b/internal/namespace/caveats.go index dfe5e725af..97e9ed6d23 100644 --- a/internal/namespace/caveats.go +++ b/internal/namespace/caveats.go @@ -17,7 +17,7 @@ func ValidateCaveatDefinition(caveat *core.CaveatDefinition) error { // Ensure all parameters are used by the caveat expression itself. parameterTypes, err := caveattypes.DecodeParameterTypes(caveat.ParameterTypes) if err != nil { - return typesystem.NewTypeErrorWithSource( + return typesystem.NewTypeWithSourceError( fmt.Errorf("could not decode caveat parameters `%s`: %w", caveat.Name, err), caveat, caveat.Name, @@ -26,7 +26,7 @@ func ValidateCaveatDefinition(caveat *core.CaveatDefinition) error { deserialized, err := caveats.DeserializeCaveat(caveat.SerializedExpression, parameterTypes) if err != nil { - return typesystem.NewTypeErrorWithSource( + return typesystem.NewTypeWithSourceError( fmt.Errorf("could not decode caveat `%s`: %w", caveat.Name, err), caveat, caveat.Name, @@ -34,7 +34,7 @@ func ValidateCaveatDefinition(caveat *core.CaveatDefinition) error { } if len(caveat.ParameterTypes) == 0 { - return typesystem.NewTypeErrorWithSource( + return typesystem.NewTypeWithSourceError( fmt.Errorf("caveat `%s` must have at least one parameter defined", caveat.Name), caveat, caveat.Name, @@ -49,7 +49,7 @@ func ValidateCaveatDefinition(caveat *core.CaveatDefinition) error { for paramName, paramType := range caveat.ParameterTypes { _, err := caveattypes.DecodeParameterType(paramType) if err != nil { - return typesystem.NewTypeErrorWithSource( + return typesystem.NewTypeWithSourceError( fmt.Errorf("type error for parameter `%s` for caveat `%s`: %w", paramName, caveat.Name, err), caveat, paramName, @@ -57,7 +57,7 @@ func ValidateCaveatDefinition(caveat *core.CaveatDefinition) error { } if !referencedNames.Has(paramName) { - return typesystem.NewTypeErrorWithSource( + return typesystem.NewTypeWithSourceError( NewUnusedCaveatParameterErr(caveat.Name, paramName), caveat, paramName, diff --git a/internal/namespace/errors.go b/internal/namespace/errors.go index 28a8754643..abe7fe6fd0 100644 --- a/internal/namespace/errors.go +++ b/internal/namespace/errors.go @@ -9,112 +9,112 @@ import ( "github.com/authzed/spicedb/internal/sharederrors" ) -// ErrNamespaceNotFound occurs when a namespace was not found. -type ErrNamespaceNotFound struct { +// NamespaceNotFoundError occurs when a namespace was not found. +type NamespaceNotFoundError struct { error namespaceName string } // NotFoundNamespaceName is the name of the namespace not found. -func (err ErrNamespaceNotFound) NotFoundNamespaceName() string { +func (err NamespaceNotFoundError) NotFoundNamespaceName() string { return err.namespaceName } // MarshalZerologObject implements zerolog object marshalling. -func (err ErrNamespaceNotFound) MarshalZerologObject(e *zerolog.Event) { +func (err NamespaceNotFoundError) MarshalZerologObject(e *zerolog.Event) { e.Err(err.error).Str("namespace", err.namespaceName) } // DetailsMetadata returns the metadata for details for this error. -func (err ErrNamespaceNotFound) DetailsMetadata() map[string]string { +func (err NamespaceNotFoundError) DetailsMetadata() map[string]string { return map[string]string{ "definition_name": err.namespaceName, } } -// ErrRelationNotFound occurs when a relation was not found under a namespace. -type ErrRelationNotFound struct { +// RelationNotFoundError occurs when a relation was not found under a namespace. +type RelationNotFoundError struct { error namespaceName string relationName string } // NamespaceName returns the name of the namespace in which the relation was not found. -func (err ErrRelationNotFound) NamespaceName() string { +func (err RelationNotFoundError) NamespaceName() string { return err.namespaceName } // NotFoundRelationName returns the name of the relation not found. -func (err ErrRelationNotFound) NotFoundRelationName() string { +func (err RelationNotFoundError) NotFoundRelationName() string { return err.relationName } -func (err ErrRelationNotFound) MarshalZerologObject(e *zerolog.Event) { +func (err RelationNotFoundError) MarshalZerologObject(e *zerolog.Event) { e.Err(err.error).Str("namespace", err.namespaceName).Str("relation", err.relationName) } // DetailsMetadata returns the metadata for details for this error. -func (err ErrRelationNotFound) DetailsMetadata() map[string]string { +func (err RelationNotFoundError) DetailsMetadata() map[string]string { return map[string]string{ "definition_name": err.namespaceName, "relation_or_permission_name": err.relationName, } } -// ErrDuplicateRelation occurs when a duplicate relation was found inside a namespace. -type ErrDuplicateRelation struct { +// DuplicateRelationError occurs when a duplicate relation was found inside a namespace. +type DuplicateRelationError struct { error namespaceName string relationName string } // MarshalZerologObject implements zerolog object marshalling. -func (err ErrDuplicateRelation) MarshalZerologObject(e *zerolog.Event) { +func (err DuplicateRelationError) MarshalZerologObject(e *zerolog.Event) { e.Err(err.error).Str("namespace", err.namespaceName).Str("relation", err.relationName) } // DetailsMetadata returns the metadata for details for this error. -func (err ErrDuplicateRelation) DetailsMetadata() map[string]string { +func (err DuplicateRelationError) DetailsMetadata() map[string]string { return map[string]string{ "definition_name": err.namespaceName, "relation_or_permission_name": err.relationName, } } -// ErrPermissionsCycle occurs when a cycle exists within permissions. -type ErrPermissionsCycle struct { +// PermissionsCycleError occurs when a cycle exists within permissions. +type PermissionsCycleError struct { error namespaceName string permissionNames []string } // MarshalZerologObject implements zerolog object marshalling. -func (err ErrPermissionsCycle) MarshalZerologObject(e *zerolog.Event) { +func (err PermissionsCycleError) MarshalZerologObject(e *zerolog.Event) { e.Err(err.error).Str("namespace", err.namespaceName).Str("permissions", strings.Join(err.permissionNames, ", ")) } // DetailsMetadata returns the metadata for details for this error. -func (err ErrPermissionsCycle) DetailsMetadata() map[string]string { +func (err PermissionsCycleError) DetailsMetadata() map[string]string { return map[string]string{ "definition_name": err.namespaceName, "permission_names": strings.Join(err.permissionNames, ","), } } -// ErrUnusedCaveatParameter indicates that a caveat parameter is unused in the caveat expression. -type ErrUnusedCaveatParameter struct { +// UnusedCaveatParameterError indicates that a caveat parameter is unused in the caveat expression. +type UnusedCaveatParameterError struct { error caveatName string paramName string } // MarshalZerologObject implements zerolog object marshalling. -func (err ErrUnusedCaveatParameter) MarshalZerologObject(e *zerolog.Event) { +func (err UnusedCaveatParameterError) MarshalZerologObject(e *zerolog.Event) { e.Err(err.error).Str("caveat", err.caveatName).Str("param", err.paramName) } // DetailsMetadata returns the metadata for details for this error. -func (err ErrUnusedCaveatParameter) DetailsMetadata() map[string]string { +func (err UnusedCaveatParameterError) DetailsMetadata() map[string]string { return map[string]string{ "caveat_name": err.caveatName, "parameter_name": err.paramName, @@ -123,7 +123,7 @@ func (err ErrUnusedCaveatParameter) DetailsMetadata() map[string]string { // NewNamespaceNotFoundErr constructs a new namespace not found error. func NewNamespaceNotFoundErr(nsName string) error { - return ErrNamespaceNotFound{ + return NamespaceNotFoundError{ error: fmt.Errorf("object definition `%s` not found", nsName), namespaceName: nsName, } @@ -131,7 +131,7 @@ func NewNamespaceNotFoundErr(nsName string) error { // NewRelationNotFoundErr constructs a new relation not found error. func NewRelationNotFoundErr(nsName string, relationName string) error { - return ErrRelationNotFound{ + return RelationNotFoundError{ error: fmt.Errorf("relation/permission `%s` not found under definition `%s`", relationName, nsName), namespaceName: nsName, relationName: relationName, @@ -140,7 +140,7 @@ func NewRelationNotFoundErr(nsName string, relationName string) error { // NewDuplicateRelationError constructs an error indicating that a relation was defined more than once in a namespace. func NewDuplicateRelationError(nsName string, relationName string) error { - return ErrDuplicateRelation{ + return DuplicateRelationError{ error: fmt.Errorf("found duplicate relation/permission name `%s` under definition `%s`", relationName, nsName), namespaceName: nsName, relationName: relationName, @@ -149,7 +149,7 @@ func NewDuplicateRelationError(nsName string, relationName string) error { // NewPermissionsCycleErr constructs an error indicating that a cycle exists amongst permissions. func NewPermissionsCycleErr(nsName string, permissionNames []string) error { - return ErrPermissionsCycle{ + return PermissionsCycleError{ error: fmt.Errorf("under definition `%s`, there exists a cycle in permissions: %s", nsName, strings.Join(permissionNames, ", ")), namespaceName: nsName, permissionNames: permissionNames, @@ -158,7 +158,7 @@ func NewPermissionsCycleErr(nsName string, permissionNames []string) error { // NewUnusedCaveatParameterErr constructs indicating that a parameter was unused in a caveat expression. func NewUnusedCaveatParameterErr(caveatName string, paramName string) error { - return ErrUnusedCaveatParameter{ + return UnusedCaveatParameterError{ error: fmt.Errorf("parameter `%s` for caveat `%s` is unused", paramName, caveatName), caveatName: caveatName, paramName: paramName, @@ -166,6 +166,6 @@ func NewUnusedCaveatParameterErr(caveatName string, paramName string) error { } var ( - _ sharederrors.UnknownNamespaceError = ErrNamespaceNotFound{} - _ sharederrors.UnknownRelationError = ErrRelationNotFound{} + _ sharederrors.UnknownNamespaceError = NamespaceNotFoundError{} + _ sharederrors.UnknownRelationError = RelationNotFoundError{} ) diff --git a/internal/namespace/util.go b/internal/namespace/util.go index aabcafbcf2..497bdfbf2e 100644 --- a/internal/namespace/util.go +++ b/internal/namespace/util.go @@ -11,8 +11,8 @@ import ( // ReadNamespaceAndRelation checks that the specified namespace and relation exist in the // datastore. // -// Returns ErrNamespaceNotFound if the namespace cannot be found. -// Returns ErrRelationNotFound if the relation was not found in the namespace. +// Returns NamespaceNotFoundError if the namespace cannot be found. +// Returns RelationNotFoundError if the relation was not found in the namespace. // Returns the direct downstream error for all other unknown error. func ReadNamespaceAndRelation( ctx context.Context, @@ -48,8 +48,8 @@ type TypeAndRelationToCheck struct { // CheckNamespaceAndRelations ensures that the given namespace+relation checks all succeed. If any fail, returns an error. // -// Returns ErrNamespaceNotFound if the namespace cannot be found. -// Returns ErrRelationNotFound if the relation was not found in the namespace. +// Returns NamespaceNotFoundError if the namespace cannot be found. +// Returns RelationNotFoundError if the relation was not found in the namespace. // Returns the direct downstream error for all other unknown error. func CheckNamespaceAndRelations(ctx context.Context, checks []TypeAndRelationToCheck, ds datastore.Reader) error { nsNames := mapz.NewSet[string]() @@ -100,8 +100,8 @@ func CheckNamespaceAndRelations(ctx context.Context, checks []TypeAndRelationToC // CheckNamespaceAndRelation checks that the specified namespace and relation exist in the // datastore. // -// Returns datastore.ErrNamespaceNotFound if the namespace cannot be found. -// Returns ErrRelationNotFound if the relation was not found in the namespace. +// Returns datastore.NamespaceNotFoundError if the namespace cannot be found. +// Returns RelationNotFoundError if the relation was not found in the namespace. // Returns the direct downstream error for all other unknown error. func CheckNamespaceAndRelation( ctx context.Context, diff --git a/internal/relationships/errors.go b/internal/relationships/errors.go index 07a320f27d..5597ce8574 100644 --- a/internal/relationships/errors.go +++ b/internal/relationships/errors.go @@ -19,9 +19,9 @@ import ( "github.com/authzed/spicedb/pkg/typesystem" ) -// ErrInvalidSubjectType indicates that a write was attempted with a subject type which is not +// InvalidSubjectTypeError indicates that a write was attempted with a subject type which is not // allowed on relation. -type ErrInvalidSubjectType struct { +type InvalidSubjectTypeError struct { error relationship tuple.Relationship relationType *core.AllowedRelation @@ -54,7 +54,7 @@ func NewInvalidSubjectTypeError( } if !allowedCaveatsForSubject.IsEmpty() { - return ErrInvalidSubjectType{ + return InvalidSubjectTypeError{ error: fmt.Errorf( "subjects of type `%s` are not allowed on relation `%s#%s` without one of the following caveats: %s", typesystem.SourceForAllowedRelation(relationType), @@ -79,7 +79,7 @@ func NewInvalidSubjectTypeError( matches := fuzzy.RankFind(typesystem.SourceForAllowedRelation(relationType), allowedTypeStrings) sort.Sort(matches) if len(matches) > 0 { - return ErrInvalidSubjectType{ + return InvalidSubjectTypeError{ error: fmt.Errorf( "subjects of type `%s` are not allowed on relation `%s#%s`; did you mean `%s`?", typesystem.SourceForAllowedRelation(relationType), @@ -93,7 +93,7 @@ func NewInvalidSubjectTypeError( } } - return ErrInvalidSubjectType{ + return InvalidSubjectTypeError{ error: fmt.Errorf( "subjects of type `%s` are not allowed on relation `%s#%s`", typesystem.SourceForAllowedRelation(relationType), @@ -107,7 +107,7 @@ func NewInvalidSubjectTypeError( } // GRPCStatus implements retrieving the gRPC status for the error. -func (err ErrInvalidSubjectType) GRPCStatus() *status.Status { +func (err InvalidSubjectTypeError) GRPCStatus() *status.Status { details := map[string]string{ "definition_name": err.relationship.Resource.ObjectType, "relation_name": err.relationship.Resource.Relation, @@ -128,15 +128,15 @@ func (err ErrInvalidSubjectType) GRPCStatus() *status.Status { ) } -// ErrCannotWriteToPermission indicates that a write was attempted on a permission. -type ErrCannotWriteToPermission struct { +// CannotWriteToPermissionError indicates that a write was attempted on a permission. +type CannotWriteToPermissionError struct { error rel tuple.Relationship } // NewCannotWriteToPermissionError constructs a new error for attempting to write to a permission. -func NewCannotWriteToPermissionError(rel tuple.Relationship) ErrCannotWriteToPermission { - return ErrCannotWriteToPermission{ +func NewCannotWriteToPermissionError(rel tuple.Relationship) CannotWriteToPermissionError { + return CannotWriteToPermissionError{ error: fmt.Errorf( "cannot write a relationship to permission `%s` under definition `%s`", rel.Resource.Relation, @@ -147,7 +147,7 @@ func NewCannotWriteToPermissionError(rel tuple.Relationship) ErrCannotWriteToPer } // GRPCStatus implements retrieving the gRPC status for the error. -func (err ErrCannotWriteToPermission) GRPCStatus() *status.Status { +func (err CannotWriteToPermissionError) GRPCStatus() *status.Status { return spiceerrors.WithCodeAndDetails( err, codes.InvalidArgument, @@ -161,15 +161,15 @@ func (err ErrCannotWriteToPermission) GRPCStatus() *status.Status { ) } -// ErrCaveatNotFound indicates that a caveat referenced in a relationship update was not found. -type ErrCaveatNotFound struct { +// CaveatNotFoundError indicates that a caveat referenced in a relationship update was not found. +type CaveatNotFoundError struct { error relationship tuple.Relationship } // NewCaveatNotFoundError constructs a new caveat not found error. -func NewCaveatNotFoundError(relationship tuple.Relationship) ErrCaveatNotFound { - return ErrCaveatNotFound{ +func NewCaveatNotFoundError(relationship tuple.Relationship) CaveatNotFoundError { + return CaveatNotFoundError{ error: fmt.Errorf( "the caveat `%s` was not found for relationship `%s`", relationship.OptionalCaveat.CaveatName, @@ -180,7 +180,7 @@ func NewCaveatNotFoundError(relationship tuple.Relationship) ErrCaveatNotFound { } // GRPCStatus implements retrieving the gRPC status for the error. -func (err ErrCaveatNotFound) GRPCStatus() *status.Status { +func (err CaveatNotFoundError) GRPCStatus() *status.Status { return spiceerrors.WithCodeAndDetails( err, codes.FailedPrecondition, diff --git a/internal/services/dispatch/v1/acl.go b/internal/services/dispatch/v1/acl.go index 68d2740929..b3a981d2f1 100644 --- a/internal/services/dispatch/v1/acl.go +++ b/internal/services/dispatch/v1/acl.go @@ -105,7 +105,7 @@ func rewriteGraphError(ctx context.Context, err error) error { case err == nil: return nil - case errors.As(err, &graph.ErrAlwaysFail{}): + case errors.As(err, &graph.AlwaysFailError{}): fallthrough default: log.Ctx(ctx).Err(err).Msg("unexpected dispatch graph error") diff --git a/internal/services/shared/errors.go b/internal/services/shared/errors.go index d5ca7fef85..47d60c1325 100644 --- a/internal/services/shared/errors.go +++ b/internal/services/shared/errors.go @@ -41,24 +41,24 @@ func mustMakeStatusReadonly() error { // NewSchemaWriteDataValidationError creates a new error representing that a schema write cannot be // completed due to existing data that would be left unreferenced. -func NewSchemaWriteDataValidationError(message string, args ...any) ErrSchemaWriteDataValidation { - return ErrSchemaWriteDataValidation{ +func NewSchemaWriteDataValidationError(message string, args ...any) SchemaWriteDataValidationError { + return SchemaWriteDataValidationError{ error: fmt.Errorf(message, args...), } } -// ErrSchemaWriteDataValidation occurs when a schema cannot be applied due to leaving data unreferenced. -type ErrSchemaWriteDataValidation struct { +// SchemaWriteDataValidationError occurs when a schema cannot be applied due to leaving data unreferenced. +type SchemaWriteDataValidationError struct { error } // MarshalZerologObject implements zerolog object marshalling. -func (err ErrSchemaWriteDataValidation) MarshalZerologObject(e *zerolog.Event) { +func (err SchemaWriteDataValidationError) MarshalZerologObject(e *zerolog.Event) { e.Err(err.error) } // GRPCStatus implements retrieving the gRPC status for the error. -func (err ErrSchemaWriteDataValidation) GRPCStatus() *status.Status { +func (err SchemaWriteDataValidationError) GRPCStatus() *status.Status { return spiceerrors.WithCodeAndDetails( err, codes.InvalidArgument, @@ -71,7 +71,7 @@ func (err ErrSchemaWriteDataValidation) GRPCStatus() *status.Status { // MaxDepthExceededError is an error returned when the maximum depth for dispatching has been exceeded. type MaxDepthExceededError struct { - *spiceerrors.ErrorWithAdditionalDetails + *spiceerrors.WithAdditionalDetailsError // AllowedMaximumDepth is the configured allowed maximum depth. AllowedMaximumDepth uint32 @@ -95,19 +95,19 @@ func (err MaxDepthExceededError) GRPCStatus() *status.Status { func NewMaxDepthExceededError(allowedMaximumDepth uint32, isCheckRequest bool) error { if isCheckRequest { return MaxDepthExceededError{ - spiceerrors.NewErrorWithAdditionalDetails(fmt.Errorf("the check request has exceeded the allowable maximum depth of %d: this usually indicates a recursive or too deep data dependency. Try running zed with --explain to see the dependency. See: https://spicedb.dev/d/debug-max-depth-check", allowedMaximumDepth)), + spiceerrors.NewWithAdditionalDetailsError(fmt.Errorf("the check request has exceeded the allowable maximum depth of %d: this usually indicates a recursive or too deep data dependency. Try running zed with --explain to see the dependency. See: https://spicedb.dev/d/debug-max-depth-check", allowedMaximumDepth)), allowedMaximumDepth, } } return MaxDepthExceededError{ - spiceerrors.NewErrorWithAdditionalDetails(fmt.Errorf("the request has exceeded the allowable maximum depth of %d: this usually indicates a recursive or too deep data dependency. See: https://spicedb.dev/d/debug-max-depth", allowedMaximumDepth)), + spiceerrors.NewWithAdditionalDetailsError(fmt.Errorf("the request has exceeded the allowable maximum depth of %d: this usually indicates a recursive or too deep data dependency. See: https://spicedb.dev/d/debug-max-depth", allowedMaximumDepth)), allowedMaximumDepth, } } -func AsValidationError(err error) *ErrSchemaWriteDataValidation { - var validationErr ErrSchemaWriteDataValidation +func AsValidationError(err error) *SchemaWriteDataValidationError { + var validationErr SchemaWriteDataValidationError if errors.As(err, &validationErr) { return &validationErr } @@ -142,7 +142,7 @@ func rewriteError(ctx context.Context, err error, config *ConfigForErrors) error var relationNotFoundError sharederrors.UnknownRelationError var compilerError compiler.BaseCompilerError - var sourceError spiceerrors.ErrorWithSource + var sourceError spiceerrors.WithSourceError var typeError typesystem.TypeError var maxDepthError dispatch.MaxDepthExceededError @@ -170,25 +170,25 @@ func rewriteError(ctx context.Context, err error, config *ConfigForErrors) error _, isCheckRequest := maxDepthError.Request.(*dispatchv1.DispatchCheckRequest) return NewMaxDepthExceededError(config.MaximumAPIDepth, isCheckRequest) - case errors.As(err, &datastore.ErrReadOnly{}): + case errors.As(err, &datastore.ReadOnlyError{}): return ErrServiceReadOnly - case errors.As(err, &datastore.ErrInvalidRevision{}): + case errors.As(err, &datastore.InvalidRevisionError{}): return status.Errorf(codes.OutOfRange, "invalid zedtoken: %s", err) - case errors.As(err, &datastore.ErrCaveatNameNotFound{}): + case errors.As(err, &datastore.CaveatNameNotFoundError{}): return spiceerrors.WithCodeAndReason(err, codes.FailedPrecondition, v1.ErrorReason_ERROR_REASON_UNKNOWN_CAVEAT) - case errors.As(err, &datastore.ErrWatchDisabled{}): + case errors.As(err, &datastore.WatchDisabledError{}): return status.Errorf(codes.FailedPrecondition, "%s", err) - case errors.As(err, &datastore.ErrCounterAlreadyRegistered{}): + case errors.As(err, &datastore.CounterAlreadyRegisteredError{}): return spiceerrors.WithCodeAndReason(err, codes.FailedPrecondition, v1.ErrorReason_ERROR_REASON_COUNTER_ALREADY_REGISTERED) - case errors.As(err, &datastore.ErrCounterNotRegistered{}): + case errors.As(err, &datastore.CounterNotRegisteredError{}): return spiceerrors.WithCodeAndReason(err, codes.FailedPrecondition, v1.ErrorReason_ERROR_REASON_COUNTER_NOT_REGISTERED) - case errors.As(err, &graph.ErrRelationMissingTypeInfo{}): + case errors.As(err, &graph.RelationMissingTypeInfoError{}): return status.Errorf(codes.FailedPrecondition, "failed precondition: %s", err) - case errors.As(err, &graph.ErrAlwaysFail{}): + case errors.As(err, &graph.AlwaysFailError{}): log.Ctx(ctx).Err(err).Msg("received internal error") return status.Errorf(codes.Internal, "internal error: %s", err) - case errors.As(err, &graph.ErrUnimplemented{}): + case errors.As(err, &graph.UnimplementedError{}): return status.Errorf(codes.Unimplemented, "%s", err) case errors.Is(err, context.DeadlineExceeded): return status.Errorf(codes.DeadlineExceeded, "%s", err) diff --git a/internal/services/v1/errors.go b/internal/services/v1/errors.go index 5e37e2bcff..6de67497b4 100644 --- a/internal/services/v1/errors.go +++ b/internal/services/v1/errors.go @@ -15,20 +15,20 @@ import ( "github.com/authzed/spicedb/pkg/tuple" ) -// ErrExceedsMaximumLimit occurs when a limit that is too large is given to a call. -type ErrExceedsMaximumLimit struct { +// ExceedsMaximumLimitError occurs when a limit that is too large is given to a call. +type ExceedsMaximumLimitError struct { error providedLimit uint64 maxLimitAllowed uint64 } // MarshalZerologObject implements zerolog object marshalling. -func (err ErrExceedsMaximumLimit) MarshalZerologObject(e *zerolog.Event) { +func (err ExceedsMaximumLimitError) MarshalZerologObject(e *zerolog.Event) { e.Err(err.error).Uint64("providedLimit", err.providedLimit).Uint64("maxLimitAllowed", err.maxLimitAllowed) } // GRPCStatus implements retrieving the gRPC status for the error. -func (err ErrExceedsMaximumLimit) GRPCStatus() *status.Status { +func (err ExceedsMaximumLimitError) GRPCStatus() *status.Status { return spiceerrors.WithCodeAndDetails( err, codes.InvalidArgument, @@ -43,28 +43,28 @@ func (err ErrExceedsMaximumLimit) GRPCStatus() *status.Status { } // NewExceedsMaximumLimitErr creates a new error representing that the limit specified was too large. -func NewExceedsMaximumLimitErr(providedLimit uint64, maxLimitAllowed uint64) ErrExceedsMaximumLimit { - return ErrExceedsMaximumLimit{ +func NewExceedsMaximumLimitErr(providedLimit uint64, maxLimitAllowed uint64) ExceedsMaximumLimitError { + return ExceedsMaximumLimitError{ error: fmt.Errorf("provided limit %d is greater than maximum allowed of %d", providedLimit, maxLimitAllowed), providedLimit: providedLimit, maxLimitAllowed: maxLimitAllowed, } } -// ErrExceedsMaximumChecks occurs when too many checks are given to a call. -type ErrExceedsMaximumChecks struct { +// ExceedsMaximumChecksError occurs when too many checks are given to a call. +type ExceedsMaximumChecksError struct { error checkCount uint64 maxCountAllowed uint64 } // MarshalZerologObject implements zerolog object marshalling. -func (err ErrExceedsMaximumChecks) MarshalZerologObject(e *zerolog.Event) { +func (err ExceedsMaximumChecksError) MarshalZerologObject(e *zerolog.Event) { e.Err(err.error).Uint64("checkCount", err.checkCount).Uint64("maxCountAllowed", err.maxCountAllowed) } // GRPCStatus implements retrieving the gRPC status for the error. -func (err ErrExceedsMaximumChecks) GRPCStatus() *status.Status { +func (err ExceedsMaximumChecksError) GRPCStatus() *status.Status { return spiceerrors.WithCodeAndDetails( err, codes.InvalidArgument, @@ -79,28 +79,28 @@ func (err ErrExceedsMaximumChecks) GRPCStatus() *status.Status { } // NewExceedsMaximumChecksErr creates a new error representing that too many updates were given to a BulkCheckPermissions call. -func NewExceedsMaximumChecksErr(checkCount uint64, maxCountAllowed uint64) ErrExceedsMaximumChecks { - return ErrExceedsMaximumChecks{ +func NewExceedsMaximumChecksErr(checkCount uint64, maxCountAllowed uint64) ExceedsMaximumChecksError { + return ExceedsMaximumChecksError{ error: fmt.Errorf("check count of %d is greater than maximum allowed of %d", checkCount, maxCountAllowed), checkCount: checkCount, maxCountAllowed: maxCountAllowed, } } -// ErrExceedsMaximumUpdates occurs when too many updates are given to a call. -type ErrExceedsMaximumUpdates struct { +// ExceedsMaximumUpdatesError occurs when too many updates are given to a call. +type ExceedsMaximumUpdatesError struct { error updateCount uint64 maxCountAllowed uint64 } // MarshalZerologObject implements zerolog object marshalling. -func (err ErrExceedsMaximumUpdates) MarshalZerologObject(e *zerolog.Event) { +func (err ExceedsMaximumUpdatesError) MarshalZerologObject(e *zerolog.Event) { e.Err(err.error).Uint64("updateCount", err.updateCount).Uint64("maxCountAllowed", err.maxCountAllowed) } // GRPCStatus implements retrieving the gRPC status for the error. -func (err ErrExceedsMaximumUpdates) GRPCStatus() *status.Status { +func (err ExceedsMaximumUpdatesError) GRPCStatus() *status.Status { return spiceerrors.WithCodeAndDetails( err, codes.InvalidArgument, @@ -115,28 +115,28 @@ func (err ErrExceedsMaximumUpdates) GRPCStatus() *status.Status { } // NewExceedsMaximumUpdatesErr creates a new error representing that too many updates were given to a WriteRelationships call. -func NewExceedsMaximumUpdatesErr(updateCount uint64, maxCountAllowed uint64) ErrExceedsMaximumUpdates { - return ErrExceedsMaximumUpdates{ +func NewExceedsMaximumUpdatesErr(updateCount uint64, maxCountAllowed uint64) ExceedsMaximumUpdatesError { + return ExceedsMaximumUpdatesError{ error: fmt.Errorf("update count of %d is greater than maximum allowed of %d", updateCount, maxCountAllowed), updateCount: updateCount, maxCountAllowed: maxCountAllowed, } } -// ErrExceedsMaximumPreconditions occurs when too many preconditions are given to a call. -type ErrExceedsMaximumPreconditions struct { +// ExceedsMaximumPreconditionsError occurs when too many preconditions are given to a call. +type ExceedsMaximumPreconditionsError struct { error preconditionCount uint64 maxCountAllowed uint64 } // MarshalZerologObject implements zerolog object marshalling. -func (err ErrExceedsMaximumPreconditions) MarshalZerologObject(e *zerolog.Event) { +func (err ExceedsMaximumPreconditionsError) MarshalZerologObject(e *zerolog.Event) { e.Err(err.error).Uint64("preconditionCount", err.preconditionCount).Uint64("maxCountAllowed", err.maxCountAllowed) } // GRPCStatus implements retrieving the gRPC status for the error. -func (err ErrExceedsMaximumPreconditions) GRPCStatus() *status.Status { +func (err ExceedsMaximumPreconditionsError) GRPCStatus() *status.Status { return spiceerrors.WithCodeAndDetails( err, codes.InvalidArgument, @@ -151,8 +151,8 @@ func (err ErrExceedsMaximumPreconditions) GRPCStatus() *status.Status { } // NewExceedsMaximumPreconditionsErr creates a new error representing that too many preconditions were given to a call. -func NewExceedsMaximumPreconditionsErr(preconditionCount uint64, maxCountAllowed uint64) ErrExceedsMaximumPreconditions { - return ErrExceedsMaximumPreconditions{ +func NewExceedsMaximumPreconditionsErr(preconditionCount uint64, maxCountAllowed uint64) ExceedsMaximumPreconditionsError { + return ExceedsMaximumPreconditionsError{ error: fmt.Errorf( "precondition count of %d is greater than maximum allowed of %d", preconditionCount, @@ -162,27 +162,27 @@ func NewExceedsMaximumPreconditionsErr(preconditionCount uint64, maxCountAllowed } } -// ErrPreconditionFailed occurs when the precondition to a write tuple call does not match. -type ErrPreconditionFailed struct { +// PreconditionFailedError occurs when the precondition to a write tuple call does not match. +type PreconditionFailedError struct { error precondition *v1.Precondition } // MarshalZerologObject implements zerolog object marshalling. -func (err ErrPreconditionFailed) MarshalZerologObject(e *zerolog.Event) { +func (err PreconditionFailedError) MarshalZerologObject(e *zerolog.Event) { e.Err(err.error).Interface("precondition", err.precondition) } // NewPreconditionFailedErr constructs a new precondition failed error. func NewPreconditionFailedErr(precondition *v1.Precondition) error { - return ErrPreconditionFailed{ + return PreconditionFailedError{ error: fmt.Errorf("unable to satisfy write precondition `%s`", precondition), precondition: precondition, } } // GRPCStatus implements retrieving the gRPC status for the error. -func (err ErrPreconditionFailed) GRPCStatus() *status.Status { +func (err PreconditionFailedError) GRPCStatus() *status.Status { metadata := map[string]string{ "precondition_operation": v1.Precondition_Operation_name[int32(err.precondition.Operation)], } @@ -225,25 +225,25 @@ func (err ErrPreconditionFailed) GRPCStatus() *status.Status { ) } -// ErrDuplicateRelationshipError indicates that an update was attempted on the same relationship. -type ErrDuplicateRelationshipError struct { +// DuplicateRelationErrorshipError indicates that an update was attempted on the same relationship. +type DuplicateRelationErrorshipError struct { error update *v1.RelationshipUpdate } // NewDuplicateRelationshipErr constructs a new invalid subject error. -func NewDuplicateRelationshipErr(update *v1.RelationshipUpdate) ErrDuplicateRelationshipError { - return ErrDuplicateRelationshipError{ +func NewDuplicateRelationshipErr(update *v1.RelationshipUpdate) DuplicateRelationErrorshipError { + return DuplicateRelationErrorshipError{ error: fmt.Errorf( "found more than one update with relationship `%s` in this request; a relationship can only be specified in an update once per overall WriteRelationships request", - tuple.V1StringRelationshipWithoutCaveat(update.Relationship), + tuple.V1StringRelationshipWithoutCaveatOrExpiration(update.Relationship), ), update: update, } } // GRPCStatus implements retrieving the gRPC status for the error. -func (err ErrDuplicateRelationshipError) GRPCStatus() *status.Status { +func (err DuplicateRelationErrorshipError) GRPCStatus() *status.Status { return spiceerrors.WithCodeAndDetails( err, codes.InvalidArgument, @@ -270,7 +270,7 @@ func NewMaxRelationshipContextError(update *v1.RelationshipUpdate, maxAllowedSiz return ErrMaxRelationshipContextError{ error: fmt.Errorf( "provided relationship `%s` exceeded maximum allowed caveat size of %d", - tuple.V1StringRelationshipWithoutCaveat(update.Relationship), + tuple.V1StringRelationshipWithoutCaveatOrExpiration(update.Relationship), maxAllowedSize, ), update: update, @@ -286,7 +286,7 @@ func (err ErrMaxRelationshipContextError) GRPCStatus() *status.Status { spiceerrors.ForReason( v1.ErrorReason_ERROR_REASON_MAX_RELATIONSHIP_CONTEXT_SIZE, map[string]string{ - "relationship": tuple.V1StringRelationshipWithoutCaveat(err.update.Relationship), + "relationship": tuple.V1StringRelationshipWithoutCaveatOrExpiration(err.update.Relationship), "max_allowed_size": strconv.Itoa(err.maxAllowedSize), "context_size": strconv.Itoa(proto.Size(err.update.Relationship)), }, @@ -294,16 +294,16 @@ func (err ErrMaxRelationshipContextError) GRPCStatus() *status.Status { ) } -// ErrCouldNotTransactionallyDelete indicates that a deletion could not occur transactionally. -type ErrCouldNotTransactionallyDelete struct { +// CouldNotTransactionallyDeleteError indicates that a deletion could not occur transactionally. +type CouldNotTransactionallyDeleteError struct { error limit uint32 filter *v1.RelationshipFilter } // NewCouldNotTransactionallyDeleteErr constructs a new could not transactionally deleter error. -func NewCouldNotTransactionallyDeleteErr(filter *v1.RelationshipFilter, limit uint32) ErrCouldNotTransactionallyDelete { - return ErrCouldNotTransactionallyDelete{ +func NewCouldNotTransactionallyDeleteErr(filter *v1.RelationshipFilter, limit uint32) CouldNotTransactionallyDeleteError { + return CouldNotTransactionallyDeleteError{ error: fmt.Errorf( "found more than %d relationships to be deleted and partial deletion was not requested", limit, @@ -314,7 +314,7 @@ func NewCouldNotTransactionallyDeleteErr(filter *v1.RelationshipFilter, limit ui } // GRPCStatus implements retrieving the gRPC status for the error. -func (err ErrCouldNotTransactionallyDelete) GRPCStatus() *status.Status { +func (err CouldNotTransactionallyDeleteError) GRPCStatus() *status.Status { metadata := map[string]string{ "limit": strconv.Itoa(int(err.limit)), "filter_resource_type": err.filter.ResourceType, @@ -350,15 +350,15 @@ func (err ErrCouldNotTransactionallyDelete) GRPCStatus() *status.Status { ) } -// ErrInvalidCursor indicates that an invalid cursor was found. -type ErrInvalidCursor struct { +// InvalidCursorError indicates that an invalid cursor was found. +type InvalidCursorError struct { error reason string } // NewInvalidCursorErr constructs a new invalid cursor error. -func NewInvalidCursorErr(reason string) ErrInvalidCursor { - return ErrInvalidCursor{ +func NewInvalidCursorErr(reason string) InvalidCursorError { + return InvalidCursorError{ error: fmt.Errorf( "the cursor provided is not valid: %s", reason, @@ -367,7 +367,7 @@ func NewInvalidCursorErr(reason string) ErrInvalidCursor { } // GRPCStatus implements retrieving the gRPC status for the error. -func (err ErrInvalidCursor) GRPCStatus() *status.Status { +func (err InvalidCursorError) GRPCStatus() *status.Status { return spiceerrors.WithCodeAndDetails( err, codes.FailedPrecondition, @@ -380,15 +380,15 @@ func (err ErrInvalidCursor) GRPCStatus() *status.Status { ) } -// ErrInvalidFilter indicates the specified relationship filter was invalid. -type ErrInvalidFilter struct { +// InvalidFilterError indicates the specified relationship filter was invalid. +type InvalidFilterError struct { error filter string } // GRPCStatus implements retrieving the gRPC status for the error. -func (err ErrInvalidFilter) GRPCStatus() *status.Status { +func (err InvalidFilterError) GRPCStatus() *status.Status { return spiceerrors.WithCodeAndDetails( err, codes.InvalidArgument, @@ -402,8 +402,8 @@ func (err ErrInvalidFilter) GRPCStatus() *status.Status { } // NewInvalidFilterErr constructs a new invalid filter error. -func NewInvalidFilterErr(reason string, filter string) ErrInvalidFilter { - return ErrInvalidFilter{ +func NewInvalidFilterErr(reason string, filter string) InvalidFilterError { + return InvalidFilterError{ error: fmt.Errorf( "the relationship filter provided is not valid: %s", reason, ), @@ -412,21 +412,21 @@ func NewInvalidFilterErr(reason string, filter string) ErrInvalidFilter { } // NewEmptyPreconditionErr constructs a new empty precondition error. -func NewEmptyPreconditionErr() ErrEmptyPrecondition { - return ErrEmptyPrecondition{ +func NewEmptyPreconditionErr() EmptyPreconditionError { + return EmptyPreconditionError{ error: fmt.Errorf( "one of the specified preconditions is empty", ), } } -// ErrEmptyPrecondition indicates an empty precondition was found. -type ErrEmptyPrecondition struct { +// EmptyPreconditionError indicates an empty precondition was found. +type EmptyPreconditionError struct { error } // GRPCStatus implements retrieving the gRPC status for the error. -func (err ErrEmptyPrecondition) GRPCStatus() *status.Status { +func (err EmptyPreconditionError) GRPCStatus() *status.Status { // TODO(jschorr): Put a proper error reason in here. return spiceerrors.WithCodeAndDetails( err, @@ -439,8 +439,8 @@ func (err ErrEmptyPrecondition) GRPCStatus() *status.Status { } // NewNotAPermissionError constructs a new not a permission error. -func NewNotAPermissionError(relationName string) ErrNotAPermission { - return ErrNotAPermission{ +func NewNotAPermissionError(relationName string) NotAPermissionError { + return NotAPermissionError{ error: fmt.Errorf( "the relation `%s` is not a permission", relationName, ), @@ -448,14 +448,14 @@ func NewNotAPermissionError(relationName string) ErrNotAPermission { } } -// ErrNotAPermission indicates that the relation is not a permission. -type ErrNotAPermission struct { +// NotAPermissionError indicates that the relation is not a permission. +type NotAPermissionError struct { error relationName string } // GRPCStatus implements retrieving the gRPC status for the error. -func (err ErrNotAPermission) GRPCStatus() *status.Status { +func (err NotAPermissionError) GRPCStatus() *status.Status { return spiceerrors.WithCodeAndDetails( err, codes.InvalidArgument, @@ -476,27 +476,27 @@ func defaultIfZero[T comparable](value T, defaultValue T) T { return value } -// ErrTransactionMetadataTooLarge indicates that the metadata for a transaction is too large. -type ErrTransactionMetadataTooLarge struct { +// TransactionMetadataTooLargeError indicates that the metadata for a transaction is too large. +type TransactionMetadataTooLargeError struct { error metadataSize int maxSize int } // NewTransactionMetadataTooLargeErr constructs a new transaction metadata too large error. -func NewTransactionMetadataTooLargeErr(metadataSize int, maxSize int) ErrTransactionMetadataTooLarge { - return ErrTransactionMetadataTooLarge{ +func NewTransactionMetadataTooLargeErr(metadataSize int, maxSize int) TransactionMetadataTooLargeError { + return TransactionMetadataTooLargeError{ error: fmt.Errorf("metadata size of %d is greater than maximum allowed of %d", metadataSize, maxSize), metadataSize: metadataSize, maxSize: maxSize, } } -func (err ErrTransactionMetadataTooLarge) MarshalZerologObject(e *zerolog.Event) { +func (err TransactionMetadataTooLargeError) MarshalZerologObject(e *zerolog.Event) { e.Err(err.error).Int("metadataSize", err.metadataSize).Int("maxSize", err.maxSize) } -func (err ErrTransactionMetadataTooLarge) GRPCStatus() *status.Status { +func (err TransactionMetadataTooLargeError) GRPCStatus() *status.Status { return spiceerrors.WithCodeAndDetails( err, codes.InvalidArgument, diff --git a/internal/services/v1/experimental.go b/internal/services/v1/experimental.go index 8f526640db..8cd1058844 100644 --- a/internal/services/v1/experimental.go +++ b/internal/services/v1/experimental.go @@ -154,6 +154,12 @@ func (a *bulkLoadAdapter) Next(_ context.Context) (*tuple.Relationship, error) { a.currentBatch = batch.Relationships a.numSent = 0 + for _, rel := range batch.Relationships { + if rel.OptionalExpiresAt != nil { + return nil, fmt.Errorf("expiration time is not currently supported") + } + } + a.awaitingNamespaces, a.awaitingCaveats = extractBatchNewReferencedNamespacesAndCaveats( a.currentBatch, a.referencedNamespaceMap, @@ -173,6 +179,7 @@ func (a *bulkLoadAdapter) Next(_ context.Context) (*tuple.Relationship, error) { } a.current.OptionalIntegrity = nil + a.current.OptionalExpiration = nil a.current.RelationshipReference.Resource.ObjectType = a.currentBatch[a.numSent].Resource.ObjectType a.current.RelationshipReference.Resource.ObjectID = a.currentBatch[a.numSent].Resource.ObjectId diff --git a/internal/services/v1/relationships.go b/internal/services/v1/relationships.go index b550ce4f84..1850a58099 100644 --- a/internal/services/v1/relationships.go +++ b/internal/services/v1/relationships.go @@ -250,7 +250,7 @@ func (ps *permissionServer) ReadRelationships(req *v1.ReadRelationshipsRequest, break } - dispatchCursor.Sections[0] = tuple.StringWithoutCaveat(rel) + dispatchCursor.Sections[0] = tuple.StringWithoutCaveatOrExpiration(rel) encodedCursor, err := cursor.EncodeFromDispatchCursor(dispatchCursor, rrRequestHash, atRevision, nil) if err != nil { return ps.rewriteError(ctx, err) @@ -295,8 +295,16 @@ func (ps *permissionServer) WriteRelationships(ctx context.Context, req *v1.Writ // Check for duplicate updates and create the set of caveat names to load. updateRelationshipSet := mapz.NewSet[string]() for _, update := range req.Updates { + // TODO(jschorr): Remove this once expiration is supported. + if update.Relationship.OptionalExpiresAt != nil { + return nil, ps.rewriteError( + ctx, + fmt.Errorf("expiration is not supported in this version of the API"), + ) + } + // TODO(jschorr): Change to struct-based keys. - tupleStr := tuple.V1StringRelationshipWithoutCaveat(update.Relationship) + tupleStr := tuple.V1StringRelationshipWithoutCaveatOrExpiration(update.Relationship) if !updateRelationshipSet.Add(tupleStr) { return nil, ps.rewriteError( ctx, diff --git a/internal/services/v1/watch.go b/internal/services/v1/watch.go index 9fc85b170b..ab0d839595 100644 --- a/internal/services/v1/watch.go +++ b/internal/services/v1/watch.go @@ -110,9 +110,9 @@ func (ws *watchServer) Watch(req *v1.WatchRequest, stream v1.WatchService_WatchS } case err := <-errchan: switch { - case errors.As(err, &datastore.ErrWatchCanceled{}): + case errors.As(err, &datastore.WatchCanceledError{}): return status.Errorf(codes.Canceled, "watch canceled by user: %s", err) - case errors.As(err, &datastore.ErrWatchDisconnected{}): + case errors.As(err, &datastore.WatchDisconnectedError{}): return status.Errorf(codes.ResourceExhausted, "watch disconnected: %s", err) default: return status.Errorf(codes.Internal, "watch error: %s", err) diff --git a/internal/testfixtures/validating.go b/internal/testfixtures/validating.go index 75b83aeebe..e15db0fc4a 100644 --- a/internal/testfixtures/validating.go +++ b/internal/testfixtures/validating.go @@ -217,8 +217,8 @@ func (vrwt validatingReadWriteTransaction) WriteRelationships(ctx context.Contex // Ensure there are no duplicate mutations. tupleSet := mapz.NewSet[string]() for _, mutation := range mutations { - if !tupleSet.Add(tuple.StringWithoutCaveat(mutation.Relationship)) { - return fmt.Errorf("found duplicate update for relationship %s", tuple.StringWithoutCaveat(mutation.Relationship)) + if !tupleSet.Add(tuple.StringWithoutCaveatOrExpiration(mutation.Relationship)) { + return fmt.Errorf("found duplicate update for relationship %s", tuple.StringWithoutCaveatOrExpiration(mutation.Relationship)) } } diff --git a/pkg/caveats/compile.go b/pkg/caveats/compile.go index 76062ac094..fb647967b6 100644 --- a/pkg/caveats/compile.go +++ b/pkg/caveats/compile.go @@ -130,7 +130,7 @@ func CompileCaveatWithSource(env *Environment, name string, source common.Source ast, issues := celEnv.CompileSource(source) if issues != nil && issues.Err() != nil { if startPosition == nil { - return nil, CompilationErrors{issues.Err(), issues} + return nil, MultipleCompilationError{issues.Err(), issues} } // Construct errors with the source location adjusted based on the starting source position @@ -164,11 +164,11 @@ func CompileCaveatWithSource(env *Environment, name string, source common.Source } adjustedIssues := cel.NewIssues(adjustedErrors) - return nil, CompilationErrors{adjustedIssues.Err(), adjustedIssues} + return nil, MultipleCompilationError{adjustedIssues.Err(), adjustedIssues} } if ast.OutputType() != cel.BoolType { - return nil, CompilationErrors{fmt.Errorf("caveat expression must result in a boolean value: found `%s`", ast.OutputType().String()), nil} + return nil, MultipleCompilationError{fmt.Errorf("caveat expression must result in a boolean value: found `%s`", ast.OutputType().String()), nil} } compiled := &CompiledCaveat{celEnv, ast, anonymousCaveat} diff --git a/pkg/caveats/compile_test.go b/pkg/caveats/compile_test.go index e783e0d059..d83ae1b8e5 100644 --- a/pkg/caveats/compile_test.go +++ b/pkg/caveats/compile_test.go @@ -199,7 +199,7 @@ func TestCompile(t *testing.T) { require.Error(t, err) require.Nil(t, compiled) - isCompilationError := errors.As(err, &CompilationErrors{}) + isCompilationError := errors.As(err, &MultipleCompilationError{}) require.True(t, isCompilationError) for _, expectedError := range tc.expectedErrors { diff --git a/pkg/caveats/errors.go b/pkg/caveats/errors.go index 223614d4bc..9c496096cf 100644 --- a/pkg/caveats/errors.go +++ b/pkg/caveats/errors.go @@ -7,68 +7,68 @@ import ( "github.com/rs/zerolog" ) -// EvaluationErr is an error in evaluation of a caveat expression. -type EvaluationErr struct { +// EvaluationError is an error in evaluation of a caveat expression. +type EvaluationError struct { error } // MarshalZerologObject implements zerolog.LogObjectMarshaler -func (err EvaluationErr) MarshalZerologObject(e *zerolog.Event) { +func (err EvaluationError) MarshalZerologObject(e *zerolog.Event) { e.Err(err.error) } // DetailsMetadata returns the metadata for details for this error. -func (err EvaluationErr) DetailsMetadata() map[string]string { +func (err EvaluationError) DetailsMetadata() map[string]string { return map[string]string{} } -// ParameterConversionErr is an error in type conversion of a supplied parameter. -type ParameterConversionErr struct { +// ParameterConversionError is an error in type conversion of a supplied parameter. +type ParameterConversionError struct { error parameterName string } // MarshalZerologObject implements zerolog.LogObjectMarshaler -func (err ParameterConversionErr) MarshalZerologObject(e *zerolog.Event) { +func (err ParameterConversionError) MarshalZerologObject(e *zerolog.Event) { e.Err(err.error).Str("parameterName", err.parameterName) } // DetailsMetadata returns the metadata for details for this error. -func (err ParameterConversionErr) DetailsMetadata() map[string]string { +func (err ParameterConversionError) DetailsMetadata() map[string]string { return map[string]string{ "parameter_name": err.parameterName, } } // ParameterName is the name of the parameter. -func (err ParameterConversionErr) ParameterName() string { +func (err ParameterConversionError) ParameterName() string { return err.parameterName } -// CompilationErrors is a wrapping error for containing compilation errors for a Caveat. -type CompilationErrors struct { +// MultipleCompilationError is a wrapping error for containing compilation errors for a Caveat. +type MultipleCompilationError struct { error issues *cel.Issues } // LineNumber is the 0-indexed line number for compilation error. -func (err CompilationErrors) LineNumber() int { +func (err MultipleCompilationError) LineNumber() int { return err.issues.Errors()[0].Location.Line() - 1 } // ColumnPositionis the 0-indexed column position for compilation error. -func (err CompilationErrors) ColumnPosition() int { +func (err MultipleCompilationError) ColumnPosition() int { return err.issues.Errors()[0].Location.Column() - 1 } // MarshalZerologObject implements zerolog.LogObjectMarshaler -func (err CompilationErrors) MarshalZerologObject(e *zerolog.Event) { +func (err MultipleCompilationError) MarshalZerologObject(e *zerolog.Event) { e.Err(err.error).Int("lineNumber", err.LineNumber()).Int("columnPosition", err.ColumnPosition()) } // DetailsMetadata returns the metadata for details for this error. -func (err CompilationErrors) DetailsMetadata() map[string]string { +func (err MultipleCompilationError) DetailsMetadata() map[string]string { return map[string]string{ "line_number": strconv.Itoa(err.LineNumber()), "column_position": strconv.Itoa(err.ColumnPosition()), diff --git a/pkg/caveats/eval.go b/pkg/caveats/eval.go index c21cc2dfd5..cef9a4b52e 100644 --- a/pkg/caveats/eval.go +++ b/pkg/caveats/eval.go @@ -119,7 +119,7 @@ func EvaluateCaveatWithConfig(caveat *CompiledCaveat, contextValues map[string]a val, details, err := prg.Eval(activation) if err != nil { - return nil, EvaluationErr{err} + return nil, EvaluationError{err} } // If the value produced has Unknown type, then it means required context was missing. diff --git a/pkg/caveats/parameters.go b/pkg/caveats/parameters.go index 0785909092..a0a3400697 100644 --- a/pkg/caveats/parameters.go +++ b/pkg/caveats/parameters.go @@ -54,7 +54,7 @@ func ConvertContextToParameters( convertedParam, err := varType.ConvertValue(value) if err != nil { - return nil, ParameterConversionErr{fmt.Errorf("could not convert context parameter `%s`: %w", key, err), key} + return nil, ParameterConversionError{fmt.Errorf("could not convert context parameter `%s`: %w", key, err), key} } converted[key] = convertedParam diff --git a/pkg/composableschemadsl/compiler/compiler.go b/pkg/composableschemadsl/compiler/compiler.go index 11a1cc5aca..e0ec6946e8 100644 --- a/pkg/composableschemadsl/compiler/compiler.go +++ b/pkg/composableschemadsl/compiler/compiler.go @@ -137,9 +137,9 @@ func compileImpl(schema InputSchema, cctx compilationContext, prefix ObjectPrefi globallyVisitedFiles: cctx.globallyVisitedFiles, }, root) if err != nil { - var errorWithNode errorWithNode - if errors.As(err, &errorWithNode) { - err = toContextError(errorWithNode.error.Error(), errorWithNode.errorSourceCode, errorWithNode.node, mapper) + var withNodeError withNodeError + if errors.As(err, &withNodeError) { + err = toContextError(withNodeError.error.Error(), withNodeError.errorSourceCode, withNodeError.node, mapper) } return nil, err @@ -187,7 +187,7 @@ func toContextError(errMessage string, errorSourceCode string, node *dslNode, ma return fmt.Errorf("missing source for node: %w", err) } - return ErrorWithContext{ + return WithContextError{ BaseCompilerError: BaseCompilerError{ error: fmt.Errorf("parse error in %s: %s", formattedRange, errMessage), BaseMessage: errMessage, diff --git a/pkg/composableschemadsl/compiler/errors.go b/pkg/composableschemadsl/compiler/errors.go index ddb585845c..9b63002e63 100644 --- a/pkg/composableschemadsl/compiler/errors.go +++ b/pkg/composableschemadsl/compiler/errors.go @@ -13,26 +13,26 @@ type BaseCompilerError struct { BaseMessage string } -type errorWithNode struct { +type withNodeError struct { error node *dslNode errorSourceCode string } -// ErrorWithContext defines an error which contains contextual information. -type ErrorWithContext struct { +// WithContextError defines an error which contains contextual information. +type WithContextError struct { BaseCompilerError SourceRange input.SourceRange Source input.Source ErrorSourceCode string } -func (ewc ErrorWithContext) Unwrap() error { +func (ewc WithContextError) Unwrap() error { return ewc.BaseCompilerError } // DetailsMetadata returns the metadata for details for this error. -func (ewc ErrorWithContext) DetailsMetadata() map[string]string { +func (ewc WithContextError) DetailsMetadata() map[string]string { startLine, startCol, err := ewc.SourceRange.Start().LineAndColumn() if err != nil { return map[string]string{} diff --git a/pkg/composableschemadsl/compiler/importer.go b/pkg/composableschemadsl/compiler/importer.go index 0cb6c6162c..52ff29dbdd 100644 --- a/pkg/composableschemadsl/compiler/importer.go +++ b/pkg/composableschemadsl/compiler/importer.go @@ -22,7 +22,7 @@ type importContext struct { const SchemaFileSuffix = ".zed" -type ErrCircularImport struct { +type CircularImportError struct { error filePath string } @@ -38,7 +38,7 @@ func importFile(importContext importContext) (*CompiledSchema, error) { if ok := currentLocallyVisitedFiles.Add(filePath); !ok { // If we've already visited the file on this particular branch walk, it's // a circular import issue. - return nil, &ErrCircularImport{ + return nil, &CircularImportError{ error: fmt.Errorf("circular import detected: %s has been visited on this branch", filePath), filePath: filePath, } diff --git a/pkg/composableschemadsl/compiler/node.go b/pkg/composableschemadsl/compiler/node.go index d47c170851..8e095d677d 100644 --- a/pkg/composableschemadsl/compiler/node.go +++ b/pkg/composableschemadsl/compiler/node.go @@ -164,15 +164,15 @@ func (tn *dslNode) Lookup(predicateName string) (*dslNode, error) { } func (tn *dslNode) Errorf(message string, args ...interface{}) error { - return errorWithNode{ + return withNodeError{ error: fmt.Errorf(message, args...), errorSourceCode: "", node: tn, } } -func (tn *dslNode) ErrorWithSourcef(sourceCode string, message string, args ...interface{}) error { - return errorWithNode{ +func (tn *dslNode) WithSourceErrorf(sourceCode string, message string, args ...interface{}) error { + return withNodeError{ error: fmt.Errorf(message, args...), errorSourceCode: sourceCode, node: tn, diff --git a/pkg/composableschemadsl/compiler/translator.go b/pkg/composableschemadsl/compiler/translator.go index 3d4fce70d7..f59af778f6 100644 --- a/pkg/composableschemadsl/compiler/translator.go +++ b/pkg/composableschemadsl/compiler/translator.go @@ -72,7 +72,7 @@ func translate(tctx translationContext, root *dslNode) (*CompiledSchema, error) name := def.GetName() if !names.Add(name) { - return nil, topLevelNode.ErrorWithSourcef(name, "found name reused between multiple definitions and/or caveats: %s", name) + return nil, topLevelNode.WithSourceErrorf(name, "found name reused between multiple definitions and/or caveats: %s", name) } orderedDefinitions = append(orderedDefinitions, def) @@ -88,7 +88,7 @@ func translate(tctx translationContext, root *dslNode) (*CompiledSchema, error) name := def.GetName() if !names.Add(name) { - return nil, topLevelNode.ErrorWithSourcef(name, "found name reused between multiple definitions and/or caveats: %s", name) + return nil, topLevelNode.WithSourceErrorf(name, "found name reused between multiple definitions and/or caveats: %s", name) } orderedDefinitions = append(orderedDefinitions, def) @@ -118,13 +118,13 @@ func translate(tctx translationContext, root *dslNode) (*CompiledSchema, error) func translateCaveatDefinition(tctx translationContext, defNode *dslNode) (*core.CaveatDefinition, error) { definitionName, err := defNode.GetString(dslshape.NodeCaveatDefinitionPredicateName) if err != nil { - return nil, defNode.ErrorWithSourcef(definitionName, "invalid definition name: %w", err) + return nil, defNode.WithSourceErrorf(definitionName, "invalid definition name: %w", err) } // parameters paramNodes := defNode.List(dslshape.NodeCaveatDefinitionPredicateParameters) if len(paramNodes) == 0 { - return nil, defNode.ErrorWithSourcef(definitionName, "caveat `%s` must have at least one parameter defined", definitionName) + return nil, defNode.WithSourceErrorf(definitionName, "caveat `%s` must have at least one parameter defined", definitionName) } env := caveats.NewEnvironment() @@ -132,27 +132,27 @@ func translateCaveatDefinition(tctx translationContext, defNode *dslNode) (*core for _, paramNode := range paramNodes { paramName, err := paramNode.GetString(dslshape.NodeCaveatParameterPredicateName) if err != nil { - return nil, paramNode.ErrorWithSourcef(paramName, "invalid parameter name: %w", err) + return nil, paramNode.WithSourceErrorf(paramName, "invalid parameter name: %w", err) } if _, ok := parameters[paramName]; ok { - return nil, paramNode.ErrorWithSourcef(paramName, "duplicate parameter `%s` defined on caveat `%s`", paramName, definitionName) + return nil, paramNode.WithSourceErrorf(paramName, "duplicate parameter `%s` defined on caveat `%s`", paramName, definitionName) } typeRefNode, err := paramNode.Lookup(dslshape.NodeCaveatParameterPredicateType) if err != nil { - return nil, paramNode.ErrorWithSourcef(paramName, "invalid type for parameter: %w", err) + return nil, paramNode.WithSourceErrorf(paramName, "invalid type for parameter: %w", err) } translatedType, err := translateCaveatTypeReference(tctx, typeRefNode) if err != nil { - return nil, paramNode.ErrorWithSourcef(paramName, "invalid type for caveat parameter `%s` on caveat `%s`: %w", paramName, definitionName, err) + return nil, paramNode.WithSourceErrorf(paramName, "invalid type for caveat parameter `%s` on caveat `%s`: %w", paramName, definitionName, err) } parameters[paramName] = *translatedType err = env.AddVariable(paramName, *translatedType) if err != nil { - return nil, paramNode.ErrorWithSourcef(paramName, "invalid type for caveat parameter `%s` on caveat `%s`: %w", paramName, definitionName, err) + return nil, paramNode.WithSourceErrorf(paramName, "invalid type for caveat parameter `%s` on caveat `%s`: %w", paramName, definitionName, err) } } @@ -164,27 +164,27 @@ func translateCaveatDefinition(tctx translationContext, defNode *dslNode) (*core // caveat expression. expressionStringNode, err := defNode.Lookup(dslshape.NodeCaveatDefinitionPredicateExpession) if err != nil { - return nil, defNode.ErrorWithSourcef(definitionName, "invalid expression: %w", err) + return nil, defNode.WithSourceErrorf(definitionName, "invalid expression: %w", err) } expressionString, err := expressionStringNode.GetString(dslshape.NodeCaveatExpressionPredicateExpression) if err != nil { - return nil, defNode.ErrorWithSourcef(expressionString, "invalid expression: %w", err) + return nil, defNode.WithSourceErrorf(expressionString, "invalid expression: %w", err) } rnge, err := expressionStringNode.Range(tctx.mapper) if err != nil { - return nil, defNode.ErrorWithSourcef(expressionString, "invalid expression: %w", err) + return nil, defNode.WithSourceErrorf(expressionString, "invalid expression: %w", err) } source, err := caveats.NewSource(expressionString, caveatPath) if err != nil { - return nil, defNode.ErrorWithSourcef(expressionString, "invalid expression: %w", err) + return nil, defNode.WithSourceErrorf(expressionString, "invalid expression: %w", err) } compiled, err := caveats.CompileCaveatWithSource(env, caveatPath, source, rnge.Start()) if err != nil { - return nil, expressionStringNode.ErrorWithSourcef(expressionString, "invalid expression for caveat `%s`: %w", definitionName, err) + return nil, expressionStringNode.WithSourceErrorf(expressionString, "invalid expression for caveat `%s`: %w", definitionName, err) } def, err := namespace.CompiledCaveatDefinition(env, caveatPath, compiled) @@ -200,7 +200,7 @@ func translateCaveatDefinition(tctx translationContext, defNode *dslNode) (*core func translateCaveatTypeReference(tctx translationContext, typeRefNode *dslNode) (*caveattypes.VariableType, error) { typeName, err := typeRefNode.GetString(dslshape.NodeCaveatTypeReferencePredicateType) if err != nil { - return nil, typeRefNode.ErrorWithSourcef(typeName, "invalid type name: %w", err) + return nil, typeRefNode.WithSourceErrorf(typeName, "invalid type name: %w", err) } childTypeNodes := typeRefNode.List(dslshape.NodeCaveatTypeReferencePredicateChildTypes) @@ -215,7 +215,7 @@ func translateCaveatTypeReference(tctx translationContext, typeRefNode *dslNode) constructedType, err := caveattypes.BuildType(typeName, childTypes) if err != nil { - return nil, typeRefNode.ErrorWithSourcef(typeName, "%w", err) + return nil, typeRefNode.WithSourceErrorf(typeName, "%w", err) } return constructedType, nil @@ -224,7 +224,7 @@ func translateCaveatTypeReference(tctx translationContext, typeRefNode *dslNode) func translateObjectDefinition(tctx translationContext, defNode *dslNode) (*core.NamespaceDefinition, error) { definitionName, err := defNode.GetString(dslshape.NodeDefinitionPredicateName) if err != nil { - return nil, defNode.ErrorWithSourcef(definitionName, "invalid definition name: %w", err) + return nil, defNode.WithSourceErrorf(definitionName, "invalid definition name: %w", err) } relationsAndPermissions := []*core.Relation{} @@ -719,10 +719,10 @@ func translateImport(tctx translationContext, importNode *dslNode, names *mapz.S locallyVisitedFiles: tctx.locallyVisitedFiles, }) if err != nil { - var circularImportError *ErrCircularImport + var circularImportError *CircularImportError if errors.As(err, &circularImportError) { - // NOTE: The "%s" is an empty format string to keep with the form of ErrorWithSourcef - return nil, importNode.ErrorWithSourcef(circularImportError.filePath, "%s", circularImportError.error.Error()) + // NOTE: The "%s" is an empty format string to keep with the form of WithSourceErrorf + return nil, importNode.WithSourceErrorf(circularImportError.filePath, "%s", circularImportError.error.Error()) } return nil, err } diff --git a/pkg/cursor/errors.go b/pkg/cursor/errors.go index afb47628ae..941df70571 100644 --- a/pkg/cursor/errors.go +++ b/pkg/cursor/errors.go @@ -23,13 +23,13 @@ var ErrNilCursor = errors.New("cursor pointer was nil") // ErrHashMismatch is returned as the base error when a mismatching hash was given to the decoder. var ErrHashMismatch = errors.New("the cursor provided does not have the same arguments as the original API call; please ensure you are making the same API call, with the exact same parameters (besides the cursor)") -// ErrInvalidCursor occurs when a cursor could not be decoded. -type ErrInvalidCursor struct { +// InvalidCursorError occurs when a cursor could not be decoded. +type InvalidCursorError struct { error } // GRPCStatus implements retrieving the gRPC status for the error. -func (err ErrInvalidCursor) GRPCStatus() *status.Status { +func (err InvalidCursorError) GRPCStatus() *status.Status { return spiceerrors.WithCodeAndDetails( err, codes.InvalidArgument, @@ -42,5 +42,5 @@ func (err ErrInvalidCursor) GRPCStatus() *status.Status { // NewInvalidCursorErr creates and returns a new invalid cursor error. func NewInvalidCursorErr(err error) error { - return ErrInvalidCursor{err} + return InvalidCursorError{err} } diff --git a/pkg/datastore/caveat.go b/pkg/datastore/caveat.go index 4d1cbda483..51ced8d3e2 100644 --- a/pkg/datastore/caveat.go +++ b/pkg/datastore/caveat.go @@ -12,7 +12,7 @@ type RevisionedCaveat = RevisionedDefinition[*core.CaveatDefinition] // CaveatReader offers read operations for caveats type CaveatReader interface { // ReadCaveatByName returns a caveat with the provided name. - // It returns an instance of ErrCaveatNotFound if not found. + // It returns an instance of CaveatNotFoundError if not found. ReadCaveatByName(ctx context.Context, name string) (caveat *core.CaveatDefinition, lastWritten Revision, err error) // ListAllCaveats returns all caveats stored in the system. diff --git a/pkg/datastore/datastore.go b/pkg/datastore/datastore.go index 9e53e4a4dc..0174f8dadc 100644 --- a/pkg/datastore/datastore.go +++ b/pkg/datastore/datastore.go @@ -431,7 +431,7 @@ type Reader interface { ) (RelationshipIterator, error) // ReadNamespaceByName reads a namespace definition and the revision at which it was created or - // last written. It returns an instance of ErrNamespaceNotFound if not found. + // last written. It returns an instance of NamespaceNotFoundError if not found. ReadNamespaceByName(ctx context.Context, nsName string) (ns *core.NamespaceDefinition, lastWritten Revision, err error) // ListAllNamespaces lists all namespaces defined. diff --git a/pkg/datastore/errors.go b/pkg/datastore/errors.go index d5f1313a00..84057d57e6 100644 --- a/pkg/datastore/errors.go +++ b/pkg/datastore/errors.go @@ -14,52 +14,52 @@ type ErrNotFound interface { IsNotFoundError() bool } -// ErrNamespaceNotFound occurs when a namespace was not found. -type ErrNamespaceNotFound struct { +// NamespaceNotFoundError occurs when a namespace was not found. +type NamespaceNotFoundError struct { error namespaceName string } -var _ ErrNotFound = ErrNamespaceNotFound{} +var _ ErrNotFound = NamespaceNotFoundError{} -func (err ErrNamespaceNotFound) IsNotFoundError() bool { +func (err NamespaceNotFoundError) IsNotFoundError() bool { return true } // NotFoundNamespaceName is the name of the namespace not found. -func (err ErrNamespaceNotFound) NotFoundNamespaceName() string { +func (err NamespaceNotFoundError) NotFoundNamespaceName() string { return err.namespaceName } // MarshalZerologObject implements zerolog object marshalling. -func (err ErrNamespaceNotFound) MarshalZerologObject(e *zerolog.Event) { +func (err NamespaceNotFoundError) MarshalZerologObject(e *zerolog.Event) { e.Err(err.error).Str("namespace", err.namespaceName) } // DetailsMetadata returns the metadata for details for this error. -func (err ErrNamespaceNotFound) DetailsMetadata() map[string]string { +func (err NamespaceNotFoundError) DetailsMetadata() map[string]string { return map[string]string{ "definition_name": err.namespaceName, } } -// ErrWatchDisconnected occurs when a watch has fallen too far behind and was forcibly disconnected +// WatchDisconnectedError occurs when a watch has fallen too far behind and was forcibly disconnected // as a result. -type ErrWatchDisconnected struct{ error } +type WatchDisconnectedError struct{ error } -// ErrWatchCanceled occurs when a watch was canceled by the caller. -type ErrWatchCanceled struct{ error } +// WatchCanceledError occurs when a watch was canceled by the caller. +type WatchCanceledError struct{ error } -// ErrWatchDisabled occurs when watch is disabled by being unsupported by the datastore. -type ErrWatchDisabled struct{ error } +// WatchDisabledError occurs when watch is disabled by being unsupported by the datastore. +type WatchDisabledError struct{ error } -// ErrReadOnly is returned when the operation cannot be completed because the datastore is in +// ReadOnlyError is returned when the operation cannot be completed because the datastore is in // read-only mode. -type ErrReadOnly struct{ error } +type ReadOnlyError struct{ error } -// ErrWatchRetryable is returned when a transient/temporary error occurred in watch and indicates that +// WatchRetryableError is returned when a transient/temporary error occurred in watch and indicates that // the caller *may* retry the watch after some backoff time. -type ErrWatchRetryable struct{ error } +type WatchRetryableError struct{ error } // InvalidRevisionReason is the reason the revision could not be used. type InvalidRevisionReason int @@ -74,25 +74,25 @@ const ( CouldNotDetermineRevision ) -// ErrInvalidRevision occurs when a revision specified to a call was invalid. -type ErrInvalidRevision struct { +// InvalidRevisionError occurs when a revision specified to a call was invalid. +type InvalidRevisionError struct { error revision Revision reason InvalidRevisionReason } // InvalidRevision is the revision that failed. -func (err ErrInvalidRevision) InvalidRevision() Revision { +func (err InvalidRevisionError) InvalidRevision() Revision { return err.revision } // Reason is the reason the revision failed. -func (err ErrInvalidRevision) Reason() InvalidRevisionReason { +func (err InvalidRevisionError) Reason() InvalidRevisionReason { return err.reason } // MarshalZerologObject implements zerolog object marshalling. -func (err ErrInvalidRevision) MarshalZerologObject(e *zerolog.Event) { +func (err InvalidRevisionError) MarshalZerologObject(e *zerolog.Event) { switch err.reason { case RevisionStale: e.Err(err.error).Str("reason", "stale") @@ -105,7 +105,7 @@ func (err ErrInvalidRevision) MarshalZerologObject(e *zerolog.Event) { // NewNamespaceNotFoundErr constructs a new namespace not found error. func NewNamespaceNotFoundErr(nsName string) error { - return ErrNamespaceNotFound{ + return NamespaceNotFoundError{ error: fmt.Errorf("object definition `%s` not found", nsName), namespaceName: nsName, } @@ -113,21 +113,21 @@ func NewNamespaceNotFoundErr(nsName string) error { // NewWatchDisconnectedErr constructs a new watch was disconnected error. func NewWatchDisconnectedErr() error { - return ErrWatchDisconnected{ + return WatchDisconnectedError{ error: fmt.Errorf("watch fell too far behind and was disconnected; consider increasing watch buffer size via the flag --datastore-watch-buffer-length"), } } // NewWatchCanceledErr constructs a new watch was canceled error. func NewWatchCanceledErr() error { - return ErrWatchCanceled{ + return WatchCanceledError{ error: fmt.Errorf("watch was canceled by the caller"), } } // NewWatchDisabledErr constructs a new watch is disabled error. func NewWatchDisabledErr(reason string) error { - return ErrWatchDisabled{ + return WatchDisabledError{ error: fmt.Errorf("watch is currently disabled: %s", reason), } } @@ -135,7 +135,7 @@ func NewWatchDisabledErr(reason string) error { // NewWatchTemporaryErr wraps another error in watch, indicating that the error is likely // a temporary condition and clients may consider retrying by calling watch again (vs a fatal error). func NewWatchTemporaryErr(wrapped error) error { - return ErrWatchRetryable{ + return WatchRetryableError{ error: fmt.Errorf("watch has failed with a temporary condition: %w. please retry the watch", wrapped), } } @@ -143,7 +143,7 @@ func NewWatchTemporaryErr(wrapped error) error { // NewReadonlyErr constructs an error for when a request has failed because // the datastore has been configured to be read-only. func NewReadonlyErr() error { - return ErrReadOnly{ + return ReadOnlyError{ error: fmt.Errorf("datastore is in read-only mode"), } } @@ -152,14 +152,14 @@ func NewReadonlyErr() error { func NewInvalidRevisionErr(revision Revision, reason InvalidRevisionReason) error { switch reason { case RevisionStale: - return ErrInvalidRevision{ + return InvalidRevisionError{ error: fmt.Errorf("revision has expired"), revision: revision, reason: reason, } default: - return ErrInvalidRevision{ + return InvalidRevisionError{ error: fmt.Errorf("revision was invalid"), revision: revision, reason: reason, @@ -167,61 +167,61 @@ func NewInvalidRevisionErr(revision Revision, reason InvalidRevisionReason) erro } } -// ErrCaveatNameNotFound is the error returned when a caveat is not found by its name -type ErrCaveatNameNotFound struct { +// CaveatNameNotFoundError is the error returned when a caveat is not found by its name +type CaveatNameNotFoundError struct { error name string } -var _ ErrNotFound = ErrCaveatNameNotFound{} +var _ ErrNotFound = CaveatNameNotFoundError{} -func (err ErrCaveatNameNotFound) IsNotFoundError() bool { +func (err CaveatNameNotFoundError) IsNotFoundError() bool { return true } // CaveatName returns the name of the caveat that couldn't be found -func (err ErrCaveatNameNotFound) CaveatName() string { +func (err CaveatNameNotFoundError) CaveatName() string { return err.name } // NewCaveatNameNotFoundErr constructs a new caveat name not found error. func NewCaveatNameNotFoundErr(name string) error { - return ErrCaveatNameNotFound{ + return CaveatNameNotFoundError{ error: fmt.Errorf("caveat with name `%s` not found", name), name: name, } } // DetailsMetadata returns the metadata for details for this error. -func (err ErrCaveatNameNotFound) DetailsMetadata() map[string]string { +func (err CaveatNameNotFoundError) DetailsMetadata() map[string]string { return map[string]string{ "caveat_name": err.name, } } -// ErrCounterNotRegistered indicates that a counter was not registered. -type ErrCounterNotRegistered struct { +// CounterNotRegisteredError indicates that a counter was not registered. +type CounterNotRegisteredError struct { error counterName string } // NewCounterNotRegisteredErr constructs a new counter not registered error. func NewCounterNotRegisteredErr(counterName string) error { - return ErrCounterNotRegistered{ + return CounterNotRegisteredError{ error: fmt.Errorf("counter with name `%s` not found", counterName), counterName: counterName, } } // DetailsMetadata returns the metadata for details for this error. -func (err ErrCounterNotRegistered) DetailsMetadata() map[string]string { +func (err CounterNotRegisteredError) DetailsMetadata() map[string]string { return map[string]string{ "counter_name": err.counterName, } } -// ErrCounterAlreadyRegistered indicates that a counter was already registered. -type ErrCounterAlreadyRegistered struct { +// CounterAlreadyRegisteredError indicates that a counter was already registered. +type CounterAlreadyRegisteredError struct { error counterName string @@ -230,7 +230,7 @@ type ErrCounterAlreadyRegistered struct { // NewCounterAlreadyRegisteredErr constructs a new filter not registered error. func NewCounterAlreadyRegisteredErr(counterName string, filter *core.RelationshipFilter) error { - return ErrCounterAlreadyRegistered{ + return CounterAlreadyRegisteredError{ error: fmt.Errorf("counter with name `%s` already registered", counterName), counterName: counterName, filter: filter, @@ -238,7 +238,7 @@ func NewCounterAlreadyRegisteredErr(counterName string, filter *core.Relationshi } // DetailsMetadata returns the metadata for details for this error. -func (err ErrCounterAlreadyRegistered) DetailsMetadata() map[string]string { +func (err CounterAlreadyRegisteredError) DetailsMetadata() map[string]string { subjectType := "" subjectID := "" subjectRelation := "" diff --git a/pkg/datastore/test/caveat.go b/pkg/datastore/test/caveat.go index 0e4db51c9b..cf51ce5c1d 100644 --- a/pkg/datastore/test/caveat.go +++ b/pkg/datastore/test/caveat.go @@ -36,7 +36,7 @@ func CaveatNotFoundTest(t *testing.T, tester DatastoreTester) { require.NoError(err) _, _, err = ds.SnapshotReader(startRevision).ReadCaveatByName(ctx, "unknown") - require.True(errors.As(err, &datastore.ErrCaveatNameNotFound{})) + require.True(errors.As(err, &datastore.CaveatNameNotFoundError{})) } func WriteReadDeleteCaveatTest(t *testing.T, tester DatastoreTester) { @@ -119,11 +119,11 @@ func WriteReadDeleteCaveatTest(t *testing.T, tester DatastoreTester) { req.NoError(err) cr = ds.SnapshotReader(rev) _, _, err = cr.ReadCaveatByName(ctx, coreCaveat.Name) - req.ErrorAs(err, &datastore.ErrCaveatNameNotFound{}) + req.ErrorAs(err, &datastore.CaveatNameNotFoundError{}) // Returns an error if caveat name or ID does not exist _, _, err = cr.ReadCaveatByName(ctx, "doesnotexist") - req.ErrorAs(err, &datastore.ErrCaveatNameNotFound{}) + req.ErrorAs(err, &datastore.CaveatNameNotFoundError{}) } func WriteCaveatedRelationshipTest(t *testing.T, tester DatastoreTester) { @@ -377,7 +377,7 @@ func skipIfNotCaveatStorer(t *testing.T, ds datastore.Datastore) { ctx := context.Background() _, _ = ds.ReadWriteTx(ctx, func(ctx context.Context, transaction datastore.ReadWriteTransaction) error { // nolint: errcheck _, _, err := transaction.ReadCaveatByName(ctx, uuid.NewString()) - if !errors.As(err, &datastore.ErrCaveatNameNotFound{}) { + if !errors.As(err, &datastore.CaveatNameNotFoundError{}) { t.Skip("datastore does not implement CaveatStorer interface") } return fmt.Errorf("force rollback of unnecesary tx") diff --git a/pkg/datastore/test/namespace.go b/pkg/datastore/test/namespace.go index 7207afe866..9cca0b6e5d 100644 --- a/pkg/datastore/test/namespace.go +++ b/pkg/datastore/test/namespace.go @@ -44,7 +44,7 @@ func NamespaceNotFoundTest(t *testing.T, tester DatastoreTester) { require.NoError(err) _, _, err = ds.SnapshotReader(startRevision).ReadNamespaceByName(ctx, "unknown") - require.True(errors.As(err, &datastore.ErrNamespaceNotFound{})) + require.True(errors.As(err, &datastore.NamespaceNotFoundError{})) } // NamespaceWriteTest tests whether or not the requirements for writing @@ -167,7 +167,7 @@ func NamespaceDeleteTest(t *testing.T, tester DatastoreTester) { require.True(deletedRev.GreaterThan(revision)) _, _, err = ds.SnapshotReader(deletedRev).ReadNamespaceByName(ctx, testfixtures.DocumentNS.Name) - require.True(errors.As(err, &datastore.ErrNamespaceNotFound{})) + require.True(errors.As(err, &datastore.NamespaceNotFoundError{})) found, nsCreatedRev, err := ds.SnapshotReader(deletedRev).ReadNamespaceByName(ctx, testfixtures.FolderNS.Name) require.NotNil(found) @@ -234,7 +234,7 @@ func EmptyNamespaceDeleteTest(t *testing.T, tester DatastoreTester) { require.True(deletedRev.GreaterThan(revision)) _, _, err = ds.SnapshotReader(deletedRev).ReadNamespaceByName(ctx, testfixtures.UserNS.Name) - require.True(errors.As(err, &datastore.ErrNamespaceNotFound{})) + require.True(errors.As(err, &datastore.NamespaceNotFoundError{})) } // StableNamespaceReadWriteTest tests writing a namespace to the datastore and reading it back, diff --git a/pkg/datastore/test/relationships.go b/pkg/datastore/test/relationships.go index 0c64f12dd8..1d7dd31557 100644 --- a/pkg/datastore/test/relationships.go +++ b/pkg/datastore/test/relationships.go @@ -451,7 +451,7 @@ func InvalidReadsTest(t *testing.T, tester DatastoreTester) { // Check that we get an error when there are no revisions err = ds.CheckRevision(ctx, datastore.NoRevision) - revisionErr := datastore.ErrInvalidRevision{} + revisionErr := datastore.InvalidRevisionError{} require.True(errors.As(err, &revisionErr)) newRel := makeTestRel("one", "one") diff --git a/pkg/datastore/test/watch.go b/pkg/datastore/test/watch.go index e7e3edcb11..e36b02973b 100644 --- a/pkg/datastore/test/watch.go +++ b/pkg/datastore/test/watch.go @@ -153,10 +153,10 @@ func VerifyUpdates( errWait := time.NewTimer(waitForChangesTimeout) select { case err := <-errchan: - require.True(errors.As(err, &datastore.ErrWatchDisconnected{})) + require.True(errors.As(err, &datastore.WatchDisconnectedError{})) return case <-errWait.C: - require.Fail("Timed out waiting for ErrWatchDisconnected") + require.Fail("Timed out waiting for WatchDisconnectedError") } return } @@ -195,10 +195,10 @@ func VerifyUpdatesWithMetadata( errWait := time.NewTimer(waitForChangesTimeout) select { case err := <-errchan: - require.True(errors.As(err, &datastore.ErrWatchDisconnected{})) + require.True(errors.As(err, &datastore.WatchDisconnectedError{})) return case <-errWait.C: - require.Fail("Timed out waiting for ErrWatchDisconnected") + require.Fail("Timed out waiting for WatchDisconnectedError") } return } @@ -266,10 +266,10 @@ func WatchCancelTest(t *testing.T, tester DatastoreTester) { require.Zero(created) select { case err := <-errchan: - require.True(errors.As(err, &datastore.ErrWatchCanceled{})) + require.True(errors.As(err, &datastore.WatchCanceledError{})) return case <-errWait.C: - require.Fail("Timed out waiting for ErrWatchCanceled") + require.Fail("Timed out waiting for WatchCanceledError") } return } @@ -506,10 +506,10 @@ func verifyNoUpdates( errWait := time.NewTimer(waitForChangesTimeout) select { case err := <-errchan: - require.True(errors.As(err, &datastore.ErrWatchDisconnected{})) + require.True(errors.As(err, &datastore.WatchDisconnectedError{})) return case <-errWait.C: - require.Fail("Timed out waiting for ErrWatchDisconnected") + require.Fail("Timed out waiting for WatchDisconnectedError") } return } @@ -674,10 +674,10 @@ func verifyMixedUpdates( errWait := time.NewTimer(waitForChangesTimeout) select { case err := <-errchan: - require.True(errors.As(err, &datastore.ErrWatchDisconnected{})) + require.True(errors.As(err, &datastore.WatchDisconnectedError{})) return case <-errWait.C: - require.Fail("Timed out waiting for ErrWatchDisconnected") + require.Fail("Timed out waiting for WatchDisconnectedError") } return } diff --git a/pkg/development/devcontext.go b/pkg/development/devcontext.go index ac7a74727c..f15357f917 100644 --- a/pkg/development/devcontext.go +++ b/pkg/development/devcontext.go @@ -97,7 +97,7 @@ func newDevContextWithDatastore(ctx context.Context, requestContext *devinterfac Message: err.Error(), Source: devinterface.DeveloperError_RELATIONSHIP, Kind: devinterface.DeveloperError_PARSE_ERROR, - Context: tuple.CoreRelationToStringWithoutCaveat(rel), + Context: tuple.CoreRelationToStringWithoutCaveatOrExpiration(rel), }) } @@ -262,7 +262,7 @@ func loadCompiled( continue } - errWithSource, ok := spiceerrors.AsErrorWithSource(cverr) + errWithSource, ok := spiceerrors.AsWithSourceError(cverr) if ok { // NOTE: zeroes are fine here to mean "unknown" lineNumber, err := safecast.ToUint32(errWithSource.LineNumber) @@ -294,7 +294,7 @@ func loadCompiled( for _, nsDef := range compiled.ObjectDefinitions { ts, terr := typesystem.NewNamespaceTypeSystem(nsDef, resolver) if terr != nil { - errWithSource, ok := spiceerrors.AsErrorWithSource(terr) + errWithSource, ok := spiceerrors.AsWithSourceError(terr) // NOTE: zeroes are fine here to mean "unknown" lineNumber, err := safecast.ToUint32(errWithSource.LineNumber) if err != nil { @@ -333,7 +333,7 @@ func loadCompiled( continue } - errWithSource, ok := spiceerrors.AsErrorWithSource(tverr) + errWithSource, ok := spiceerrors.AsWithSourceError(tverr) if ok { // NOTE: zeroes are fine here to mean "unknown" lineNumber, err := safecast.ToUint32(errWithSource.LineNumber) @@ -374,7 +374,7 @@ func DistinguishGraphError(devContext *DevContext, dispatchError error, source d func distinguishGraphError(ctx context.Context, dispatchError error, source devinterface.DeveloperError_Source, line uint32, column uint32, context string) (*devinterface.DeveloperError, error) { var nsNotFoundError sharederrors.UnknownNamespaceError var relNotFoundError sharederrors.UnknownRelationError - var invalidRelError relationships.ErrInvalidSubjectType + var invalidRelError relationships.InvalidSubjectTypeError var maxDepthErr dispatch.MaxDepthExceededError if errors.As(dispatchError, &maxDepthErr) { @@ -447,13 +447,13 @@ func rewriteACLError(ctx context.Context, err error) error { case errors.As(err, &relNotFoundError): fallthrough - case errors.As(err, &datastore.ErrInvalidRevision{}): + case errors.As(err, &datastore.InvalidRevisionError{}): return status.Errorf(codes.OutOfRange, "invalid zookie: %s", err) - case errors.As(err, &maingraph.ErrRelationMissingTypeInfo{}): + case errors.As(err, &maingraph.RelationMissingTypeInfoError{}): return status.Errorf(codes.FailedPrecondition, "failed precondition: %s", err) - case errors.As(err, &maingraph.ErrAlwaysFail{}): + case errors.As(err, &maingraph.AlwaysFailError{}): log.Ctx(ctx).Err(err).Msg("internal graph error in devcontext") return status.Errorf(codes.Internal, "internal error: %s", err) diff --git a/pkg/development/parsing.go b/pkg/development/parsing.go index e7d69f433b..75e27c8ff1 100644 --- a/pkg/development/parsing.go +++ b/pkg/development/parsing.go @@ -14,7 +14,7 @@ import ( func ParseAssertionsYAML(assertionsYaml string) (*blocks.Assertions, *devinterface.DeveloperError) { assertions, err := validationfile.ParseAssertionsBlock([]byte(assertionsYaml)) if err != nil { - serr, ok := spiceerrors.AsErrorWithSource(err) + serr, ok := spiceerrors.AsWithSourceError(err) if ok { return nil, convertSourceError(devinterface.DeveloperError_ASSERTION, serr) } @@ -27,7 +27,7 @@ func ParseAssertionsYAML(assertionsYaml string) (*blocks.Assertions, *devinterfa func ParseExpectedRelationsYAML(expectedRelationsYaml string) (*blocks.ParsedExpectedRelations, *devinterface.DeveloperError) { block, err := validationfile.ParseExpectedRelationsBlock([]byte(expectedRelationsYaml)) if err != nil { - serr, ok := spiceerrors.AsErrorWithSource(err) + serr, ok := spiceerrors.AsWithSourceError(err) if ok { return nil, convertSourceError(devinterface.DeveloperError_VALIDATION_YAML, serr) } @@ -48,7 +48,7 @@ func convertError(source devinterface.DeveloperError_Source, err error) *devinte } } -func convertSourceError(source devinterface.DeveloperError_Source, err *spiceerrors.ErrorWithSource) *devinterface.DeveloperError { +func convertSourceError(source devinterface.DeveloperError_Source, err *spiceerrors.WithSourceError) *devinterface.DeveloperError { // NOTE: zeroes are fine here to mean "unknown" lineNumber, castErr := safecast.ToUint32(err.LineNumber) if castErr != nil { diff --git a/pkg/development/schema.go b/pkg/development/schema.go index 3de3c64e26..0e5045196e 100644 --- a/pkg/development/schema.go +++ b/pkg/development/schema.go @@ -20,7 +20,7 @@ func CompileSchema(schema string) (*compiler.CompiledSchema, *devinterface.Devel SchemaString: schema, }, compiler.AllowUnprefixedObjectType()) - var contextError compiler.ErrorWithContext + var contextError compiler.WithContextError if errors.As(err, &contextError) { line, col, lerr := contextError.SourceRange.Start().LineAndColumn() if lerr != nil { diff --git a/pkg/middleware/consistency/consistency.go b/pkg/middleware/consistency/consistency.go index 43895b7973..f5630ea9a4 100644 --- a/pkg/middleware/consistency/consistency.go +++ b/pkg/middleware/consistency/consistency.go @@ -264,10 +264,10 @@ func rewriteDatastoreError(ctx context.Context, err error) error { } switch { - case errors.As(err, &datastore.ErrInvalidRevision{}): + case errors.As(err, &datastore.InvalidRevisionError{}): return status.Errorf(codes.OutOfRange, "invalid revision: %s", err) - case errors.As(err, &datastore.ErrReadOnly{}): + case errors.As(err, &datastore.ReadOnlyError{}): return shared.ErrServiceReadOnly default: diff --git a/pkg/proto/core/v1/core.pb.go b/pkg/proto/core/v1/core.pb.go index 1ca8b3e394..56ce0f7b95 100644 --- a/pkg/proto/core/v1/core.pb.go +++ b/pkg/proto/core/v1/core.pb.go @@ -399,6 +399,8 @@ type RelationTuple struct { Caveat *ContextualizedCaveat `protobuf:"bytes,3,opt,name=caveat,proto3" json:"caveat,omitempty"` // * integrity holds (optional) information about the integrity of the tuple Integrity *RelationshipIntegrity `protobuf:"bytes,4,opt,name=integrity,proto3" json:"integrity,omitempty"` + // * optional_expiration_time is the (optional) time at which the tuple expires + OptionalExpirationTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=optional_expiration_time,json=optionalExpirationTime,proto3" json:"optional_expiration_time,omitempty"` } func (x *RelationTuple) Reset() { @@ -461,6 +463,13 @@ func (x *RelationTuple) GetIntegrity() *RelationshipIntegrity { return nil } +func (x *RelationTuple) GetOptionalExpirationTime() *timestamppb.Timestamp { + if x != nil { + return x.OptionalExpirationTime + } + return nil +} + type RelationshipIntegrity struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3082,7 +3091,7 @@ var file_core_v1_core_proto_rawDesc = []byte{ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0xb2, 0x02, 0x0a, 0x0d, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, + 0x22, 0x88, 0x03, 0x0a, 0x0d, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x12, 0x58, 0x0a, 0x15, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, @@ -3101,561 +3110,567 @@ var file_core_v1_core_proto_rawDesc = []byte{ 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x69, 0x74, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x00, 0x52, 0x09, 0x69, 0x6e, 0x74, 0x65, - 0x67, 0x72, 0x69, 0x74, 0x79, 0x22, 0x7b, 0x0a, 0x15, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x68, 0x69, 0x70, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x69, 0x74, 0x79, 0x12, 0x15, - 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x37, 0x0a, 0x09, 0x68, 0x61, 0x73, - 0x68, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x08, 0x68, 0x61, 0x73, 0x68, 0x65, 0x64, - 0x41, 0x74, 0x22, 0xab, 0x01, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x75, 0x61, - 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x12, 0x56, 0x0a, 0x0b, 0x63, - 0x61, 0x76, 0x65, 0x61, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x35, 0xfa, 0x42, 0x32, 0x72, 0x30, 0x28, 0x80, 0x01, 0x32, 0x2b, 0x5e, 0x28, 0x28, 0x5b, - 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, - 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2f, 0x5f, 0x7c, 0x2d, 0x5d, 0x7b, 0x30, 0x2c, 0x31, 0x32, 0x37, - 0x7d, 0x29, 0x7c, 0x5c, 0x2a, 0x29, 0x24, 0x52, 0x0a, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x00, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x22, 0xd4, 0x03, 0x0a, 0x10, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x44, 0x65, 0x66, 0x69, 0x6e, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x35, 0xfa, 0x42, 0x32, 0x72, 0x30, 0x28, 0x80, 0x01, 0x32, 0x2b, 0x5e, - 0x28, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x5b, 0x61, - 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2f, 0x5f, 0x7c, 0x2d, 0x5d, 0x7b, 0x30, 0x2c, - 0x31, 0x32, 0x37, 0x7d, 0x29, 0x7c, 0x5c, 0x2a, 0x29, 0x24, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x3f, 0x0a, 0x15, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x65, - 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, - 0x0a, 0xfa, 0x42, 0x07, 0x7a, 0x05, 0x10, 0x00, 0x18, 0x80, 0x20, 0x52, 0x14, 0x73, 0x65, 0x72, - 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x62, 0x0a, 0x0f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x44, 0x65, 0x66, 0x69, 0x6e, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x54, - 0x79, 0x70, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x9a, 0x01, - 0x04, 0x08, 0x01, 0x10, 0x14, 0x52, 0x0e, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x5f, 0x0a, 0x13, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x32, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x7d, 0x0a, 0x13, 0x43, 0x61, 0x76, 0x65, 0x61, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1b, - 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x49, 0x0a, 0x0b, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x76, 0x65, 0x61, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x0a, - 0xfa, 0x42, 0x07, 0x92, 0x01, 0x04, 0x08, 0x00, 0x10, 0x01, 0x52, 0x0a, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x91, 0x02, 0x0a, 0x11, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x66, 0x0a, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x48, 0xfa, 0x42, 0x45, 0x72, 0x43, 0x28, 0x80, 0x01, 0x32, 0x3e, 0x5e, 0x28, 0x5b, 0x61, 0x2d, - 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x31, - 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2f, 0x29, 0x2a, 0x5b, 0x61, 0x2d, 0x7a, - 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, - 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x24, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x12, 0x46, 0x0a, 0x09, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xfa, 0x42, 0x26, 0x72, 0x24, 0x28, 0x80, - 0x08, 0x32, 0x1f, 0x5e, 0x28, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, - 0x2f, 0x5f, 0x7c, 0x5c, 0x2d, 0x3d, 0x2b, 0x5d, 0x7b, 0x31, 0x2c, 0x7d, 0x29, 0x7c, 0x5c, 0x2a, - 0x29, 0x24, 0x52, 0x08, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x4c, 0x0a, 0x08, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, - 0xfa, 0x42, 0x2d, 0x72, 0x2b, 0x28, 0x40, 0x32, 0x27, 0x5e, 0x28, 0x5c, 0x2e, 0x5c, 0x2e, 0x5c, - 0x2e, 0x7c, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, - 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x24, - 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xc9, 0x01, 0x0a, 0x11, 0x52, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, - 0x12, 0x66, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x48, 0xfa, 0x42, 0x45, 0x72, 0x43, 0x28, 0x80, 0x01, 0x32, 0x3e, 0x5e, - 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, - 0x31, 0x2c, 0x36, 0x31, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2f, 0x29, 0x2a, - 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, - 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x24, 0x52, 0x09, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xfa, 0x42, 0x2d, 0x72, - 0x2b, 0x28, 0x40, 0x32, 0x27, 0x5e, 0x28, 0x5c, 0x2e, 0x5c, 0x2e, 0x5c, 0x2e, 0x7c, 0x5b, 0x61, - 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, - 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x24, 0x52, 0x08, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x27, 0x0a, 0x06, 0x5a, 0x6f, 0x6f, 0x6b, 0x69, 0x65, - 0x12, 0x1d, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, - 0xda, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, - 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x4e, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, - 0x6c, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, 0x6f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x05, 0x74, 0x75, 0x70, 0x6c, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x22, - 0x3b, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0b, 0x0a, 0x07, - 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x52, 0x45, - 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x54, 0x4f, 0x55, 0x43, 0x48, 0x10, 0x02, - 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x03, 0x22, 0xa9, 0x02, 0x0a, - 0x15, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x72, - 0x65, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x4b, 0x0a, 0x11, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6d, - 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x48, - 0x00, 0x52, 0x10, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x4e, - 0x6f, 0x64, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x6c, 0x65, 0x61, 0x66, 0x5f, 0x6e, 0x6f, 0x64, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x48, - 0x00, 0x52, 0x08, 0x6c, 0x65, 0x61, 0x66, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x36, 0x0a, 0x08, 0x65, - 0x78, 0x70, 0x61, 0x6e, 0x64, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6e, - 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x65, 0x78, 0x70, 0x61, 0x6e, - 0x64, 0x65, 0x64, 0x12, 0x46, 0x0a, 0x11, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x5f, 0x65, 0x78, - 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x45, - 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x63, 0x61, 0x76, 0x65, 0x61, - 0x74, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x0b, 0x0a, 0x09, 0x6e, - 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0xe2, 0x01, 0x0a, 0x13, 0x53, 0x65, 0x74, - 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, - 0x12, 0x44, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, - 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, - 0x74, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x0b, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, - 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, - 0x70, 0x6c, 0x65, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x0a, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x44, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, - 0x00, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x4e, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, - 0x49, 0x4e, 0x54, 0x45, 0x52, 0x53, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x0d, - 0x0a, 0x09, 0x45, 0x58, 0x43, 0x4c, 0x55, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x22, 0x8d, 0x01, - 0x0a, 0x0d, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, - 0x34, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x46, 0x0a, 0x11, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x5f, - 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x76, 0x65, 0x61, - 0x74, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x63, 0x61, 0x76, - 0x65, 0x61, 0x74, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x44, 0x0a, - 0x0e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, - 0x32, 0x0a, 0x08, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x72, 0x65, - 0x63, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x08, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x73, 0x22, 0xb8, 0x01, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x12, 0xab, 0x01, 0x0a, 0x10, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, - 0x79, 0x42, 0x6a, 0xfa, 0x42, 0x67, 0x92, 0x01, 0x64, 0x08, 0x01, 0x22, 0x60, 0x8a, 0x01, 0x02, - 0x10, 0x01, 0xa2, 0x01, 0x58, 0x08, 0x01, 0x12, 0x26, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6d, 0x70, - 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x6f, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, - 0x2c, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6d, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0f, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x93, - 0x02, 0x0a, 0x13, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, - 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x48, 0xfa, 0x42, 0x45, 0x72, 0x43, 0x28, 0x80, 0x01, 0x32, 0x3e, - 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, - 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2f, 0x29, - 0x2a, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, + 0x67, 0x72, 0x69, 0x74, 0x79, 0x12, 0x54, 0x0a, 0x18, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, + 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x16, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x45, 0x78, 0x70, + 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x7b, 0x0a, 0x15, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x49, 0x6e, 0x74, 0x65, 0x67, + 0x72, 0x69, 0x74, 0x79, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x68, + 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, + 0x37, 0x0a, 0x09, 0x68, 0x61, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x08, + 0x68, 0x61, 0x73, 0x68, 0x65, 0x64, 0x41, 0x74, 0x22, 0xab, 0x01, 0x0a, 0x14, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x43, 0x61, 0x76, 0x65, 0x61, + 0x74, 0x12, 0x56, 0x0a, 0x0b, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x35, 0xfa, 0x42, 0x32, 0x72, 0x30, 0x28, 0x80, 0x01, + 0x32, 0x2b, 0x5e, 0x28, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5f, + 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2f, 0x5f, 0x7c, 0x2d, 0x5d, + 0x7b, 0x30, 0x2c, 0x31, 0x32, 0x37, 0x7d, 0x29, 0x7c, 0x5c, 0x2a, 0x29, 0x24, 0x52, 0x0a, 0x63, + 0x61, 0x76, 0x65, 0x61, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x07, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x00, 0x52, 0x07, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0xd4, 0x03, 0x0a, 0x10, 0x43, 0x61, 0x76, 0x65, 0x61, + 0x74, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x35, 0xfa, 0x42, 0x32, 0x72, 0x30, + 0x28, 0x80, 0x01, 0x32, 0x2b, 0x5e, 0x28, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, + 0x2d, 0x39, 0x5f, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2f, 0x5f, + 0x7c, 0x2d, 0x5d, 0x7b, 0x30, 0x2c, 0x31, 0x32, 0x37, 0x7d, 0x29, 0x7c, 0x5c, 0x2a, 0x29, 0x24, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x15, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, + 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x7a, 0x05, 0x10, 0x00, 0x18, 0x80, + 0x20, 0x52, 0x14, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x45, 0x78, 0x70, + 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x62, 0x0a, 0x0f, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2d, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x76, 0x65, 0x61, + 0x74, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, + 0x0a, 0xfa, 0x42, 0x07, 0x9a, 0x01, 0x04, 0x08, 0x01, 0x10, 0x14, 0x52, 0x0e, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x0f, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x5f, 0x0a, 0x13, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x32, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x61, 0x76, 0x65, 0x61, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x63, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x7d, 0x0a, + 0x13, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, + 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x49, 0x0a, 0x0b, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, + 0x65, 0x6e, 0x63, 0x65, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x92, 0x01, 0x04, 0x08, 0x00, 0x10, 0x01, + 0x52, 0x0a, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x91, 0x02, 0x0a, + 0x11, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x66, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x48, 0xfa, 0x42, 0x45, 0x72, 0x43, 0x28, 0x80, 0x01, 0x32, + 0x3e, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, + 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x31, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2f, + 0x29, 0x2a, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, + 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x24, 0x52, + 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x46, 0x0a, 0x09, 0x6f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xfa, + 0x42, 0x26, 0x72, 0x24, 0x28, 0x80, 0x08, 0x32, 0x1f, 0x5e, 0x28, 0x28, 0x5b, 0x61, 0x2d, 0x7a, + 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2f, 0x5f, 0x7c, 0x5c, 0x2d, 0x3d, 0x2b, 0x5d, 0x7b, 0x31, + 0x2c, 0x7d, 0x29, 0x7c, 0x5c, 0x2a, 0x29, 0x24, 0x52, 0x08, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x49, 0x64, 0x12, 0x4c, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xfa, 0x42, 0x2d, 0x72, 0x2b, 0x28, 0x40, 0x32, 0x27, 0x5e, + 0x28, 0x5c, 0x2e, 0x5c, 0x2e, 0x5c, 0x2e, 0x7c, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, + 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, + 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x24, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0xc9, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x48, 0xfa, 0x42, 0x45, 0x72, 0x43, + 0x28, 0x80, 0x01, 0x32, 0x3e, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, + 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x31, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, + 0x2d, 0x39, 0x5d, 0x2f, 0x29, 0x2a, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, + 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, + 0x39, 0x5d, 0x24, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x4c, + 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x30, 0xfa, 0x42, 0x2d, 0x72, 0x2b, 0x28, 0x40, 0x32, 0x27, 0x5e, 0x28, 0x5c, 0x2e, 0x5c, + 0x2e, 0x5c, 0x2e, 0x7c, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, + 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, + 0x29, 0x24, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x27, 0x0a, 0x06, + 0x5a, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x12, 0x1d, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x05, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xda, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x4e, 0x0a, + 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, + 0x10, 0x01, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, + 0x05, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x75, 0x70, 0x6c, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, + 0x74, 0x75, 0x70, 0x6c, 0x65, 0x22, 0x3b, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, + 0x0a, 0x0a, 0x06, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x54, + 0x4f, 0x55, 0x43, 0x48, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, + 0x10, 0x03, 0x22, 0xa9, 0x02, 0x0a, 0x15, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x75, 0x70, 0x6c, 0x65, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x4b, 0x0a, 0x11, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x6f, 0x64, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, + 0x65, 0x72, 0x73, 0x65, 0x74, 0x48, 0x00, 0x52, 0x10, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6d, 0x65, + 0x64, 0x69, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x6c, 0x65, 0x61, + 0x66, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x53, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x48, 0x00, 0x52, 0x08, 0x6c, 0x65, 0x61, 0x66, 0x4e, 0x6f, 0x64, + 0x65, 0x12, 0x36, 0x0a, 0x08, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x65, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x08, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x65, 0x64, 0x12, 0x46, 0x0a, 0x11, 0x63, 0x61, 0x76, + 0x65, 0x61, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x61, 0x76, 0x65, 0x61, 0x74, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x10, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x42, 0x0b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0xe2, + 0x01, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, + 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x12, 0x44, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x0b, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x64, + 0x65, 0x52, 0x0a, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x44, 0x0a, + 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, + 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x4e, 0x49, 0x4f, 0x4e, + 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x53, 0x45, 0x43, 0x54, 0x49, + 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x45, 0x58, 0x43, 0x4c, 0x55, 0x53, 0x49, 0x4f, + 0x4e, 0x10, 0x03, 0x22, 0x8d, 0x01, 0x0a, 0x0d, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x34, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x46, 0x0a, 0x11, 0x63, + 0x61, 0x76, 0x65, 0x61, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x10, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x22, 0x44, 0x0a, 0x0e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x53, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x32, 0x0a, 0x08, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, + 0x08, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x22, 0xb8, 0x01, 0x0a, 0x08, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0xab, 0x01, 0x0a, 0x10, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x6a, 0xfa, 0x42, 0x67, 0x92, 0x01, 0x64, 0x08, + 0x01, 0x22, 0x60, 0x8a, 0x01, 0x02, 0x10, 0x01, 0xa2, 0x01, 0x58, 0x08, 0x01, 0x12, 0x26, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x69, 0x6d, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x6f, 0x63, 0x43, 0x6f, + 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x2c, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6d, 0x70, 0x6c, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x52, 0x0f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x22, 0x93, 0x02, 0x0a, 0x13, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5c, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x48, 0xfa, 0x42, 0x45, 0x72, + 0x43, 0x28, 0x80, 0x01, 0x32, 0x3e, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, + 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, + 0x30, 0x2d, 0x39, 0x5d, 0x2f, 0x29, 0x2a, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, + 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, + 0x2d, 0x39, 0x5d, 0x24, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x08, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x9c, 0x03, 0x0a, 0x08, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xfa, 0x42, 0x24, 0x72, 0x22, 0x28, 0x40, 0x32, 0x1e, + 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x24, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x12, 0x40, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x9c, 0x03, 0x0a, 0x08, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x3b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x27, 0xfa, 0x42, 0x24, 0x72, 0x22, 0x28, 0x40, 0x32, 0x1e, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, - 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, - 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x24, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x40, - 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, - 0x52, 0x0e, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, - 0x12, 0x43, 0x0a, 0x10, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x74, 0x79, 0x70, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x69, - 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x10, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, - 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x11, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x43, 0x61, 0x63, 0x68, 0x65, - 0x4b, 0x65, 0x79, 0x22, 0xf4, 0x03, 0x0a, 0x11, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x79, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x77, 0x0a, 0x1b, 0x65, 0x6e, 0x74, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x5f, + 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x52, + 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x52, 0x0e, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x52, + 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x43, 0x0a, 0x10, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, + 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x74, 0x79, 0x70, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x0f, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x11, + 0x61, 0x6c, 0x69, 0x61, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x61, 0x6e, + 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x6b, 0x65, 0x79, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, + 0x6c, 0x43, 0x61, 0x63, 0x68, 0x65, 0x4b, 0x65, 0x79, 0x22, 0xf4, 0x03, 0x0a, 0x11, 0x52, 0x65, + 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, + 0x77, 0x0a, 0x1b, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x5f, 0x62, + 0x79, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x47, 0x72, 0x61, 0x70, 0x68, + 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x18, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x53, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x83, 0x01, 0x0a, 0x1f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x79, 0x47, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x18, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x83, 0x01, 0x0a, 0x1f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x79, 0x47, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x1c, 0x65, 0x6e, 0x74, 0x72, - 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x6d, 0x0a, 0x1d, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x71, 0x0a, 0x21, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xc6, 0x01, 0x0a, 0x17, 0x52, - 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, - 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0b, 0x65, 0x6e, - 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x45, 0x0a, 0x10, - 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, - 0x63, 0x65, 0x52, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0xce, 0x04, 0x0a, 0x16, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x4e, - 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3a, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x52, 0x65, + 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, + 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x47, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x53, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x1c, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x53, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x6d, + 0x0a, 0x1d, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x53, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x68, + 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x71, 0x0a, + 0x21, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, + 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0xc6, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x0b, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, + 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x52, 0x0b, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, + 0x21, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x45, 0x0a, 0x10, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xce, 0x04, 0x0a, 0x16, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x43, - 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, - 0x6e, 0x63, 0x65, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x5b, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x75, 0x70, - 0x6c, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, - 0x19, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, - 0x74, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x17, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, - 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7a, 0x0a, 0x1a, 0x52, 0x65, 0x61, + 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x4e, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x3a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x45, 0x4c, 0x41, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x10, 0x00, - 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x4f, 0x4d, 0x50, 0x55, 0x54, 0x45, 0x44, 0x5f, 0x55, 0x53, 0x45, - 0x52, 0x53, 0x45, 0x54, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x10, - 0x01, 0x12, 0x22, 0x0a, 0x1e, 0x54, 0x55, 0x50, 0x4c, 0x45, 0x53, 0x45, 0x54, 0x5f, 0x54, 0x4f, - 0x5f, 0x55, 0x53, 0x45, 0x52, 0x53, 0x45, 0x54, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x50, 0x4f, - 0x49, 0x4e, 0x54, 0x10, 0x02, 0x22, 0x57, 0x0a, 0x16, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x20, 0x0a, 0x1c, 0x52, 0x45, 0x41, 0x43, 0x48, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x43, 0x4f, 0x4e, - 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x10, - 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x4f, 0x50, 0x45, 0x52, - 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x10, 0x01, 0x4a, 0x04, - 0x08, 0x03, 0x10, 0x04, 0x22, 0x65, 0x0a, 0x0f, 0x54, 0x79, 0x70, 0x65, 0x49, 0x6e, 0x66, 0x6f, - 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x52, 0x0a, 0x18, 0x61, 0x6c, 0x6c, 0x6f, 0x77, - 0x65, 0x64, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x16, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x44, 0x69, 0x72, 0x65, - 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x95, 0x04, 0x0a, 0x0f, - 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x66, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x48, 0xfa, 0x42, 0x45, 0x72, 0x43, 0x28, 0x80, 0x01, 0x32, 0x3e, 0x5e, 0x28, - 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, - 0x2c, 0x36, 0x31, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2f, 0x29, 0x2a, 0x5b, - 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, - 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x24, 0x52, 0x09, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x4e, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xfa, 0x42, 0x2d, 0x72, 0x2b, - 0x28, 0x40, 0x32, 0x27, 0x5e, 0x28, 0x5c, 0x2e, 0x5c, 0x2e, 0x5c, 0x2e, 0x7c, 0x5b, 0x61, 0x2d, - 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, - 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x24, 0x48, 0x00, 0x52, 0x08, 0x72, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x52, 0x0a, 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x5f, 0x77, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x77, - 0x65, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x57, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x48, 0x00, 0x52, 0x0e, 0x70, 0x75, 0x62, - 0x6c, 0x69, 0x63, 0x57, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x12, 0x40, 0x0a, 0x0f, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, - 0x0f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x52, 0x0e, - 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x12, 0x49, - 0x0a, 0x13, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x72, 0x61, 0x69, 0x74, 0x52, 0x12, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x45, - 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x10, 0x0a, 0x0e, 0x50, 0x75, 0x62, - 0x6c, 0x69, 0x63, 0x57, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x42, 0x16, 0x0a, 0x14, 0x72, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x72, 0x5f, 0x77, 0x69, 0x6c, 0x64, 0x63, - 0x61, 0x72, 0x64, 0x22, 0x11, 0x0a, 0x0f, 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x54, 0x72, 0x61, 0x69, 0x74, 0x22, 0x30, 0x0a, 0x0d, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, - 0x64, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x61, 0x76, 0x65, 0x61, - 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x61, - 0x76, 0x65, 0x61, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xad, 0x02, 0x0a, 0x0e, 0x55, 0x73, 0x65, - 0x72, 0x73, 0x65, 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x37, 0x0a, 0x05, 0x75, - 0x6e, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x05, 0x75, - 0x6e, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0c, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x09, 0x65, - 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, - 0x00, 0x52, 0x09, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x0f, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x18, - 0x0a, 0x11, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xb2, 0x05, 0x0a, 0x0c, 0x53, 0x65, 0x74, - 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x05, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x0f, 0xfa, 0x42, 0x0c, 0x92, 0x01, 0x09, 0x08, 0x01, 0x22, - 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x1a, 0xdd, 0x04, - 0x0a, 0x05, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x12, 0x37, 0x0a, 0x05, 0x5f, 0x74, 0x68, 0x69, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, - 0x69, 0x6c, 0x64, 0x2e, 0x54, 0x68, 0x69, 0x73, 0x48, 0x00, 0x52, 0x04, 0x54, 0x68, 0x69, 0x73, - 0x12, 0x4f, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, - 0x72, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, - 0x72, 0x73, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, - 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, - 0x74, 0x12, 0x4d, 0x0a, 0x10, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x75, 0x73, - 0x65, 0x72, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, - 0x72, 0x73, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, - 0x52, 0x0e, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, - 0x12, 0x4c, 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x77, 0x72, - 0x69, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, - 0x74, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0e, - 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x6c, - 0x0a, 0x1b, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x5f, 0x74, 0x75, 0x70, - 0x6c, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x75, - 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, - 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, - 0x48, 0x00, 0x52, 0x18, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x54, 0x75, - 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x12, 0x34, 0x0a, 0x04, - 0x5f, 0x6e, 0x69, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x4e, 0x69, 0x6c, 0x48, 0x00, 0x52, 0x03, 0x4e, - 0x69, 0x6c, 0x12, 0x40, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, + 0x69, 0x6e, 0x74, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, + 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x43, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x72, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5b, 0x0a, 0x0d, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x36, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x68, + 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, + 0x65, 0x74, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x10, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x5f, + 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, + 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x7a, 0x0a, 0x1a, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x17, 0x0a, + 0x13, 0x52, 0x45, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x50, + 0x4f, 0x49, 0x4e, 0x54, 0x10, 0x00, 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x4f, 0x4d, 0x50, 0x55, 0x54, + 0x45, 0x44, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x53, 0x45, 0x54, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, + 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x22, 0x0a, 0x1e, 0x54, 0x55, 0x50, 0x4c, 0x45, + 0x53, 0x45, 0x54, 0x5f, 0x54, 0x4f, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x53, 0x45, 0x54, 0x5f, 0x45, + 0x4e, 0x54, 0x52, 0x59, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x10, 0x02, 0x22, 0x57, 0x0a, 0x16, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x0a, 0x1c, 0x52, 0x45, 0x41, 0x43, 0x48, 0x41, 0x42, + 0x4c, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x5f, 0x52, + 0x45, 0x53, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x44, 0x49, 0x52, 0x45, 0x43, + 0x54, 0x5f, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x53, 0x55, + 0x4c, 0x54, 0x10, 0x01, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0x65, 0x0a, 0x0f, 0x54, 0x79, + 0x70, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x52, 0x0a, + 0x18, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x18, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, + 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x16, 0x61, 0x6c, 0x6c, 0x6f, 0x77, + 0x65, 0x64, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x22, 0x95, 0x04, 0x0a, 0x0f, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x52, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x66, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x48, 0xfa, 0x42, 0x45, 0x72, 0x43, 0x28, + 0x80, 0x01, 0x32, 0x3e, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, + 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x31, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, + 0x39, 0x5d, 0x2f, 0x29, 0x2a, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, + 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, + 0x5d, 0x24, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x4e, 0x0a, + 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x30, 0xfa, 0x42, 0x2d, 0x72, 0x2b, 0x28, 0x40, 0x32, 0x27, 0x5e, 0x28, 0x5c, 0x2e, 0x5c, 0x2e, + 0x5c, 0x2e, 0x7c, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, + 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, + 0x24, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x52, 0x0a, + 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x77, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x57, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x48, + 0x00, 0x52, 0x0e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x57, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, + 0x64, 0x12, 0x40, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, + 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x43, 0x61, + 0x76, 0x65, 0x61, 0x74, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x43, 0x61, + 0x76, 0x65, 0x61, 0x74, 0x12, 0x49, 0x0a, 0x13, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, + 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x69, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x69, 0x74, 0x52, 0x12, 0x72, 0x65, 0x71, + 0x75, 0x69, 0x72, 0x65, 0x64, 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, + 0x10, 0x0a, 0x0e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x57, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, + 0x64, 0x42, 0x16, 0x0a, 0x14, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x72, + 0x5f, 0x77, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x22, 0x11, 0x0a, 0x0f, 0x45, 0x78, 0x70, + 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x69, 0x74, 0x22, 0x30, 0x0a, 0x0d, + 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x12, 0x1f, 0x0a, + 0x0b, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xad, + 0x02, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, + 0x65, 0x12, 0x37, 0x0a, 0x05, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, + 0x01, 0x48, 0x00, 0x52, 0x05, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x0c, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, + 0x01, 0x48, 0x00, 0x52, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x3f, 0x0a, 0x09, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, + 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x09, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0d, 0x6f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x74, 0x68, 0x1a, 0x06, 0x0a, 0x04, 0x54, - 0x68, 0x69, 0x73, 0x1a, 0x05, 0x0a, 0x03, 0x4e, 0x69, 0x6c, 0x42, 0x11, 0x0a, 0x0a, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xba, 0x02, - 0x0a, 0x0e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, - 0x12, 0x46, 0x0a, 0x08, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x70, - 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x2e, 0x54, 0x75, 0x70, 0x6c, - 0x65, 0x73, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, - 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x65, 0x74, 0x12, 0x4d, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x70, - 0x75, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, - 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, - 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x12, 0x40, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x4f, 0x0a, 0x08, 0x54, 0x75, 0x70, - 0x6c, 0x65, 0x73, 0x65, 0x74, 0x12, 0x43, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xfa, 0x42, 0x24, 0x72, 0x22, 0x28, 0x40, - 0x32, 0x1e, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, - 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x24, - 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xec, 0x03, 0x0a, 0x18, 0x46, - 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, - 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x12, 0x52, 0x0a, 0x08, 0x66, 0x75, 0x6e, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x18, 0x0a, 0x11, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, + 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xb2, + 0x05, 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x42, 0x0a, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x42, 0x0f, 0xfa, 0x42, 0x0c, + 0x92, 0x01, 0x09, 0x08, 0x01, 0x22, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x1a, 0xdd, 0x04, 0x0a, 0x05, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x12, 0x37, 0x0a, + 0x05, 0x5f, 0x74, 0x68, 0x69, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x54, 0x68, 0x69, 0x73, 0x48, 0x00, + 0x52, 0x04, 0x54, 0x68, 0x69, 0x73, 0x12, 0x4f, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, + 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, + 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, + 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, + 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x12, 0x4d, 0x0a, 0x10, 0x74, 0x75, 0x70, 0x6c, 0x65, + 0x5f, 0x74, 0x6f, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, + 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, + 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0e, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, + 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x12, 0x4c, 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, + 0x74, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, + 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, + 0x10, 0x01, 0x48, 0x00, 0x52, 0x0e, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x52, 0x65, 0x77, + 0x72, 0x69, 0x74, 0x65, 0x12, 0x6c, 0x0a, 0x1b, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x65, 0x64, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x75, 0x73, 0x65, 0x72, + 0x73, 0x65, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x54, 0x75, - 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x2e, 0x46, 0x75, 0x6e, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x82, 0x01, 0x04, 0x10, 0x01, 0x20, - 0x00, 0x52, 0x08, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x50, 0x0a, 0x08, 0x74, - 0x75, 0x70, 0x6c, 0x65, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x65, 0x64, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, - 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x08, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x65, 0x74, 0x12, 0x4d, 0x0a, - 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, - 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x63, 0x6f, 0x6d, - 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x12, 0x40, 0x0a, 0x0f, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x4f, - 0x0a, 0x08, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x65, 0x74, 0x12, 0x43, 0x0a, 0x08, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xfa, 0x42, - 0x24, 0x72, 0x22, 0x28, 0x40, 0x32, 0x1e, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, - 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, - 0x30, 0x2d, 0x39, 0x5d, 0x24, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x48, 0x0a, 0x08, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x14, 0x46, - 0x55, 0x4e, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x55, 0x4e, 0x43, 0x54, 0x49, 0x4f, - 0x4e, 0x5f, 0x41, 0x4e, 0x59, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x55, 0x4e, 0x43, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x4c, 0x4c, 0x10, 0x02, 0x22, 0x91, 0x02, 0x0a, 0x0f, 0x43, 0x6f, - 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x12, 0x41, 0x0a, - 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, + 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, + 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x18, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x65, 0x64, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x73, + 0x65, 0x74, 0x12, 0x34, 0x0a, 0x04, 0x5f, 0x6e, 0x69, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x4e, 0x69, + 0x6c, 0x48, 0x00, 0x52, 0x03, 0x4e, 0x69, 0x6c, 0x12, 0x40, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x07, 0x20, 0x03, + 0x28, 0x0d, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x74, + 0x68, 0x1a, 0x06, 0x0a, 0x04, 0x54, 0x68, 0x69, 0x73, 0x1a, 0x05, 0x0a, 0x03, 0x4e, 0x69, 0x6c, + 0x42, 0x11, 0x0a, 0x0a, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, + 0xf8, 0x42, 0x01, 0x22, 0xba, 0x02, 0x0a, 0x0e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, + 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x12, 0x46, 0x0a, 0x08, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, + 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, + 0x74, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, + 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x65, 0x74, 0x12, 0x4d, + 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x73, + 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, + 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x63, 0x6f, + 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x12, 0x40, 0x0a, + 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, + 0x4f, 0x0a, 0x08, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x65, 0x74, 0x12, 0x43, 0x0a, 0x08, 0x72, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xfa, + 0x42, 0x24, 0x72, 0x22, 0x28, 0x40, 0x32, 0x1e, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, + 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, + 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x24, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0xec, 0x03, 0x0a, 0x18, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x54, + 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x12, 0x52, 0x0a, + 0x08, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x2a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x65, 0x64, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x73, + 0x65, 0x74, 0x2e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, 0x07, + 0x82, 0x01, 0x04, 0x10, 0x01, 0x20, 0x00, 0x52, 0x08, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x50, 0x0a, 0x08, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x75, + 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, + 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x65, 0x74, 0x42, + 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x74, 0x75, 0x70, 0x6c, 0x65, + 0x73, 0x65, 0x74, 0x12, 0x4d, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x5f, + 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, - 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x12, 0x43, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, + 0x01, 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, + 0x65, 0x74, 0x12, 0x40, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x4f, 0x0a, 0x08, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x65, 0x74, + 0x12, 0x43, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xfa, 0x42, 0x24, 0x72, 0x22, 0x28, 0x40, 0x32, 0x1e, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x24, 0x52, 0x08, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x34, 0x0a, 0x06, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x55, 0x50, 0x4c, 0x45, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, - 0x54, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x55, 0x50, 0x4c, 0x45, 0x5f, 0x55, 0x53, 0x45, - 0x52, 0x53, 0x45, 0x54, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x01, 0x22, 0x8a, 0x01, - 0x0a, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x37, 0x0a, 0x18, 0x7a, 0x65, 0x72, 0x6f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, - 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x15, 0x7a, 0x65, 0x72, 0x6f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x4c, - 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x1c, 0x7a, 0x65, 0x72, - 0x6f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, - 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x19, 0x7a, 0x65, 0x72, 0x6f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x43, 0x6f, 0x6c, 0x75, - 0x6d, 0x6e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x9c, 0x01, 0x0a, 0x10, 0x43, - 0x61, 0x76, 0x65, 0x61, 0x74, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x38, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x76, - 0x65, 0x61, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x09, - 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x06, 0x63, 0x61, 0x76, - 0x65, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x75, 0x61, 0x6c, 0x69, 0x7a, - 0x65, 0x64, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x48, 0x00, 0x52, 0x06, 0x63, 0x61, 0x76, 0x65, - 0x61, 0x74, 0x42, 0x15, 0x0a, 0x13, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x6f, 0x72, 0x5f, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x22, 0xb0, 0x01, 0x0a, 0x0f, 0x43, 0x61, - 0x76, 0x65, 0x61, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, - 0x02, 0x6f, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x02, 0x6f, - 0x70, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, - 0x76, 0x65, 0x61, 0x74, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x08, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x32, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, - 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4e, - 0x44, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x4e, 0x4f, 0x54, 0x10, 0x03, 0x22, 0xee, 0x03, 0x0a, - 0x12, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x12, 0x70, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x4b, 0xfa, 0x42, 0x48, 0x72, - 0x46, 0x28, 0x80, 0x01, 0x32, 0x41, 0x5e, 0x28, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x48, 0x0a, 0x08, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x18, 0x0a, 0x14, 0x46, 0x55, 0x4e, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x46, + 0x55, 0x4e, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x4e, 0x59, 0x10, 0x01, 0x12, 0x10, 0x0a, + 0x0c, 0x46, 0x55, 0x4e, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x4c, 0x4c, 0x10, 0x02, 0x22, + 0x91, 0x02, 0x0a, 0x0f, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, + 0x73, 0x65, 0x74, 0x12, 0x41, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, + 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x2e, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, + 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x43, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xfa, 0x42, 0x24, 0x72, 0x22, 0x28, + 0x40, 0x32, 0x1e, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, + 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, + 0x24, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x0f, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x34, 0x0a, + 0x06, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x55, 0x50, 0x4c, 0x45, + 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x55, 0x50, + 0x4c, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x53, 0x45, 0x54, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, + 0x54, 0x10, 0x01, 0x22, 0x8a, 0x01, 0x0a, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x18, 0x7a, 0x65, 0x72, 0x6f, 0x5f, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x7a, 0x65, 0x72, 0x6f, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x65, 0x64, 0x4c, 0x69, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, + 0x3f, 0x0a, 0x1c, 0x7a, 0x65, 0x72, 0x6f, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, + 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x19, 0x7a, 0x65, 0x72, 0x6f, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x65, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x9c, 0x01, 0x0a, 0x10, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x45, 0x78, 0x70, 0x72, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x37, 0x0a, 0x06, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1d, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x48, 0x00, + 0x52, 0x06, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x42, 0x15, 0x0a, 0x13, 0x6f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x72, 0x5f, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x22, + 0xb0, 0x01, 0x0a, 0x0f, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x02, 0x6f, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x22, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x02, 0x6f, 0x70, 0x12, 0x35, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x72, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x32, + 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0b, 0x0a, 0x07, 0x55, + 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x52, 0x10, 0x01, + 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4e, 0x44, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x4e, 0x4f, 0x54, + 0x10, 0x03, 0x22, 0xee, 0x03, 0x0a, 0x12, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x68, 0x69, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x70, 0x0a, 0x0d, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x4b, 0xfa, 0x42, 0x48, 0x72, 0x46, 0x28, 0x80, 0x01, 0x32, 0x41, 0x5e, 0x28, 0x28, 0x5b, + 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, + 0x36, 0x31, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2f, 0x29, 0x2a, 0x5b, 0x61, + 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, + 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x3f, 0x24, 0x52, 0x0c, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x57, 0x0a, 0x14, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xfa, 0x42, 0x22, 0x72, 0x20, + 0x28, 0x80, 0x08, 0x32, 0x1b, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, + 0x39, 0x2f, 0x5f, 0x7c, 0x5c, 0x2d, 0x3d, 0x2b, 0x5d, 0x7b, 0x31, 0x2c, 0x7d, 0x29, 0x3f, 0x24, + 0x52, 0x12, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x49, 0x64, 0x12, 0x64, 0x0a, 0x1b, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, + 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x5f, 0x70, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xfa, 0x42, 0x22, 0x72, 0x20, + 0x28, 0x80, 0x08, 0x32, 0x1b, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, + 0x39, 0x2f, 0x5f, 0x7c, 0x5c, 0x2d, 0x3d, 0x2b, 0x5d, 0x7b, 0x31, 0x2c, 0x7d, 0x29, 0x3f, 0x24, + 0x52, 0x18, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x49, 0x64, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x57, 0x0a, 0x11, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, 0xfa, 0x42, 0x27, 0x72, 0x25, 0x28, 0x40, 0x32, 0x21, + 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, + 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x3f, + 0x24, 0x52, 0x10, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x17, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x15, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x22, 0x86, 0x03, 0x0a, 0x0d, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x6b, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x48, 0xfa, 0x42, 0x45, + 0x72, 0x43, 0x28, 0x80, 0x01, 0x32, 0x3e, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x31, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2f, 0x29, 0x2a, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, - 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x3f, 0x24, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x57, 0x0a, 0x14, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, - 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x25, 0xfa, 0x42, 0x22, 0x72, 0x20, 0x28, 0x80, 0x08, 0x32, 0x1b, 0x5e, - 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2f, 0x5f, 0x7c, 0x5c, 0x2d, - 0x3d, 0x2b, 0x5d, 0x7b, 0x31, 0x2c, 0x7d, 0x29, 0x3f, 0x24, 0x52, 0x12, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x64, - 0x0a, 0x1b, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x25, 0xfa, 0x42, 0x22, 0x72, 0x20, 0x28, 0x80, 0x08, 0x32, 0x1b, 0x5e, - 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2f, 0x5f, 0x7c, 0x5c, 0x2d, - 0x3d, 0x2b, 0x5d, 0x7b, 0x31, 0x2c, 0x7d, 0x29, 0x3f, 0x24, 0x52, 0x18, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x50, 0x72, - 0x65, 0x66, 0x69, 0x78, 0x12, 0x57, 0x0a, 0x11, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, - 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x2a, 0xfa, 0x42, 0x27, 0x72, 0x25, 0x28, 0x40, 0x32, 0x21, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, - 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, - 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x3f, 0x24, 0x52, 0x10, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, - 0x17, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x15, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x86, 0x03, - 0x0a, 0x0d, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, - 0x6b, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x48, 0xfa, 0x42, 0x45, 0x72, 0x43, 0x28, 0x80, 0x01, 0x32, - 0x3e, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, - 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x31, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x2f, - 0x29, 0x2a, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, - 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x24, 0x52, - 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x5a, 0x0a, 0x13, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, 0xfa, 0x42, 0x27, 0x72, 0x25, - 0x28, 0x80, 0x08, 0x32, 0x20, 0x5e, 0x28, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, - 0x2d, 0x39, 0x2f, 0x5f, 0x7c, 0x5c, 0x2d, 0x3d, 0x2b, 0x5d, 0x7b, 0x31, 0x2c, 0x7d, 0x29, 0x7c, - 0x5c, 0x2a, 0x29, 0x3f, 0x24, 0x52, 0x11, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x53, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x52, 0x0a, 0x11, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x10, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x58, 0x0a, 0x0e, - 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x46, - 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x2a, 0xfa, 0x42, 0x27, 0x72, 0x25, 0x28, 0x40, 0x32, 0x21, 0x5e, 0x28, 0x5b, 0x61, 0x2d, - 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, - 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x3f, 0x24, 0x52, 0x08, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x8a, 0x01, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x09, 0x43, 0x6f, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x61, 0x75, 0x74, 0x68, 0x7a, 0x65, 0x64, 0x2f, 0x73, 0x70, 0x69, 0x63, 0x65, 0x64, 0x62, 0x2f, - 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, - 0x31, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x58, 0x58, 0xaa, 0x02, - 0x07, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x07, 0x43, 0x6f, 0x72, 0x65, 0x5c, - 0x56, 0x31, 0xe2, 0x02, 0x13, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x43, 0x6f, 0x72, 0x65, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x30, 0x2d, 0x39, 0x5d, 0x24, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x5a, 0x0a, 0x13, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x2a, 0xfa, 0x42, 0x27, 0x72, 0x25, 0x28, 0x80, 0x08, 0x32, 0x20, 0x5e, 0x28, 0x28, 0x5b, 0x61, + 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2f, 0x5f, 0x7c, 0x5c, 0x2d, 0x3d, 0x2b, 0x5d, + 0x7b, 0x31, 0x2c, 0x7d, 0x29, 0x7c, 0x5c, 0x2a, 0x29, 0x3f, 0x24, 0x52, 0x11, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x52, + 0x0a, 0x11, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x52, 0x10, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x1a, 0x58, 0x0a, 0x0e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, 0xfa, 0x42, 0x27, 0x72, 0x25, 0x28, 0x40, 0x32, + 0x21, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, + 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, + 0x3f, 0x24, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x8a, 0x01, 0x0a, + 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x09, 0x43, 0x6f, + 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x65, 0x64, 0x2f, 0x73, 0x70, + 0x69, 0x63, 0x65, 0x64, 0x62, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0x76, 0x31, 0xa2, 0x02, + 0x03, 0x43, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, + 0x07, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x13, 0x43, 0x6f, 0x72, 0x65, 0x5c, + 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x08, 0x43, 0x6f, 0x72, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -3732,78 +3747,79 @@ var file_core_v1_core_proto_depIdxs = []int32{ 12, // 1: core.v1.RelationTuple.subject:type_name -> core.v1.ObjectAndRelation 9, // 2: core.v1.RelationTuple.caveat:type_name -> core.v1.ContextualizedCaveat 8, // 3: core.v1.RelationTuple.integrity:type_name -> core.v1.RelationshipIntegrity - 50, // 4: core.v1.RelationshipIntegrity.hashed_at:type_name -> google.protobuf.Timestamp - 51, // 5: core.v1.ContextualizedCaveat.context:type_name -> google.protobuf.Struct - 40, // 6: core.v1.CaveatDefinition.parameter_types:type_name -> core.v1.CaveatDefinition.ParameterTypesEntry - 20, // 7: core.v1.CaveatDefinition.metadata:type_name -> core.v1.Metadata - 35, // 8: core.v1.CaveatDefinition.source_position:type_name -> core.v1.SourcePosition - 11, // 9: core.v1.CaveatTypeReference.child_types:type_name -> core.v1.CaveatTypeReference - 0, // 10: core.v1.RelationTupleUpdate.operation:type_name -> core.v1.RelationTupleUpdate.Operation - 7, // 11: core.v1.RelationTupleUpdate.tuple:type_name -> core.v1.RelationTuple - 17, // 12: core.v1.RelationTupleTreeNode.intermediate_node:type_name -> core.v1.SetOperationUserset - 19, // 13: core.v1.RelationTupleTreeNode.leaf_node:type_name -> core.v1.DirectSubjects - 12, // 14: core.v1.RelationTupleTreeNode.expanded:type_name -> core.v1.ObjectAndRelation - 36, // 15: core.v1.RelationTupleTreeNode.caveat_expression:type_name -> core.v1.CaveatExpression - 1, // 16: core.v1.SetOperationUserset.operation:type_name -> core.v1.SetOperationUserset.Operation - 16, // 17: core.v1.SetOperationUserset.child_nodes:type_name -> core.v1.RelationTupleTreeNode - 12, // 18: core.v1.DirectSubject.subject:type_name -> core.v1.ObjectAndRelation - 36, // 19: core.v1.DirectSubject.caveat_expression:type_name -> core.v1.CaveatExpression - 18, // 20: core.v1.DirectSubjects.subjects:type_name -> core.v1.DirectSubject - 52, // 21: core.v1.Metadata.metadata_message:type_name -> google.protobuf.Any - 22, // 22: core.v1.NamespaceDefinition.relation:type_name -> core.v1.Relation - 20, // 23: core.v1.NamespaceDefinition.metadata:type_name -> core.v1.Metadata - 35, // 24: core.v1.NamespaceDefinition.source_position:type_name -> core.v1.SourcePosition - 30, // 25: core.v1.Relation.userset_rewrite:type_name -> core.v1.UsersetRewrite - 26, // 26: core.v1.Relation.type_information:type_name -> core.v1.TypeInformation - 20, // 27: core.v1.Relation.metadata:type_name -> core.v1.Metadata - 35, // 28: core.v1.Relation.source_position:type_name -> core.v1.SourcePosition - 41, // 29: core.v1.ReachabilityGraph.entrypoints_by_subject_type:type_name -> core.v1.ReachabilityGraph.EntrypointsBySubjectTypeEntry - 42, // 30: core.v1.ReachabilityGraph.entrypoints_by_subject_relation:type_name -> core.v1.ReachabilityGraph.EntrypointsBySubjectRelationEntry - 25, // 31: core.v1.ReachabilityEntrypoints.entrypoints:type_name -> core.v1.ReachabilityEntrypoint - 13, // 32: core.v1.ReachabilityEntrypoints.subject_relation:type_name -> core.v1.RelationReference - 2, // 33: core.v1.ReachabilityEntrypoint.kind:type_name -> core.v1.ReachabilityEntrypoint.ReachabilityEntrypointKind - 13, // 34: core.v1.ReachabilityEntrypoint.target_relation:type_name -> core.v1.RelationReference - 3, // 35: core.v1.ReachabilityEntrypoint.result_status:type_name -> core.v1.ReachabilityEntrypoint.EntrypointResultStatus - 27, // 36: core.v1.TypeInformation.allowed_direct_relations:type_name -> core.v1.AllowedRelation - 43, // 37: core.v1.AllowedRelation.public_wildcard:type_name -> core.v1.AllowedRelation.PublicWildcard - 35, // 38: core.v1.AllowedRelation.source_position:type_name -> core.v1.SourcePosition - 29, // 39: core.v1.AllowedRelation.required_caveat:type_name -> core.v1.AllowedCaveat - 28, // 40: core.v1.AllowedRelation.required_expiration:type_name -> core.v1.ExpirationTrait - 31, // 41: core.v1.UsersetRewrite.union:type_name -> core.v1.SetOperation - 31, // 42: core.v1.UsersetRewrite.intersection:type_name -> core.v1.SetOperation - 31, // 43: core.v1.UsersetRewrite.exclusion:type_name -> core.v1.SetOperation - 35, // 44: core.v1.UsersetRewrite.source_position:type_name -> core.v1.SourcePosition - 44, // 45: core.v1.SetOperation.child:type_name -> core.v1.SetOperation.Child - 47, // 46: core.v1.TupleToUserset.tupleset:type_name -> core.v1.TupleToUserset.Tupleset - 34, // 47: core.v1.TupleToUserset.computed_userset:type_name -> core.v1.ComputedUserset - 35, // 48: core.v1.TupleToUserset.source_position:type_name -> core.v1.SourcePosition - 4, // 49: core.v1.FunctionedTupleToUserset.function:type_name -> core.v1.FunctionedTupleToUserset.Function - 48, // 50: core.v1.FunctionedTupleToUserset.tupleset:type_name -> core.v1.FunctionedTupleToUserset.Tupleset - 34, // 51: core.v1.FunctionedTupleToUserset.computed_userset:type_name -> core.v1.ComputedUserset - 35, // 52: core.v1.FunctionedTupleToUserset.source_position:type_name -> core.v1.SourcePosition - 5, // 53: core.v1.ComputedUserset.object:type_name -> core.v1.ComputedUserset.Object - 35, // 54: core.v1.ComputedUserset.source_position:type_name -> core.v1.SourcePosition - 37, // 55: core.v1.CaveatExpression.operation:type_name -> core.v1.CaveatOperation - 9, // 56: core.v1.CaveatExpression.caveat:type_name -> core.v1.ContextualizedCaveat - 6, // 57: core.v1.CaveatOperation.op:type_name -> core.v1.CaveatOperation.Operation - 36, // 58: core.v1.CaveatOperation.children:type_name -> core.v1.CaveatExpression - 39, // 59: core.v1.RelationshipFilter.optional_subject_filter:type_name -> core.v1.SubjectFilter - 49, // 60: core.v1.SubjectFilter.optional_relation:type_name -> core.v1.SubjectFilter.RelationFilter - 11, // 61: core.v1.CaveatDefinition.ParameterTypesEntry.value:type_name -> core.v1.CaveatTypeReference - 24, // 62: core.v1.ReachabilityGraph.EntrypointsBySubjectTypeEntry.value:type_name -> core.v1.ReachabilityEntrypoints - 24, // 63: core.v1.ReachabilityGraph.EntrypointsBySubjectRelationEntry.value:type_name -> core.v1.ReachabilityEntrypoints - 45, // 64: core.v1.SetOperation.Child._this:type_name -> core.v1.SetOperation.Child.This - 34, // 65: core.v1.SetOperation.Child.computed_userset:type_name -> core.v1.ComputedUserset - 32, // 66: core.v1.SetOperation.Child.tuple_to_userset:type_name -> core.v1.TupleToUserset - 30, // 67: core.v1.SetOperation.Child.userset_rewrite:type_name -> core.v1.UsersetRewrite - 33, // 68: core.v1.SetOperation.Child.functioned_tuple_to_userset:type_name -> core.v1.FunctionedTupleToUserset - 46, // 69: core.v1.SetOperation.Child._nil:type_name -> core.v1.SetOperation.Child.Nil - 35, // 70: core.v1.SetOperation.Child.source_position:type_name -> core.v1.SourcePosition - 71, // [71:71] is the sub-list for method output_type - 71, // [71:71] is the sub-list for method input_type - 71, // [71:71] is the sub-list for extension type_name - 71, // [71:71] is the sub-list for extension extendee - 0, // [0:71] is the sub-list for field type_name + 50, // 4: core.v1.RelationTuple.optional_expiration_time:type_name -> google.protobuf.Timestamp + 50, // 5: core.v1.RelationshipIntegrity.hashed_at:type_name -> google.protobuf.Timestamp + 51, // 6: core.v1.ContextualizedCaveat.context:type_name -> google.protobuf.Struct + 40, // 7: core.v1.CaveatDefinition.parameter_types:type_name -> core.v1.CaveatDefinition.ParameterTypesEntry + 20, // 8: core.v1.CaveatDefinition.metadata:type_name -> core.v1.Metadata + 35, // 9: core.v1.CaveatDefinition.source_position:type_name -> core.v1.SourcePosition + 11, // 10: core.v1.CaveatTypeReference.child_types:type_name -> core.v1.CaveatTypeReference + 0, // 11: core.v1.RelationTupleUpdate.operation:type_name -> core.v1.RelationTupleUpdate.Operation + 7, // 12: core.v1.RelationTupleUpdate.tuple:type_name -> core.v1.RelationTuple + 17, // 13: core.v1.RelationTupleTreeNode.intermediate_node:type_name -> core.v1.SetOperationUserset + 19, // 14: core.v1.RelationTupleTreeNode.leaf_node:type_name -> core.v1.DirectSubjects + 12, // 15: core.v1.RelationTupleTreeNode.expanded:type_name -> core.v1.ObjectAndRelation + 36, // 16: core.v1.RelationTupleTreeNode.caveat_expression:type_name -> core.v1.CaveatExpression + 1, // 17: core.v1.SetOperationUserset.operation:type_name -> core.v1.SetOperationUserset.Operation + 16, // 18: core.v1.SetOperationUserset.child_nodes:type_name -> core.v1.RelationTupleTreeNode + 12, // 19: core.v1.DirectSubject.subject:type_name -> core.v1.ObjectAndRelation + 36, // 20: core.v1.DirectSubject.caveat_expression:type_name -> core.v1.CaveatExpression + 18, // 21: core.v1.DirectSubjects.subjects:type_name -> core.v1.DirectSubject + 52, // 22: core.v1.Metadata.metadata_message:type_name -> google.protobuf.Any + 22, // 23: core.v1.NamespaceDefinition.relation:type_name -> core.v1.Relation + 20, // 24: core.v1.NamespaceDefinition.metadata:type_name -> core.v1.Metadata + 35, // 25: core.v1.NamespaceDefinition.source_position:type_name -> core.v1.SourcePosition + 30, // 26: core.v1.Relation.userset_rewrite:type_name -> core.v1.UsersetRewrite + 26, // 27: core.v1.Relation.type_information:type_name -> core.v1.TypeInformation + 20, // 28: core.v1.Relation.metadata:type_name -> core.v1.Metadata + 35, // 29: core.v1.Relation.source_position:type_name -> core.v1.SourcePosition + 41, // 30: core.v1.ReachabilityGraph.entrypoints_by_subject_type:type_name -> core.v1.ReachabilityGraph.EntrypointsBySubjectTypeEntry + 42, // 31: core.v1.ReachabilityGraph.entrypoints_by_subject_relation:type_name -> core.v1.ReachabilityGraph.EntrypointsBySubjectRelationEntry + 25, // 32: core.v1.ReachabilityEntrypoints.entrypoints:type_name -> core.v1.ReachabilityEntrypoint + 13, // 33: core.v1.ReachabilityEntrypoints.subject_relation:type_name -> core.v1.RelationReference + 2, // 34: core.v1.ReachabilityEntrypoint.kind:type_name -> core.v1.ReachabilityEntrypoint.ReachabilityEntrypointKind + 13, // 35: core.v1.ReachabilityEntrypoint.target_relation:type_name -> core.v1.RelationReference + 3, // 36: core.v1.ReachabilityEntrypoint.result_status:type_name -> core.v1.ReachabilityEntrypoint.EntrypointResultStatus + 27, // 37: core.v1.TypeInformation.allowed_direct_relations:type_name -> core.v1.AllowedRelation + 43, // 38: core.v1.AllowedRelation.public_wildcard:type_name -> core.v1.AllowedRelation.PublicWildcard + 35, // 39: core.v1.AllowedRelation.source_position:type_name -> core.v1.SourcePosition + 29, // 40: core.v1.AllowedRelation.required_caveat:type_name -> core.v1.AllowedCaveat + 28, // 41: core.v1.AllowedRelation.required_expiration:type_name -> core.v1.ExpirationTrait + 31, // 42: core.v1.UsersetRewrite.union:type_name -> core.v1.SetOperation + 31, // 43: core.v1.UsersetRewrite.intersection:type_name -> core.v1.SetOperation + 31, // 44: core.v1.UsersetRewrite.exclusion:type_name -> core.v1.SetOperation + 35, // 45: core.v1.UsersetRewrite.source_position:type_name -> core.v1.SourcePosition + 44, // 46: core.v1.SetOperation.child:type_name -> core.v1.SetOperation.Child + 47, // 47: core.v1.TupleToUserset.tupleset:type_name -> core.v1.TupleToUserset.Tupleset + 34, // 48: core.v1.TupleToUserset.computed_userset:type_name -> core.v1.ComputedUserset + 35, // 49: core.v1.TupleToUserset.source_position:type_name -> core.v1.SourcePosition + 4, // 50: core.v1.FunctionedTupleToUserset.function:type_name -> core.v1.FunctionedTupleToUserset.Function + 48, // 51: core.v1.FunctionedTupleToUserset.tupleset:type_name -> core.v1.FunctionedTupleToUserset.Tupleset + 34, // 52: core.v1.FunctionedTupleToUserset.computed_userset:type_name -> core.v1.ComputedUserset + 35, // 53: core.v1.FunctionedTupleToUserset.source_position:type_name -> core.v1.SourcePosition + 5, // 54: core.v1.ComputedUserset.object:type_name -> core.v1.ComputedUserset.Object + 35, // 55: core.v1.ComputedUserset.source_position:type_name -> core.v1.SourcePosition + 37, // 56: core.v1.CaveatExpression.operation:type_name -> core.v1.CaveatOperation + 9, // 57: core.v1.CaveatExpression.caveat:type_name -> core.v1.ContextualizedCaveat + 6, // 58: core.v1.CaveatOperation.op:type_name -> core.v1.CaveatOperation.Operation + 36, // 59: core.v1.CaveatOperation.children:type_name -> core.v1.CaveatExpression + 39, // 60: core.v1.RelationshipFilter.optional_subject_filter:type_name -> core.v1.SubjectFilter + 49, // 61: core.v1.SubjectFilter.optional_relation:type_name -> core.v1.SubjectFilter.RelationFilter + 11, // 62: core.v1.CaveatDefinition.ParameterTypesEntry.value:type_name -> core.v1.CaveatTypeReference + 24, // 63: core.v1.ReachabilityGraph.EntrypointsBySubjectTypeEntry.value:type_name -> core.v1.ReachabilityEntrypoints + 24, // 64: core.v1.ReachabilityGraph.EntrypointsBySubjectRelationEntry.value:type_name -> core.v1.ReachabilityEntrypoints + 45, // 65: core.v1.SetOperation.Child._this:type_name -> core.v1.SetOperation.Child.This + 34, // 66: core.v1.SetOperation.Child.computed_userset:type_name -> core.v1.ComputedUserset + 32, // 67: core.v1.SetOperation.Child.tuple_to_userset:type_name -> core.v1.TupleToUserset + 30, // 68: core.v1.SetOperation.Child.userset_rewrite:type_name -> core.v1.UsersetRewrite + 33, // 69: core.v1.SetOperation.Child.functioned_tuple_to_userset:type_name -> core.v1.FunctionedTupleToUserset + 46, // 70: core.v1.SetOperation.Child._nil:type_name -> core.v1.SetOperation.Child.Nil + 35, // 71: core.v1.SetOperation.Child.source_position:type_name -> core.v1.SourcePosition + 72, // [72:72] is the sub-list for method output_type + 72, // [72:72] is the sub-list for method input_type + 72, // [72:72] is the sub-list for extension type_name + 72, // [72:72] is the sub-list for extension extendee + 0, // [0:72] is the sub-list for field type_name } func init() { file_core_v1_core_proto_init() } diff --git a/pkg/proto/core/v1/core.pb.validate.go b/pkg/proto/core/v1/core.pb.validate.go index 2b60a733e5..f8a01af22e 100644 --- a/pkg/proto/core/v1/core.pb.validate.go +++ b/pkg/proto/core/v1/core.pb.validate.go @@ -195,6 +195,35 @@ func (m *RelationTuple) validate(all bool) error { } } + if all { + switch v := interface{}(m.GetOptionalExpirationTime()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RelationTupleValidationError{ + field: "OptionalExpirationTime", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RelationTupleValidationError{ + field: "OptionalExpirationTime", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOptionalExpirationTime()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RelationTupleValidationError{ + field: "OptionalExpirationTime", + reason: "embedded message failed validation", + cause: err, + } + } + } + if len(errors) > 0 { return RelationTupleMultiError(errors) } diff --git a/pkg/proto/core/v1/core_vtproto.pb.go b/pkg/proto/core/v1/core_vtproto.pb.go index adf959e995..160a1d9339 100644 --- a/pkg/proto/core/v1/core_vtproto.pb.go +++ b/pkg/proto/core/v1/core_vtproto.pb.go @@ -34,6 +34,7 @@ func (m *RelationTuple) CloneVT() *RelationTuple { r.Subject = m.Subject.CloneVT() r.Caveat = m.Caveat.CloneVT() r.Integrity = m.Integrity.CloneVT() + r.OptionalExpirationTime = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.OptionalExpirationTime).CloneVT()) if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -1015,6 +1016,9 @@ func (this *RelationTuple) EqualVT(that *RelationTuple) bool { if !this.Integrity.EqualVT(that.Integrity) { return false } + if !(*timestamppb1.Timestamp)(this.OptionalExpirationTime).EqualVT((*timestamppb1.Timestamp)(that.OptionalExpirationTime)) { + return false + } return string(this.unknownFields) == string(that.unknownFields) } @@ -2541,6 +2545,16 @@ func (m *RelationTuple) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if m.OptionalExpirationTime != nil { + size, err := (*timestamppb1.Timestamp)(m.OptionalExpirationTime).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + } if m.Integrity != nil { size, err := m.Integrity.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { @@ -5040,6 +5054,10 @@ func (m *RelationTuple) SizeVT() (n int) { l = m.Integrity.SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } + if m.OptionalExpirationTime != nil { + l = (*timestamppb1.Timestamp)(m.OptionalExpirationTime).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } n += len(m.unknownFields) return n } @@ -6203,6 +6221,42 @@ func (m *RelationTuple) UnmarshalVT(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OptionalExpirationTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.OptionalExpirationTime == nil { + m.OptionalExpirationTime = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.OptionalExpirationTime).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) diff --git a/pkg/schemadsl/compiler/compiler.go b/pkg/schemadsl/compiler/compiler.go index efa7f47715..6565b1196e 100644 --- a/pkg/schemadsl/compiler/compiler.go +++ b/pkg/schemadsl/compiler/compiler.go @@ -102,9 +102,9 @@ func Compile(schema InputSchema, prefix ObjectPrefixOption, opts ...Option) (*Co allowedFlags: cfg.allowedFlags, }, root) if err != nil { - var errorWithNode errorWithNode - if errors.As(err, &errorWithNode) { - err = toContextError(errorWithNode.error.Error(), errorWithNode.errorSourceCode, errorWithNode.node, mapper) + var withNodeError withNodeError + if errors.As(err, &withNodeError) { + err = toContextError(withNodeError.error.Error(), withNodeError.errorSourceCode, withNodeError.node, mapper) } return nil, err @@ -152,7 +152,7 @@ func toContextError(errMessage string, errorSourceCode string, node *dslNode, ma return fmt.Errorf("missing source for node: %w", err) } - return ErrorWithContext{ + return WithContextError{ BaseCompilerError: BaseCompilerError{ error: fmt.Errorf("parse error in %s: %s", formattedRange, errMessage), BaseMessage: errMessage, diff --git a/pkg/schemadsl/compiler/errors.go b/pkg/schemadsl/compiler/errors.go index af0964cdfa..2c33ba80cb 100644 --- a/pkg/schemadsl/compiler/errors.go +++ b/pkg/schemadsl/compiler/errors.go @@ -13,26 +13,26 @@ type BaseCompilerError struct { BaseMessage string } -type errorWithNode struct { +type withNodeError struct { error node *dslNode errorSourceCode string } -// ErrorWithContext defines an error which contains contextual information. -type ErrorWithContext struct { +// WithContextError defines an error which contains contextual information. +type WithContextError struct { BaseCompilerError SourceRange input.SourceRange Source input.Source ErrorSourceCode string } -func (ewc ErrorWithContext) Unwrap() error { +func (ewc WithContextError) Unwrap() error { return ewc.BaseCompilerError } // DetailsMetadata returns the metadata for details for this error. -func (ewc ErrorWithContext) DetailsMetadata() map[string]string { +func (ewc WithContextError) DetailsMetadata() map[string]string { startLine, startCol, err := ewc.SourceRange.Start().LineAndColumn() if err != nil { return map[string]string{} diff --git a/pkg/schemadsl/compiler/node.go b/pkg/schemadsl/compiler/node.go index eef25cd8c3..b7e2a703dd 100644 --- a/pkg/schemadsl/compiler/node.go +++ b/pkg/schemadsl/compiler/node.go @@ -164,15 +164,15 @@ func (tn *dslNode) Lookup(predicateName string) (*dslNode, error) { } func (tn *dslNode) Errorf(message string, args ...interface{}) error { - return errorWithNode{ + return withNodeError{ error: fmt.Errorf(message, args...), errorSourceCode: "", node: tn, } } -func (tn *dslNode) ErrorWithSourcef(sourceCode string, message string, args ...interface{}) error { - return errorWithNode{ +func (tn *dslNode) WithSourceErrorf(sourceCode string, message string, args ...interface{}) error { + return withNodeError{ error: fmt.Errorf(message, args...), errorSourceCode: sourceCode, node: tn, diff --git a/pkg/schemadsl/compiler/translator.go b/pkg/schemadsl/compiler/translator.go index c1421ba67f..3ad5186b62 100644 --- a/pkg/schemadsl/compiler/translator.go +++ b/pkg/schemadsl/compiler/translator.go @@ -80,7 +80,7 @@ func translate(tctx translationContext, root *dslNode) (*CompiledSchema, error) } if !names.Add(definition.GetName()) { - return nil, definitionNode.ErrorWithSourcef(definition.GetName(), "found name reused between multiple definitions and/or caveats: %s", definition.GetName()) + return nil, definitionNode.WithSourceErrorf(definition.GetName(), "found name reused between multiple definitions and/or caveats: %s", definition.GetName()) } orderedDefinitions = append(orderedDefinitions, definition) @@ -98,13 +98,13 @@ func translate(tctx translationContext, root *dslNode) (*CompiledSchema, error) func translateCaveatDefinition(tctx translationContext, defNode *dslNode) (*core.CaveatDefinition, error) { definitionName, err := defNode.GetString(dslshape.NodeCaveatDefinitionPredicateName) if err != nil { - return nil, defNode.ErrorWithSourcef(definitionName, "invalid definition name: %w", err) + return nil, defNode.WithSourceErrorf(definitionName, "invalid definition name: %w", err) } // parameters paramNodes := defNode.List(dslshape.NodeCaveatDefinitionPredicateParameters) if len(paramNodes) == 0 { - return nil, defNode.ErrorWithSourcef(definitionName, "caveat `%s` must have at least one parameter defined", definitionName) + return nil, defNode.WithSourceErrorf(definitionName, "caveat `%s` must have at least one parameter defined", definitionName) } env := caveats.NewEnvironment() @@ -112,27 +112,27 @@ func translateCaveatDefinition(tctx translationContext, defNode *dslNode) (*core for _, paramNode := range paramNodes { paramName, err := paramNode.GetString(dslshape.NodeCaveatParameterPredicateName) if err != nil { - return nil, paramNode.ErrorWithSourcef(paramName, "invalid parameter name: %w", err) + return nil, paramNode.WithSourceErrorf(paramName, "invalid parameter name: %w", err) } if _, ok := parameters[paramName]; ok { - return nil, paramNode.ErrorWithSourcef(paramName, "duplicate parameter `%s` defined on caveat `%s`", paramName, definitionName) + return nil, paramNode.WithSourceErrorf(paramName, "duplicate parameter `%s` defined on caveat `%s`", paramName, definitionName) } typeRefNode, err := paramNode.Lookup(dslshape.NodeCaveatParameterPredicateType) if err != nil { - return nil, paramNode.ErrorWithSourcef(paramName, "invalid type for parameter: %w", err) + return nil, paramNode.WithSourceErrorf(paramName, "invalid type for parameter: %w", err) } translatedType, err := translateCaveatTypeReference(tctx, typeRefNode) if err != nil { - return nil, paramNode.ErrorWithSourcef(paramName, "invalid type for caveat parameter `%s` on caveat `%s`: %w", paramName, definitionName, err) + return nil, paramNode.WithSourceErrorf(paramName, "invalid type for caveat parameter `%s` on caveat `%s`: %w", paramName, definitionName, err) } parameters[paramName] = *translatedType err = env.AddVariable(paramName, *translatedType) if err != nil { - return nil, paramNode.ErrorWithSourcef(paramName, "invalid type for caveat parameter `%s` on caveat `%s`: %w", paramName, definitionName, err) + return nil, paramNode.WithSourceErrorf(paramName, "invalid type for caveat parameter `%s` on caveat `%s`: %w", paramName, definitionName, err) } } @@ -144,27 +144,27 @@ func translateCaveatDefinition(tctx translationContext, defNode *dslNode) (*core // caveat expression. expressionStringNode, err := defNode.Lookup(dslshape.NodeCaveatDefinitionPredicateExpession) if err != nil { - return nil, defNode.ErrorWithSourcef(definitionName, "invalid expression: %w", err) + return nil, defNode.WithSourceErrorf(definitionName, "invalid expression: %w", err) } expressionString, err := expressionStringNode.GetString(dslshape.NodeCaveatExpressionPredicateExpression) if err != nil { - return nil, defNode.ErrorWithSourcef(expressionString, "invalid expression: %w", err) + return nil, defNode.WithSourceErrorf(expressionString, "invalid expression: %w", err) } rnge, err := expressionStringNode.Range(tctx.mapper) if err != nil { - return nil, defNode.ErrorWithSourcef(expressionString, "invalid expression: %w", err) + return nil, defNode.WithSourceErrorf(expressionString, "invalid expression: %w", err) } source, err := caveats.NewSource(expressionString, caveatPath) if err != nil { - return nil, defNode.ErrorWithSourcef(expressionString, "invalid expression: %w", err) + return nil, defNode.WithSourceErrorf(expressionString, "invalid expression: %w", err) } compiled, err := caveats.CompileCaveatWithSource(env, caveatPath, source, rnge.Start()) if err != nil { - return nil, expressionStringNode.ErrorWithSourcef(expressionString, "invalid expression for caveat `%s`: %w", definitionName, err) + return nil, expressionStringNode.WithSourceErrorf(expressionString, "invalid expression for caveat `%s`: %w", definitionName, err) } def, err := namespace.CompiledCaveatDefinition(env, caveatPath, compiled) @@ -180,7 +180,7 @@ func translateCaveatDefinition(tctx translationContext, defNode *dslNode) (*core func translateCaveatTypeReference(tctx translationContext, typeRefNode *dslNode) (*caveattypes.VariableType, error) { typeName, err := typeRefNode.GetString(dslshape.NodeCaveatTypeReferencePredicateType) if err != nil { - return nil, typeRefNode.ErrorWithSourcef(typeName, "invalid type name: %w", err) + return nil, typeRefNode.WithSourceErrorf(typeName, "invalid type name: %w", err) } childTypeNodes := typeRefNode.List(dslshape.NodeCaveatTypeReferencePredicateChildTypes) @@ -195,7 +195,7 @@ func translateCaveatTypeReference(tctx translationContext, typeRefNode *dslNode) constructedType, err := caveattypes.BuildType(typeName, childTypes) if err != nil { - return nil, typeRefNode.ErrorWithSourcef(typeName, "%w", err) + return nil, typeRefNode.WithSourceErrorf(typeName, "%w", err) } return constructedType, nil @@ -204,7 +204,7 @@ func translateCaveatTypeReference(tctx translationContext, typeRefNode *dslNode) func translateObjectDefinition(tctx translationContext, defNode *dslNode) (*core.NamespaceDefinition, error) { definitionName, err := defNode.GetString(dslshape.NodeDefinitionPredicateName) if err != nil { - return nil, defNode.ErrorWithSourcef(definitionName, "invalid definition name: %w", err) + return nil, defNode.WithSourceErrorf(definitionName, "invalid definition name: %w", err) } relationsAndPermissions := []*core.Relation{} diff --git a/pkg/schemautil/schemautil.go b/pkg/schemautil/schemautil.go index d4f2528671..08a9627401 100644 --- a/pkg/schemautil/schemautil.go +++ b/pkg/schemautil/schemautil.go @@ -25,7 +25,7 @@ func ApplySchemaChanges( validated *shared.ValidatedSchemaChanges, existingCaveats []*core.CaveatDefinition, existingObjectDefs []*core.NamespaceDefinition, -) (*shared.AppliedSchemaChanges, *shared.ErrSchemaWriteDataValidation, error) { +) (*shared.AppliedSchemaChanges, *shared.SchemaWriteDataValidationError, error) { result, err := shared.ApplySchemaChangesOverExisting(ctx, rwt, validated, existingCaveats, existingObjectDefs) if err != nil { return result, shared.AsValidationError(err), err diff --git a/pkg/spiceerrors/common.go b/pkg/spiceerrors/common.go index 56f77677c9..625faef270 100644 --- a/pkg/spiceerrors/common.go +++ b/pkg/spiceerrors/common.go @@ -14,9 +14,9 @@ type SourcePosition struct { ColumnPosition int } -// ErrorWithSource is an error that includes the source text and position +// WithSourceError is an error that includes the source text and position // information. -type ErrorWithSource struct { +type WithSourceError struct { error // SourceCodeString is the input source code string for the error. @@ -37,49 +37,49 @@ type HasMetadata interface { } // Unwrap returns the inner, wrapped error. -func (err *ErrorWithSource) Unwrap() error { +func (err *WithSourceError) Unwrap() error { return err.error } -// NewErrorWithSource creates and returns a new ErrorWithSource. -func NewErrorWithSource(err error, sourceCodeString string, oneIndexedLineNumber uint64, oneIndexedColumnPosition uint64) *ErrorWithSource { - return &ErrorWithSource{err, sourceCodeString, oneIndexedLineNumber, oneIndexedColumnPosition} +// NewWithSourceError creates and returns a new WithSourceError. +func NewWithSourceError(err error, sourceCodeString string, oneIndexedLineNumber uint64, oneIndexedColumnPosition uint64) *WithSourceError { + return &WithSourceError{err, sourceCodeString, oneIndexedLineNumber, oneIndexedColumnPosition} } -// AsErrorWithSource returns the error as an ErrorWithSource, if applicable. -func AsErrorWithSource(err error) (*ErrorWithSource, bool) { - var serr *ErrorWithSource +// AsWithSourceError returns the error as an WithSourceError, if applicable. +func AsWithSourceError(err error) (*WithSourceError, bool) { + var serr *WithSourceError if errors.As(err, &serr) { return serr, true } return nil, false } -// ErrorWithAdditionalDetails is an error that includes additional details. -type ErrorWithAdditionalDetails struct { +// WithAdditionalDetailsError is an error that includes additional details. +type WithAdditionalDetailsError struct { error // AdditionalDetails is a map of additional details for the error. AdditionalDetails map[string]string } -func NewErrorWithAdditionalDetails(err error) *ErrorWithAdditionalDetails { - return &ErrorWithAdditionalDetails{err, nil} +func NewWithAdditionalDetailsError(err error) *WithAdditionalDetailsError { + return &WithAdditionalDetailsError{err, nil} } // Unwrap returns the inner, wrapped error. -func (err *ErrorWithAdditionalDetails) Unwrap() error { +func (err *WithAdditionalDetailsError) Unwrap() error { return err.error } -func (err *ErrorWithAdditionalDetails) WithAdditionalDetails(key string, value string) { +func (err *WithAdditionalDetailsError) WithAdditionalDetails(key string, value string) { if err.AdditionalDetails == nil { err.AdditionalDetails = make(map[string]string) } err.AdditionalDetails[key] = value } -func (err *ErrorWithAdditionalDetails) AddToDetails(details map[string]string) map[string]string { +func (err *WithAdditionalDetailsError) AddToDetails(details map[string]string) map[string]string { if err.AdditionalDetails != nil { maps.Copy(details, err.AdditionalDetails) } diff --git a/pkg/spiceerrors/withstatus.go b/pkg/spiceerrors/withstatus.go index 52bf0b864a..1ee6e0abd3 100644 --- a/pkg/spiceerrors/withstatus.go +++ b/pkg/spiceerrors/withstatus.go @@ -31,7 +31,7 @@ func WithCodeAndDetails(err error, code codes.Code, details ...protoiface.Messag // status code and any supplied details. func WithCodeAndDetailsAsError(err error, code codes.Code, details ...protoiface.MessageV1) error { status := WithCodeAndDetails(err, code, details...) - return errWithStatus{err, status} + return withStatusError{err, status} } // ForReason returns an ErrorInfo block for a specific error reason as defined in the V1 API. @@ -54,7 +54,7 @@ func WithCodeAndReason(err error, code codes.Code, reason v1.ErrorReason) error } status := WithCodeAndDetails(err, code, ForReason(reason, metadata)) - return errWithStatus{err, status} + return withStatusError{err, status} } type SupportsAdditionalMetadata interface { @@ -72,11 +72,11 @@ func WithAdditionalDetails(err error, key MetadataKey, value string) bool { return false } -type errWithStatus struct { +type withStatusError struct { error status *status.Status } -func (err errWithStatus) GRPCStatus() *status.Status { +func (err withStatusError) GRPCStatus() *status.Status { return err.status } diff --git a/pkg/tuple/comparison.go b/pkg/tuple/comparison.go index 4847855d03..159edd9c90 100644 --- a/pkg/tuple/comparison.go +++ b/pkg/tuple/comparison.go @@ -1,6 +1,8 @@ package tuple import ( + "time" + "google.golang.org/protobuf/proto" core "github.com/authzed/spicedb/pkg/proto/core/v1" @@ -18,7 +20,19 @@ func ONREqualOrWildcard(onr, target ObjectAndRelation) bool { // Equal returns true if the two relationships are exactly the same. func Equal(lhs, rhs Relationship) bool { - return ONREqual(lhs.Resource, rhs.Resource) && ONREqual(lhs.Subject, rhs.Subject) && caveatEqual(lhs.OptionalCaveat, rhs.OptionalCaveat) + return ONREqual(lhs.Resource, rhs.Resource) && ONREqual(lhs.Subject, rhs.Subject) && caveatEqual(lhs.OptionalCaveat, rhs.OptionalCaveat) && expirationEqual(lhs.OptionalExpiration, rhs.OptionalExpiration) +} + +func expirationEqual(lhs, rhs *time.Time) bool { + if lhs == nil && rhs == nil { + return true + } + + if lhs == nil || rhs == nil { + return false + } + + return lhs.Equal(*rhs) } func caveatEqual(lhs, rhs *core.ContextualizedCaveat) bool { diff --git a/pkg/tuple/comparison_test.go b/pkg/tuple/comparison_test.go index 53d3144219..086cf61757 100644 --- a/pkg/tuple/comparison_test.go +++ b/pkg/tuple/comparison_test.go @@ -71,6 +71,8 @@ func TestEqual(t *testing.T) { MustParse("document:foo#viewer@user:tom[somecaveat:{\"hi\":{\"yo\":123}}]"), MustParse("document:foo#viewer@user:tom[somecaveat:{\"hi\":{\"yo\":{\"hey\":true}}, \"hi2\":{\"yo2\":{\"hey2\":false}}}]"), MustParse("document:foo#viewer@user:tom[somecaveat:{\"hi\":{\"yo\":{\"hey\":true}}, \"hi2\":{\"yo2\":{\"hey2\":[1,2,3]}}}]"), + MustParse("document:foo#viewer@user:tom[expiration:2020-01-01T00:00:00Z]"), + MustParse("document:foo#viewer@user:tom[somecaveat:{\"hi\":\"there\"}][expiration:2020-01-01T00:00:00Z]"), } for _, tc := range equalTestCases { @@ -238,6 +240,21 @@ func TestEqual(t *testing.T) { lhs: MustParse("document:foo#viewer@user:tom[somecaveat:{\"hi\":{\"yo\":[1,2,3]}}]"), rhs: MustParse("document:foo#viewer@user:tom[somecaveat:{\"hi\":{\"yo\":[1,2,4]}}]"), }, + { + name: "one with expiration, the other without", + lhs: MustParse("document:foo#viewer@user:tom[expiration:2020-01-01T00:00:00Z]"), + rhs: MustParse("document:foo#viewer@user:tom"), + }, + { + name: "mismatch expiration", + lhs: MustParse("document:foo#viewer@user:tom[expiration:2020-01-01T00:00:00Z]"), + rhs: MustParse("document:foo#viewer@user:tom[expiration:2020-01-02T00:00:00Z]"), + }, + { + name: "same expiration, one with caveat", + lhs: MustParse("document:foo#viewer@user:tom[expiration:2020-01-01T00:00:00Z]"), + rhs: MustParse("document:foo#viewer@user:tom[somecaveat][expiration:2020-01-01T00:00:00Z]"), + }, } for _, tc := range notEqualTestCases { diff --git a/pkg/tuple/core.go b/pkg/tuple/core.go index 44d963c769..ed862d1869 100644 --- a/pkg/tuple/core.go +++ b/pkg/tuple/core.go @@ -1,6 +1,8 @@ package tuple import ( + "time" + core "github.com/authzed/spicedb/pkg/proto/core/v1" "github.com/authzed/spicedb/pkg/spiceerrors" ) @@ -18,8 +20,8 @@ func ONRStringToCore(ns, oid, rel string) *core.ObjectAndRelation { } } -// CoreRelationToStringWithoutCaveat creates a string from a core.RelationTuple without stringifying the caveat. -func CoreRelationToStringWithoutCaveat(rel *core.RelationTuple) string { +// CoreRelationToStringWithoutCaveatOrExpiration creates a string from a core.RelationTuple without stringifying the caveat. +func CoreRelationToStringWithoutCaveatOrExpiration(rel *core.RelationTuple) string { if rel.Subject.Relation == Ellipsis { return rel.ResourceAndRelation.Namespace + ":" + rel.ResourceAndRelation.ObjectId + "@" + rel.Subject.Namespace + ":" + rel.Subject.ObjectId } @@ -55,6 +57,12 @@ func FromCoreRelationTuple(rt *core.RelationTuple) Relationship { return rt.Validate() == nil }, "relation tuple must be valid") + var expiration *time.Time + if rt.OptionalExpirationTime != nil { + t := rt.OptionalExpirationTime.AsTime() + expiration = &t + } + return Relationship{ RelationshipReference: RelationshipReference{ Resource: ObjectAndRelation{ @@ -68,7 +76,8 @@ func FromCoreRelationTuple(rt *core.RelationTuple) Relationship { Relation: rt.Subject.Relation, }, }, - OptionalCaveat: rt.Caveat, + OptionalCaveat: rt.Caveat, + OptionalExpiration: expiration, } } diff --git a/pkg/tuple/core_test.go b/pkg/tuple/core_test.go index 7f30a08878..924fe90ec9 100644 --- a/pkg/tuple/core_test.go +++ b/pkg/tuple/core_test.go @@ -3,9 +3,11 @@ package tuple import ( "strings" "testing" + "time" "github.com/stretchr/testify/require" "google.golang.org/protobuf/types/known/structpb" + "google.golang.org/protobuf/types/known/timestamppb" core "github.com/authzed/spicedb/pkg/proto/core/v1" ) @@ -72,6 +74,9 @@ func TestCoreRelationToString(t *testing.T) { }) require.NoError(t, err) + testTime, err := time.Parse(expirationFormat, "2021-01-01T00:00:00Z") + require.NoError(t, err) + tests := []struct { name string input *core.RelationTuple @@ -113,6 +118,44 @@ func TestCoreRelationToString(t *testing.T) { }, expected: `resource:1#view@user:1[cav:{"letters":["a","b","c"]}]`, }, + { + name: "relation with expiration", + input: &core.RelationTuple{ + ResourceAndRelation: &core.ObjectAndRelation{ + Namespace: "resource", + ObjectId: "1", + Relation: "view", + }, + Subject: &core.ObjectAndRelation{ + Namespace: "user", + ObjectId: "1", + Relation: "...", + }, + OptionalExpirationTime: timestamppb.New(testTime), + }, + expected: `resource:1#view@user:1[expiration:2021-01-01T00:00:00Z]`, + }, + { + name: "relation with caveat and expiration", + input: &core.RelationTuple{ + ResourceAndRelation: &core.ObjectAndRelation{ + Namespace: "resource", + ObjectId: "1", + Relation: "view", + }, + Subject: &core.ObjectAndRelation{ + Namespace: "user", + ObjectId: "1", + Relation: "...", + }, + Caveat: &core.ContextualizedCaveat{ + CaveatName: "cav", + Context: caveatContext, + }, + OptionalExpirationTime: timestamppb.New(testTime), + }, + expected: `resource:1#view@user:1[cav:{"letters":["a","b","c"]}][expiration:2021-01-01T00:00:00Z]`, + }, } for _, tt := range tests { diff --git a/pkg/tuple/hashing.go b/pkg/tuple/hashing.go index c6c8ebf727..7e7bec6732 100644 --- a/pkg/tuple/hashing.go +++ b/pkg/tuple/hashing.go @@ -40,6 +40,11 @@ func CanonicalBytes(rel Relationship) ([]byte, error) { } } + if rel.OptionalExpiration != nil { + sb.WriteString(" with $expiration:") + sb.WriteString(rel.OptionalExpiration.Format(expirationFormat)) + } + return sb.Bytes(), nil } diff --git a/pkg/tuple/parsing.go b/pkg/tuple/parsing.go index 71fab65282..f2ed7d2af1 100644 --- a/pkg/tuple/parsing.go +++ b/pkg/tuple/parsing.go @@ -6,6 +6,7 @@ import ( "maps" "regexp" "slices" + "time" "google.golang.org/protobuf/types/known/structpb" @@ -36,7 +37,10 @@ var subjectExpr = fmt.Sprintf( relationExpr, ) -var caveatExpr = fmt.Sprintf(`\[(?P(%s))(:(?P(\{(.+)\})))?\]`, caveatNameExpr) +var ( + caveatExpr = fmt.Sprintf(`\[(?P(%s))(:(?P(\{(.+)\})))?\]`, caveatNameExpr) + expirationExpr = `\[expiration:(?P([\d\-\.:TZ]+))\]` +) var ( resourceIDRegex = regexp.MustCompile(fmt.Sprintf("^%s$", resourceIDExpr)) @@ -45,10 +49,11 @@ var ( var parserRegex = regexp.MustCompile( fmt.Sprintf( - `^%s@%s(%s)?$`, + `^%s@%s(%s)?(%s)?$`, onrExpr, subjectExpr, caveatExpr, + expirationExpr, ), ) @@ -86,14 +91,15 @@ func MustParse(relString string) Relationship { } var ( - subjectRelIndex = slices.Index(parserRegex.SubexpNames(), "subjectRel") - caveatNameIndex = slices.Index(parserRegex.SubexpNames(), "caveatName") - caveatContextIndex = slices.Index(parserRegex.SubexpNames(), "caveatContext") - resourceIDIndex = slices.Index(parserRegex.SubexpNames(), "resourceID") - subjectIDIndex = slices.Index(parserRegex.SubexpNames(), "subjectID") - resourceTypeIndex = slices.Index(parserRegex.SubexpNames(), "resourceType") - resourceRelIndex = slices.Index(parserRegex.SubexpNames(), "resourceRel") - subjectTypeIndex = slices.Index(parserRegex.SubexpNames(), "subjectType") + subjectRelIndex = slices.Index(parserRegex.SubexpNames(), "subjectRel") + caveatNameIndex = slices.Index(parserRegex.SubexpNames(), "caveatName") + caveatContextIndex = slices.Index(parserRegex.SubexpNames(), "caveatContext") + resourceIDIndex = slices.Index(parserRegex.SubexpNames(), "resourceID") + subjectIDIndex = slices.Index(parserRegex.SubexpNames(), "subjectID") + resourceTypeIndex = slices.Index(parserRegex.SubexpNames(), "resourceType") + resourceRelIndex = slices.Index(parserRegex.SubexpNames(), "resourceRel") + subjectTypeIndex = slices.Index(parserRegex.SubexpNames(), "subjectType") + expirationDateTimeIndex = slices.Index(parserRegex.SubexpNames(), "expirationDateTime") ) // Parse unmarshals the string form of a Tuple and returns an error on failure, @@ -134,6 +140,17 @@ func Parse(relString string) (Relationship, error) { } } + expirationTimeStr := groups[expirationDateTimeIndex] + var optionalExpiration *time.Time + if len(expirationTimeStr) > 0 { + expirationTime, err := time.Parse(expirationFormat, expirationTimeStr) + if err != nil { + return Relationship{}, fmt.Errorf("invalid expiration time: %w", err) + } + + optionalExpiration = &expirationTime + } + resourceID := groups[resourceIDIndex] if err := ValidateResourceID(resourceID); err != nil { return Relationship{}, fmt.Errorf("invalid resource id: %w", err) @@ -157,10 +174,17 @@ func Parse(relString string) (Relationship, error) { Relation: subjectRelation, }, }, - OptionalCaveat: optionalCaveat, + OptionalCaveat: optionalCaveat, + OptionalExpiration: optionalExpiration, }, nil } +// MustWithExpiration adds the given expiration to the relationship. This is for testing only. +func MustWithExpiration(rel Relationship, expiration time.Time) Relationship { + rel.OptionalExpiration = &expiration + return rel +} + // MustWithCaveat adds the given caveat name to the relationship. This is for testing only. func MustWithCaveat(rel Relationship, caveatName string, contexts ...map[string]any) Relationship { wc, err := WithCaveat(rel, caveatName, contexts...) diff --git a/pkg/tuple/parsing_test.go b/pkg/tuple/parsing_test.go index 2e02d65eed..2cf0588666 100644 --- a/pkg/tuple/parsing_test.go +++ b/pkg/tuple/parsing_test.go @@ -3,10 +3,12 @@ package tuple import ( "strings" "testing" + "time" v1 "github.com/authzed/authzed-go/proto/authzed/api/v1" "github.com/stretchr/testify/require" "google.golang.org/protobuf/types/known/structpb" + "google.golang.org/protobuf/types/known/timestamppb" "github.com/authzed/spicedb/pkg/testutil" ) @@ -37,6 +39,24 @@ func v1rel(resType, resID, relation, subType, subID, subRel string) *v1.Relation } } +func ev1rel(resType, resID, relation, subType, subID, subRel string, expiration time.Time) *v1.Relationship { + return &v1.Relationship{ + Resource: &v1.ObjectReference{ + ObjectType: resType, + ObjectId: resID, + }, + Relation: relation, + Subject: &v1.SubjectReference{ + Object: &v1.ObjectReference{ + ObjectType: subType, + ObjectId: subID, + }, + OptionalRelation: subRel, + }, + OptionalExpiresAt: timestamppb.New(expiration), + } +} + func cv1rel(resType, resID, relation, subType, subID, subRel, caveatName string, caveatContext map[string]any) *v1.Relationship { context, err := structpb.NewStruct(caveatContext) if err != nil { @@ -67,6 +87,37 @@ func cv1rel(resType, resID, relation, subType, subID, subRel, caveatName string, } } +func ecv1rel(resType, resID, relation, subType, subID, subRel string, expiration time.Time, caveatName string, caveatContext map[string]any) *v1.Relationship { + context, err := structpb.NewStruct(caveatContext) + if err != nil { + panic(err) + } + + if len(context.Fields) == 0 { + context = nil + } + + return &v1.Relationship{ + Resource: &v1.ObjectReference{ + ObjectType: resType, + ObjectId: resID, + }, + Relation: relation, + Subject: &v1.SubjectReference{ + Object: &v1.ObjectReference{ + ObjectType: subType, + ObjectId: subID, + }, + OptionalRelation: subRel, + }, + OptionalCaveat: &v1.ContextualizedCaveat{ + CaveatName: caveatName, + Context: context, + }, + OptionalExpiresAt: timestamppb.New(expiration), + } +} + var superLongID = strings.Repeat("f", 1024) var testCases = []struct { @@ -74,6 +125,7 @@ var testCases = []struct { expectedOutput string relFormat Relationship v1Format *v1.Relationship + expectedV1Output string stableCanonicalization string }{ { @@ -415,6 +467,112 @@ var testCases = []struct { }), stableCanonicalization: "ZG9jdW1lbnQ6Zm9vI3ZpZXdlckB1c2VyOnRvbSMuLi4gd2l0aCBzb21lY2F2ZWF0OntmaXJzdDphQGV4YW1wbGUuY29tLHNlY29uZDpiQGV4YW1wbGUuY29tfQ==", }, + { + input: `document:foo#viewer@user:tom[expiration:2020-01-01T00:00:00Z]`, + expectedOutput: `document:foo#viewer@user:tom[expiration:2020-01-01T00:00:00Z]`, + relFormat: MustWithExpiration( + makeRel( + StringToONR("document", "foo", "viewer"), + StringToONR("user", "tom", "..."), + ), + time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC), + ), + v1Format: ev1rel("document", "foo", "viewer", "user", "tom", "", time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC)), + stableCanonicalization: "ZG9jdW1lbnQ6Zm9vI3ZpZXdlckB1c2VyOnRvbSMuLi4gd2l0aCAkZXhwaXJhdGlvbjoyMDIwLTAxLTAxVDAwOjAwOjAwWg==", + }, + { + input: `document:foo#viewer@user:tom[expiration:2022-01-02T01:02:03Z]`, + expectedOutput: `document:foo#viewer@user:tom[expiration:2022-01-02T01:02:03Z]`, + relFormat: MustWithExpiration( + makeRel( + StringToONR("document", "foo", "viewer"), + StringToONR("user", "tom", "..."), + ), + time.Date(2022, 1, 2, 1, 2, 3, 0, time.UTC), + ), + v1Format: ev1rel("document", "foo", "viewer", "user", "tom", "", time.Date(2022, 1, 2, 1, 2, 3, 0, time.UTC)), + stableCanonicalization: "ZG9jdW1lbnQ6Zm9vI3ZpZXdlckB1c2VyOnRvbSMuLi4gd2l0aCAkZXhwaXJhdGlvbjoyMDIyLTAxLTAyVDAxOjAyOjAzWg==", + }, + { + input: `document:foo#viewer@user:tom[somecaveat][expiration:2020-01-01T00:00:00Z]`, + expectedOutput: `document:foo#viewer@user:tom[somecaveat][expiration:2020-01-01T00:00:00Z]`, + relFormat: MustWithExpiration( + MustWithCaveat( + makeRel( + StringToONR("document", "foo", "viewer"), + StringToONR("user", "tom", "..."), + ), + "somecaveat", + ), + time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC), + ), + v1Format: ecv1rel("document", "foo", "viewer", "user", "tom", "", time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC), "somecaveat", map[string]any{}), + stableCanonicalization: "ZG9jdW1lbnQ6Zm9vI3ZpZXdlckB1c2VyOnRvbSMuLi4gd2l0aCBzb21lY2F2ZWF0IHdpdGggJGV4cGlyYXRpb246MjAyMC0wMS0wMVQwMDowMDowMFo=", + }, + { + input: `document:foo#viewer@user:tom[somecaveat:{"foo":42}][expiration:2020-01-01T00:00:00Z]`, + expectedOutput: `document:foo#viewer@user:tom[somecaveat:{"foo":42}][expiration:2020-01-01T00:00:00Z]`, + relFormat: MustWithExpiration( + MustWithCaveat( + makeRel( + StringToONR("document", "foo", "viewer"), + StringToONR("user", "tom", "..."), + ), + "somecaveat", + map[string]any{ + "foo": 42, + }, + ), + time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC), + ), + v1Format: ecv1rel("document", "foo", "viewer", "user", "tom", "", time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC), "somecaveat", map[string]any{ + "foo": 42, + }), + stableCanonicalization: "ZG9jdW1lbnQ6Zm9vI3ZpZXdlckB1c2VyOnRvbSMuLi4gd2l0aCBzb21lY2F2ZWF0Ontmb286NDIuMDAwMDAwfSB3aXRoICRleHBpcmF0aW9uOjIwMjAtMDEtMDFUMDA6MDA6MDBa", + }, + { + input: `document:foo#viewer@user:tom[expiration:2020-01-01T00:00:01.542Z]`, + expectedOutput: `document:foo#viewer@user:tom[expiration:2020-01-01T00:00:01.542Z]`, + relFormat: MustWithExpiration( + makeRel( + StringToONR("document", "foo", "viewer"), + StringToONR("user", "tom", "..."), + ), + time.Date(2020, 1, 1, 0, 0, 1, 542000000, time.UTC), + ), + v1Format: ev1rel("document", "foo", "viewer", "user", "tom", "", time.Date(2020, 1, 1, 0, 0, 1, 542000000, time.UTC)), + stableCanonicalization: "ZG9jdW1lbnQ6Zm9vI3ZpZXdlckB1c2VyOnRvbSMuLi4gd2l0aCAkZXhwaXJhdGlvbjoyMDIwLTAxLTAxVDAwOjAwOjAxLjU0Mlo=", + }, + { + input: `document:foo#viewer@user:tom[expiration:2020-01-01T00:00:01Z]`, + expectedOutput: `document:foo#viewer@user:tom[expiration:2020-01-01T00:00:01Z]`, + relFormat: MustWithExpiration( + makeRel( + StringToONR("document", "foo", "viewer"), + StringToONR("user", "tom", "..."), + ), + time.Date(2020, 1, 1, 0, 0, 1, 0, time.UTC), + ), + v1Format: ev1rel("document", "foo", "viewer", "user", "tom", "", time.Date(2020, 1, 1, 0, 0, 1, 0, time.UTC)), + stableCanonicalization: "ZG9jdW1lbnQ6Zm9vI3ZpZXdlckB1c2VyOnRvbSMuLi4gd2l0aCAkZXhwaXJhdGlvbjoyMDIwLTAxLTAxVDAwOjAwOjAxWg==", + }, + { + input: `document:foo#viewer@user:tom[expiration:2020-01-01T00:00:01-04:00]`, + expectedOutput: `document:foo#viewer@user:tom[expiration:2020-01-01T00:00:01-04:00]`, + + // NOTE: When converted to V1 (which stores as a timestamppb.Timestamp), the timezone is changed + // into UTC. + expectedV1Output: `document:foo#viewer@user:tom[expiration:2020-01-01T04:00:01Z]`, + relFormat: MustWithExpiration( + makeRel( + StringToONR("document", "foo", "viewer"), + StringToONR("user", "tom", "..."), + ), + time.Date(2020, 1, 1, 0, 0, 1, 0, time.FixedZone("UTC-4", -4*60*60)), + ), + v1Format: ev1rel("document", "foo", "viewer", "user", "tom", "", time.Date(2020, 1, 1, 4, 0, 1, 0, time.UTC)), + stableCanonicalization: "ZG9jdW1lbnQ6Zm9vI3ZpZXdlckB1c2VyOnRvbSMuLi4gd2l0aCAkZXhwaXJhdGlvbjoyMDIwLTAxLTAxVDAwOjAwOjAxLTA0OjAw", + }, } func TestSerialize(t *testing.T) { @@ -428,7 +586,7 @@ func TestSerialize(t *testing.T) { serialized := strings.Replace(MustString(tc.relFormat), " ", "", -1) require.Equal(t, tc.expectedOutput, serialized) - withoutCaveat := StringWithoutCaveat(tc.relFormat) + withoutCaveat := StringWithoutCaveatOrExpiration(tc.relFormat) require.Contains(t, tc.expectedOutput, withoutCaveat) require.NotContains(t, withoutCaveat, "[") }) @@ -441,10 +599,15 @@ func TestSerialize(t *testing.T) { return } + expectedOutput := tc.expectedV1Output + if expectedOutput == "" { + expectedOutput = tc.expectedOutput + } + serialized := strings.Replace(MustV1RelString(tc.v1Format), " ", "", -1) - require.Equal(t, tc.expectedOutput, serialized) + require.Equal(t, expectedOutput, serialized) - withoutCaveat := V1StringRelationshipWithoutCaveat(tc.v1Format) + withoutCaveat := V1StringRelationshipWithoutCaveatOrExpiration(tc.v1Format) require.Contains(t, tc.expectedOutput, withoutCaveat) require.NotContains(t, withoutCaveat, "[") }) @@ -494,11 +657,16 @@ func TestConvert(t *testing.T) { } require.NoError(err) - require.True(Equal(tc.relFormat, parsed)) + require.True(Equal(tc.relFormat, parsed), "found difference in parsed relationship: %v vs %v", tc.relFormat, parsed) relationship := ToV1Relationship(parsed) relString := strings.Replace(MustV1RelString(relationship), " ", "", -1) - require.Equal(tc.expectedOutput, relString) + expectedOutput := tc.expectedV1Output + if expectedOutput == "" { + expectedOutput = tc.expectedOutput + } + + require.Equal(expectedOutput, relString) }) } } diff --git a/pkg/tuple/strings.go b/pkg/tuple/strings.go index 974bb03916..3f0576c993 100644 --- a/pkg/tuple/strings.go +++ b/pkg/tuple/strings.go @@ -3,6 +3,7 @@ package tuple import ( "sort" "strings" + "time" "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/types/known/structpb" @@ -11,6 +12,8 @@ import ( "github.com/authzed/spicedb/pkg/spiceerrors" ) +var expirationFormat = time.RFC3339Nano + // JoinRelRef joins the namespace and relation together into the same // format as `StringRR()`. func JoinRelRef(namespace, relation string) string { return namespace + "#" + relation } @@ -90,11 +93,24 @@ func String(rel Relationship) (string, error) { return "", err } - return StringONR(rel.Resource) + "@" + StringONR(rel.Subject) + caveatString, nil + expirationString, err := StringExpiration(rel.OptionalExpiration) + if err != nil { + return "", err + } + + return StringONR(rel.Resource) + "@" + StringONR(rel.Subject) + caveatString + expirationString, nil +} + +func StringExpiration(expiration *time.Time) (string, error) { + if expiration == nil { + return "", nil + } + + return "[expiration:" + expiration.Format(expirationFormat) + "]", nil } -// StringWithoutCaveat converts a relationship to a string, without its caveat included. -func StringWithoutCaveat(rel Relationship) string { +// StringWithoutCaveatOrExpiration converts a relationship to a string, without its caveat or expiration included. +func StringWithoutCaveatOrExpiration(rel Relationship) string { spiceerrors.DebugAssert(rel.ValidateNotEmpty, "relationship must not be empty") return StringONR(rel.Resource) + "@" + StringONR(rel.Subject) diff --git a/pkg/tuple/structs.go b/pkg/tuple/structs.go index 3a520d6637..208e0ddf63 100644 --- a/pkg/tuple/structs.go +++ b/pkg/tuple/structs.go @@ -3,6 +3,7 @@ package tuple import ( "errors" "fmt" + "time" core "github.com/authzed/spicedb/pkg/proto/core/v1" "github.com/authzed/spicedb/pkg/spiceerrors" @@ -67,8 +68,10 @@ type RelationshipReference struct { // Relationship represents a relationship between two objects. type Relationship struct { - OptionalCaveat *core.ContextualizedCaveat - OptionalIntegrity *core.RelationshipIntegrity + OptionalCaveat *core.ContextualizedCaveat + OptionalExpiration *time.Time + OptionalIntegrity *core.RelationshipIntegrity + RelationshipReference } @@ -82,7 +85,7 @@ func (r Relationship) ToCoreTuple() *core.RelationTuple { } } -const relStructSize = 112 /* size of the struct itself */ +const relStructSize = 120 /* size of the struct itself */ func (r Relationship) SizeVT() int { size := r.Resource.SizeVT() + r.Subject.SizeVT() + relStructSize @@ -151,7 +154,7 @@ func (ru RelationshipUpdate) OperationString() string { } func (ru RelationshipUpdate) DebugString() string { - return fmt.Sprintf("%s(%s)", ru.OperationString(), StringWithoutCaveat(ru.Relationship)) + return fmt.Sprintf("%s(%s)", ru.OperationString(), StringWithoutCaveatOrExpiration(ru.Relationship)) } // RelationReference represents a reference to a relation. diff --git a/pkg/tuple/v1.go b/pkg/tuple/v1.go index 9ad8e5807a..5a3705fd8e 100644 --- a/pkg/tuple/v1.go +++ b/pkg/tuple/v1.go @@ -2,9 +2,11 @@ package tuple import ( "fmt" + "time" v1 "github.com/authzed/authzed-go/proto/authzed/api/v1" "github.com/jzelinskie/stringz" + "google.golang.org/protobuf/types/known/timestamppb" core "github.com/authzed/spicedb/pkg/proto/core/v1" "github.com/authzed/spicedb/pkg/spiceerrors" @@ -76,11 +78,24 @@ func V1StringRelationship(rel *v1.Relationship) (string, error) { return "", err } - return V1StringRelationshipWithoutCaveat(rel) + caveatString, nil + expirationString, err := V1StringExpiration(rel.OptionalExpiresAt) + if err != nil { + return "", err + } + + return V1StringRelationshipWithoutCaveatOrExpiration(rel) + caveatString + expirationString, nil +} + +func V1StringExpiration(expiration *timestamppb.Timestamp) (string, error) { + if expiration == nil { + return "", nil + } + + return "[expiration:" + expiration.AsTime().Format(expirationFormat) + "]", nil } -// V1StringRelationshipWithoutCaveat converts a v1.Relationship to a string, excluding any caveat. -func V1StringRelationshipWithoutCaveat(rel *v1.Relationship) string { +// V1StringRelationshipWithoutCaveatOrExpiration converts a v1.Relationship to a string, excluding any caveat. +func V1StringRelationshipWithoutCaveatOrExpiration(rel *v1.Relationship) string { if rel == nil || rel.Resource == nil || rel.Subject == nil { return "" } @@ -168,6 +183,13 @@ func FromV1Relationship(rel *v1.Relationship) Relationship { Context: rel.OptionalCaveat.Context, } } + + var expiration *time.Time + if rel.OptionalExpiresAt != nil { + t := rel.OptionalExpiresAt.AsTime() + expiration = &t + } + return Relationship{ RelationshipReference: RelationshipReference{ Resource: ObjectAndRelation{ @@ -181,7 +203,8 @@ func FromV1Relationship(rel *v1.Relationship) Relationship { Relation: stringz.Default(rel.Subject.OptionalRelation, Ellipsis, ""), }, }, - OptionalCaveat: caveat, + OptionalCaveat: caveat, + OptionalExpiration: expiration, } } @@ -194,6 +217,12 @@ func ToV1Relationship(rel Relationship) *v1.Relationship { Context: rel.OptionalCaveat.Context, } } + + var expiration *timestamppb.Timestamp + if rel.OptionalExpiration != nil { + expiration = timestamppb.New(*rel.OptionalExpiration) + } + return &v1.Relationship{ Resource: &v1.ObjectReference{ ObjectType: rel.Resource.ObjectType, @@ -207,7 +236,8 @@ func ToV1Relationship(rel Relationship) *v1.Relationship { }, OptionalRelation: stringz.Default(rel.Subject.Relation, "", Ellipsis), }, - OptionalCaveat: caveat, + OptionalCaveat: caveat, + OptionalExpiresAt: expiration, } } @@ -230,6 +260,12 @@ func CopyToV1Relationship(rel Relationship, v1rel *v1.Relationship) { } else { v1rel.OptionalCaveat = nil } + + if rel.OptionalExpiration != nil { + v1rel.OptionalExpiresAt = timestamppb.New(*rel.OptionalExpiration) + } else { + v1rel.OptionalExpiresAt = nil + } } // UpdatesToV1RelationshipUpdates converts a slice of RelationshipUpdate into a diff --git a/pkg/typesystem/errors.go b/pkg/typesystem/errors.go index a1f59fbb70..19e9f27c84 100644 --- a/pkg/typesystem/errors.go +++ b/pkg/typesystem/errors.go @@ -10,103 +10,103 @@ import ( "github.com/authzed/spicedb/internal/sharederrors" ) -// ErrNamespaceNotFound occurs when a namespace was not found. -type ErrNamespaceNotFound struct { +// NamespaceNotFoundError occurs when a namespace was not found. +type NamespaceNotFoundError struct { error namespaceName string } // NotFoundNamespaceName is the name of the namespace not found. -func (err ErrNamespaceNotFound) NotFoundNamespaceName() string { +func (err NamespaceNotFoundError) NotFoundNamespaceName() string { return err.namespaceName } // MarshalZerologObject implements zerolog object marshalling. -func (err ErrNamespaceNotFound) MarshalZerologObject(e *zerolog.Event) { +func (err NamespaceNotFoundError) MarshalZerologObject(e *zerolog.Event) { e.Err(err.error).Str("namespace", err.namespaceName) } // DetailsMetadata returns the metadata for details for this error. -func (err ErrNamespaceNotFound) DetailsMetadata() map[string]string { +func (err NamespaceNotFoundError) DetailsMetadata() map[string]string { return map[string]string{ "definition_name": err.namespaceName, } } -// ErrRelationNotFound occurs when a relation was not found under a namespace. -type ErrRelationNotFound struct { +// RelationNotFoundError occurs when a relation was not found under a namespace. +type RelationNotFoundError struct { error namespaceName string relationName string } // NamespaceName returns the name of the namespace in which the relation was not found. -func (err ErrRelationNotFound) NamespaceName() string { +func (err RelationNotFoundError) NamespaceName() string { return err.namespaceName } // NotFoundRelationName returns the name of the relation not found. -func (err ErrRelationNotFound) NotFoundRelationName() string { +func (err RelationNotFoundError) NotFoundRelationName() string { return err.relationName } -func (err ErrRelationNotFound) MarshalZerologObject(e *zerolog.Event) { +func (err RelationNotFoundError) MarshalZerologObject(e *zerolog.Event) { e.Err(err.error).Str("namespace", err.namespaceName).Str("relation", err.relationName) } // DetailsMetadata returns the metadata for details for this error. -func (err ErrRelationNotFound) DetailsMetadata() map[string]string { +func (err RelationNotFoundError) DetailsMetadata() map[string]string { return map[string]string{ "definition_name": err.namespaceName, "relation_or_permission_name": err.relationName, } } -// ErrCaveatNotFound occurs when a caveat was not found. -type ErrCaveatNotFound struct { +// CaveatNotFoundError occurs when a caveat was not found. +type CaveatNotFoundError struct { error caveatName string } // CaveatName returns the name of the caveat not found. -func (err ErrCaveatNotFound) CaveatName() string { +func (err CaveatNotFoundError) CaveatName() string { return err.caveatName } -func (err ErrCaveatNotFound) MarshalZerologObject(e *zerolog.Event) { +func (err CaveatNotFoundError) MarshalZerologObject(e *zerolog.Event) { e.Err(err.error).Str("caveat", err.caveatName) } // DetailsMetadata returns the metadata for details for this error. -func (err ErrCaveatNotFound) DetailsMetadata() map[string]string { +func (err CaveatNotFoundError) DetailsMetadata() map[string]string { return map[string]string{ "caveat_name": err.caveatName, } } -// ErrDuplicateRelation occurs when a duplicate relation was found inside a namespace. -type ErrDuplicateRelation struct { +// DuplicateRelationError occurs when a duplicate relation was found inside a namespace. +type DuplicateRelationError struct { error namespaceName string relationName string } // MarshalZerologObject implements zerolog object marshalling. -func (err ErrDuplicateRelation) MarshalZerologObject(e *zerolog.Event) { +func (err DuplicateRelationError) MarshalZerologObject(e *zerolog.Event) { e.Err(err.error).Str("namespace", err.namespaceName).Str("relation", err.relationName) } // DetailsMetadata returns the metadata for details for this error. -func (err ErrDuplicateRelation) DetailsMetadata() map[string]string { +func (err DuplicateRelationError) DetailsMetadata() map[string]string { return map[string]string{ "definition_name": err.namespaceName, "relation_or_permission_name": err.relationName, } } -// ErrPermissionUsedOnLeftOfArrow occurs when a permission is used on the left side of an arrow +// PermissionUsedOnLeftOfArrowError occurs when a permission is used on the left side of an arrow // expression. -type ErrPermissionUsedOnLeftOfArrow struct { +type PermissionUsedOnLeftOfArrowError struct { error namespaceName string parentPermissionName string @@ -114,12 +114,12 @@ type ErrPermissionUsedOnLeftOfArrow struct { } // MarshalZerologObject implements zerolog object marshalling. -func (err ErrPermissionUsedOnLeftOfArrow) MarshalZerologObject(e *zerolog.Event) { +func (err PermissionUsedOnLeftOfArrowError) MarshalZerologObject(e *zerolog.Event) { e.Err(err.error).Str("namespace", err.namespaceName).Str("permission", err.parentPermissionName).Str("usedPermission", err.foundPermissionName) } // DetailsMetadata returns the metadata for details for this error. -func (err ErrPermissionUsedOnLeftOfArrow) DetailsMetadata() map[string]string { +func (err PermissionUsedOnLeftOfArrowError) DetailsMetadata() map[string]string { return map[string]string{ "definition_name": err.namespaceName, "permission_name": err.parentPermissionName, @@ -127,8 +127,8 @@ func (err ErrPermissionUsedOnLeftOfArrow) DetailsMetadata() map[string]string { } } -// ErrWildcardUsedInArrow occurs when an arrow operates over a relation that contains a wildcard. -type ErrWildcardUsedInArrow struct { +// WildcardUsedInArrowError occurs when an arrow operates over a relation that contains a wildcard. +type WildcardUsedInArrowError struct { error namespaceName string parentPermissionName string @@ -136,12 +136,12 @@ type ErrWildcardUsedInArrow struct { } // MarshalZerologObject implements zerolog object marshalling. -func (err ErrWildcardUsedInArrow) MarshalZerologObject(e *zerolog.Event) { +func (err WildcardUsedInArrowError) MarshalZerologObject(e *zerolog.Event) { e.Err(err.error).Str("namespace", err.namespaceName).Str("parentPermissionName", err.parentPermissionName).Str("accessedRelationName", err.accessedRelationName) } // DetailsMetadata returns the metadata for details for this error. -func (err ErrWildcardUsedInArrow) DetailsMetadata() map[string]string { +func (err WildcardUsedInArrowError) DetailsMetadata() map[string]string { return map[string]string{ "definition_name": err.namespaceName, "permission_name": err.parentPermissionName, @@ -149,69 +149,69 @@ func (err ErrWildcardUsedInArrow) DetailsMetadata() map[string]string { } } -// ErrMissingAllowedRelations occurs when a relation is defined without any type information. -type ErrMissingAllowedRelations struct { +// MissingAllowedRelationsError occurs when a relation is defined without any type information. +type MissingAllowedRelationsError struct { error namespaceName string relationName string } // MarshalZerologObject implements zerolog object marshalling. -func (err ErrMissingAllowedRelations) MarshalZerologObject(e *zerolog.Event) { +func (err MissingAllowedRelationsError) MarshalZerologObject(e *zerolog.Event) { e.Err(err.error).Str("namespace", err.namespaceName).Str("relation", err.relationName) } // DetailsMetadata returns the metadata for details for this error. -func (err ErrMissingAllowedRelations) DetailsMetadata() map[string]string { +func (err MissingAllowedRelationsError) DetailsMetadata() map[string]string { return map[string]string{ "definition_name": err.namespaceName, "relation_name": err.relationName, } } -// ErrTransitiveWildcard occurs when a wildcard relation in turn references another wildcard +// TransitiveWildcardError occurs when a wildcard relation in turn references another wildcard // relation. -type ErrTransitiveWildcard struct { +type TransitiveWildcardError struct { error namespaceName string relationName string } // MarshalZerologObject implements zerolog object marshalling. -func (err ErrTransitiveWildcard) MarshalZerologObject(e *zerolog.Event) { +func (err TransitiveWildcardError) MarshalZerologObject(e *zerolog.Event) { e.Err(err.error).Str("namespace", err.namespaceName).Str("relation", err.relationName) } // DetailsMetadata returns the metadata for details for this error. -func (err ErrTransitiveWildcard) DetailsMetadata() map[string]string { +func (err TransitiveWildcardError) DetailsMetadata() map[string]string { return map[string]string{ "definition_name": err.namespaceName, "relation_name": err.relationName, } } -// ErrPermissionsCycle occurs when a cycle exists within permissions. -type ErrPermissionsCycle struct { +// PermissionsCycleError occurs when a cycle exists within permissions. +type PermissionsCycleError struct { error namespaceName string permissionNames []string } // MarshalZerologObject implements zerolog object marshalling. -func (err ErrPermissionsCycle) MarshalZerologObject(e *zerolog.Event) { +func (err PermissionsCycleError) MarshalZerologObject(e *zerolog.Event) { e.Err(err.error).Str("namespace", err.namespaceName).Str("permissions", strings.Join(err.permissionNames, ", ")) } // DetailsMetadata returns the metadata for details for this error. -func (err ErrPermissionsCycle) DetailsMetadata() map[string]string { +func (err PermissionsCycleError) DetailsMetadata() map[string]string { return map[string]string{ "definition_name": err.namespaceName, "permission_names": strings.Join(err.permissionNames, ","), } } -// ErrDuplicateAllowedRelation indicates that an allowed relation was redefined on a relation. -type ErrDuplicateAllowedRelation struct { +// DuplicateAllowedRelationError indicates that an allowed relation was redefined on a relation. +type DuplicateAllowedRelationError struct { error namespaceName string relationName string @@ -219,12 +219,12 @@ type ErrDuplicateAllowedRelation struct { } // MarshalZerologObject implements zerolog object marshalling. -func (err ErrDuplicateAllowedRelation) MarshalZerologObject(e *zerolog.Event) { +func (err DuplicateAllowedRelationError) MarshalZerologObject(e *zerolog.Event) { e.Err(err.error).Str("namespace", err.namespaceName).Str("relation", err.relationName).Str("allowed-relation", err.allowedRelationSource) } // DetailsMetadata returns the metadata for details for this error. -func (err ErrDuplicateAllowedRelation) DetailsMetadata() map[string]string { +func (err DuplicateAllowedRelationError) DetailsMetadata() map[string]string { return map[string]string{ "definition_name": err.namespaceName, "relation_name": err.relationName, @@ -232,20 +232,20 @@ func (err ErrDuplicateAllowedRelation) DetailsMetadata() map[string]string { } } -// ErrUnusedCaveatParameter indicates that a caveat parameter is unused in the caveat expression. -type ErrUnusedCaveatParameter struct { +// UnusedCaveatParameterError indicates that a caveat parameter is unused in the caveat expression. +type UnusedCaveatParameterError struct { error caveatName string paramName string } // MarshalZerologObject implements zerolog object marshalling. -func (err ErrUnusedCaveatParameter) MarshalZerologObject(e *zerolog.Event) { +func (err UnusedCaveatParameterError) MarshalZerologObject(e *zerolog.Event) { e.Err(err.error).Str("caveat", err.caveatName).Str("param", err.paramName) } // DetailsMetadata returns the metadata for details for this error. -func (err ErrUnusedCaveatParameter) DetailsMetadata() map[string]string { +func (err UnusedCaveatParameterError) DetailsMetadata() map[string]string { return map[string]string{ "caveat_name": err.caveatName, "parameter_name": err.paramName, @@ -254,7 +254,7 @@ func (err ErrUnusedCaveatParameter) DetailsMetadata() map[string]string { // NewNamespaceNotFoundErr constructs a new namespace not found error. func NewNamespaceNotFoundErr(nsName string) error { - return ErrNamespaceNotFound{ + return NamespaceNotFoundError{ error: fmt.Errorf("object definition `%s` not found", nsName), namespaceName: nsName, } @@ -262,7 +262,7 @@ func NewNamespaceNotFoundErr(nsName string) error { // NewRelationNotFoundErr constructs a new relation not found error. func NewRelationNotFoundErr(nsName string, relationName string) error { - return ErrRelationNotFound{ + return RelationNotFoundError{ error: fmt.Errorf("relation/permission `%s` not found under definition `%s`", relationName, nsName), namespaceName: nsName, relationName: relationName, @@ -271,7 +271,7 @@ func NewRelationNotFoundErr(nsName string, relationName string) error { // NewCaveatNotFoundErr constructs a new caveat not found error. func NewCaveatNotFoundErr(caveatName string) error { - return ErrCaveatNotFound{ + return CaveatNotFoundError{ error: fmt.Errorf("caveat `%s` not found", caveatName), caveatName: caveatName, } @@ -279,7 +279,7 @@ func NewCaveatNotFoundErr(caveatName string) error { // NewDuplicateRelationError constructs an error indicating that a relation was defined more than once in a namespace. func NewDuplicateRelationError(nsName string, relationName string) error { - return ErrDuplicateRelation{ + return DuplicateRelationError{ error: fmt.Errorf("found duplicate relation/permission name `%s` under definition `%s`", relationName, nsName), namespaceName: nsName, relationName: relationName, @@ -288,7 +288,7 @@ func NewDuplicateRelationError(nsName string, relationName string) error { // NewDuplicateAllowedRelationErr constructs an error indicating that an allowed relation was defined more than once for a relation. func NewDuplicateAllowedRelationErr(nsName string, relationName string, allowedRelationSource string) error { - return ErrDuplicateAllowedRelation{ + return DuplicateAllowedRelationError{ error: fmt.Errorf("found duplicate allowed subject type `%s` on relation `%s` under definition `%s`", allowedRelationSource, relationName, nsName), namespaceName: nsName, relationName: relationName, @@ -298,7 +298,7 @@ func NewDuplicateAllowedRelationErr(nsName string, relationName string, allowedR // NewPermissionUsedOnLeftOfArrowErr constructs an error indicating that a permission was used on the left side of an arrow. func NewPermissionUsedOnLeftOfArrowErr(nsName string, parentPermissionName string, foundPermissionName string) error { - return ErrPermissionUsedOnLeftOfArrow{ + return PermissionUsedOnLeftOfArrowError{ error: fmt.Errorf("under permission `%s` under definition `%s`: permissions cannot be used on the left hand side of an arrow (found `%s`)", parentPermissionName, nsName, foundPermissionName), namespaceName: nsName, parentPermissionName: parentPermissionName, @@ -308,7 +308,7 @@ func NewPermissionUsedOnLeftOfArrowErr(nsName string, parentPermissionName strin // NewWildcardUsedInArrowErr constructs an error indicating that an arrow operated over a relation with a wildcard type. func NewWildcardUsedInArrowErr(nsName string, parentPermissionName string, foundRelationName string, wildcardTypeName string, wildcardRelationName string) error { - return ErrWildcardUsedInArrow{ + return WildcardUsedInArrowError{ error: fmt.Errorf("for arrow under permission `%s`: relation `%s#%s` includes wildcard type `%s` via relation `%s`: wildcard relations cannot be used on the left side of arrows", parentPermissionName, nsName, foundRelationName, wildcardTypeName, wildcardRelationName), namespaceName: nsName, parentPermissionName: parentPermissionName, @@ -318,7 +318,7 @@ func NewWildcardUsedInArrowErr(nsName string, parentPermissionName string, found // NewMissingAllowedRelationsErr constructs an error indicating that type information is missing for a relation. func NewMissingAllowedRelationsErr(nsName string, relationName string) error { - return ErrMissingAllowedRelations{ + return MissingAllowedRelationsError{ error: fmt.Errorf("at least one allowed relation/permission is required to be defined for relation `%s`", relationName), namespaceName: nsName, relationName: relationName, @@ -327,7 +327,7 @@ func NewMissingAllowedRelationsErr(nsName string, relationName string) error { // NewTransitiveWildcardErr constructs an error indicating that a transitive wildcard exists. func NewTransitiveWildcardErr(nsName string, relationName string, foundRelationNamespace string, foundRelationName string, wildcardTypeName string, wildcardRelationReference string) error { - return ErrTransitiveWildcard{ + return TransitiveWildcardError{ error: fmt.Errorf("for relation `%s`: relation/permission `%s#%s` includes wildcard type `%s` via relation `%s`: wildcard relations cannot be transitively included", relationName, foundRelationNamespace, foundRelationName, wildcardTypeName, wildcardRelationReference), namespaceName: nsName, relationName: relationName, @@ -336,7 +336,7 @@ func NewTransitiveWildcardErr(nsName string, relationName string, foundRelationN // NewPermissionsCycleErr constructs an error indicating that a cycle exists amongst permissions. func NewPermissionsCycleErr(nsName string, permissionNames []string) error { - return ErrPermissionsCycle{ + return PermissionsCycleError{ error: fmt.Errorf("under definition `%s`, there exists a cycle in permissions: %s", nsName, strings.Join(permissionNames, ", ")), namespaceName: nsName, permissionNames: permissionNames, @@ -345,7 +345,7 @@ func NewPermissionsCycleErr(nsName string, permissionNames []string) error { // NewUnusedCaveatParameterErr constructs indicating that a parameter was unused in a caveat expression. func NewUnusedCaveatParameterErr(caveatName string, paramName string) error { - return ErrUnusedCaveatParameter{ + return UnusedCaveatParameterError{ error: fmt.Errorf("parameter `%s` for caveat `%s` is unused", paramName, caveatName), caveatName: caveatName, paramName: paramName, @@ -376,6 +376,6 @@ func (err TypeError) Unwrap() error { } var ( - _ sharederrors.UnknownNamespaceError = ErrNamespaceNotFound{} - _ sharederrors.UnknownRelationError = ErrRelationNotFound{} + _ sharederrors.UnknownNamespaceError = NamespaceNotFoundError{} + _ sharederrors.UnknownRelationError = RelationNotFoundError{} ) diff --git a/pkg/typesystem/typesystem.go b/pkg/typesystem/typesystem.go index 8552533759..337b2d364d 100644 --- a/pkg/typesystem/typesystem.go +++ b/pkg/typesystem/typesystem.go @@ -85,7 +85,7 @@ func NewNamespaceTypeSystem(nsDef *core.NamespaceDefinition, resolver Resolver) for _, relation := range nsDef.GetRelation() { _, existing := relationMap[relation.Name] if existing { - return nil, NewTypeErrorWithSource( + return nil, NewTypeWithSourceError( NewDuplicateRelationError(nsDef.Name, relation.Name), relation, relation.Name, @@ -413,7 +413,7 @@ func (nts *TypeSystem) Validate(ctx context.Context) (*ValidatedNamespaceTypeSys relationName := child.ComputedUserset.GetRelation() _, ok := nts.relationMap[relationName] if !ok { - return NewTypeErrorWithSource( + return NewTypeWithSourceError( NewRelationNotFoundErr(nts.nsDef.Name, relationName), childOneof, relationName, @@ -434,7 +434,7 @@ func (nts *TypeSystem) Validate(ctx context.Context) (*ValidatedNamespaceTypeSys relationName := tupleset.GetRelation() found, ok := nts.relationMap[relationName] if !ok { - return NewTypeErrorWithSource( + return NewTypeWithSourceError( NewRelationNotFoundErr(nts.nsDef.Name, relationName), childOneof, relationName, @@ -442,7 +442,7 @@ func (nts *TypeSystem) Validate(ctx context.Context) (*ValidatedNamespaceTypeSys } if nspkg.GetRelationKind(found) == iv1.RelationMetadata_PERMISSION { - return NewTypeErrorWithSource( + return NewTypeWithSourceError( NewPermissionUsedOnLeftOfArrowErr(nts.nsDef.Name, relation.Name, relationName), childOneof, relationName), nil } @@ -454,7 +454,7 @@ func (nts *TypeSystem) Validate(ctx context.Context) (*ValidatedNamespaceTypeSys } if referencedWildcard != nil { - return NewTypeErrorWithSource( + return NewTypeWithSourceError( NewWildcardUsedInArrowErr( nts.nsDef.Name, relation.Name, @@ -480,7 +480,7 @@ func (nts *TypeSystem) Validate(ctx context.Context) (*ValidatedNamespaceTypeSys relationName := tupleset.GetRelation() found, ok := nts.relationMap[relationName] if !ok { - return NewTypeErrorWithSource( + return NewTypeWithSourceError( NewRelationNotFoundErr(nts.nsDef.Name, relationName), childOneof, relationName, @@ -488,7 +488,7 @@ func (nts *TypeSystem) Validate(ctx context.Context) (*ValidatedNamespaceTypeSys } if nspkg.GetRelationKind(found) == iv1.RelationMetadata_PERMISSION { - return NewTypeErrorWithSource( + return NewTypeWithSourceError( NewPermissionUsedOnLeftOfArrowErr(nts.nsDef.Name, relation.Name, relationName), childOneof, relationName), nil } @@ -500,7 +500,7 @@ func (nts *TypeSystem) Validate(ctx context.Context) (*ValidatedNamespaceTypeSys } if referencedWildcard != nil { - return NewTypeErrorWithSource( + return NewTypeWithSourceError( NewWildcardUsedInArrowErr( nts.nsDef.Name, relation.Name, @@ -538,7 +538,7 @@ func (nts *TypeSystem) Validate(ctx context.Context) (*ValidatedNamespaceTypeSys if usersetRewrite == nil || hasThis { if len(allowedDirectRelations) == 0 { - return nil, NewTypeErrorWithSource( + return nil, NewTypeWithSourceError( NewMissingAllowedRelationsErr(nts.nsDef.Name, relation.Name), relation, relation.Name, ) @@ -546,7 +546,7 @@ func (nts *TypeSystem) Validate(ctx context.Context) (*ValidatedNamespaceTypeSys } else { if len(allowedDirectRelations) != 0 { // NOTE: This is a legacy error and should never really occur with schema. - return nil, NewTypeErrorWithSource( + return nil, NewTypeWithSourceError( fmt.Errorf("direct relations are not allowed under relation `%s`", relation.Name), relation, relation.Name) } @@ -562,7 +562,7 @@ func (nts *TypeSystem) Validate(ctx context.Context) (*ValidatedNamespaceTypeSys for _, allowedRelation := range allowedDirectRelations { source := SourceForAllowedRelation(allowedRelation) if !encountered.Add(source) { - return nil, NewTypeErrorWithSource( + return nil, NewTypeWithSourceError( NewDuplicateAllowedRelationErr(nts.nsDef.Name, relation.Name, source), allowedRelation, source, @@ -574,7 +574,7 @@ func (nts *TypeSystem) Validate(ctx context.Context) (*ValidatedNamespaceTypeSys if allowedRelation.GetPublicWildcard() == nil && allowedRelation.GetRelation() != tuple.Ellipsis { _, ok := nts.relationMap[allowedRelation.GetRelation()] if !ok { - return nil, NewTypeErrorWithSource( + return nil, NewTypeWithSourceError( NewRelationNotFoundErr(allowedRelation.GetNamespace(), allowedRelation.GetRelation()), allowedRelation, allowedRelation.GetRelation(), @@ -584,7 +584,7 @@ func (nts *TypeSystem) Validate(ctx context.Context) (*ValidatedNamespaceTypeSys } else { subjectTS, err := nts.TypeSystemForNamespace(ctx, allowedRelation.GetNamespace()) if err != nil { - return nil, NewTypeErrorWithSource( + return nil, NewTypeWithSourceError( fmt.Errorf("could not lookup definition `%s` for relation `%s`: %w", allowedRelation.GetNamespace(), relation.Name, err), allowedRelation, allowedRelation.GetNamespace(), @@ -596,7 +596,7 @@ func (nts *TypeSystem) Validate(ctx context.Context) (*ValidatedNamespaceTypeSys // Ensure the relation exists. ok := subjectTS.HasRelation(allowedRelation.GetRelation()) if !ok { - return nil, NewTypeErrorWithSource( + return nil, NewTypeWithSourceError( NewRelationNotFoundErr(allowedRelation.GetNamespace(), allowedRelation.GetRelation()), allowedRelation, allowedRelation.GetRelation(), @@ -610,7 +610,7 @@ func (nts *TypeSystem) Validate(ctx context.Context) (*ValidatedNamespaceTypeSys } if referencedWildcard != nil { - return nil, NewTypeErrorWithSource( + return nil, NewTypeWithSourceError( NewTransitiveWildcardErr( nts.nsDef.Name, relation.GetName(), @@ -630,7 +630,7 @@ func (nts *TypeSystem) Validate(ctx context.Context) (*ValidatedNamespaceTypeSys if allowedRelation.GetRequiredCaveat() != nil { _, err := nts.resolver.LookupCaveat(ctx, allowedRelation.GetRequiredCaveat().CaveatName) if err != nil { - return nil, NewTypeErrorWithSource( + return nil, NewTypeWithSourceError( fmt.Errorf("could not lookup caveat `%s` for relation `%s`: %w", allowedRelation.GetRequiredCaveat().CaveatName, relation.Name, err), allowedRelation, source, @@ -702,7 +702,7 @@ func (nts *TypeSystem) RelationDoesNotAllowCaveatsForSubject(relationName string typeInfo := relation.GetTypeInformation() if typeInfo == nil { - return false, NewTypeErrorWithSource( + return false, NewTypeWithSourceError( fmt.Errorf("relation `%s` does not have type information", relationName), relation, relationName, ) @@ -719,7 +719,7 @@ func (nts *TypeSystem) RelationDoesNotAllowCaveatsForSubject(relationName string } if !foundSubjectType { - return false, NewTypeErrorWithSource( + return false, NewTypeWithSourceError( fmt.Errorf("relation `%s` does not allow subject type `%s`", relationName, subjectTypeName), relation, relationName, ) @@ -733,12 +733,12 @@ type ValidatedNamespaceTypeSystem struct { *TypeSystem } -// NewTypeErrorWithSource creates a new type error at the specific position and with source code, wrapping the underlying +// NewTypeWithSourceError creates a new type error at the specific position and with source code, wrapping the underlying // error. -func NewTypeErrorWithSource(wrapped error, withSource nspkg.WithSourcePosition, sourceCodeString string) error { +func NewTypeWithSourceError(wrapped error, withSource nspkg.WithSourcePosition, sourceCodeString string) error { sourcePosition := withSource.GetSourcePosition() if sourcePosition != nil { - return asTypeError(spiceerrors.NewErrorWithSource( + return asTypeError(spiceerrors.NewWithSourceError( wrapped, sourceCodeString, sourcePosition.ZeroIndexedLineNumber+1, // +1 to make 1-indexed @@ -746,7 +746,7 @@ func NewTypeErrorWithSource(wrapped error, withSource nspkg.WithSourcePosition, )) } - return asTypeError(spiceerrors.NewErrorWithSource( + return asTypeError(spiceerrors.NewWithSourceError( wrapped, sourceCodeString, 0, diff --git a/pkg/validationfile/blocks/assertions.go b/pkg/validationfile/blocks/assertions.go index 56ef6cc693..56c4e6cec8 100644 --- a/pkg/validationfile/blocks/assertions.go +++ b/pkg/validationfile/blocks/assertions.go @@ -93,7 +93,7 @@ func (a *Assertion) UnmarshalYAML(node *yamlv3.Node) error { // Check for caveat context. parts := strings.SplitN(trimmed, " with ", 2) if len(parts) == 0 { - return spiceerrors.NewErrorWithSource( + return spiceerrors.NewWithSourceError( fmt.Errorf("error parsing assertion `%s`", trimmed), trimmed, line, @@ -103,7 +103,7 @@ func (a *Assertion) UnmarshalYAML(node *yamlv3.Node) error { relationship, err := tuple.Parse(strings.TrimSpace(parts[0])) if err != nil { - return spiceerrors.NewErrorWithSource( + return spiceerrors.NewWithSourceError( fmt.Errorf("error parsing relationship in assertion `%s`: %w", trimmed, err), trimmed, line, @@ -117,7 +117,7 @@ func (a *Assertion) UnmarshalYAML(node *yamlv3.Node) error { caveatContextMap := make(map[string]any, 0) err := json.Unmarshal([]byte(parts[1]), &caveatContextMap) if err != nil { - return spiceerrors.NewErrorWithSource( + return spiceerrors.NewWithSourceError( fmt.Errorf("error parsing caveat context in assertion `%s`: %w", trimmed, err), trimmed, line, diff --git a/pkg/validationfile/blocks/errors.go b/pkg/validationfile/blocks/errors.go index 70054a846f..b30ef7abd1 100644 --- a/pkg/validationfile/blocks/errors.go +++ b/pkg/validationfile/blocks/errors.go @@ -35,7 +35,7 @@ func convertYamlError(err error) error { message = fmt.Sprintf("unexpected value `%s`", source) } - return spiceerrors.NewErrorWithSource( + return spiceerrors.NewWithSourceError( errors.New(message), source, lineNumber, diff --git a/pkg/validationfile/blocks/expectedrelations.go b/pkg/validationfile/blocks/expectedrelations.go index 9c0bb1db4d..44f3b88d68 100644 --- a/pkg/validationfile/blocks/expectedrelations.go +++ b/pkg/validationfile/blocks/expectedrelations.go @@ -70,7 +70,7 @@ func (ors *ObjectRelation) UnmarshalYAML(node *yamlv3.Node) error { parsed, err := tuple.ParseONR(ors.ObjectRelationString) if err != nil { - return spiceerrors.NewErrorWithSource( + return spiceerrors.NewWithSourceError( fmt.Errorf("could not parse %s: %w", ors.ObjectRelationString, err), ors.ObjectRelationString, line, @@ -142,7 +142,7 @@ func (es *ExpectedSubject) UnmarshalYAML(node *yamlv3.Node) error { subjectWithExceptions, subErr := es.ValidationString.Subject() if subErr != nil { - return spiceerrors.NewErrorWithSource( + return spiceerrors.NewWithSourceError( subErr, subErr.SourceCodeString, line+subErr.LineNumber, @@ -152,7 +152,7 @@ func (es *ExpectedSubject) UnmarshalYAML(node *yamlv3.Node) error { onrs, onrErr := es.ValidationString.ONRS() if onrErr != nil { - return spiceerrors.NewErrorWithSource( + return spiceerrors.NewWithSourceError( onrErr, onrErr.SourceCodeString, line+onrErr.LineNumber, @@ -183,7 +183,7 @@ func (vs ValidationString) SubjectString() (string, bool) { // Subject returns the subject contained in the ValidationString, if any. If // none, returns nil. -func (vs ValidationString) Subject() (*SubjectWithExceptions, *spiceerrors.ErrorWithSource) { +func (vs ValidationString) Subject() (*SubjectWithExceptions, *spiceerrors.WithSourceError) { subjectStr, ok := vs.SubjectString() if !ok { return nil, nil @@ -193,13 +193,13 @@ func (vs ValidationString) Subject() (*SubjectWithExceptions, *spiceerrors.Error groups := vsSubjectWithExceptionsOrCaveatRegex.FindStringSubmatch(subjectStr) if len(groups) == 0 { bracketedSubjectString := "[" + subjectStr + "]" - return nil, spiceerrors.NewErrorWithSource(fmt.Errorf("invalid subject: `%s`", subjectStr), bracketedSubjectString, 0, 0) + return nil, spiceerrors.NewWithSourceError(fmt.Errorf("invalid subject: `%s`", subjectStr), bracketedSubjectString, 0, 0) } subjectONRString := groups[slices.Index(vsSubjectWithExceptionsOrCaveatRegex.SubexpNames(), "subject_onr")] subjectONR, err := tuple.ParseSubjectONR(subjectONRString) if err != nil { - return nil, spiceerrors.NewErrorWithSource(fmt.Errorf("invalid subject: `%s`: %w", subjectONRString, err), subjectONRString, 0, 0) + return nil, spiceerrors.NewWithSourceError(fmt.Errorf("invalid subject: `%s`: %w", subjectONRString, err), subjectONRString, 0, 0) } exceptionsString := strings.TrimSpace(groups[slices.Index(vsSubjectWithExceptionsOrCaveatRegex.SubexpNames(), "exceptions")]) @@ -217,7 +217,7 @@ func (vs ValidationString) Subject() (*SubjectWithExceptions, *spiceerrors.Error exceptionONR, err := tuple.ParseSubjectONR(strings.TrimSpace(exceptionString)) if err != nil { - return nil, spiceerrors.NewErrorWithSource(fmt.Errorf("invalid subject: `%s`: %w", exceptionString, err), exceptionString, 0, 0) + return nil, spiceerrors.NewWithSourceError(fmt.Errorf("invalid subject: `%s`: %w", exceptionString, err), exceptionString, 0, 0) } exceptions = append(exceptions, SubjectAndCaveat{exceptionONR, isCaveated}) @@ -239,13 +239,13 @@ func (vs ValidationString) ONRStrings() []string { } // ONRS returns the subject ONRs in the ValidationString, if any. -func (vs ValidationString) ONRS() ([]tuple.ObjectAndRelation, *spiceerrors.ErrorWithSource) { +func (vs ValidationString) ONRS() ([]tuple.ObjectAndRelation, *spiceerrors.WithSourceError) { onrStrings := vs.ONRStrings() onrs := []tuple.ObjectAndRelation{} for _, onrString := range onrStrings { found, err := tuple.ParseONR(onrString) if err != nil { - return nil, spiceerrors.NewErrorWithSource(fmt.Errorf("invalid resource and relation: `%s`: %w", onrString, err), onrString, 0, 0) + return nil, spiceerrors.NewWithSourceError(fmt.Errorf("invalid resource and relation: `%s`: %w", onrString, err), onrString, 0, 0) } onrs = append(onrs, found) diff --git a/pkg/validationfile/blocks/relationships.go b/pkg/validationfile/blocks/relationships.go index 94ac4c68dc..278c7a8e46 100644 --- a/pkg/validationfile/blocks/relationships.go +++ b/pkg/validationfile/blocks/relationships.go @@ -56,7 +56,7 @@ func (pr *ParsedRelationships) UnmarshalYAML(node *yamlv3.Node) error { rel, err := tuple.Parse(trimmed) if err != nil { - return spiceerrors.NewErrorWithSource( + return spiceerrors.NewWithSourceError( fmt.Errorf("error parsing relationship `%s`: %w", trimmed, err), trimmed, errorLine, @@ -64,16 +64,16 @@ func (pr *ParsedRelationships) UnmarshalYAML(node *yamlv3.Node) error { ) } - _, ok := seenTuples[tuple.StringWithoutCaveat(rel)] + _, ok := seenTuples[tuple.StringWithoutCaveatOrExpiration(rel)] if ok { - return spiceerrors.NewErrorWithSource( + return spiceerrors.NewWithSourceError( fmt.Errorf("found repeated relationship `%s`", trimmed), trimmed, errorLine, column, ) } - seenTuples[tuple.StringWithoutCaveat(rel)] = true + seenTuples[tuple.StringWithoutCaveatOrExpiration(rel)] = true relationships = append(relationships, rel) } diff --git a/pkg/validationfile/blocks/schema.go b/pkg/validationfile/blocks/schema.go index 6286c3eda4..814eebca0f 100644 --- a/pkg/validationfile/blocks/schema.go +++ b/pkg/validationfile/blocks/schema.go @@ -37,7 +37,7 @@ func (ps *ParsedSchema) UnmarshalYAML(node *yamlv3.Node) error { SchemaString: ps.Schema, }, compiler.AllowUnprefixedObjectType()) if err != nil { - var errWithContext compiler.ErrorWithContext + var errWithContext compiler.WithContextError if errors.As(err, &errWithContext) { line, col, lerr := errWithContext.SourceRange.Start().LineAndColumn() if lerr != nil { @@ -53,7 +53,7 @@ func (ps *ParsedSchema) UnmarshalYAML(node *yamlv3.Node) error { return err } - return spiceerrors.NewErrorWithSource( + return spiceerrors.NewWithSourceError( fmt.Errorf("error when parsing schema: %s", errWithContext.BaseMessage), errWithContext.ErrorSourceCode, uintLine+1, // source line is 0-indexed diff --git a/pkg/validationfile/fileformat_test.go b/pkg/validationfile/fileformat_test.go index 3d9d056b06..8f8b793fa6 100644 --- a/pkg/validationfile/fileformat_test.go +++ b/pkg/validationfile/fileformat_test.go @@ -111,7 +111,7 @@ relationships: >- document:firstdoc#reader#user:fred `)) - errWithSource, ok := spiceerrors.AsErrorWithSource(err) + errWithSource, ok := spiceerrors.AsWithSourceError(err) require.True(t, ok) require.Equal(t, err.Error(), "error parsing relationship `document:firstdocwriter@user:tom`: invalid relationship string") @@ -128,7 +128,7 @@ relationships: >- document:firstdoc#readeruser:fred `)) - errWithSource, ok := spiceerrors.AsErrorWithSource(err) + errWithSource, ok := spiceerrors.AsWithSourceError(err) require.True(t, ok) require.Equal(t, err.Error(), "error parsing relationship `document:firstdoc#readeruser:fred`: invalid relationship string") @@ -151,7 +151,7 @@ relationships: >- document:firstdoc#readeruser:fred `)) - errWithSource, ok := spiceerrors.AsErrorWithSource(err) + errWithSource, ok := spiceerrors.AsWithSourceError(err) require.True(t, ok) require.Equal(t, err.Error(), "error parsing relationship `document:firstdoc#readeruser:fred`: invalid relationship string") @@ -175,7 +175,7 @@ assertions: - document:seconddoc#view@user:fred `)) - errWithSource, ok := spiceerrors.AsErrorWithSource(err) + errWithSource, ok := spiceerrors.AsWithSourceError(err) require.True(t, ok) require.Equal(t, err.Error(), "unexpected value `asdkjha`") @@ -199,7 +199,7 @@ assertions: - document:seconddoc#view@user:fred `)) - errWithSource, ok := spiceerrors.AsErrorWithSource(err) + errWithSource, ok := spiceerrors.AsWithSourceError(err) require.True(t, ok) require.Equal(t, err.Error(), "unexpected value `asdk`") diff --git a/proto/internal/core/v1/core.proto b/proto/internal/core/v1/core.proto index 6c96521d72..ca836a414c 100644 --- a/proto/internal/core/v1/core.proto +++ b/proto/internal/core/v1/core.proto @@ -20,6 +20,9 @@ message RelationTuple { /** integrity holds (optional) information about the integrity of the tuple */ RelationshipIntegrity integrity = 4 [(validate.rules).message.required = false]; + + /** optional_expiration_time is the (optional) time at which the tuple expires */ + google.protobuf.Timestamp optional_expiration_time = 5; } message RelationshipIntegrity {