diff --git a/api/vault/v1/query.pulsar.go b/api/vault/v1/query.pulsar.go index 7cd917edb..6bf02ca81 100644 --- a/api/vault/v1/query.pulsar.go +++ b/api/vault/v1/query.pulsar.go @@ -1570,6 +1570,797 @@ func (x *fastReflection_QueryIPFSResponse) ProtoMethods() *protoiface.Methods { } } +var ( + md_QuerySchemaRequest protoreflect.MessageDescriptor +) + +func init() { + file_vault_v1_query_proto_init() + md_QuerySchemaRequest = File_vault_v1_query_proto.Messages().ByName("QuerySchemaRequest") +} + +var _ protoreflect.Message = (*fastReflection_QuerySchemaRequest)(nil) + +type fastReflection_QuerySchemaRequest QuerySchemaRequest + +func (x *QuerySchemaRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QuerySchemaRequest)(x) +} + +func (x *QuerySchemaRequest) slowProtoReflect() protoreflect.Message { + mi := &file_vault_v1_query_proto_msgTypes[4] + 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) +} + +var _fastReflection_QuerySchemaRequest_messageType fastReflection_QuerySchemaRequest_messageType +var _ protoreflect.MessageType = fastReflection_QuerySchemaRequest_messageType{} + +type fastReflection_QuerySchemaRequest_messageType struct{} + +func (x fastReflection_QuerySchemaRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QuerySchemaRequest)(nil) +} +func (x fastReflection_QuerySchemaRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QuerySchemaRequest) +} +func (x fastReflection_QuerySchemaRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QuerySchemaRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QuerySchemaRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QuerySchemaRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QuerySchemaRequest) Type() protoreflect.MessageType { + return _fastReflection_QuerySchemaRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QuerySchemaRequest) New() protoreflect.Message { + return new(fastReflection_QuerySchemaRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QuerySchemaRequest) Interface() protoreflect.ProtoMessage { + return (*QuerySchemaRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QuerySchemaRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QuerySchemaRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySchemaRequest")) + } + panic(fmt.Errorf("message vault.v1.QuerySchemaRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QuerySchemaRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySchemaRequest")) + } + panic(fmt.Errorf("message vault.v1.QuerySchemaRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QuerySchemaRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySchemaRequest")) + } + panic(fmt.Errorf("message vault.v1.QuerySchemaRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QuerySchemaRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySchemaRequest")) + } + panic(fmt.Errorf("message vault.v1.QuerySchemaRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QuerySchemaRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySchemaRequest")) + } + panic(fmt.Errorf("message vault.v1.QuerySchemaRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QuerySchemaRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySchemaRequest")) + } + panic(fmt.Errorf("message vault.v1.QuerySchemaRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QuerySchemaRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in vault.v1.QuerySchemaRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QuerySchemaRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QuerySchemaRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QuerySchemaRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QuerySchemaRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QuerySchemaRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QuerySchemaRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QuerySchemaRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySchemaRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySchemaRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QuerySchemaResponse protoreflect.MessageDescriptor + fd_QuerySchemaResponse_schema protoreflect.FieldDescriptor +) + +func init() { + file_vault_v1_query_proto_init() + md_QuerySchemaResponse = File_vault_v1_query_proto.Messages().ByName("QuerySchemaResponse") + fd_QuerySchemaResponse_schema = md_QuerySchemaResponse.Fields().ByName("schema") +} + +var _ protoreflect.Message = (*fastReflection_QuerySchemaResponse)(nil) + +type fastReflection_QuerySchemaResponse QuerySchemaResponse + +func (x *QuerySchemaResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QuerySchemaResponse)(x) +} + +func (x *QuerySchemaResponse) slowProtoReflect() protoreflect.Message { + mi := &file_vault_v1_query_proto_msgTypes[5] + 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) +} + +var _fastReflection_QuerySchemaResponse_messageType fastReflection_QuerySchemaResponse_messageType +var _ protoreflect.MessageType = fastReflection_QuerySchemaResponse_messageType{} + +type fastReflection_QuerySchemaResponse_messageType struct{} + +func (x fastReflection_QuerySchemaResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QuerySchemaResponse)(nil) +} +func (x fastReflection_QuerySchemaResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QuerySchemaResponse) +} +func (x fastReflection_QuerySchemaResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QuerySchemaResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QuerySchemaResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QuerySchemaResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QuerySchemaResponse) Type() protoreflect.MessageType { + return _fastReflection_QuerySchemaResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QuerySchemaResponse) New() protoreflect.Message { + return new(fastReflection_QuerySchemaResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QuerySchemaResponse) Interface() protoreflect.ProtoMessage { + return (*QuerySchemaResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QuerySchemaResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Schema != nil { + value := protoreflect.ValueOfMessage(x.Schema.ProtoReflect()) + if !f(fd_QuerySchemaResponse_schema, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QuerySchemaResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "vault.v1.QuerySchemaResponse.schema": + return x.Schema != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySchemaResponse")) + } + panic(fmt.Errorf("message vault.v1.QuerySchemaResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QuerySchemaResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "vault.v1.QuerySchemaResponse.schema": + x.Schema = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySchemaResponse")) + } + panic(fmt.Errorf("message vault.v1.QuerySchemaResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QuerySchemaResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "vault.v1.QuerySchemaResponse.schema": + value := x.Schema + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySchemaResponse")) + } + panic(fmt.Errorf("message vault.v1.QuerySchemaResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QuerySchemaResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "vault.v1.QuerySchemaResponse.schema": + x.Schema = value.Message().Interface().(*Schema) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySchemaResponse")) + } + panic(fmt.Errorf("message vault.v1.QuerySchemaResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QuerySchemaResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "vault.v1.QuerySchemaResponse.schema": + if x.Schema == nil { + x.Schema = new(Schema) + } + return protoreflect.ValueOfMessage(x.Schema.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySchemaResponse")) + } + panic(fmt.Errorf("message vault.v1.QuerySchemaResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QuerySchemaResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "vault.v1.QuerySchemaResponse.schema": + m := new(Schema) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySchemaResponse")) + } + panic(fmt.Errorf("message vault.v1.QuerySchemaResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QuerySchemaResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in vault.v1.QuerySchemaResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QuerySchemaResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QuerySchemaResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QuerySchemaResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QuerySchemaResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QuerySchemaResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Schema != nil { + l = options.Size(x.Schema) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QuerySchemaResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Schema != nil { + encoded, err := options.Marshal(x.Schema) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QuerySchemaResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySchemaResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySchemaResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Schema == nil { + x.Schema = &Schema{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Schema); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + var ( md_SyncRequest protoreflect.MessageDescriptor fd_SyncRequest_did protoreflect.FieldDescriptor @@ -1590,7 +2381,7 @@ func (x *SyncRequest) ProtoReflect() protoreflect.Message { } func (x *SyncRequest) slowProtoReflect() protoreflect.Message { - mi := &file_vault_v1_query_proto_msgTypes[4] + mi := &file_vault_v1_query_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2010,7 +2801,7 @@ func (x *SyncResponse) ProtoReflect() protoreflect.Message { } func (x *SyncResponse) slowProtoReflect() protoreflect.Message { - mi := &file_vault_v1_query_proto_msgTypes[5] + mi := &file_vault_v1_query_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2422,7 +3213,7 @@ func (x *BuildTxRequest) ProtoReflect() protoreflect.Message { } func (x *BuildTxRequest) slowProtoReflect() protoreflect.Message { - mi := &file_vault_v1_query_proto_msgTypes[6] + mi := &file_vault_v1_query_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2906,7 +3697,7 @@ func (x *BuildTxResponse) ProtoReflect() protoreflect.Message { } func (x *BuildTxResponse) slowProtoReflect() protoreflect.Message { - mi := &file_vault_v1_query_proto_msgTypes[7] + mi := &file_vault_v1_query_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3499,6 +4290,70 @@ func (x *QueryIPFSResponse) GetIpfs() bool { return false } +// QuerySchemaRequest is the request type for the Query/Schema RPC method. +type QuerySchemaRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QuerySchemaRequest) Reset() { + *x = QuerySchemaRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_vault_v1_query_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QuerySchemaRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuerySchemaRequest) ProtoMessage() {} + +// Deprecated: Use QuerySchemaRequest.ProtoReflect.Descriptor instead. +func (*QuerySchemaRequest) Descriptor() ([]byte, []int) { + return file_vault_v1_query_proto_rawDescGZIP(), []int{4} +} + +// QuerySchemaResponse is the response type for the Query/Schema RPC method. +type QuerySchemaResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Schema is the DID document. + Schema *Schema `protobuf:"bytes,1,opt,name=schema,proto3" json:"schema,omitempty"` +} + +func (x *QuerySchemaResponse) Reset() { + *x = QuerySchemaResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_vault_v1_query_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QuerySchemaResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuerySchemaResponse) ProtoMessage() {} + +// Deprecated: Use QuerySchemaResponse.ProtoReflect.Descriptor instead. +func (*QuerySchemaResponse) Descriptor() ([]byte, []int) { + return file_vault_v1_query_proto_rawDescGZIP(), []int{5} +} + +func (x *QuerySchemaResponse) GetSchema() *Schema { + if x != nil { + return x.Schema + } + return nil +} + // SyncRequest is the request type for the Sync RPC method. type SyncRequest struct { state protoimpl.MessageState @@ -3511,7 +4366,7 @@ type SyncRequest struct { func (x *SyncRequest) Reset() { *x = SyncRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vault_v1_query_proto_msgTypes[4] + mi := &file_vault_v1_query_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3525,7 +4380,7 @@ func (*SyncRequest) ProtoMessage() {} // Deprecated: Use SyncRequest.ProtoReflect.Descriptor instead. func (*SyncRequest) Descriptor() ([]byte, []int) { - return file_vault_v1_query_proto_rawDescGZIP(), []int{4} + return file_vault_v1_query_proto_rawDescGZIP(), []int{6} } func (x *SyncRequest) GetDid() string { @@ -3547,7 +4402,7 @@ type SyncResponse struct { func (x *SyncResponse) Reset() { *x = SyncResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vault_v1_query_proto_msgTypes[5] + mi := &file_vault_v1_query_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3561,7 +4416,7 @@ func (*SyncResponse) ProtoMessage() {} // Deprecated: Use SyncResponse.ProtoReflect.Descriptor instead. func (*SyncResponse) Descriptor() ([]byte, []int) { - return file_vault_v1_query_proto_rawDescGZIP(), []int{5} + return file_vault_v1_query_proto_rawDescGZIP(), []int{7} } func (x *SyncResponse) GetSuccess() bool { @@ -3584,7 +4439,7 @@ type BuildTxRequest struct { func (x *BuildTxRequest) Reset() { *x = BuildTxRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vault_v1_query_proto_msgTypes[6] + mi := &file_vault_v1_query_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3598,7 +4453,7 @@ func (*BuildTxRequest) ProtoMessage() {} // Deprecated: Use BuildTxRequest.ProtoReflect.Descriptor instead. func (*BuildTxRequest) Descriptor() ([]byte, []int) { - return file_vault_v1_query_proto_rawDescGZIP(), []int{6} + return file_vault_v1_query_proto_rawDescGZIP(), []int{8} } func (x *BuildTxRequest) GetDid() string { @@ -3628,7 +4483,7 @@ type BuildTxResponse struct { func (x *BuildTxResponse) Reset() { *x = BuildTxResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vault_v1_query_proto_msgTypes[7] + mi := &file_vault_v1_query_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3642,7 +4497,7 @@ func (*BuildTxResponse) ProtoMessage() {} // Deprecated: Use BuildTxResponse.ProtoReflect.Descriptor instead. func (*BuildTxResponse) Descriptor() ([]byte, []int) { - return file_vault_v1_query_proto_rawDescGZIP(), []int{7} + return file_vault_v1_query_proto_rawDescGZIP(), []int{9} } func (x *BuildTxResponse) GetSuccess() bool { @@ -3676,45 +4531,57 @@ var file_vault_v1_query_proto_rawDesc = []byte{ 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x50, 0x46, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x27, 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x50, 0x46, 0x53, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x70, 0x66, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x70, 0x66, 0x73, 0x22, 0x1f, 0x0a, 0x0b, 0x53, 0x79, - 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x22, 0x28, 0x0a, 0x0c, 0x53, - 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, - 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0x34, 0x0a, 0x0e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x54, 0x78, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x6b, 0x6c, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x6b, 0x6c, 0x22, 0x3b, 0x0a, 0x0f, 0x42, - 0x75, 0x69, 0x6c, 0x64, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, - 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x78, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x78, 0x32, 0x92, 0x02, 0x0a, 0x05, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x12, 0x5f, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1c, 0x2e, 0x76, - 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x61, 0x75, - 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x12, 0x12, 0x10, 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x12, 0x59, 0x0a, 0x07, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x54, 0x78, 0x12, 0x18, - 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x54, - 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x22, 0x11, 0x2f, 0x76, 0x61, - 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x74, 0x78, 0x12, 0x4d, - 0x0a, 0x04, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x15, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, - 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x22, 0x0e, 0x2f, - 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x88, 0x01, - 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0a, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, - 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, - 0x31, 0x3b, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x56, 0x58, 0x58, 0xaa, - 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x08, 0x56, 0x61, 0x75, - 0x6c, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x14, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x56, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x09, 0x56, - 0x61, 0x75, 0x6c, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x70, 0x66, 0x73, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x22, 0x3f, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x22, 0x1f, 0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, + 0x69, 0x64, 0x22, 0x28, 0x0a, 0x0c, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0x34, 0x0a, 0x0e, + 0x42, 0x75, 0x69, 0x6c, 0x64, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, + 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, + 0x12, 0x10, 0x0a, 0x03, 0x70, 0x6b, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, + 0x6b, 0x6c, 0x22, 0x3b, 0x0a, 0x0f, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x54, 0x78, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, + 0x0e, 0x0a, 0x02, 0x74, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x78, 0x32, + 0xf3, 0x02, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x5f, 0x0a, 0x06, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x12, 0x1c, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, + 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x59, 0x0a, 0x07, 0x42, 0x75, + 0x69, 0x6c, 0x64, 0x54, 0x78, 0x12, 0x18, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x19, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, + 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x13, 0x22, 0x11, 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x75, + 0x69, 0x6c, 0x64, 0x74, 0x78, 0x12, 0x5f, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, + 0x1c, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, + 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x4d, 0x0a, 0x04, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x15, + 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x22, 0x0e, 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, + 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x88, 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x61, + 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x76, + 0x31, 0xa2, 0x02, 0x03, 0x56, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x2e, + 0x56, 0x31, 0xca, 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x14, + 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x09, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3729,31 +4596,37 @@ func file_vault_v1_query_proto_rawDescGZIP() []byte { return file_vault_v1_query_proto_rawDescData } -var file_vault_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_vault_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_vault_v1_query_proto_goTypes = []interface{}{ (*QueryParamsRequest)(nil), // 0: vault.v1.QueryParamsRequest (*QueryParamsResponse)(nil), // 1: vault.v1.QueryParamsResponse (*QueryIPFSRequest)(nil), // 2: vault.v1.QueryIPFSRequest (*QueryIPFSResponse)(nil), // 3: vault.v1.QueryIPFSResponse - (*SyncRequest)(nil), // 4: vault.v1.SyncRequest - (*SyncResponse)(nil), // 5: vault.v1.SyncResponse - (*BuildTxRequest)(nil), // 6: vault.v1.BuildTxRequest - (*BuildTxResponse)(nil), // 7: vault.v1.BuildTxResponse - (*Params)(nil), // 8: vault.v1.Params + (*QuerySchemaRequest)(nil), // 4: vault.v1.QuerySchemaRequest + (*QuerySchemaResponse)(nil), // 5: vault.v1.QuerySchemaResponse + (*SyncRequest)(nil), // 6: vault.v1.SyncRequest + (*SyncResponse)(nil), // 7: vault.v1.SyncResponse + (*BuildTxRequest)(nil), // 8: vault.v1.BuildTxRequest + (*BuildTxResponse)(nil), // 9: vault.v1.BuildTxResponse + (*Params)(nil), // 10: vault.v1.Params + (*Schema)(nil), // 11: vault.v1.Schema } var file_vault_v1_query_proto_depIdxs = []int32{ - 8, // 0: vault.v1.QueryParamsResponse.params:type_name -> vault.v1.Params - 0, // 1: vault.v1.Query.Params:input_type -> vault.v1.QueryParamsRequest - 6, // 2: vault.v1.Query.BuildTx:input_type -> vault.v1.BuildTxRequest - 4, // 3: vault.v1.Query.Sync:input_type -> vault.v1.SyncRequest - 1, // 4: vault.v1.Query.Params:output_type -> vault.v1.QueryParamsResponse - 7, // 5: vault.v1.Query.BuildTx:output_type -> vault.v1.BuildTxResponse - 5, // 6: vault.v1.Query.Sync:output_type -> vault.v1.SyncResponse - 4, // [4:7] is the sub-list for method output_type - 1, // [1:4] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 10, // 0: vault.v1.QueryParamsResponse.params:type_name -> vault.v1.Params + 11, // 1: vault.v1.QuerySchemaResponse.schema:type_name -> vault.v1.Schema + 0, // 2: vault.v1.Query.Params:input_type -> vault.v1.QueryParamsRequest + 8, // 3: vault.v1.Query.BuildTx:input_type -> vault.v1.BuildTxRequest + 4, // 4: vault.v1.Query.Schema:input_type -> vault.v1.QuerySchemaRequest + 6, // 5: vault.v1.Query.Sync:input_type -> vault.v1.SyncRequest + 1, // 6: vault.v1.Query.Params:output_type -> vault.v1.QueryParamsResponse + 9, // 7: vault.v1.Query.BuildTx:output_type -> vault.v1.BuildTxResponse + 5, // 8: vault.v1.Query.Schema:output_type -> vault.v1.QuerySchemaResponse + 7, // 9: vault.v1.Query.Sync:output_type -> vault.v1.SyncResponse + 6, // [6:10] is the sub-list for method output_type + 2, // [2:6] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_vault_v1_query_proto_init() } @@ -3812,7 +4685,7 @@ func file_vault_v1_query_proto_init() { } } file_vault_v1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncRequest); i { + switch v := v.(*QuerySchemaRequest); i { case 0: return &v.state case 1: @@ -3824,7 +4697,7 @@ func file_vault_v1_query_proto_init() { } } file_vault_v1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncResponse); i { + switch v := v.(*QuerySchemaResponse); i { case 0: return &v.state case 1: @@ -3836,7 +4709,7 @@ func file_vault_v1_query_proto_init() { } } file_vault_v1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BuildTxRequest); i { + switch v := v.(*SyncRequest); i { case 0: return &v.state case 1: @@ -3848,6 +4721,30 @@ func file_vault_v1_query_proto_init() { } } file_vault_v1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SyncResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vault_v1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BuildTxRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vault_v1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BuildTxResponse); i { case 0: return &v.state @@ -3866,7 +4763,7 @@ func file_vault_v1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_vault_v1_query_proto_rawDesc, NumEnums: 0, - NumMessages: 8, + NumMessages: 10, NumExtensions: 0, NumServices: 1, }, diff --git a/api/vault/v1/query_grpc.pb.go b/api/vault/v1/query_grpc.pb.go index 8b371f4f5..c81f6c5e0 100644 --- a/api/vault/v1/query_grpc.pb.go +++ b/api/vault/v1/query_grpc.pb.go @@ -21,6 +21,7 @@ const _ = grpc.SupportPackageIsVersion7 const ( Query_Params_FullMethodName = "/vault.v1.Query/Params" Query_BuildTx_FullMethodName = "/vault.v1.Query/BuildTx" + Query_Schema_FullMethodName = "/vault.v1.Query/Schema" Query_Sync_FullMethodName = "/vault.v1.Query/Sync" ) @@ -32,6 +33,9 @@ type QueryClient interface { Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // BuildTx builds an unsigned transaction message for the given PKL. BuildTx(ctx context.Context, in *BuildTxRequest, opts ...grpc.CallOption) (*BuildTxResponse, error) + // Schema queries the DID document by its id. And returns the required PKL + // information + Schema(ctx context.Context, in *QuerySchemaRequest, opts ...grpc.CallOption) (*QuerySchemaResponse, error) // Sync queries the DID document by its id. And returns the required PKL // information Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) @@ -63,6 +67,15 @@ func (c *queryClient) BuildTx(ctx context.Context, in *BuildTxRequest, opts ...g return out, nil } +func (c *queryClient) Schema(ctx context.Context, in *QuerySchemaRequest, opts ...grpc.CallOption) (*QuerySchemaResponse, error) { + out := new(QuerySchemaResponse) + err := c.cc.Invoke(ctx, Query_Schema_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) { out := new(SyncResponse) err := c.cc.Invoke(ctx, Query_Sync_FullMethodName, in, out, opts...) @@ -80,6 +93,9 @@ type QueryServer interface { Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // BuildTx builds an unsigned transaction message for the given PKL. BuildTx(context.Context, *BuildTxRequest) (*BuildTxResponse, error) + // Schema queries the DID document by its id. And returns the required PKL + // information + Schema(context.Context, *QuerySchemaRequest) (*QuerySchemaResponse, error) // Sync queries the DID document by its id. And returns the required PKL // information Sync(context.Context, *SyncRequest) (*SyncResponse, error) @@ -96,6 +112,9 @@ func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*Q func (UnimplementedQueryServer) BuildTx(context.Context, *BuildTxRequest) (*BuildTxResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method BuildTx not implemented") } +func (UnimplementedQueryServer) Schema(context.Context, *QuerySchemaRequest) (*QuerySchemaResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Schema not implemented") +} func (UnimplementedQueryServer) Sync(context.Context, *SyncRequest) (*SyncResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Sync not implemented") } @@ -148,6 +167,24 @@ func _Query_BuildTx_Handler(srv interface{}, ctx context.Context, dec func(inter return interceptor(ctx, in, info, handler) } +func _Query_Schema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySchemaRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Schema(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Schema_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Schema(ctx, req.(*QuerySchemaRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_Sync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SyncRequest) if err := dec(in); err != nil { @@ -181,6 +218,10 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "BuildTx", Handler: _Query_BuildTx_Handler, }, + { + MethodName: "Schema", + Handler: _Query_Schema_Handler, + }, { MethodName: "Sync", Handler: _Query_Sync_Handler, diff --git a/pkg/nebula/nebula.pkl b/config/nebula.pkl similarity index 100% rename from pkg/nebula/nebula.pkl rename to config/nebula.pkl diff --git a/devbox.json b/devbox.json index 0d1a5af38..8795ff2e0 100644 --- a/devbox.json +++ b/devbox.json @@ -54,6 +54,7 @@ "make build-hway" ], "gen:proto": [ + "rm -rf ./pkg/nebula/node_modules", "make proto-gen" ], "gen:pkl": [ diff --git a/pkg/nebula/nebula.go b/pkg/nebula/nebula.go index 8a06ce455..49779a784 100644 --- a/pkg/nebula/nebula.go +++ b/pkg/nebula/nebula.go @@ -1,22 +1,16 @@ package nebula import ( - "context" "embed" "io/fs" "net/http" "github.com/labstack/echo/v4" - - "github.com/onsonr/sonr/pkg/nebula/models" ) //go:embed assets var embeddedFiles embed.FS -//go:embed nebula.pkl -var config []byte - func getHTTPFS() (http.FileSystem, error) { fsys, err := fs.Sub(embeddedFiles, "assets") if err != nil { @@ -27,10 +21,6 @@ func getHTTPFS() (http.FileSystem, error) { // UseAssets is a middleware that serves static files from the embedded assets func UseAssets(e *echo.Echo) error { - err := models.LoadFromString(context.Background(), string(config)) - if err != nil { - return err - } fsys, err := getHTTPFS() if err != nil { return err @@ -38,10 +28,5 @@ func UseAssets(e *echo.Echo) error { assets := http.FileServer(fsys) e.GET("/", echo.WrapHandler(assets)) e.GET("/assets/*", echo.WrapHandler(http.StripPrefix("/assets/", assets))) - e.GET("/_nebula/config", handleGetConfig) return nil } - -func handleGetConfig(c echo.Context) error { - return c.Blob(http.StatusOK, "application/octet-stream", config) -} diff --git a/proto/vault/v1/query.proto b/proto/vault/v1/query.proto index 9e2d0f501..e16679db0 100644 --- a/proto/vault/v1/query.proto +++ b/proto/vault/v1/query.proto @@ -18,6 +18,12 @@ service Query { option (google.api.http).post = "/vault/v1/buildtx"; } + // Schema queries the DID document by its id. And returns the required PKL + // information + rpc Schema(QuerySchemaRequest) returns (QuerySchemaResponse) { + option (google.api.http).get = "/vault/v1/schema"; + } + // Sync queries the DID document by its id. And returns the required PKL // information rpc Sync(SyncRequest) returns (SyncResponse) { @@ -43,6 +49,15 @@ message QueryIPFSResponse { bool ipfs = 1; } +// QuerySchemaRequest is the request type for the Query/Schema RPC method. +message QuerySchemaRequest {} + +// QuerySchemaResponse is the response type for the Query/Schema RPC method. +message QuerySchemaResponse { + // Schema is the DID document. + Schema schema = 1; +} + // SyncRequest is the request type for the Sync RPC method. message SyncRequest { string did = 1; diff --git a/web/provider/sync.go b/web/provider/sync.go deleted file mode 100644 index 5ac8282f4..000000000 --- a/web/provider/sync.go +++ /dev/null @@ -1 +0,0 @@ -package handlers diff --git a/web/provider/wss.go b/web/provider/wss.go deleted file mode 100644 index 5ac8282f4..000000000 --- a/web/provider/wss.go +++ /dev/null @@ -1 +0,0 @@ -package handlers diff --git a/x/vault/keeper/querier.go b/x/vault/keeper/querier.go index 329eb59d3..4ac437631 100644 --- a/x/vault/keeper/querier.go +++ b/x/vault/keeper/querier.go @@ -40,3 +40,16 @@ func (k Querier) BuildTx(goCtx context.Context, req *types.BuildTxRequest) (*typ // ctx := sdk.UnwrapSDKContext(goCtx) return &types.BuildTxResponse{}, nil } + +// Schema implements types.QueryServer. +func (k Querier) Schema(goCtx context.Context, req *types.QuerySchemaRequest) (*types.QuerySchemaResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + p, err := k.Keeper.Params.Get(ctx) + if err != nil { + return nil, err + } + return &types.QuerySchemaResponse{ + Schema: p.Schema, + }, nil +} diff --git a/x/vault/types/query.pb.go b/x/vault/types/query.pb.go index fec7bfb75..12bbcf367 100644 --- a/x/vault/types/query.pb.go +++ b/x/vault/types/query.pb.go @@ -194,6 +194,89 @@ func (m *QueryIPFSResponse) GetIpfs() bool { return false } +// QuerySchemaRequest is the request type for the Query/Schema RPC method. +type QuerySchemaRequest struct { +} + +func (m *QuerySchemaRequest) Reset() { *m = QuerySchemaRequest{} } +func (m *QuerySchemaRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySchemaRequest) ProtoMessage() {} +func (*QuerySchemaRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e6d49a2800ab3e4b, []int{4} +} +func (m *QuerySchemaRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySchemaRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySchemaRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySchemaRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySchemaRequest.Merge(m, src) +} +func (m *QuerySchemaRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySchemaRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySchemaRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySchemaRequest proto.InternalMessageInfo + +// QuerySchemaResponse is the response type for the Query/Schema RPC method. +type QuerySchemaResponse struct { + // Schema is the DID document. + Schema *Schema `protobuf:"bytes,1,opt,name=schema,proto3" json:"schema,omitempty"` +} + +func (m *QuerySchemaResponse) Reset() { *m = QuerySchemaResponse{} } +func (m *QuerySchemaResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySchemaResponse) ProtoMessage() {} +func (*QuerySchemaResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e6d49a2800ab3e4b, []int{5} +} +func (m *QuerySchemaResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySchemaResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySchemaResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySchemaResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySchemaResponse.Merge(m, src) +} +func (m *QuerySchemaResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySchemaResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySchemaResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySchemaResponse proto.InternalMessageInfo + +func (m *QuerySchemaResponse) GetSchema() *Schema { + if m != nil { + return m.Schema + } + return nil +} + // SyncRequest is the request type for the Sync RPC method. type SyncRequest struct { Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` @@ -203,7 +286,7 @@ func (m *SyncRequest) Reset() { *m = SyncRequest{} } func (m *SyncRequest) String() string { return proto.CompactTextString(m) } func (*SyncRequest) ProtoMessage() {} func (*SyncRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e6d49a2800ab3e4b, []int{4} + return fileDescriptor_e6d49a2800ab3e4b, []int{6} } func (m *SyncRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -248,7 +331,7 @@ func (m *SyncResponse) Reset() { *m = SyncResponse{} } func (m *SyncResponse) String() string { return proto.CompactTextString(m) } func (*SyncResponse) ProtoMessage() {} func (*SyncResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e6d49a2800ab3e4b, []int{5} + return fileDescriptor_e6d49a2800ab3e4b, []int{7} } func (m *SyncResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -294,7 +377,7 @@ func (m *BuildTxRequest) Reset() { *m = BuildTxRequest{} } func (m *BuildTxRequest) String() string { return proto.CompactTextString(m) } func (*BuildTxRequest) ProtoMessage() {} func (*BuildTxRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e6d49a2800ab3e4b, []int{6} + return fileDescriptor_e6d49a2800ab3e4b, []int{8} } func (m *BuildTxRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -347,7 +430,7 @@ func (m *BuildTxResponse) Reset() { *m = BuildTxResponse{} } func (m *BuildTxResponse) String() string { return proto.CompactTextString(m) } func (*BuildTxResponse) ProtoMessage() {} func (*BuildTxResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e6d49a2800ab3e4b, []int{7} + return fileDescriptor_e6d49a2800ab3e4b, []int{9} } func (m *BuildTxResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -395,6 +478,8 @@ func init() { proto.RegisterType((*QueryParamsResponse)(nil), "vault.v1.QueryParamsResponse") proto.RegisterType((*QueryIPFSRequest)(nil), "vault.v1.QueryIPFSRequest") proto.RegisterType((*QueryIPFSResponse)(nil), "vault.v1.QueryIPFSResponse") + proto.RegisterType((*QuerySchemaRequest)(nil), "vault.v1.QuerySchemaRequest") + proto.RegisterType((*QuerySchemaResponse)(nil), "vault.v1.QuerySchemaResponse") proto.RegisterType((*SyncRequest)(nil), "vault.v1.SyncRequest") proto.RegisterType((*SyncResponse)(nil), "vault.v1.SyncResponse") proto.RegisterType((*BuildTxRequest)(nil), "vault.v1.BuildTxRequest") @@ -404,34 +489,37 @@ func init() { func init() { proto.RegisterFile("vault/v1/query.proto", fileDescriptor_e6d49a2800ab3e4b) } var fileDescriptor_e6d49a2800ab3e4b = []byte{ - // 424 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x41, 0x8b, 0xd3, 0x40, - 0x1c, 0xc5, 0x9b, 0xb8, 0x76, 0xd7, 0xff, 0x4a, 0xcd, 0xce, 0xae, 0x25, 0x1b, 0xd6, 0x28, 0x83, - 0x60, 0x4f, 0x09, 0x5b, 0xbd, 0x09, 0x0a, 0x3d, 0x08, 0x1e, 0x84, 0xda, 0x7a, 0xd1, 0x8b, 0xa4, - 0xe9, 0x18, 0x43, 0xd3, 0x99, 0x69, 0x66, 0x52, 0x92, 0xab, 0x9f, 0x40, 0xf4, 0x4b, 0x79, 0x2c, - 0x78, 0xf1, 0x28, 0xad, 0x1f, 0x44, 0x32, 0x99, 0x34, 0xad, 0x5a, 0xbc, 0x84, 0xc9, 0x9b, 0xf7, - 0x7e, 0xff, 0xcc, 0x9b, 0xc0, 0xc5, 0x32, 0xc8, 0x12, 0xe9, 0x2f, 0xaf, 0xfd, 0x45, 0x46, 0xd2, - 0xc2, 0xe3, 0x29, 0x93, 0x0c, 0x9d, 0x28, 0xd5, 0x5b, 0x5e, 0x3b, 0x57, 0x11, 0x63, 0x51, 0x42, - 0xfc, 0x80, 0xc7, 0x7e, 0x40, 0x29, 0x93, 0x81, 0x8c, 0x19, 0x15, 0x95, 0xcf, 0xe9, 0x6e, 0xd3, - 0x11, 0xa1, 0x44, 0xc4, 0x5a, 0xc7, 0x17, 0x80, 0x5e, 0x97, 0xb8, 0x61, 0x90, 0x06, 0x73, 0x31, - 0x22, 0x8b, 0x8c, 0x08, 0x89, 0x9f, 0xc3, 0xf9, 0x9e, 0x2a, 0x38, 0xa3, 0x82, 0xa0, 0x1e, 0xb4, - 0xb9, 0x52, 0x6c, 0xe3, 0x81, 0xd1, 0x3b, 0xed, 0x5b, 0x5e, 0x3d, 0xdd, 0xd3, 0x4e, 0xbd, 0x8f, - 0x11, 0x58, 0x0a, 0xf0, 0x72, 0xf8, 0x62, 0x5c, 0x43, 0x1f, 0xc1, 0xd9, 0x8e, 0xa6, 0x91, 0x08, - 0x8e, 0x62, 0xfe, 0xa1, 0x02, 0x9e, 0x8c, 0xd4, 0x1a, 0xdf, 0x87, 0xd3, 0x71, 0x41, 0x43, 0x9d, - 0x43, 0x16, 0xdc, 0x98, 0xc6, 0x53, 0xe5, 0xb8, 0x35, 0x2a, 0x97, 0xb8, 0x07, 0xb7, 0x2b, 0x83, - 0x86, 0xd8, 0x70, 0x2c, 0xb2, 0x30, 0x24, 0xa2, 0xe6, 0xd4, 0xaf, 0xf8, 0x09, 0x74, 0x06, 0x59, - 0x9c, 0x4c, 0xdf, 0xe4, 0x07, 0x69, 0xa5, 0xc2, 0x67, 0x89, 0x6d, 0x56, 0x0a, 0x9f, 0x25, 0xf8, - 0x29, 0xdc, 0xd9, 0xa6, 0xfe, 0x37, 0x02, 0x75, 0xc0, 0x94, 0xb9, 0x4e, 0x9b, 0x32, 0xef, 0x7f, - 0x31, 0xe1, 0xa6, 0x3a, 0x27, 0x7a, 0x0f, 0xed, 0xaa, 0x16, 0x74, 0xd5, 0x14, 0xf5, 0x77, 0xdb, - 0xce, 0xbd, 0x03, 0xbb, 0xd5, 0x68, 0x6c, 0x7f, 0xfa, 0xfe, 0xeb, 0xab, 0x89, 0x90, 0xe5, 0x6f, - 0xef, 0xb0, 0x6a, 0x19, 0xbd, 0x85, 0x63, 0xfd, 0x9d, 0xc8, 0x6e, 0x18, 0xfb, 0x07, 0x76, 0x2e, - 0xff, 0xb1, 0xa3, 0xc9, 0x97, 0x8a, 0x7c, 0x8e, 0xcf, 0x1a, 0xf2, 0xa4, 0xb4, 0xc8, 0x1c, 0xbd, - 0x82, 0xa3, 0xb2, 0x62, 0x74, 0xb7, 0x49, 0xef, 0xdc, 0x89, 0xd3, 0xfd, 0x53, 0xd6, 0xc4, 0xae, - 0x22, 0x5a, 0xb8, 0xd3, 0x10, 0x45, 0x41, 0xc3, 0xc1, 0xb3, 0x6f, 0x6b, 0xd7, 0x58, 0xad, 0x5d, - 0xe3, 0xe7, 0xda, 0x35, 0x3e, 0x6f, 0xdc, 0xd6, 0x6a, 0xe3, 0xb6, 0x7e, 0x6c, 0xdc, 0xd6, 0xbb, - 0x87, 0x51, 0x2c, 0x3f, 0x66, 0x13, 0x2f, 0x64, 0x73, 0x9f, 0x51, 0xc1, 0x68, 0xea, 0xab, 0x47, - 0xae, 0x09, 0xb2, 0xe0, 0x44, 0x4c, 0xda, 0xea, 0x6f, 0x7d, 0xfc, 0x3b, 0x00, 0x00, 0xff, 0xff, - 0x76, 0x05, 0xd8, 0x03, 0x05, 0x03, 0x00, 0x00, + // 466 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0xc1, 0x6e, 0xd3, 0x30, + 0x18, 0xc7, 0x9b, 0x30, 0xba, 0xf1, 0x0d, 0x95, 0xcc, 0x1b, 0x55, 0x16, 0x8d, 0x80, 0x2c, 0x24, + 0x7a, 0x4a, 0xb4, 0xc1, 0x0d, 0x09, 0xa4, 0x1d, 0x90, 0x38, 0x20, 0x8d, 0x96, 0x0b, 0x5c, 0x50, + 0x9a, 0x9a, 0x2e, 0x5a, 0x6a, 0x7b, 0xb5, 0x53, 0xa5, 0x57, 0x9e, 0x00, 0x89, 0x97, 0xe2, 0x38, + 0x89, 0x0b, 0x47, 0xd4, 0xf2, 0x06, 0xbc, 0x00, 0x8a, 0xed, 0x24, 0xcd, 0xb2, 0x89, 0x4b, 0xe4, + 0xfc, 0xbf, 0xef, 0xfb, 0xf9, 0xef, 0xfc, 0x1d, 0x38, 0x58, 0x44, 0x59, 0x2a, 0xc3, 0xc5, 0x71, + 0x78, 0x99, 0x91, 0xf9, 0x32, 0xe0, 0x73, 0x26, 0x19, 0xda, 0x51, 0x6a, 0xb0, 0x38, 0xf6, 0x8e, + 0xa6, 0x8c, 0x4d, 0x53, 0x12, 0x46, 0x3c, 0x09, 0x23, 0x4a, 0x99, 0x8c, 0x64, 0xc2, 0xa8, 0xd0, + 0x7d, 0x5e, 0xbf, 0x9a, 0x9e, 0x12, 0x4a, 0x44, 0x62, 0x74, 0x7c, 0x00, 0xe8, 0x7d, 0x81, 0x3b, + 0x8b, 0xe6, 0xd1, 0x4c, 0x0c, 0xc9, 0x65, 0x46, 0x84, 0xc4, 0xaf, 0x61, 0xbf, 0xa1, 0x0a, 0xce, + 0xa8, 0x20, 0x68, 0x00, 0x5d, 0xae, 0x14, 0xd7, 0x7a, 0x62, 0x0d, 0x76, 0x4f, 0x9c, 0xa0, 0xdc, + 0x3d, 0x30, 0x9d, 0xa6, 0x8e, 0x11, 0x38, 0x0a, 0xf0, 0xf6, 0xec, 0xcd, 0xa8, 0x84, 0x3e, 0x83, + 0xbd, 0x0d, 0xcd, 0x20, 0x11, 0x6c, 0x25, 0xfc, 0x8b, 0x06, 0xee, 0x0c, 0xd5, 0xba, 0xf2, 0x34, + 0x8a, 0xcf, 0xc9, 0x2c, 0xba, 0xee, 0xa9, 0x54, 0x6b, 0x4f, 0x42, 0x29, 0x6d, 0x4f, 0xa6, 0xd3, + 0xd4, 0xf1, 0x63, 0xd8, 0x1d, 0x2d, 0x69, 0x6c, 0x78, 0xc8, 0x81, 0x3b, 0x93, 0x64, 0xa2, 0xa6, + 0xee, 0x0d, 0x8b, 0x25, 0x1e, 0xc0, 0x7d, 0xdd, 0x60, 0xd0, 0x2e, 0x6c, 0x8b, 0x2c, 0x8e, 0x89, + 0x28, 0xed, 0x95, 0xaf, 0xf8, 0x05, 0xf4, 0x4e, 0xb3, 0x24, 0x9d, 0x7c, 0xc8, 0x6f, 0xa5, 0x15, + 0x0a, 0xbf, 0x48, 0x5d, 0x5b, 0x2b, 0xfc, 0x22, 0xc5, 0x2f, 0xe1, 0x41, 0x35, 0xf5, 0xbf, 0x2d, + 0x50, 0x0f, 0x6c, 0x99, 0x9b, 0x69, 0x5b, 0xe6, 0x27, 0x7f, 0x6d, 0xb8, 0xab, 0xce, 0x8f, 0x3e, + 0x43, 0x57, 0x7f, 0x6d, 0x74, 0x54, 0x9f, 0xb5, 0x1d, 0xa2, 0xf7, 0xe8, 0x96, 0xaa, 0xde, 0x1a, + 0xbb, 0x5f, 0x7f, 0xfe, 0xf9, 0x6e, 0x23, 0xe4, 0x84, 0xd5, 0xd5, 0xd0, 0xe1, 0xa1, 0x8f, 0xb0, + 0x6d, 0x7c, 0x22, 0xb7, 0x66, 0x34, 0x0f, 0xec, 0x1d, 0xde, 0x50, 0x31, 0xe4, 0x43, 0x45, 0xde, + 0xc7, 0x7b, 0x35, 0x79, 0x5c, 0xb4, 0xc8, 0xbc, 0xf0, 0xae, 0x53, 0x69, 0x79, 0x6f, 0x84, 0xdd, + 0xf2, 0xde, 0x0c, 0xfd, 0x26, 0xef, 0x3a, 0x64, 0xf4, 0x0e, 0xb6, 0x8a, 0x0c, 0xd1, 0xc3, 0x8d, + 0x6b, 0x50, 0x87, 0xee, 0xf5, 0xaf, 0xcb, 0x06, 0xd8, 0x57, 0x40, 0x07, 0xf7, 0x36, 0x80, 0x4b, + 0x1a, 0x9f, 0xbe, 0xfa, 0xb1, 0xf2, 0xad, 0xab, 0x95, 0x6f, 0xfd, 0x5e, 0xf9, 0xd6, 0xb7, 0xb5, + 0xdf, 0xb9, 0x5a, 0xfb, 0x9d, 0x5f, 0x6b, 0xbf, 0xf3, 0xe9, 0xe9, 0x34, 0x91, 0xe7, 0xd9, 0x38, + 0x88, 0xd9, 0x2c, 0x64, 0x54, 0x30, 0x3a, 0x0f, 0xd5, 0x23, 0x37, 0x04, 0xb9, 0xe4, 0x44, 0x8c, + 0xbb, 0xea, 0x2f, 0x7b, 0xfe, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xf3, 0xd1, 0xd1, 0xbc, 0xbd, 0x03, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -450,6 +538,9 @@ type QueryClient interface { Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // BuildTx builds an unsigned transaction message for the given PKL. BuildTx(ctx context.Context, in *BuildTxRequest, opts ...grpc.CallOption) (*BuildTxResponse, error) + // Schema queries the DID document by its id. And returns the required PKL + // information + Schema(ctx context.Context, in *QuerySchemaRequest, opts ...grpc.CallOption) (*QuerySchemaResponse, error) // Sync queries the DID document by its id. And returns the required PKL // information Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) @@ -481,6 +572,15 @@ func (c *queryClient) BuildTx(ctx context.Context, in *BuildTxRequest, opts ...g return out, nil } +func (c *queryClient) Schema(ctx context.Context, in *QuerySchemaRequest, opts ...grpc.CallOption) (*QuerySchemaResponse, error) { + out := new(QuerySchemaResponse) + err := c.cc.Invoke(ctx, "/vault.v1.Query/Schema", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) { out := new(SyncResponse) err := c.cc.Invoke(ctx, "/vault.v1.Query/Sync", in, out, opts...) @@ -496,6 +596,9 @@ type QueryServer interface { Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // BuildTx builds an unsigned transaction message for the given PKL. BuildTx(context.Context, *BuildTxRequest) (*BuildTxResponse, error) + // Schema queries the DID document by its id. And returns the required PKL + // information + Schema(context.Context, *QuerySchemaRequest) (*QuerySchemaResponse, error) // Sync queries the DID document by its id. And returns the required PKL // information Sync(context.Context, *SyncRequest) (*SyncResponse, error) @@ -511,6 +614,9 @@ func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsReq func (*UnimplementedQueryServer) BuildTx(ctx context.Context, req *BuildTxRequest) (*BuildTxResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method BuildTx not implemented") } +func (*UnimplementedQueryServer) Schema(ctx context.Context, req *QuerySchemaRequest) (*QuerySchemaResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Schema not implemented") +} func (*UnimplementedQueryServer) Sync(ctx context.Context, req *SyncRequest) (*SyncResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Sync not implemented") } @@ -555,6 +661,24 @@ func _Query_BuildTx_Handler(srv interface{}, ctx context.Context, dec func(inter return interceptor(ctx, in, info, handler) } +func _Query_Schema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySchemaRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Schema(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/vault.v1.Query/Schema", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Schema(ctx, req.(*QuerySchemaRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_Sync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SyncRequest) if err := dec(in); err != nil { @@ -585,6 +709,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "BuildTx", Handler: _Query_BuildTx_Handler, }, + { + MethodName: "Schema", + Handler: _Query_Schema_Handler, + }, { MethodName: "Sync", Handler: _Query_Sync_Handler, @@ -708,6 +836,64 @@ func (m *QueryIPFSResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *QuerySchemaRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySchemaRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySchemaRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QuerySchemaResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySchemaResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySchemaResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Schema != nil { + { + size, err := m.Schema.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *SyncRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -902,6 +1088,28 @@ func (m *QueryIPFSResponse) Size() (n int) { return n } +func (m *QuerySchemaRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QuerySchemaResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Schema != nil { + l = m.Schema.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func (m *SyncRequest) Size() (n int) { if m == nil { return 0 @@ -1222,6 +1430,142 @@ func (m *QueryIPFSResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QuerySchemaRequest) Unmarshal(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 ErrIntOverflowQuery + } + 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: QuerySchemaRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySchemaRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySchemaResponse) Unmarshal(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 ErrIntOverflowQuery + } + 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: QuerySchemaResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySchemaResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Schema == nil { + m.Schema = &Schema{} + } + if err := m.Schema.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *SyncRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/vault/types/query.pb.gw.go b/x/vault/types/query.pb.gw.go index 712b1dbe7..d14a06768 100644 --- a/x/vault/types/query.pb.gw.go +++ b/x/vault/types/query.pb.gw.go @@ -87,6 +87,24 @@ func local_request_Query_BuildTx_0(ctx context.Context, marshaler runtime.Marsha } +func request_Query_Schema_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySchemaRequest + var metadata runtime.ServerMetadata + + msg, err := client.Schema(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Schema_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySchemaRequest + var metadata runtime.ServerMetadata + + msg, err := server.Schema(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_Query_Sync_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -175,6 +193,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_Schema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Schema_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Schema_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("POST", pattern_Query_Sync_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -279,6 +320,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_Schema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Schema_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Schema_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("POST", pattern_Query_Sync_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -307,6 +368,8 @@ var ( pattern_Query_BuildTx_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"vault", "v1", "buildtx"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Schema_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"vault", "v1", "schema"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Sync_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"vault", "v1", "sync"}, "", runtime.AssumeColonVerbOpt(false))) ) @@ -315,5 +378,7 @@ var ( forward_Query_BuildTx_0 = runtime.ForwardResponseMessage + forward_Query_Schema_0 = runtime.ForwardResponseMessage + forward_Query_Sync_0 = runtime.ForwardResponseMessage )