diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 0b41dcd0b4..009067e63d 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -129,11 +129,3 @@ jobs: version: latest args: test:ui workdir: build - - - name: Upload Playwright Report - uses: actions/upload-artifact@v3 - if: ${{ always() }} - with: - name: playwright-report - path: playwright-report/ - retention-days: 5 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 824c3c586e..83a6aac5d0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go: ["1.19", "1.20"] + go: ["1.20"] steps: - uses: actions/checkout@v3 diff --git a/build/testing/integration.go b/build/testing/integration.go index 80d412e544..7de5ba81a7 100644 --- a/build/testing/integration.go +++ b/build/testing/integration.go @@ -6,6 +6,7 @@ import ( "fmt" "log" "math/rand" + "os" "path" "strings" "time" @@ -90,6 +91,7 @@ func Integration(ctx context.Context, client *dagger.Client, base, flipt *dagger name := strings.ToLower(replacer.Replace(fmt.Sprintf("flipt-test-%s-config-%s", test.name, config.name))) flipt = flipt. + WithEnvVariable("CI", os.Getenv("CI")). WithEnvVariable("FLIPT_LOG_LEVEL", "debug"). WithEnvVariable("FLIPT_LOG_FILE", fmt.Sprintf("/var/opt/flipt/logs/%s.log", name)). WithMountedCache("/var/opt/flipt/logs", logs) diff --git a/build/testing/ui.go b/build/testing/ui.go index 6ce3122649..3312e33a29 100644 --- a/build/testing/ui.go +++ b/build/testing/ui.go @@ -2,6 +2,7 @@ package testing import ( "context" + "os" "time" "dagger.io/dagger" @@ -11,6 +12,7 @@ func UI(ctx context.Context, client *dagger.Client, ui, flipt *dagger.Container) test := ui. WithExec([]string{"npx", "playwright", "install", "chromium", "--with-deps"}). WithServiceBinding("flipt", flipt. + WithEnvVariable("CI", os.Getenv("CI")). WithEnvVariable("FLIPT_AUTHENTICATION_METHODS_TOKEN_ENABLED", "true"). WithEnvVariable("UNIQUE", time.Now().String()). WithExec(nil)). diff --git a/go.mod b/go.mod index 56997fa703..d65011141c 100644 --- a/go.mod +++ b/go.mod @@ -34,7 +34,7 @@ require ( github.com/spf13/cobra v1.7.0 github.com/spf13/viper v1.15.0 github.com/stretchr/testify v1.8.2 - github.com/testcontainers/testcontainers-go v0.19.0 + github.com/testcontainers/testcontainers-go v0.20.0 github.com/uber/jaeger-client-go v2.30.0+incompatible github.com/xo/dburl v0.14.2 go.flipt.io/flipt/errors v1.19.3 @@ -76,7 +76,7 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/docker/docker v23.0.3+incompatible // indirect + github.com/docker/docker v23.0.5+incompatible // indirect github.com/docker/go-units v0.5.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-jose/go-jose/v3 v3.0.0 // indirect @@ -93,6 +93,7 @@ require ( github.com/hashicorp/go-hclog v1.4.0 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/hcl v1.0.0 // indirect + github.com/imdario/mergo v0.3.12 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/klauspost/compress v1.15.12 // indirect github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect diff --git a/go.sum b/go.sum index 97f0b1fde0..94828e9134 100644 --- a/go.sum +++ b/go.sum @@ -395,8 +395,8 @@ github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m3 github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v1.4.2-0.20190924003213-a8608b5b67c7/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v20.10.13+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v23.0.3+incompatible h1:9GhVsShNWz1hO//9BNg/dpMnZW25KydO4wtVxWAIbho= -github.com/docker/docker v23.0.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v23.0.5+incompatible h1:DaxtlTJjFSnLOXVNUBU1+6kXGz2lpDoEAH6QoxaSg8k= +github.com/docker/docker v23.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= @@ -738,6 +738,7 @@ github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJ github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= @@ -1225,8 +1226,8 @@ github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= -github.com/testcontainers/testcontainers-go v0.19.0 h1:3bmFPuQRgVIQwxZJERyzB8AogmJW3Qzh8iDyfJbPhi8= -github.com/testcontainers/testcontainers-go v0.19.0/go.mod h1:3YsSoxK0rGEUzbGD4gUVt1Nm3GJpCIq94GX+2LSf3d4= +github.com/testcontainers/testcontainers-go v0.20.0 h1:ASrcJee7vcWNw43yUgL2n8KA5IOywrF031GawlrkVkE= +github.com/testcontainers/testcontainers-go v0.20.0/go.mod h1:zb+NOlCQBkZ7RQp4QI+YMIHyO2CQ/qsXzNF5eLJ24SY= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= diff --git a/go.work.sum b/go.work.sum index 7fb194887a..55b153511f 100644 --- a/go.work.sum +++ b/go.work.sum @@ -511,6 +511,8 @@ github.com/dimchansky/utfbom v1.1.1 h1:vV6w1AhK4VMnhBno/TPVCoK9U/LP0PkLCS9tbxHdi github.com/dnaeon/go-vcr v1.0.1 h1:r8L/HqC0Hje5AXMu1ooW8oyQyOFv4GxqpL0nRP7SLLY= github.com/dnephin/pflag v1.0.7 h1:oxONGlWxhmUct0YzKTgrpQv9AUA1wtPBn7zuSjJqptk= github.com/docker/cli v23.0.0-rc.1+incompatible h1:Vl3pcUK4/LFAD56Ys3BrqgAtuwpWd/IO3amuSL0ZbP0= +github.com/docker/docker v23.0.5+incompatible h1:DaxtlTJjFSnLOXVNUBU1+6kXGz2lpDoEAH6QoxaSg8k= +github.com/docker/docker v23.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A= github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8= github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8= @@ -923,6 +925,8 @@ github.com/stretchr/testify v1.7.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/subosito/gotenv v1.4.0/go.mod h1:mZd6rFysKEcUhUHXJk0C/08wAgyDBFuwEYL7vWWGaGo= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 h1:kdXcSzyDtseVEc4yCz2qF8ZrQvIDBJLl4S1c3GCXmoI= github.com/tchap/go-patricia v2.2.6+incompatible h1:JvoDL7JSoIP2HDE8AbDH3zC8QBPxmzYe32HHy5yQ+Ck= +github.com/testcontainers/testcontainers-go v0.20.0 h1:ASrcJee7vcWNw43yUgL2n8KA5IOywrF031GawlrkVkE= +github.com/testcontainers/testcontainers-go v0.20.0/go.mod h1:zb+NOlCQBkZ7RQp4QI+YMIHyO2CQ/qsXzNF5eLJ24SY= github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw= github.com/tklauser/numcpus v0.4.0 h1:E53Dm1HjH1/R2/aoCtXtPgzmElmn51aOkhCFSuZq//o= diff --git a/internal/server/evaluator.go b/internal/server/evaluator.go index a7ce550799..3d614b48c2 100644 --- a/internal/server/evaluator.go +++ b/internal/server/evaluator.go @@ -209,6 +209,8 @@ func (s *Server) evaluate(ctx context.Context, r *flipt.EvaluationRequest) (resp match, err = matchesNumber(c, v) case flipt.ComparisonType_BOOLEAN_COMPARISON_TYPE: match, err = matchesBool(c, v) + case flipt.ComparisonType_DATETIME_COMPARISON_TYPE: + match, err = matchesDateTime(c, v) default: resp.Reason = flipt.EvaluationReason_ERROR_EVALUATION_REASON return resp, errs.ErrInvalid("unknown constraint type") @@ -443,3 +445,56 @@ func matchesBool(c storage.EvaluationConstraint, v string) (bool, error) { return false, nil } + +func matchesDateTime(c storage.EvaluationConstraint, v string) (bool, error) { + switch c.Operator { + case flipt.OpNotPresent: + return len(strings.TrimSpace(v)) == 0, nil + case flipt.OpPresent: + return len(strings.TrimSpace(v)) != 0, nil + } + + // can't parse an empty string + if v == "" { + return false, nil + } + + d, err := tryParseDateTime(v) + if err != nil { + return false, err + } + + value, err := tryParseDateTime(c.Value) + if err != nil { + return false, err + } + + switch c.Operator { + case flipt.OpEQ: + return value.Equal(d), nil + case flipt.OpNEQ: + return !value.Equal(d), nil + case flipt.OpLT: + return d.Before(value), nil + case flipt.OpLTE: + return d.Before(value) || value.Equal(d), nil + case flipt.OpGT: + return d.After(value), nil + case flipt.OpGTE: + return d.After(value) || value.Equal(d), nil + } + + return false, nil +} + +func tryParseDateTime(v string) (time.Time, error) { + if d, err := time.Parse(time.RFC3339, v); err == nil { + return d.UTC(), nil + } + + if d, err := time.Parse(time.DateOnly, v); err == nil { + return d.UTC(), nil + } + + return time.Time{}, errs.ErrInvalidf("parsing datetime from %q", v) +} diff --git a/internal/server/evaluator_test.go b/internal/server/evaluator_test.go index 474e83f458..c787d8a381 100644 --- a/internal/server/evaluator_test.go +++ b/internal/server/evaluator_test.go @@ -2206,3 +2206,239 @@ func Test_matchesBool(t *testing.T) { }) } } + +func Test_matchesDateTime(t *testing.T) { + tests := []struct { + name string + constraint storage.EvaluationConstraint + value string + wantMatch bool + wantErr bool + }{ + { + name: "present", + constraint: storage.EvaluationConstraint{ + Property: "foo", + Operator: "present", + }, + value: "2006-01-02T15:04:05Z", + wantMatch: true, + }, + { + name: "negative present", + constraint: storage.EvaluationConstraint{ + Property: "foo", + Operator: "present", + }, + }, + { + name: "not present", + constraint: storage.EvaluationConstraint{ + Property: "foo", + Operator: "notpresent", + }, + wantMatch: true, + }, + { + name: "negative notpresent", + constraint: storage.EvaluationConstraint{ + Property: "foo", + Operator: "notpresent", + }, + value: "2006-01-02T15:04:05Z", + }, + { + name: "not a datetime constraint value", + constraint: storage.EvaluationConstraint{ + Property: "foo", + Operator: "eq", + Value: "bar", + }, + value: "2006-01-02T15:04:05Z", + wantErr: true, + }, + { + name: "not a datetime context value", + constraint: storage.EvaluationConstraint{ + Property: "foo", + Operator: "eq", + Value: "2006-01-02T15:04:05Z", + }, + value: "foo", + wantErr: true, + }, + { + name: "eq", + constraint: storage.EvaluationConstraint{ + Property: "foo", + Operator: "eq", + Value: "2006-01-02T15:04:05Z", + }, + value: "2006-01-02T15:04:05Z", + wantMatch: true, + }, + { + name: "eq date only", + constraint: storage.EvaluationConstraint{ + Property: "foo", + Operator: "eq", + Value: "2006-01-02", + }, + value: "2006-01-02", + wantMatch: true, + }, + { + name: "negative eq", + constraint: storage.EvaluationConstraint{ + Property: "foo", + Operator: "eq", + Value: "2006-01-02T15:04:05Z", + }, + value: "2007-01-02T15:04:05Z", + }, + { + name: "neq", + constraint: storage.EvaluationConstraint{ + Property: "foo", + Operator: "neq", + Value: "2006-01-02T15:04:05Z", + }, + value: "2007-01-02T15:04:05Z", + wantMatch: true, + }, + { + name: "negative neq", + constraint: storage.EvaluationConstraint{ + Property: "foo", + Operator: "neq", + Value: "2006-01-02T15:04:05Z", + }, + value: "2006-01-02T15:04:05Z", + }, + { + name: "negative neq date only", + constraint: storage.EvaluationConstraint{ + Property: "foo", + Operator: "neq", + Value: "2006-01-02", + }, + value: "2006-01-02", + }, + { + name: "lt", + constraint: storage.EvaluationConstraint{ + Property: "foo", + Operator: "lt", + Value: "2006-01-02T15:04:05Z", + }, + value: "2005-01-02T15:04:05Z", + wantMatch: true, + }, + { + name: "negative lt", + constraint: storage.EvaluationConstraint{ + Property: "foo", + Operator: "lt", + Value: "2005-01-02T15:04:05Z", + }, + value: "2006-01-02T15:04:05Z", + }, + { + name: "lte", + constraint: storage.EvaluationConstraint{ + Property: "foo", + Operator: "lte", + Value: "2006-01-02T15:04:05Z", + }, + value: "2006-01-02T15:04:05Z", + wantMatch: true, + }, + { + name: "negative lte", + constraint: storage.EvaluationConstraint{ + Property: "foo", + Operator: "lte", + Value: "2006-01-02T15:04:05Z", + }, + value: "2007-01-02T15:04:05Z", + }, + { + name: "gt", + constraint: storage.EvaluationConstraint{ + Property: "foo", + Operator: "gt", + Value: "2006-01-02T15:04:05Z", + }, + value: "2007-01-02T15:04:05Z", + wantMatch: true, + }, + { + name: "negative gt", + constraint: storage.EvaluationConstraint{ + Property: "foo", + Operator: "gt", + Value: "2007-01-02T15:04:05Z", + }, + value: "2006-01-02T15:04:05Z", + }, + { + name: "gte", + constraint: storage.EvaluationConstraint{ + Property: "foo", + Operator: "gte", + Value: "2006-01-02T15:04:05Z", + }, + value: "2006-01-02T15:04:05Z", + wantMatch: true, + }, + { + name: "negative gte", + constraint: storage.EvaluationConstraint{ + Property: "foo", + Operator: "gte", + Value: "2006-01-02T15:04:05Z", + }, + value: "2005-01-02T15:04:05Z", + }, + { + name: "empty value", + constraint: storage.EvaluationConstraint{ + Property: "foo", + Operator: "eq", + Value: "2006-01-02T15:04:05Z", + }, + }, + { + name: "unknown operator", + constraint: storage.EvaluationConstraint{ + Property: "foo", + Operator: "foo", + Value: "2006-01-02T15:04:05Z", + }, + value: "2006-01-02T15:04:05Z", + }, + } + + for _, tt := range tests { + var ( + constraint = tt.constraint + value = tt.value + wantMatch = tt.wantMatch + wantErr = tt.wantErr + ) + + t.Run(tt.name, func(t *testing.T) { + match, err := matchesDateTime(constraint, value) + + if wantErr { + require.Error(t, err) + var ierr errs.ErrInvalid + require.ErrorAs(t, err, &ierr) + return + } + + require.NoError(t, err) + assert.Equal(t, wantMatch, match) + }) + } +} diff --git a/rpc/flipt/flipt.pb.go b/rpc/flipt/flipt.pb.go index 33b84a4daf..7d643fc300 100644 --- a/rpc/flipt/flipt.pb.go +++ b/rpc/flipt/flipt.pb.go @@ -126,10 +126,11 @@ func (MatchType) EnumDescriptor() ([]byte, []int) { type ComparisonType int32 const ( - ComparisonType_UNKNOWN_COMPARISON_TYPE ComparisonType = 0 - ComparisonType_STRING_COMPARISON_TYPE ComparisonType = 1 - ComparisonType_NUMBER_COMPARISON_TYPE ComparisonType = 2 - ComparisonType_BOOLEAN_COMPARISON_TYPE ComparisonType = 3 + ComparisonType_UNKNOWN_COMPARISON_TYPE ComparisonType = 0 + ComparisonType_STRING_COMPARISON_TYPE ComparisonType = 1 + ComparisonType_NUMBER_COMPARISON_TYPE ComparisonType = 2 + ComparisonType_BOOLEAN_COMPARISON_TYPE ComparisonType = 3 + ComparisonType_DATETIME_COMPARISON_TYPE ComparisonType = 4 ) // Enum value maps for ComparisonType. @@ -139,12 +140,14 @@ var ( 1: "STRING_COMPARISON_TYPE", 2: "NUMBER_COMPARISON_TYPE", 3: "BOOLEAN_COMPARISON_TYPE", + 4: "DATETIME_COMPARISON_TYPE", } ComparisonType_value = map[string]int32{ - "UNKNOWN_COMPARISON_TYPE": 0, - "STRING_COMPARISON_TYPE": 1, - "NUMBER_COMPARISON_TYPE": 2, - "BOOLEAN_COMPARISON_TYPE": 3, + "UNKNOWN_COMPARISON_TYPE": 0, + "STRING_COMPARISON_TYPE": 1, + "NUMBER_COMPARISON_TYPE": 2, + "BOOLEAN_COMPARISON_TYPE": 3, + "DATETIME_COMPARISON_TYPE": 4, } ) @@ -4136,7 +4139,7 @@ var file_flipt_proto_rawDesc = []byte{ 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x4c, 0x4c, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x4e, 0x59, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x01, 0x2a, - 0x82, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x54, 0x79, + 0xa0, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x41, 0x52, 0x49, 0x53, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x41, 0x52, @@ -4144,142 +4147,144 @@ var file_flipt_proto_rawDesc = []byte{ 0x55, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x41, 0x52, 0x49, 0x53, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x42, 0x4f, 0x4f, 0x4c, 0x45, 0x41, 0x4e, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x41, 0x52, 0x49, 0x53, 0x4f, 0x4e, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x10, 0x03, 0x32, 0xca, 0x10, 0x0a, 0x05, 0x46, 0x6c, 0x69, 0x70, 0x74, 0x12, 0x41, - 0x0a, 0x08, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x12, 0x18, 0x2e, 0x66, 0x6c, 0x69, - 0x70, 0x74, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x45, 0x76, 0x61, + 0x50, 0x45, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x44, 0x41, 0x54, 0x45, 0x54, 0x49, 0x4d, 0x45, + 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x41, 0x52, 0x49, 0x53, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x10, 0x04, 0x32, 0xca, 0x10, 0x0a, 0x05, 0x46, 0x6c, 0x69, 0x70, 0x74, 0x12, 0x41, 0x0a, 0x08, + 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x12, 0x18, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, + 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x75, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x50, 0x0a, 0x0d, 0x42, 0x61, 0x74, 0x63, 0x68, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, + 0x12, 0x1d, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x45, 0x76, + 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1e, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x50, 0x0a, 0x0d, 0x42, 0x61, 0x74, 0x63, 0x68, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, - 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, - 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1e, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x45, - 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x12, 0x1a, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x4e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x10, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x0f, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1d, 0x2e, - 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x66, - 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x00, - 0x12, 0x44, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x12, 0x1d, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1d, 0x2e, 0x66, 0x6c, 0x69, 0x70, - 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x15, 0x2e, - 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0b, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x46, 0x6c, 0x61, - 0x67, 0x22, 0x00, 0x12, 0x36, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x73, - 0x12, 0x16, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x6c, 0x61, - 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, - 0x2e, 0x46, 0x6c, 0x61, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x00, 0x12, 0x35, 0x0a, 0x0a, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x18, 0x2e, 0x66, 0x6c, 0x69, 0x70, - 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x0b, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x46, 0x6c, 0x61, 0x67, - 0x22, 0x00, 0x12, 0x35, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x6c, 0x61, 0x67, - 0x12, 0x18, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, - 0x6c, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0b, 0x2e, 0x66, 0x6c, 0x69, - 0x70, 0x74, 0x2e, 0x46, 0x6c, 0x61, 0x67, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0a, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x18, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x0d, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x66, - 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, - 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x66, 0x6c, 0x69, 0x70, - 0x74, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x0d, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x66, - 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, - 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x66, 0x6c, 0x69, 0x70, - 0x74, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x0d, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x66, - 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, - 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x15, - 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0b, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x52, 0x75, - 0x6c, 0x65, 0x22, 0x00, 0x12, 0x36, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6c, 0x65, - 0x73, 0x12, 0x16, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, - 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x66, 0x6c, 0x69, 0x70, - 0x74, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x00, 0x12, 0x35, 0x0a, 0x0a, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x18, 0x2e, 0x66, 0x6c, 0x69, - 0x70, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0b, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x52, 0x75, 0x6c, - 0x65, 0x22, 0x00, 0x12, 0x35, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, - 0x65, 0x12, 0x18, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0b, 0x2e, 0x66, 0x6c, - 0x69, 0x70, 0x74, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0a, 0x4f, 0x72, - 0x64, 0x65, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x18, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, - 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0a, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x18, 0x2e, 0x66, 0x6c, 0x69, - 0x70, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x4d, - 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x44, - 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x12, 0x4d, 0x0a, - 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x44, 0x69, - 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x12, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x38, - 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x2e, 0x66, - 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x53, - 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x00, 0x12, 0x3f, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, - 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x19, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x53, 0x65, 0x67, 0x6d, - 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x0d, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x66, 0x6c, 0x69, - 0x70, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, + 0x00, 0x12, 0x3e, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x12, 0x1a, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, + 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, + 0x00, 0x12, 0x45, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x14, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1d, 0x2e, 0x66, 0x6c, + 0x69, 0x70, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x66, 0x6c, 0x69, + 0x70, 0x74, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x00, 0x12, 0x44, + 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x12, 0x1d, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x10, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1d, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, + 0x12, 0x2f, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x15, 0x2e, 0x66, 0x6c, + 0x69, 0x70, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x0b, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x46, 0x6c, 0x61, 0x67, 0x22, + 0x00, 0x12, 0x36, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x16, + 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x46, + 0x6c, 0x61, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x00, 0x12, 0x35, 0x0a, 0x0a, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x18, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x0b, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x46, 0x6c, 0x61, 0x67, 0x22, 0x00, + 0x12, 0x35, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x18, + 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x6c, 0x61, + 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0b, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, + 0x2e, 0x46, 0x6c, 0x61, 0x67, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x18, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x0d, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x66, 0x6c, 0x69, + 0x70, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, - 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x0d, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x66, 0x6c, 0x69, - 0x70, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, + 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x0d, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x66, 0x6c, 0x69, + 0x70, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, - 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x0d, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x66, 0x6c, 0x69, - 0x70, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, + 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x0d, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x66, 0x6c, 0x69, + 0x70, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, - 0x00, 0x12, 0x47, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, - 0x72, 0x61, 0x69, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x43, 0x6f, - 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x10, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x12, 0x1e, - 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, - 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, - 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, - 0x74, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, - 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, - 0x00, 0x42, 0x1d, 0x5a, 0x1b, 0x67, 0x6f, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x69, 0x6f, - 0x2f, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x66, 0x6c, 0x69, 0x70, 0x74, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x00, 0x12, 0x2f, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x15, 0x2e, 0x66, + 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x0b, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x52, 0x75, 0x6c, 0x65, + 0x22, 0x00, 0x12, 0x36, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, + 0x16, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6c, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, + 0x52, 0x75, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x00, 0x12, 0x35, 0x0a, 0x0a, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x18, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x0b, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x22, + 0x00, 0x12, 0x35, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, + 0x18, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x75, + 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0b, 0x2e, 0x66, 0x6c, 0x69, 0x70, + 0x74, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0a, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x18, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0a, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x18, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x12, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x44, 0x69, 0x73, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x12, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x20, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x44, 0x69, 0x73, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x12, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x20, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, + 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x0a, + 0x47, 0x65, 0x74, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x2e, 0x66, 0x6c, 0x69, + 0x70, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x53, 0x65, 0x67, + 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x00, 0x12, 0x3f, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, + 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x19, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x12, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, + 0x74, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x53, 0x65, + 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x53, 0x65, + 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, + 0x47, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, + 0x69, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x73, + 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x66, + 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, + 0x72, 0x61, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x66, + 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x22, + 0x00, 0x12, 0x4c, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, + 0x72, 0x61, 0x69, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x42, + 0x1d, 0x5a, 0x1b, 0x67, 0x6f, 0x2e, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x2e, 0x69, 0x6f, 0x2f, 0x66, + 0x6c, 0x69, 0x70, 0x74, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x66, 0x6c, 0x69, 0x70, 0x74, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/rpc/flipt/flipt.proto b/rpc/flipt/flipt.proto index 1c0ea46ff2..6b13ac151b 100644 --- a/rpc/flipt/flipt.proto +++ b/rpc/flipt/flipt.proto @@ -239,6 +239,7 @@ enum ComparisonType { STRING_COMPARISON_TYPE = 1; NUMBER_COMPARISON_TYPE = 2; BOOLEAN_COMPARISON_TYPE = 3; + DATETIME_COMPARISON_TYPE = 4; } message Constraint { diff --git a/rpc/flipt/validation.go b/rpc/flipt/validation.go index 1f720806ee..0dce004de9 100644 --- a/rpc/flipt/validation.go +++ b/rpc/flipt/validation.go @@ -5,6 +5,7 @@ import ( "fmt" "regexp" "strings" + "time" "go.flipt.io/flipt/errors" ) @@ -388,6 +389,10 @@ func (req *CreateConstraintRequest) Validate() error { if _, ok := BooleanOperators[operator]; !ok { return errors.ErrInvalidf("constraint operator %q is not valid for type boolean", req.Operator) } + case ComparisonType_DATETIME_COMPARISON_TYPE: + if _, ok := NumberOperators[operator]; !ok { + return errors.ErrInvalidf("constraint operator %q is not valid for type datetime", req.Operator) + } default: return errors.ErrInvalidf("invalid constraint type: %q", req.Type.String()) } @@ -397,6 +402,16 @@ func (req *CreateConstraintRequest) Validate() error { if _, ok := NoValueOperators[operator]; !ok { return errors.EmptyFieldError("value") } + } else if req.Type == ComparisonType_DATETIME_COMPARISON_TYPE { + // we know that a value is set and that the type is datetime + // so validate that the value is a valid datetime + // also convert it to UTC before we save + // TODO: don't love that we are doing this here + v, err := tryParseDateTime(req.Value) + if err != nil { + return err + } + req.Value = v } return nil @@ -434,6 +449,10 @@ func (req *UpdateConstraintRequest) Validate() error { if _, ok := BooleanOperators[operator]; !ok { return errors.ErrInvalidf("constraint operator %q is not valid for type boolean", req.Operator) } + case ComparisonType_DATETIME_COMPARISON_TYPE: + if _, ok := NumberOperators[operator]; !ok { + return errors.ErrInvalidf("constraint operator %q is not valid for type datetime", req.Operator) + } default: return errors.ErrInvalidf("invalid constraint type: %q", req.Type.String()) } @@ -443,6 +462,16 @@ func (req *UpdateConstraintRequest) Validate() error { if _, ok := NoValueOperators[operator]; !ok { return errors.EmptyFieldError("value") } + } else if req.Type == ComparisonType_DATETIME_COMPARISON_TYPE { + // we know that a value is set and that the type is datetime + // so validate that the value is a valid datetime + // also convert it to UTC before we save + // TODO: don't love that we are doing this here + v, err := tryParseDateTime(req.Value) + if err != nil { + return err + } + req.Value = v } return nil @@ -488,3 +517,15 @@ func (req *UpdateNamespaceRequest) Validate() error { return nil } + +func tryParseDateTime(v string) (string, error) { + if d, err := time.Parse(time.RFC3339, v); err == nil { + return d.UTC().Format(time.RFC3339), nil + } + + if d, err := time.Parse(time.DateOnly, v); err == nil { + return d.UTC().Format(time.DateOnly), nil + } + + return "", errors.ErrInvalidf("parsing datetime from %q", v) +} diff --git a/rpc/flipt/validation_test.go b/rpc/flipt/validation_test.go index 23ee283efe..f5d66896fc 100644 --- a/rpc/flipt/validation_test.go +++ b/rpc/flipt/validation_test.go @@ -1209,6 +1209,17 @@ func TestValidate_CreateConstraintRequest(t *testing.T) { }, wantErr: errors.ErrInvalid("constraint operator \"eq\" is not valid for type boolean"), }, + { + name: "invalidDateTimeType", + req: &CreateConstraintRequest{ + SegmentKey: "segmentKey", + Type: ComparisonType_DATETIME_COMPARISON_TYPE, + Property: "foo", + Operator: "false", + Value: "bar", + }, + wantErr: errors.ErrInvalid("constraint operator \"false\" is not valid for type datetime"), + }, { name: "invalidType", req: &CreateConstraintRequest{ @@ -1372,6 +1383,40 @@ func TestValidate_UpdateConstraintRequest(t *testing.T) { }, wantErr: errors.ErrInvalid("constraint operator \"eq\" is not valid for type boolean"), }, + { + name: "invalidDateTimeType", + req: &UpdateConstraintRequest{ + Id: "1", + SegmentKey: "segmentKey", + Type: ComparisonType_DATETIME_COMPARISON_TYPE, + Property: "foo", + Operator: "false", + Value: "bar", + }, + wantErr: errors.ErrInvalid("constraint operator \"false\" is not valid for type datetime"), + }, + { + name: "validDateTimeType", + req: &UpdateConstraintRequest{ + Id: "1", + SegmentKey: "segmentKey", + Type: ComparisonType_DATETIME_COMPARISON_TYPE, + Property: "foo", + Operator: "eq", + Value: "2019-01-01T00:00:00-07:00", + }, + }, + { + name: "validDateTimeType_DateOnly", + req: &UpdateConstraintRequest{ + Id: "1", + SegmentKey: "segmentKey", + Type: ComparisonType_DATETIME_COMPARISON_TYPE, + Property: "foo", + Operator: "eq", + Value: "2019-01-01", + }, + }, { name: "invalidType", req: &UpdateConstraintRequest{ diff --git a/ui/package-lock.json b/ui/package-lock.json index f043ba0977..338bfbffaa 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -23,6 +23,7 @@ "formik": "^2.2.9", "highlight.js": "^11.8.0", "lodash": "^4.17.21", + "moment": "^2.29.4", "react": "^18.2.0", "react-dom": "^18.2.0", "react-router-dom": "^6.11.2", @@ -9869,6 +9870,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/moment": { + "version": "2.29.4", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", + "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==", + "engines": { + "node": "*" + } + }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -19215,6 +19224,11 @@ "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "dev": true }, + "moment": { + "version": "2.29.4", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", + "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==" + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", diff --git a/ui/package.json b/ui/package.json index 501af63e52..999bad978e 100644 --- a/ui/package.json +++ b/ui/package.json @@ -27,6 +27,7 @@ "formik": "^2.2.9", "highlight.js": "^11.8.0", "lodash": "^4.17.21", + "moment": "^2.29.4", "react": "^18.2.0", "react-dom": "^18.2.0", "react-router-dom": "^6.11.2", diff --git a/ui/playwright.config.ts b/ui/playwright.config.ts index 8a15b2d659..f037dfa6ab 100644 --- a/ui/playwright.config.ts +++ b/ui/playwright.config.ts @@ -30,7 +30,7 @@ const config: PlaywrightTestConfig = { /* Opt out of parallel tests on CI. */ workers: process.env.CI ? 1 : undefined, /* Reporter to use. See https://playwright.dev/docs/test-reporters */ - reporter: 'html', + reporter: process.env.CI ? 'github' : 'list', /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ use: { /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */ diff --git a/ui/src/App.tsx b/ui/src/App.tsx index 2922542e34..65d6c9a858 100644 --- a/ui/src/App.tsx +++ b/ui/src/App.tsx @@ -18,6 +18,9 @@ const Segments = loadable(() => import('./app/segments/Segments')); const Console = loadable(() => import('./app/console/Console')); const Login = loadable(() => import('./app/auth/Login')); const Settings = loadable(() => import('./app/settings/Settings')); +const Preferences = loadable( + () => import('./app/settings/general/Preferences') +); const Namespaces = loadable( () => import('./app/settings/namespaces/Namespaces') ); @@ -100,7 +103,7 @@ const router = createHashRouter([ element: , children: [ { - element: , + element: , index: true }, { diff --git a/ui/src/app/Layout.tsx b/ui/src/app/Layout.tsx index 56bb548e70..deb90a7b3e 100644 --- a/ui/src/app/Layout.tsx +++ b/ui/src/app/Layout.tsx @@ -1,12 +1,13 @@ import { useEffect, useState } from 'react'; import { Navigate, Outlet } from 'react-router-dom'; -import ErrorNotification from '~/components/ErrorNotification'; import Footer from '~/components/Footer'; import Header from '~/components/Header'; import NamespaceProvider from '~/components/NamespaceProvider'; import { NotificationProvider } from '~/components/NotificationProvider'; +import ErrorNotification from '~/components/notifications/ErrorNotification'; +import SuccessNotification from '~/components/notifications/SuccessNotification'; +import PreferencesProvider from '~/components/PreferencesProvider'; import Sidebar from '~/components/Sidebar'; -import SuccessNotification from '~/components/SuccessNotification'; import { listNamespaces } from '~/data/api'; import { useError } from '~/data/hooks/error'; import { useSession } from '~/data/hooks/session'; @@ -62,9 +63,11 @@ function InnerLayout() { export default function Layout() { return ( - - - + + + + + diff --git a/ui/src/app/flags/Flag.tsx b/ui/src/app/flags/Flag.tsx index 24c7f6e8f5..944e80cabc 100644 --- a/ui/src/app/flags/Flag.tsx +++ b/ui/src/app/flags/Flag.tsx @@ -9,10 +9,12 @@ import TabBar from '~/components/TabBar'; import { deleteFlag, getFlag } from '~/data/api'; import { useError } from '~/data/hooks/error'; import useNamespace from '~/data/hooks/namespace'; +import { useTimezone } from '~/data/hooks/timezone'; import { IFlag } from '~/types/Flag'; export default function Flag() { let { flagKey } = useParams(); + const { inTimezone } = useTimezone(); const [flag, setFlag] = useState(null); const [flagVersion, setFlagVersion] = useState(0); @@ -83,7 +85,10 @@ export default function Flag() { {flag.name}
-
+