diff --git a/pkg/development/warningdefs.go b/pkg/development/warningdefs.go new file mode 100644 index 0000000000..4d8dc30435 --- /dev/null +++ b/pkg/development/warningdefs.go @@ -0,0 +1,184 @@ +package development + +import ( + "context" + "fmt" + "strings" + + corev1 "github.com/authzed/spicedb/pkg/proto/core/v1" + devinterface "github.com/authzed/spicedb/pkg/proto/developer/v1" + "github.com/authzed/spicedb/pkg/tuple" + "github.com/authzed/spicedb/pkg/typesystem" +) + +var lintRelationReferencesParentType = func( + ctx context.Context, + relation *corev1.Relation, + ts *typesystem.TypeSystem, +) (*devinterface.DeveloperWarning, error) { + parentDef := ts.Namespace() + if strings.HasSuffix(relation.Name, parentDef.Name) { + if ts.IsPermission(relation.Name) { + return warningForMetadata( + fmt.Sprintf("Permission %q references parent type %q in its name; it is recommended to drop the suffix", relation.Name, parentDef.Name), + relation, + ), nil + } + + return warningForMetadata( + fmt.Sprintf("Relation %q references parent type %q in its name; it is recommended to drop the suffix", relation.Name, parentDef.Name), + relation, + ), nil + } + + return nil, nil +} + +var lintPermissionReferencingItself = func( + ctx context.Context, + computedUserset *corev1.ComputedUserset, + ts *typesystem.TypeSystem, +) (*devinterface.DeveloperWarning, error) { + parentRelation := ctx.Value(relationKey).(*corev1.Relation) + permName := parentRelation.Name + if computedUserset.Relation == permName { + return warningForMetadata( + fmt.Sprintf("Permission %q references itself, which will cause an error to be raised due to infinite recursion", permName), + parentRelation, + ), nil + } + + return nil, nil +} + +var lintArrowReferencingUnreachable = func( + ctx context.Context, + ttu *corev1.TupleToUserset, + ts *typesystem.TypeSystem, +) (*devinterface.DeveloperWarning, error) { + parentRelation := ctx.Value(relationKey).(*corev1.Relation) + + referencedRelation, ok := ts.GetRelation(ttu.Tupleset.Relation) + if !ok { + return nil, nil + } + + allowedSubjectTypes, err := ts.AllowedSubjectRelations(referencedRelation.Name) + if err != nil { + return nil, err + } + + wasFound := false + for _, subjectType := range allowedSubjectTypes { + nts, err := ts.TypeSystemForNamespace(ctx, subjectType.Namespace) + if err != nil { + return nil, err + } + + _, ok := nts.GetRelation(ttu.ComputedUserset.Relation) + if ok { + wasFound = true + } + } + + if !wasFound { + return warningForMetadata( + fmt.Sprintf( + "Arrow `%s->%s` under permission %q references relation/permission %q that does not exist on any subject types of relation %q", + ttu.Tupleset.Relation, + ttu.ComputedUserset.Relation, + parentRelation.Name, + ttu.ComputedUserset.Relation, + ttu.Tupleset.Relation, + ), + parentRelation, + ), nil + } + + return nil, nil +} + +var lintArrowOverSubRelation = func( + ctx context.Context, + ttu *corev1.TupleToUserset, + ts *typesystem.TypeSystem, +) (*devinterface.DeveloperWarning, error) { + parentRelation := ctx.Value(relationKey).(*corev1.Relation) + + referencedRelation, ok := ts.GetRelation(ttu.Tupleset.Relation) + if !ok { + return nil, nil + } + + allowedSubjectTypes, err := ts.AllowedSubjectRelations(referencedRelation.Name) + if err != nil { + return nil, err + } + + for _, subjectType := range allowedSubjectTypes { + if subjectType.Relation != tuple.Ellipsis { + return warningForMetadata( + fmt.Sprintf( + "Arrow `%s->%s` under permission %q references relation %q that has relation %q on subject %q: *the subject relation will be ignored for the arrow*", + ttu.Tupleset.Relation, + ttu.ComputedUserset.Relation, + parentRelation.Name, + ttu.Tupleset.Relation, + subjectType.Relation, + subjectType.Namespace, + ), + parentRelation, + ), nil + } + } + + return nil, nil +} + +var lintArrowReferencingRelation = func( + ctx context.Context, + ttu *corev1.TupleToUserset, + ts *typesystem.TypeSystem, +) (*devinterface.DeveloperWarning, error) { + parentRelation := ctx.Value(relationKey).(*corev1.Relation) + + referencedRelation, ok := ts.GetRelation(ttu.Tupleset.Relation) + if !ok { + return nil, nil + } + + // For each subject type of the referenced relation, check if the referenced permission + // is, in fact, a relation. + allowedSubjectTypes, err := ts.AllowedSubjectRelations(referencedRelation.Name) + if err != nil { + return nil, err + } + + for _, subjectType := range allowedSubjectTypes { + nts, err := ts.TypeSystemForNamespace(ctx, subjectType.Namespace) + if err != nil { + return nil, err + } + + targetRelation, ok := nts.GetRelation(ttu.ComputedUserset.Relation) + if !ok { + continue + } + + if !nts.IsPermission(targetRelation.Name) { + return warningForMetadata( + fmt.Sprintf( + "Arrow `%s->%s` under permission %q references relation %q on definition %q; it is recommended to point to a permission", + ttu.Tupleset.Relation, + ttu.ComputedUserset.Relation, + parentRelation.Name, + targetRelation.Name, + subjectType.Namespace, + ), + parentRelation, + ), nil + } + } + + return nil, nil +} diff --git a/pkg/development/warnings.go b/pkg/development/warnings.go new file mode 100644 index 0000000000..8238fca821 --- /dev/null +++ b/pkg/development/warnings.go @@ -0,0 +1,177 @@ +package development + +import ( + "context" + + "github.com/authzed/spicedb/pkg/namespace" + corev1 "github.com/authzed/spicedb/pkg/proto/core/v1" + devinterface "github.com/authzed/spicedb/pkg/proto/developer/v1" + "github.com/authzed/spicedb/pkg/spiceerrors" + "github.com/authzed/spicedb/pkg/typesystem" +) + +var allChecks = checkers{ + relationCheckers: []relationChecker{ + lintRelationReferencesParentType, + }, + computedUsersetCheckers: []computedUsersetChecker{ + lintPermissionReferencingItself, + }, + ttuCheckers: []ttuChecker{ + lintArrowReferencingRelation, + lintArrowReferencingUnreachable, + lintArrowOverSubRelation, + }, +} + +func warningForMetadata(message string, metadata namespace.WithSourcePosition) *devinterface.DeveloperWarning { + if metadata.GetSourcePosition() == nil { + return &devinterface.DeveloperWarning{ + Message: message, + } + } + + lineNumber := metadata.GetSourcePosition().ZeroIndexedLineNumber + 1 + columnNumber := metadata.GetSourcePosition().ZeroIndexedColumnPosition + 1 + + return &devinterface.DeveloperWarning{ + Message: message, + Line: uint32(lineNumber), + Column: uint32(columnNumber), + } +} + +// GetWarnings returns a list of warnings for the given developer context. +func GetWarnings(ctx context.Context, devCtx *DevContext) ([]*devinterface.DeveloperWarning, error) { + warnings := []*devinterface.DeveloperWarning{} + resolver := typesystem.ResolverForSchema(*devCtx.CompiledSchema) + + for _, def := range devCtx.CompiledSchema.ObjectDefinitions { + found, err := addDefinitionWarnings(ctx, def, resolver) + if err != nil { + return nil, err + } + warnings = append(warnings, found...) + } + + return warnings, nil +} + +type contextKey string + +var relationKey = contextKey("relation") + +func addDefinitionWarnings(ctx context.Context, def *corev1.NamespaceDefinition, resolver typesystem.Resolver) ([]*devinterface.DeveloperWarning, error) { + ts, err := typesystem.NewNamespaceTypeSystem(def, resolver) + if err != nil { + return nil, err + } + + warnings := []*devinterface.DeveloperWarning{} + for _, rel := range def.Relation { + ctx = context.WithValue(ctx, relationKey, rel) + for _, checker := range allChecks.relationCheckers { + checkerWarning, err := checker(ctx, rel, ts) + if err != nil { + return nil, err + } + + if checkerWarning != nil { + warnings = append(warnings, checkerWarning) + } + } + + if ts.IsPermission(rel.Name) { + found, err := walkUsersetRewrite(ctx, rel.UsersetRewrite, allChecks, ts) + if err != nil { + return nil, err + } + + warnings = append(warnings, found...) + } + } + + return warnings, nil +} + +type ( + relationChecker func(ctx context.Context, relation *corev1.Relation, vts *typesystem.TypeSystem) (*devinterface.DeveloperWarning, error) + computedUsersetChecker func(ctx context.Context, computedUserset *corev1.ComputedUserset, vts *typesystem.TypeSystem) (*devinterface.DeveloperWarning, error) + ttuChecker func(ctx context.Context, ttu *corev1.TupleToUserset, vts *typesystem.TypeSystem) (*devinterface.DeveloperWarning, error) +) + +type checkers struct { + relationCheckers []relationChecker + computedUsersetCheckers []computedUsersetChecker + ttuCheckers []ttuChecker +} + +func walkUsersetRewrite(ctx context.Context, rewrite *corev1.UsersetRewrite, checkers checkers, ts *typesystem.TypeSystem) ([]*devinterface.DeveloperWarning, error) { + if rewrite == nil { + return nil, nil + } + + switch t := (rewrite.RewriteOperation).(type) { + case *corev1.UsersetRewrite_Union: + return walkUsersetOperations(ctx, t.Union.Child, checkers, ts) + + case *corev1.UsersetRewrite_Intersection: + return walkUsersetOperations(ctx, t.Intersection.Child, checkers, ts) + + case *corev1.UsersetRewrite_Exclusion: + return walkUsersetOperations(ctx, t.Exclusion.Child, checkers, ts) + + default: + return nil, spiceerrors.MustBugf("unexpected rewrite operation type %T", t) + } +} + +func walkUsersetOperations(ctx context.Context, ops []*corev1.SetOperation_Child, checkers checkers, ts *typesystem.TypeSystem) ([]*devinterface.DeveloperWarning, error) { + warnings := []*devinterface.DeveloperWarning{} + for _, op := range ops { + switch t := op.ChildType.(type) { + case *corev1.SetOperation_Child_XThis: + continue + + case *corev1.SetOperation_Child_ComputedUserset: + for _, checker := range checkers.computedUsersetCheckers { + checkerWarning, err := checker(ctx, t.ComputedUserset, ts) + if err != nil { + return nil, err + } + + if checkerWarning != nil { + warnings = append(warnings, checkerWarning) + } + } + + case *corev1.SetOperation_Child_UsersetRewrite: + found, err := walkUsersetRewrite(ctx, t.UsersetRewrite, checkers, ts) + if err != nil { + return nil, err + } + + warnings = append(warnings, found...) + + case *corev1.SetOperation_Child_TupleToUserset: + for _, checker := range checkers.ttuCheckers { + checkerWarning, err := checker(ctx, t.TupleToUserset, ts) + if err != nil { + return nil, err + } + + if checkerWarning != nil { + warnings = append(warnings, checkerWarning) + } + } + + case *corev1.SetOperation_Child_XNil: + continue + + default: + return nil, spiceerrors.MustBugf("unexpected set operation type %T", t) + } + } + + return warnings, nil +} diff --git a/pkg/development/warnings_test.go b/pkg/development/warnings_test.go new file mode 100644 index 0000000000..b01cc84e46 --- /dev/null +++ b/pkg/development/warnings_test.go @@ -0,0 +1,149 @@ +package development + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + + developerv1 "github.com/authzed/spicedb/pkg/proto/developer/v1" +) + +func TestWarnings(t *testing.T) { + tcs := []struct { + name string + schema string + expectedWarning *developerv1.DeveloperWarning + }{ + { + name: "no warnings", + schema: `definition user {} + + definition group { + relation direct_member: user + permission member = direct_member + } + + definition document { + relation viewer: user | group#member + permission view = viewer + } + `, + }, + { + name: "permission referencing itself", + schema: `definition test { + permission view = view + }`, + expectedWarning: &developerv1.DeveloperWarning{ + Message: "Permission \"view\" references itself, which will cause an error to be raised due to infinite recursion", + Line: 2, + Column: 5, + }, + }, + { + name: "permission referencing itself, nested", + schema: `definition test { + relation viewer: test + relation editor: test + permission view = viewer + (editor & view) + }`, + expectedWarning: &developerv1.DeveloperWarning{ + Message: "Permission \"view\" references itself, which will cause an error to be raised due to infinite recursion", + Line: 4, + Column: 5, + }, + }, + { + name: "arrow referencing relation", + schema: `definition group { + relation member: user + } + + definition user {} + + definition document { + relation group: group + permission view = group->member + } + `, + expectedWarning: &developerv1.DeveloperWarning{ + Message: "Arrow `group->member` under permission \"view\" references relation \"member\" on definition \"group\"; it is recommended to point to a permission", + Line: 9, + Column: 5, + }, + }, + { + name: "arrow referencing unknown relation", + schema: `definition group { + } + + definition user {} + + definition document { + relation group: group + permission view = group->member + } + `, + expectedWarning: &developerv1.DeveloperWarning{ + Message: "Arrow `group->member` under permission \"view\" references relation/permission \"member\" that does not exist on any subject types of relation \"group\"", + Line: 8, + Column: 5, + }, + }, + { + name: "arrow referencing subject relation", + schema: `definition group { + relation direct_member: user + permission member = direct_member + } + + definition user {} + + definition document { + relation parent_group: group#member + permission view = parent_group->member + } + `, + expectedWarning: &developerv1.DeveloperWarning{ + Message: "Arrow `parent_group->member` under permission \"view\" references relation \"parent_group\" that has relation \"member\" on subject \"group\": *the subject relation will be ignored for the arrow*", + Line: 10, + Column: 5, + }, + }, + { + name: "relation referencing its parent definition in its name", + schema: `definition user {} + + definition document { + relation viewer: user + permission view_document = viewer + }`, + expectedWarning: &developerv1.DeveloperWarning{ + Message: "Permission \"view_document\" references parent type \"document\" in its name; it is recommended to drop the suffix", + Line: 5, + Column: 5, + }, + }, + } + + for _, tc := range tcs { + t.Run(tc.name, func(t *testing.T) { + devCtx, devErr, err := NewDevContext(context.Background(), &developerv1.RequestContext{ + Schema: tc.schema, + }) + require.NoError(t, err) + require.Empty(t, devErr) + + warnings, err := GetWarnings(context.Background(), devCtx) + require.NoError(t, err) + + if tc.expectedWarning == nil { + require.Empty(t, warnings) + } else { + require.Len(t, warnings, 1, "expected exactly one warning") + require.Equal(t, tc.expectedWarning, warnings[0]) + } + }) + } +} diff --git a/pkg/proto/developer/v1/developer.pb.go b/pkg/proto/developer/v1/developer.pb.go index a0be5a9a14..aa76c0da0b 100644 --- a/pkg/proto/developer/v1/developer.pb.go +++ b/pkg/proto/developer/v1/developer.pb.go @@ -80,7 +80,7 @@ func (x DeveloperError_Source) Number() protoreflect.EnumNumber { // Deprecated: Use DeveloperError_Source.Descriptor instead. func (DeveloperError_Source) EnumDescriptor() ([]byte, []int) { - return file_developer_v1_developer_proto_rawDescGZIP(), []int{6, 0} + return file_developer_v1_developer_proto_rawDescGZIP(), []int{7, 0} } type DeveloperError_ErrorKind int32 @@ -153,7 +153,7 @@ func (x DeveloperError_ErrorKind) Number() protoreflect.EnumNumber { // Deprecated: Use DeveloperError_ErrorKind.Descriptor instead. func (DeveloperError_ErrorKind) EnumDescriptor() ([]byte, []int) { - return file_developer_v1_developer_proto_rawDescGZIP(), []int{6, 1} + return file_developer_v1_developer_proto_rawDescGZIP(), []int{7, 1} } type CheckOperationsResult_Membership int32 @@ -205,7 +205,7 @@ func (x CheckOperationsResult_Membership) Number() protoreflect.EnumNumber { // Deprecated: Use CheckOperationsResult_Membership.Descriptor instead. func (CheckOperationsResult_Membership) EnumDescriptor() ([]byte, []int) { - return file_developer_v1_developer_proto_rawDescGZIP(), []int{9, 0} + return file_developer_v1_developer_proto_rawDescGZIP(), []int{10, 0} } // DeveloperRequest is a single request made to the developer platform, containing zero or more @@ -585,6 +585,73 @@ func (x *OperationResult) GetFormatSchemaResult() *FormatSchemaResult { return nil } +// DeveloperWarning represents a single warning raised by the development package. +type DeveloperWarning struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // message is the message for the developer warning. + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + // line is the 1-indexed line for the developer warning. + Line uint32 `protobuf:"varint,2,opt,name=line,proto3" json:"line,omitempty"` + // column is the 1-indexed column on the line for the developer warning. + Column uint32 `protobuf:"varint,3,opt,name=column,proto3" json:"column,omitempty"` +} + +func (x *DeveloperWarning) Reset() { + *x = DeveloperWarning{} + if protoimpl.UnsafeEnabled { + mi := &file_developer_v1_developer_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeveloperWarning) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeveloperWarning) ProtoMessage() {} + +func (x *DeveloperWarning) ProtoReflect() protoreflect.Message { + mi := &file_developer_v1_developer_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeveloperWarning.ProtoReflect.Descriptor instead. +func (*DeveloperWarning) Descriptor() ([]byte, []int) { + return file_developer_v1_developer_proto_rawDescGZIP(), []int{6} +} + +func (x *DeveloperWarning) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *DeveloperWarning) GetLine() uint32 { + if x != nil { + return x.Line + } + return 0 +} + +func (x *DeveloperWarning) GetColumn() uint32 { + if x != nil { + return x.Column + } + return 0 +} + // DeveloperError represents a single error raised by the development package. Unlike an internal // error, it represents an issue with the entered information by the calling developer. type DeveloperError struct { @@ -615,7 +682,7 @@ type DeveloperError struct { func (x *DeveloperError) Reset() { *x = DeveloperError{} if protoimpl.UnsafeEnabled { - mi := &file_developer_v1_developer_proto_msgTypes[6] + mi := &file_developer_v1_developer_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -628,7 +695,7 @@ func (x *DeveloperError) String() string { func (*DeveloperError) ProtoMessage() {} func (x *DeveloperError) ProtoReflect() protoreflect.Message { - mi := &file_developer_v1_developer_proto_msgTypes[6] + mi := &file_developer_v1_developer_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -641,7 +708,7 @@ func (x *DeveloperError) ProtoReflect() protoreflect.Message { // Deprecated: Use DeveloperError.ProtoReflect.Descriptor instead. func (*DeveloperError) Descriptor() ([]byte, []int) { - return file_developer_v1_developer_proto_rawDescGZIP(), []int{6} + return file_developer_v1_developer_proto_rawDescGZIP(), []int{7} } func (x *DeveloperError) GetMessage() string { @@ -720,7 +787,7 @@ type DeveloperErrors struct { func (x *DeveloperErrors) Reset() { *x = DeveloperErrors{} if protoimpl.UnsafeEnabled { - mi := &file_developer_v1_developer_proto_msgTypes[7] + mi := &file_developer_v1_developer_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -733,7 +800,7 @@ func (x *DeveloperErrors) String() string { func (*DeveloperErrors) ProtoMessage() {} func (x *DeveloperErrors) ProtoReflect() protoreflect.Message { - mi := &file_developer_v1_developer_proto_msgTypes[7] + mi := &file_developer_v1_developer_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -746,7 +813,7 @@ func (x *DeveloperErrors) ProtoReflect() protoreflect.Message { // Deprecated: Use DeveloperErrors.ProtoReflect.Descriptor instead. func (*DeveloperErrors) Descriptor() ([]byte, []int) { - return file_developer_v1_developer_proto_rawDescGZIP(), []int{7} + return file_developer_v1_developer_proto_rawDescGZIP(), []int{8} } func (x *DeveloperErrors) GetInputErrors() []*DeveloperError { @@ -771,7 +838,7 @@ type CheckOperationParameters struct { func (x *CheckOperationParameters) Reset() { *x = CheckOperationParameters{} if protoimpl.UnsafeEnabled { - mi := &file_developer_v1_developer_proto_msgTypes[8] + mi := &file_developer_v1_developer_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -784,7 +851,7 @@ func (x *CheckOperationParameters) String() string { func (*CheckOperationParameters) ProtoMessage() {} func (x *CheckOperationParameters) ProtoReflect() protoreflect.Message { - mi := &file_developer_v1_developer_proto_msgTypes[8] + mi := &file_developer_v1_developer_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -797,7 +864,7 @@ func (x *CheckOperationParameters) ProtoReflect() protoreflect.Message { // Deprecated: Use CheckOperationParameters.ProtoReflect.Descriptor instead. func (*CheckOperationParameters) Descriptor() ([]byte, []int) { - return file_developer_v1_developer_proto_rawDescGZIP(), []int{8} + return file_developer_v1_developer_proto_rawDescGZIP(), []int{9} } func (x *CheckOperationParameters) GetResource() *v1.ObjectAndRelation { @@ -841,7 +908,7 @@ type CheckOperationsResult struct { func (x *CheckOperationsResult) Reset() { *x = CheckOperationsResult{} if protoimpl.UnsafeEnabled { - mi := &file_developer_v1_developer_proto_msgTypes[9] + mi := &file_developer_v1_developer_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -854,7 +921,7 @@ func (x *CheckOperationsResult) String() string { func (*CheckOperationsResult) ProtoMessage() {} func (x *CheckOperationsResult) ProtoReflect() protoreflect.Message { - mi := &file_developer_v1_developer_proto_msgTypes[9] + mi := &file_developer_v1_developer_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -867,7 +934,7 @@ func (x *CheckOperationsResult) ProtoReflect() protoreflect.Message { // Deprecated: Use CheckOperationsResult.ProtoReflect.Descriptor instead. func (*CheckOperationsResult) Descriptor() ([]byte, []int) { - return file_developer_v1_developer_proto_rawDescGZIP(), []int{9} + return file_developer_v1_developer_proto_rawDescGZIP(), []int{10} } func (x *CheckOperationsResult) GetMembership() CheckOperationsResult_Membership { @@ -920,7 +987,7 @@ type PartialCaveatInfo struct { func (x *PartialCaveatInfo) Reset() { *x = PartialCaveatInfo{} if protoimpl.UnsafeEnabled { - mi := &file_developer_v1_developer_proto_msgTypes[10] + mi := &file_developer_v1_developer_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -933,7 +1000,7 @@ func (x *PartialCaveatInfo) String() string { func (*PartialCaveatInfo) ProtoMessage() {} func (x *PartialCaveatInfo) ProtoReflect() protoreflect.Message { - mi := &file_developer_v1_developer_proto_msgTypes[10] + mi := &file_developer_v1_developer_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -946,7 +1013,7 @@ func (x *PartialCaveatInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use PartialCaveatInfo.ProtoReflect.Descriptor instead. func (*PartialCaveatInfo) Descriptor() ([]byte, []int) { - return file_developer_v1_developer_proto_rawDescGZIP(), []int{10} + return file_developer_v1_developer_proto_rawDescGZIP(), []int{11} } func (x *PartialCaveatInfo) GetMissingRequiredContext() []string { @@ -969,7 +1036,7 @@ type RunAssertionsParameters struct { func (x *RunAssertionsParameters) Reset() { *x = RunAssertionsParameters{} if protoimpl.UnsafeEnabled { - mi := &file_developer_v1_developer_proto_msgTypes[11] + mi := &file_developer_v1_developer_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -982,7 +1049,7 @@ func (x *RunAssertionsParameters) String() string { func (*RunAssertionsParameters) ProtoMessage() {} func (x *RunAssertionsParameters) ProtoReflect() protoreflect.Message { - mi := &file_developer_v1_developer_proto_msgTypes[11] + mi := &file_developer_v1_developer_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -995,7 +1062,7 @@ func (x *RunAssertionsParameters) ProtoReflect() protoreflect.Message { // Deprecated: Use RunAssertionsParameters.ProtoReflect.Descriptor instead. func (*RunAssertionsParameters) Descriptor() ([]byte, []int) { - return file_developer_v1_developer_proto_rawDescGZIP(), []int{11} + return file_developer_v1_developer_proto_rawDescGZIP(), []int{12} } func (x *RunAssertionsParameters) GetAssertionsYaml() string { @@ -1020,7 +1087,7 @@ type RunAssertionsResult struct { func (x *RunAssertionsResult) Reset() { *x = RunAssertionsResult{} if protoimpl.UnsafeEnabled { - mi := &file_developer_v1_developer_proto_msgTypes[12] + mi := &file_developer_v1_developer_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1033,7 +1100,7 @@ func (x *RunAssertionsResult) String() string { func (*RunAssertionsResult) ProtoMessage() {} func (x *RunAssertionsResult) ProtoReflect() protoreflect.Message { - mi := &file_developer_v1_developer_proto_msgTypes[12] + mi := &file_developer_v1_developer_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1046,7 +1113,7 @@ func (x *RunAssertionsResult) ProtoReflect() protoreflect.Message { // Deprecated: Use RunAssertionsResult.ProtoReflect.Descriptor instead. func (*RunAssertionsResult) Descriptor() ([]byte, []int) { - return file_developer_v1_developer_proto_rawDescGZIP(), []int{12} + return file_developer_v1_developer_proto_rawDescGZIP(), []int{13} } func (x *RunAssertionsResult) GetInputError() *DeveloperError { @@ -1076,7 +1143,7 @@ type RunValidationParameters struct { func (x *RunValidationParameters) Reset() { *x = RunValidationParameters{} if protoimpl.UnsafeEnabled { - mi := &file_developer_v1_developer_proto_msgTypes[13] + mi := &file_developer_v1_developer_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1089,7 +1156,7 @@ func (x *RunValidationParameters) String() string { func (*RunValidationParameters) ProtoMessage() {} func (x *RunValidationParameters) ProtoReflect() protoreflect.Message { - mi := &file_developer_v1_developer_proto_msgTypes[13] + mi := &file_developer_v1_developer_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1102,7 +1169,7 @@ func (x *RunValidationParameters) ProtoReflect() protoreflect.Message { // Deprecated: Use RunValidationParameters.ProtoReflect.Descriptor instead. func (*RunValidationParameters) Descriptor() ([]byte, []int) { - return file_developer_v1_developer_proto_rawDescGZIP(), []int{13} + return file_developer_v1_developer_proto_rawDescGZIP(), []int{14} } func (x *RunValidationParameters) GetValidationYaml() string { @@ -1130,7 +1197,7 @@ type RunValidationResult struct { func (x *RunValidationResult) Reset() { *x = RunValidationResult{} if protoimpl.UnsafeEnabled { - mi := &file_developer_v1_developer_proto_msgTypes[14] + mi := &file_developer_v1_developer_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1143,7 +1210,7 @@ func (x *RunValidationResult) String() string { func (*RunValidationResult) ProtoMessage() {} func (x *RunValidationResult) ProtoReflect() protoreflect.Message { - mi := &file_developer_v1_developer_proto_msgTypes[14] + mi := &file_developer_v1_developer_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1156,7 +1223,7 @@ func (x *RunValidationResult) ProtoReflect() protoreflect.Message { // Deprecated: Use RunValidationResult.ProtoReflect.Descriptor instead. func (*RunValidationResult) Descriptor() ([]byte, []int) { - return file_developer_v1_developer_proto_rawDescGZIP(), []int{14} + return file_developer_v1_developer_proto_rawDescGZIP(), []int{15} } func (x *RunValidationResult) GetInputError() *DeveloperError { @@ -1190,7 +1257,7 @@ type FormatSchemaParameters struct { func (x *FormatSchemaParameters) Reset() { *x = FormatSchemaParameters{} if protoimpl.UnsafeEnabled { - mi := &file_developer_v1_developer_proto_msgTypes[15] + mi := &file_developer_v1_developer_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1203,7 +1270,7 @@ func (x *FormatSchemaParameters) String() string { func (*FormatSchemaParameters) ProtoMessage() {} func (x *FormatSchemaParameters) ProtoReflect() protoreflect.Message { - mi := &file_developer_v1_developer_proto_msgTypes[15] + mi := &file_developer_v1_developer_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1216,7 +1283,7 @@ func (x *FormatSchemaParameters) ProtoReflect() protoreflect.Message { // Deprecated: Use FormatSchemaParameters.ProtoReflect.Descriptor instead. func (*FormatSchemaParameters) Descriptor() ([]byte, []int) { - return file_developer_v1_developer_proto_rawDescGZIP(), []int{15} + return file_developer_v1_developer_proto_rawDescGZIP(), []int{16} } // FormatSchemaResult is the result of the `formatSchema` operation. @@ -1231,7 +1298,7 @@ type FormatSchemaResult struct { func (x *FormatSchemaResult) Reset() { *x = FormatSchemaResult{} if protoimpl.UnsafeEnabled { - mi := &file_developer_v1_developer_proto_msgTypes[16] + mi := &file_developer_v1_developer_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1244,7 +1311,7 @@ func (x *FormatSchemaResult) String() string { func (*FormatSchemaResult) ProtoMessage() {} func (x *FormatSchemaResult) ProtoReflect() protoreflect.Message { - mi := &file_developer_v1_developer_proto_msgTypes[16] + mi := &file_developer_v1_developer_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1257,7 +1324,7 @@ func (x *FormatSchemaResult) ProtoReflect() protoreflect.Message { // Deprecated: Use FormatSchemaResult.ProtoReflect.Descriptor instead. func (*FormatSchemaResult) Descriptor() ([]byte, []int) { - return file_developer_v1_developer_proto_rawDescGZIP(), []int{16} + return file_developer_v1_developer_proto_rawDescGZIP(), []int{17} } func (x *FormatSchemaResult) GetFormattedSchema() string { @@ -1365,164 +1432,170 @@ var file_developer_v1_developer_proto_rawDesc = []byte{ 0x32, 0x20, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x12, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xc6, 0x06, 0x0a, 0x0e, 0x44, 0x65, 0x76, 0x65, 0x6c, - 0x6f, 0x70, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, - 0x3b, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x23, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, - 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x04, - 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x64, 0x65, 0x76, - 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, - 0x70, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4b, 0x69, - 0x6e, 0x64, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, - 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x55, 0x0a, 0x17, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, - 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, - 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x15, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x44, 0x65, 0x62, - 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x69, 0x0a, - 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x5f, - 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x65, - 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, - 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x1d, 0x63, 0x68, 0x65, 0x63, 0x6b, - 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, - 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6f, 0x0a, 0x06, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x4f, - 0x55, 0x52, 0x43, 0x45, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x43, 0x48, 0x45, 0x4d, 0x41, - 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x52, 0x45, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x48, - 0x49, 0x50, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x59, 0x41, 0x4d, 0x4c, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x48, 0x45, - 0x43, 0x4b, 0x5f, 0x57, 0x41, 0x54, 0x43, 0x48, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x53, - 0x53, 0x45, 0x52, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x05, 0x22, 0x93, 0x02, 0x0a, 0x09, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, - 0x57, 0x4e, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x41, 0x52, - 0x53, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x43, - 0x48, 0x45, 0x4d, 0x41, 0x5f, 0x49, 0x53, 0x53, 0x55, 0x45, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, - 0x44, 0x55, 0x50, 0x4c, 0x49, 0x43, 0x41, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x4c, 0x41, 0x54, 0x49, - 0x4f, 0x4e, 0x53, 0x48, 0x49, 0x50, 0x10, 0x03, 0x12, 0x21, 0x0a, 0x1d, 0x4d, 0x49, 0x53, 0x53, - 0x49, 0x4e, 0x47, 0x5f, 0x45, 0x58, 0x50, 0x45, 0x43, 0x54, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x4c, - 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x48, 0x49, 0x50, 0x10, 0x04, 0x12, 0x1c, 0x0a, 0x18, 0x45, - 0x58, 0x54, 0x52, 0x41, 0x5f, 0x52, 0x45, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x48, 0x49, - 0x50, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x05, 0x12, 0x17, 0x0a, 0x13, 0x55, 0x4e, 0x4b, - 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x10, 0x06, 0x12, 0x14, 0x0a, 0x10, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x52, 0x45, - 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x07, 0x12, 0x15, 0x0a, 0x11, 0x4d, 0x41, 0x58, 0x49, - 0x4d, 0x55, 0x4d, 0x5f, 0x52, 0x45, 0x43, 0x55, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x08, 0x12, - 0x14, 0x0a, 0x10, 0x41, 0x53, 0x53, 0x45, 0x52, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, - 0x4c, 0x45, 0x44, 0x10, 0x09, 0x12, 0x18, 0x0a, 0x14, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, - 0x5f, 0x53, 0x55, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x0a, 0x22, - 0x52, 0x0a, 0x0f, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x73, 0x12, 0x3f, 0x0a, 0x0c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, - 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, - 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x73, 0x22, 0xd2, 0x01, 0x0a, 0x18, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, - 0x12, 0x36, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 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, 0x08, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x34, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x18, 0x02, 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, 0x48, - 0x0a, 0x0e, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x18, 0x03, 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, 0x0d, 0x63, 0x61, 0x76, 0x65, 0x61, - 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0xef, 0x03, 0x0a, 0x15, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x12, 0x4e, 0x0a, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, - 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, - 0x69, 0x70, 0x12, 0x3d, 0x0a, 0x0b, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, - 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x12, 0x4a, 0x0a, 0x11, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, - 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, - 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x64, 0x65, 0x62, - 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4f, 0x0a, - 0x13, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x5f, - 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x65, 0x76, - 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, - 0x6c, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x11, 0x70, 0x61, 0x72, - 0x74, 0x69, 0x61, 0x6c, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x5e, - 0x0a, 0x1a, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x62, 0x75, 0x67, - 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x65, 0x64, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x18, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x44, 0x65, - 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4a, - 0x0a, 0x0a, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x0b, 0x0a, 0x07, - 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4e, 0x4f, 0x54, - 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x45, 0x4d, - 0x42, 0x45, 0x52, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x41, 0x56, 0x45, 0x41, 0x54, 0x45, - 0x44, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x03, 0x22, 0x57, 0x0a, 0x11, 0x50, 0x61, - 0x72, 0x74, 0x69, 0x61, 0x6c, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, - 0x42, 0x0a, 0x18, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, - 0x72, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x16, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x22, 0x42, 0x0a, 0x17, 0x52, 0x75, 0x6e, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x27, - 0x0a, 0x0f, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x79, 0x61, 0x6d, - 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x59, 0x61, 0x6d, 0x6c, 0x22, 0x9f, 0x01, 0x0a, 0x13, 0x52, 0x75, 0x6e, 0x41, - 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x58, 0x0a, 0x10, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, + 0x70, 0x65, 0x72, 0x57, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, + 0x6d, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x22, 0xc6, 0x06, 0x0a, 0x0e, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x6c, 0x69, 0x6e, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x3b, 0x0a, 0x06, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x64, 0x65, 0x76, 0x65, + 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, + 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x45, 0x72, 0x72, + 0x6f, 0x72, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, 0x6b, 0x69, + 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x12, 0x55, 0x0a, 0x17, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, + 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x2e, + 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x15, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x69, 0x0a, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, + 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, + 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x20, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x65, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x1d, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, + 0x65, 0x64, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x6f, 0x0a, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x0e, + 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x10, 0x00, + 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x43, 0x48, 0x45, 0x4d, 0x41, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, + 0x52, 0x45, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x48, 0x49, 0x50, 0x10, 0x02, 0x12, 0x13, + 0x0a, 0x0f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x41, 0x4d, + 0x4c, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x5f, 0x57, 0x41, 0x54, + 0x43, 0x48, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x53, 0x53, 0x45, 0x52, 0x54, 0x49, 0x4f, + 0x4e, 0x10, 0x05, 0x22, 0x93, 0x02, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4b, 0x69, 0x6e, + 0x64, 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x4b, 0x49, 0x4e, + 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x41, 0x52, 0x53, 0x45, 0x5f, 0x45, 0x52, 0x52, + 0x4f, 0x52, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x43, 0x48, 0x45, 0x4d, 0x41, 0x5f, 0x49, + 0x53, 0x53, 0x55, 0x45, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x44, 0x55, 0x50, 0x4c, 0x49, 0x43, + 0x41, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x48, 0x49, 0x50, + 0x10, 0x03, 0x12, 0x21, 0x0a, 0x1d, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4e, 0x47, 0x5f, 0x45, 0x58, + 0x50, 0x45, 0x43, 0x54, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x53, + 0x48, 0x49, 0x50, 0x10, 0x04, 0x12, 0x1c, 0x0a, 0x18, 0x45, 0x58, 0x54, 0x52, 0x41, 0x5f, 0x52, + 0x45, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x48, 0x49, 0x50, 0x5f, 0x46, 0x4f, 0x55, 0x4e, + 0x44, 0x10, 0x05, 0x12, 0x17, 0x0a, 0x13, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x4f, + 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x06, 0x12, 0x14, 0x0a, 0x10, + 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x52, 0x45, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, + 0x10, 0x07, 0x12, 0x15, 0x0a, 0x11, 0x4d, 0x41, 0x58, 0x49, 0x4d, 0x55, 0x4d, 0x5f, 0x52, 0x45, + 0x43, 0x55, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x08, 0x12, 0x14, 0x0a, 0x10, 0x41, 0x53, 0x53, + 0x45, 0x52, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x09, 0x12, + 0x18, 0x0a, 0x14, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x53, 0x55, 0x42, 0x4a, 0x45, + 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x0a, 0x22, 0x52, 0x0a, 0x0f, 0x44, 0x65, 0x76, + 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12, 0x3f, 0x0a, 0x0c, + 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x52, 0x0b, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0xd2, 0x01, + 0x0a, 0x18, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x36, 0x0a, 0x08, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 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, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x12, 0x34, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 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, 0x48, 0x0a, 0x0e, 0x63, 0x61, 0x76, 0x65, + 0x61, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 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, 0x0d, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x22, 0xef, 0x03, 0x0a, 0x15, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x4e, 0x0a, 0x0a, + 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x2e, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, + 0x52, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x3d, 0x0a, 0x0b, + 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, + 0x0a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x4a, 0x0a, 0x11, 0x64, + 0x65, 0x62, 0x75, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, + 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x64, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x13, 0x70, 0x61, 0x72, 0x74, 0x69, + 0x61, 0x6c, 0x5f, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x43, 0x61, 0x76, 0x65, 0x61, + 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x11, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x43, 0x61, + 0x76, 0x65, 0x61, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x5e, 0x0a, 0x1a, 0x72, 0x65, 0x73, 0x6f, + 0x6c, 0x76, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x61, + 0x75, 0x74, 0x68, 0x7a, 0x65, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, + 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x18, + 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4a, 0x0a, 0x0a, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, + 0x4e, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4e, 0x4f, 0x54, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, + 0x52, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x12, + 0x13, 0x0a, 0x0f, 0x43, 0x41, 0x56, 0x45, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x4d, 0x45, 0x4d, 0x42, + 0x45, 0x52, 0x10, 0x03, 0x22, 0x57, 0x0a, 0x11, 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x43, + 0x61, 0x76, 0x65, 0x61, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x42, 0x0a, 0x18, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, + 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x16, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x52, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x42, 0x0a, + 0x17, 0x52, 0x75, 0x6e, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x73, 0x73, 0x65, + 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x79, 0x61, 0x6d, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0e, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x59, 0x61, 0x6d, + 0x6c, 0x22, 0x9f, 0x01, 0x0a, 0x13, 0x52, 0x75, 0x6e, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x3d, 0x0a, 0x0b, 0x69, 0x6e, 0x70, + 0x75, 0x74, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, + 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0a, 0x69, 0x6e, + 0x70, 0x75, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x49, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, + 0x6f, 0x72, 0x73, 0x22, 0x42, 0x0a, 0x17, 0x52, 0x75, 0x6e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x27, + 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x79, 0x61, 0x6d, + 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x59, 0x61, 0x6d, 0x6c, 0x22, 0xd7, 0x01, 0x0a, 0x13, 0x52, 0x75, 0x6e, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x3d, 0x0a, 0x0b, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x52, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x49, - 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x76, 0x65, - 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, - 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0x42, 0x0a, 0x17, 0x52, 0x75, 0x6e, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x79, 0x61, 0x6d, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x59, 0x61, 0x6d, 0x6c, 0x22, 0xd7, 0x01, - 0x0a, 0x13, 0x52, 0x75, 0x6e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x3d, 0x0a, 0x0b, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x76, - 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, - 0x70, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x45, - 0x72, 0x72, 0x6f, 0x72, 0x12, 0x36, 0x0a, 0x17, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x79, 0x61, 0x6d, 0x6c, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x59, 0x61, 0x6d, 0x6c, 0x12, 0x49, 0x0a, 0x11, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, - 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0x18, 0x0a, 0x16, 0x46, 0x6f, 0x72, 0x6d, 0x61, - 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x73, 0x22, 0x3f, 0x0a, 0x12, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x66, 0x6f, 0x72, 0x6d, 0x61, - 0x74, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x64, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x42, 0xb2, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, - 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, - 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 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, - 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x65, 0x76, - 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, - 0x0c, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, - 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x44, - 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, - 0x70, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x72, 0x52, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x36, + 0x0a, 0x17, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x79, 0x61, 0x6d, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x15, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x59, 0x61, 0x6d, 0x6c, 0x12, 0x49, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, + 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x73, 0x22, 0x18, 0x0a, 0x16, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x3f, 0x0a, 0x12, 0x46, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x12, 0x29, 0x0a, 0x10, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x64, 0x5f, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x74, 0x65, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x42, 0xb2, 0x01, 0x0a, + 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x42, 0x0e, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x3d, 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, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, + 0x70, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, + 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x44, 0x65, 0x76, 0x65, 0x6c, + 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, + 0x70, 0x65, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, + 0x65, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x0d, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1538,7 +1611,7 @@ func file_developer_v1_developer_proto_rawDescGZIP() []byte { } var file_developer_v1_developer_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_developer_v1_developer_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_developer_v1_developer_proto_msgTypes = make([]protoimpl.MessageInfo, 19) var file_developer_v1_developer_proto_goTypes = []interface{}{ (DeveloperError_Source)(0), // 0: developer.v1.DeveloperError.Source (DeveloperError_ErrorKind)(0), // 1: developer.v1.DeveloperError.ErrorKind @@ -1549,56 +1622,57 @@ var file_developer_v1_developer_proto_goTypes = []interface{}{ (*Operation)(nil), // 6: developer.v1.Operation (*OperationsResults)(nil), // 7: developer.v1.OperationsResults (*OperationResult)(nil), // 8: developer.v1.OperationResult - (*DeveloperError)(nil), // 9: developer.v1.DeveloperError - (*DeveloperErrors)(nil), // 10: developer.v1.DeveloperErrors - (*CheckOperationParameters)(nil), // 11: developer.v1.CheckOperationParameters - (*CheckOperationsResult)(nil), // 12: developer.v1.CheckOperationsResult - (*PartialCaveatInfo)(nil), // 13: developer.v1.PartialCaveatInfo - (*RunAssertionsParameters)(nil), // 14: developer.v1.RunAssertionsParameters - (*RunAssertionsResult)(nil), // 15: developer.v1.RunAssertionsResult - (*RunValidationParameters)(nil), // 16: developer.v1.RunValidationParameters - (*RunValidationResult)(nil), // 17: developer.v1.RunValidationResult - (*FormatSchemaParameters)(nil), // 18: developer.v1.FormatSchemaParameters - (*FormatSchemaResult)(nil), // 19: developer.v1.FormatSchemaResult - nil, // 20: developer.v1.OperationsResults.ResultsEntry - (*v1.RelationTuple)(nil), // 21: core.v1.RelationTuple - (*v11.DebugInformation)(nil), // 22: dispatch.v1.DebugInformation - (*v12.DebugInformation)(nil), // 23: authzed.api.v1.DebugInformation - (*v1.ObjectAndRelation)(nil), // 24: core.v1.ObjectAndRelation - (*structpb.Struct)(nil), // 25: google.protobuf.Struct + (*DeveloperWarning)(nil), // 9: developer.v1.DeveloperWarning + (*DeveloperError)(nil), // 10: developer.v1.DeveloperError + (*DeveloperErrors)(nil), // 11: developer.v1.DeveloperErrors + (*CheckOperationParameters)(nil), // 12: developer.v1.CheckOperationParameters + (*CheckOperationsResult)(nil), // 13: developer.v1.CheckOperationsResult + (*PartialCaveatInfo)(nil), // 14: developer.v1.PartialCaveatInfo + (*RunAssertionsParameters)(nil), // 15: developer.v1.RunAssertionsParameters + (*RunAssertionsResult)(nil), // 16: developer.v1.RunAssertionsResult + (*RunValidationParameters)(nil), // 17: developer.v1.RunValidationParameters + (*RunValidationResult)(nil), // 18: developer.v1.RunValidationResult + (*FormatSchemaParameters)(nil), // 19: developer.v1.FormatSchemaParameters + (*FormatSchemaResult)(nil), // 20: developer.v1.FormatSchemaResult + nil, // 21: developer.v1.OperationsResults.ResultsEntry + (*v1.RelationTuple)(nil), // 22: core.v1.RelationTuple + (*v11.DebugInformation)(nil), // 23: dispatch.v1.DebugInformation + (*v12.DebugInformation)(nil), // 24: authzed.api.v1.DebugInformation + (*v1.ObjectAndRelation)(nil), // 25: core.v1.ObjectAndRelation + (*structpb.Struct)(nil), // 26: google.protobuf.Struct } var file_developer_v1_developer_proto_depIdxs = []int32{ 5, // 0: developer.v1.DeveloperRequest.context:type_name -> developer.v1.RequestContext 6, // 1: developer.v1.DeveloperRequest.operations:type_name -> developer.v1.Operation - 10, // 2: developer.v1.DeveloperResponse.developer_errors:type_name -> developer.v1.DeveloperErrors + 11, // 2: developer.v1.DeveloperResponse.developer_errors:type_name -> developer.v1.DeveloperErrors 7, // 3: developer.v1.DeveloperResponse.operations_results:type_name -> developer.v1.OperationsResults - 21, // 4: developer.v1.RequestContext.relationships:type_name -> core.v1.RelationTuple - 11, // 5: developer.v1.Operation.check_parameters:type_name -> developer.v1.CheckOperationParameters - 14, // 6: developer.v1.Operation.assertions_parameters:type_name -> developer.v1.RunAssertionsParameters - 16, // 7: developer.v1.Operation.validation_parameters:type_name -> developer.v1.RunValidationParameters - 18, // 8: developer.v1.Operation.format_schema_parameters:type_name -> developer.v1.FormatSchemaParameters - 20, // 9: developer.v1.OperationsResults.results:type_name -> developer.v1.OperationsResults.ResultsEntry - 12, // 10: developer.v1.OperationResult.check_result:type_name -> developer.v1.CheckOperationsResult - 15, // 11: developer.v1.OperationResult.assertions_result:type_name -> developer.v1.RunAssertionsResult - 17, // 12: developer.v1.OperationResult.validation_result:type_name -> developer.v1.RunValidationResult - 19, // 13: developer.v1.OperationResult.format_schema_result:type_name -> developer.v1.FormatSchemaResult + 22, // 4: developer.v1.RequestContext.relationships:type_name -> core.v1.RelationTuple + 12, // 5: developer.v1.Operation.check_parameters:type_name -> developer.v1.CheckOperationParameters + 15, // 6: developer.v1.Operation.assertions_parameters:type_name -> developer.v1.RunAssertionsParameters + 17, // 7: developer.v1.Operation.validation_parameters:type_name -> developer.v1.RunValidationParameters + 19, // 8: developer.v1.Operation.format_schema_parameters:type_name -> developer.v1.FormatSchemaParameters + 21, // 9: developer.v1.OperationsResults.results:type_name -> developer.v1.OperationsResults.ResultsEntry + 13, // 10: developer.v1.OperationResult.check_result:type_name -> developer.v1.CheckOperationsResult + 16, // 11: developer.v1.OperationResult.assertions_result:type_name -> developer.v1.RunAssertionsResult + 18, // 12: developer.v1.OperationResult.validation_result:type_name -> developer.v1.RunValidationResult + 20, // 13: developer.v1.OperationResult.format_schema_result:type_name -> developer.v1.FormatSchemaResult 0, // 14: developer.v1.DeveloperError.source:type_name -> developer.v1.DeveloperError.Source 1, // 15: developer.v1.DeveloperError.kind:type_name -> developer.v1.DeveloperError.ErrorKind - 22, // 16: developer.v1.DeveloperError.check_debug_information:type_name -> dispatch.v1.DebugInformation - 23, // 17: developer.v1.DeveloperError.check_resolved_debug_information:type_name -> authzed.api.v1.DebugInformation - 9, // 18: developer.v1.DeveloperErrors.input_errors:type_name -> developer.v1.DeveloperError - 24, // 19: developer.v1.CheckOperationParameters.resource:type_name -> core.v1.ObjectAndRelation - 24, // 20: developer.v1.CheckOperationParameters.subject:type_name -> core.v1.ObjectAndRelation - 25, // 21: developer.v1.CheckOperationParameters.caveat_context:type_name -> google.protobuf.Struct + 23, // 16: developer.v1.DeveloperError.check_debug_information:type_name -> dispatch.v1.DebugInformation + 24, // 17: developer.v1.DeveloperError.check_resolved_debug_information:type_name -> authzed.api.v1.DebugInformation + 10, // 18: developer.v1.DeveloperErrors.input_errors:type_name -> developer.v1.DeveloperError + 25, // 19: developer.v1.CheckOperationParameters.resource:type_name -> core.v1.ObjectAndRelation + 25, // 20: developer.v1.CheckOperationParameters.subject:type_name -> core.v1.ObjectAndRelation + 26, // 21: developer.v1.CheckOperationParameters.caveat_context:type_name -> google.protobuf.Struct 2, // 22: developer.v1.CheckOperationsResult.membership:type_name -> developer.v1.CheckOperationsResult.Membership - 9, // 23: developer.v1.CheckOperationsResult.check_error:type_name -> developer.v1.DeveloperError - 22, // 24: developer.v1.CheckOperationsResult.debug_information:type_name -> dispatch.v1.DebugInformation - 13, // 25: developer.v1.CheckOperationsResult.partial_caveat_info:type_name -> developer.v1.PartialCaveatInfo - 23, // 26: developer.v1.CheckOperationsResult.resolved_debug_information:type_name -> authzed.api.v1.DebugInformation - 9, // 27: developer.v1.RunAssertionsResult.input_error:type_name -> developer.v1.DeveloperError - 9, // 28: developer.v1.RunAssertionsResult.validation_errors:type_name -> developer.v1.DeveloperError - 9, // 29: developer.v1.RunValidationResult.input_error:type_name -> developer.v1.DeveloperError - 9, // 30: developer.v1.RunValidationResult.validation_errors:type_name -> developer.v1.DeveloperError + 10, // 23: developer.v1.CheckOperationsResult.check_error:type_name -> developer.v1.DeveloperError + 23, // 24: developer.v1.CheckOperationsResult.debug_information:type_name -> dispatch.v1.DebugInformation + 14, // 25: developer.v1.CheckOperationsResult.partial_caveat_info:type_name -> developer.v1.PartialCaveatInfo + 24, // 26: developer.v1.CheckOperationsResult.resolved_debug_information:type_name -> authzed.api.v1.DebugInformation + 10, // 27: developer.v1.RunAssertionsResult.input_error:type_name -> developer.v1.DeveloperError + 10, // 28: developer.v1.RunAssertionsResult.validation_errors:type_name -> developer.v1.DeveloperError + 10, // 29: developer.v1.RunValidationResult.input_error:type_name -> developer.v1.DeveloperError + 10, // 30: developer.v1.RunValidationResult.validation_errors:type_name -> developer.v1.DeveloperError 8, // 31: developer.v1.OperationsResults.ResultsEntry.value:type_name -> developer.v1.OperationResult 32, // [32:32] is the sub-list for method output_type 32, // [32:32] is the sub-list for method input_type @@ -1686,7 +1760,7 @@ func file_developer_v1_developer_proto_init() { } } file_developer_v1_developer_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeveloperError); i { + switch v := v.(*DeveloperWarning); i { case 0: return &v.state case 1: @@ -1698,7 +1772,7 @@ func file_developer_v1_developer_proto_init() { } } file_developer_v1_developer_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeveloperErrors); i { + switch v := v.(*DeveloperError); i { case 0: return &v.state case 1: @@ -1710,7 +1784,7 @@ func file_developer_v1_developer_proto_init() { } } file_developer_v1_developer_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckOperationParameters); i { + switch v := v.(*DeveloperErrors); i { case 0: return &v.state case 1: @@ -1722,7 +1796,7 @@ func file_developer_v1_developer_proto_init() { } } file_developer_v1_developer_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckOperationsResult); i { + switch v := v.(*CheckOperationParameters); i { case 0: return &v.state case 1: @@ -1734,7 +1808,7 @@ func file_developer_v1_developer_proto_init() { } } file_developer_v1_developer_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PartialCaveatInfo); i { + switch v := v.(*CheckOperationsResult); i { case 0: return &v.state case 1: @@ -1746,7 +1820,7 @@ func file_developer_v1_developer_proto_init() { } } file_developer_v1_developer_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RunAssertionsParameters); i { + switch v := v.(*PartialCaveatInfo); i { case 0: return &v.state case 1: @@ -1758,7 +1832,7 @@ func file_developer_v1_developer_proto_init() { } } file_developer_v1_developer_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RunAssertionsResult); i { + switch v := v.(*RunAssertionsParameters); i { case 0: return &v.state case 1: @@ -1770,7 +1844,7 @@ func file_developer_v1_developer_proto_init() { } } file_developer_v1_developer_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RunValidationParameters); i { + switch v := v.(*RunAssertionsResult); i { case 0: return &v.state case 1: @@ -1782,7 +1856,7 @@ func file_developer_v1_developer_proto_init() { } } file_developer_v1_developer_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RunValidationResult); i { + switch v := v.(*RunValidationParameters); i { case 0: return &v.state case 1: @@ -1794,7 +1868,7 @@ func file_developer_v1_developer_proto_init() { } } file_developer_v1_developer_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FormatSchemaParameters); i { + switch v := v.(*RunValidationResult); i { case 0: return &v.state case 1: @@ -1806,6 +1880,18 @@ func file_developer_v1_developer_proto_init() { } } file_developer_v1_developer_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FormatSchemaParameters); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_developer_v1_developer_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FormatSchemaResult); i { case 0: return &v.state @@ -1824,7 +1910,7 @@ func file_developer_v1_developer_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_developer_v1_developer_proto_rawDesc, NumEnums: 3, - NumMessages: 18, + NumMessages: 19, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/proto/developer/v1/developer.pb.validate.go b/pkg/proto/developer/v1/developer.pb.validate.go index 7a49a2c137..762ebfabda 100644 --- a/pkg/proto/developer/v1/developer.pb.validate.go +++ b/pkg/proto/developer/v1/developer.pb.validate.go @@ -1075,6 +1075,112 @@ var _ interface { ErrorName() string } = OperationResultValidationError{} +// Validate checks the field values on DeveloperWarning with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *DeveloperWarning) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DeveloperWarning with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DeveloperWarningMultiError, or nil if none found. +func (m *DeveloperWarning) ValidateAll() error { + return m.validate(true) +} + +func (m *DeveloperWarning) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Message + + // no validation rules for Line + + // no validation rules for Column + + if len(errors) > 0 { + return DeveloperWarningMultiError(errors) + } + + return nil +} + +// DeveloperWarningMultiError is an error wrapping multiple validation errors +// returned by DeveloperWarning.ValidateAll() if the designated constraints +// aren't met. +type DeveloperWarningMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DeveloperWarningMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DeveloperWarningMultiError) AllErrors() []error { return m } + +// DeveloperWarningValidationError is the validation error returned by +// DeveloperWarning.Validate if the designated constraints aren't met. +type DeveloperWarningValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DeveloperWarningValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DeveloperWarningValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DeveloperWarningValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DeveloperWarningValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DeveloperWarningValidationError) ErrorName() string { return "DeveloperWarningValidationError" } + +// Error satisfies the builtin error interface +func (e DeveloperWarningValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sDeveloperWarning.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DeveloperWarningValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DeveloperWarningValidationError{} + // Validate checks the field values on DeveloperError with the rules defined in // the proto definition for this message. If any rules are violated, the first // error encountered is returned, or nil if there are no violations. diff --git a/pkg/proto/developer/v1/developer_vtproto.pb.go b/pkg/proto/developer/v1/developer_vtproto.pb.go index 354102c5e9..8636baa40a 100644 --- a/pkg/proto/developer/v1/developer_vtproto.pb.go +++ b/pkg/proto/developer/v1/developer_vtproto.pb.go @@ -158,6 +158,25 @@ func (m *OperationResult) CloneMessageVT() proto.Message { return m.CloneVT() } +func (m *DeveloperWarning) CloneVT() *DeveloperWarning { + if m == nil { + return (*DeveloperWarning)(nil) + } + r := new(DeveloperWarning) + r.Message = m.Message + r.Line = m.Line + r.Column = m.Column + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *DeveloperWarning) CloneMessageVT() proto.Message { + return m.CloneVT() +} + func (m *DeveloperError) CloneVT() *DeveloperError { if m == nil { return (*DeveloperError)(nil) @@ -616,6 +635,31 @@ func (this *OperationResult) EqualMessageVT(thatMsg proto.Message) bool { } return this.EqualVT(that) } +func (this *DeveloperWarning) EqualVT(that *DeveloperWarning) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Message != that.Message { + return false + } + if this.Line != that.Line { + return false + } + if this.Column != that.Column { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *DeveloperWarning) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*DeveloperWarning) + if !ok { + return false + } + return this.EqualVT(that) +} func (this *DeveloperError) EqualVT(that *DeveloperError) bool { if this == that { return true @@ -1341,6 +1385,56 @@ func (m *OperationResult) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *DeveloperWarning) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeveloperWarning) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DeveloperWarning) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Column != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Column)) + i-- + dAtA[i] = 0x18 + } + if m.Line != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Line)) + i-- + dAtA[i] = 0x10 + } + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *DeveloperError) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -2150,6 +2244,26 @@ func (m *OperationResult) SizeVT() (n int) { return n } +func (m *DeveloperWarning) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Message) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Line != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Line)) + } + if m.Column != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Column)) + } + n += len(m.unknownFields) + return n +} + func (m *DeveloperError) SizeVT() (n int) { if m == nil { return 0 @@ -3366,6 +3480,127 @@ func (m *OperationResult) UnmarshalVT(dAtA []byte) error { } return nil } +func (m *DeveloperWarning) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeveloperWarning: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeveloperWarning: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Line", wireType) + } + m.Line = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Line |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Column", wireType) + } + m.Column = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Column |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *DeveloperError) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/pkg/typesystem/reachabilitygraphbuilder.go b/pkg/typesystem/reachabilitygraphbuilder.go index c3e438bbb9..97f5657bf9 100644 --- a/pkg/typesystem/reachabilitygraphbuilder.go +++ b/pkg/typesystem/reachabilitygraphbuilder.go @@ -135,7 +135,7 @@ func computeRewriteOpReachability(ctx context.Context, children []*core.SetOpera // right side of the arrow. // Check if the relation does exist on the allowed type, and only add the entrypoint if present. - relTypeSystem, err := ts.typeSystemForNamespace(ctx, allowedRelationType.Namespace) + relTypeSystem, err := ts.TypeSystemForNamespace(ctx, allowedRelationType.Namespace) if err != nil { return err } diff --git a/pkg/typesystem/typesystem.go b/pkg/typesystem/typesystem.go index ff32889647..2c43831b8a 100644 --- a/pkg/typesystem/typesystem.go +++ b/pkg/typesystem/typesystem.go @@ -381,7 +381,7 @@ func (nts *TypeSystem) computeReferencesWildcardType(ctx context.Context, relati continue } - subjectTS, err := nts.typeSystemForNamespace(ctx, allowedRelation.GetNamespace()) + subjectTS, err := nts.TypeSystemForNamespace(ctx, allowedRelation.GetNamespace()) if err != nil { return nil, asTypeError(err) } @@ -535,7 +535,7 @@ func (nts *TypeSystem) Validate(ctx context.Context) (*ValidatedNamespaceTypeSys } } } else { - subjectTS, err := nts.typeSystemForNamespace(ctx, allowedRelation.GetNamespace()) + subjectTS, err := nts.TypeSystemForNamespace(ctx, allowedRelation.GetNamespace()) if err != nil { return nil, NewTypeErrorWithSource( fmt.Errorf("could not lookup definition `%s` for relation `%s`: %w", allowedRelation.GetNamespace(), relation.Name, err), @@ -615,7 +615,8 @@ func SourceForAllowedRelation(allowedRelation *core.AllowedRelation) string { return allowedRelation.Namespace + caveatStr } -func (nts *TypeSystem) typeSystemForNamespace(ctx context.Context, namespaceName string) (*TypeSystem, error) { +// TypeSystemForNamespace returns a type system for the given namespace. +func (nts *TypeSystem) TypeSystemForNamespace(ctx context.Context, namespaceName string) (*TypeSystem, error) { if nts.nsDef.Name == namespaceName { return nts, nil } diff --git a/proto/internal/developer/v1/developer.proto b/proto/internal/developer/v1/developer.proto index e23f984b40..18296c855a 100644 --- a/proto/internal/developer/v1/developer.proto +++ b/proto/internal/developer/v1/developer.proto @@ -62,6 +62,18 @@ message OperationResult { FormatSchemaResult format_schema_result = 4; } +// DeveloperWarning represents a single warning raised by the development package. +message DeveloperWarning { + // message is the message for the developer warning. + string message = 1; + + // line is the 1-indexed line for the developer warning. + uint32 line = 2; + + // column is the 1-indexed column on the line for the developer warning. + uint32 column = 3; +} + // DeveloperError represents a single error raised by the development package. Unlike an internal // error, it represents an issue with the entered information by the calling developer. message DeveloperError {