diff --git a/api/stratos/pot/v1/event.pulsar.go b/api/stratos/pot/v1/event.pulsar.go index 111299ee..b3624745 100644 --- a/api/stratos/pot/v1/event.pulsar.go +++ b/api/stratos/pot/v1/event.pulsar.go @@ -2140,554 +2140,6 @@ func (x *fastReflection_EventSlashing) ProtoMethods() *protoiface.Methods { } } -var ( - md_EventMessage protoreflect.MessageDescriptor - fd_EventMessage_module protoreflect.FieldDescriptor - fd_EventMessage_sender protoreflect.FieldDescriptor - fd_EventMessage_action protoreflect.FieldDescriptor -) - -func init() { - file_stratos_pot_v1_event_proto_init() - md_EventMessage = File_stratos_pot_v1_event_proto.Messages().ByName("EventMessage") - fd_EventMessage_module = md_EventMessage.Fields().ByName("module") - fd_EventMessage_sender = md_EventMessage.Fields().ByName("sender") - fd_EventMessage_action = md_EventMessage.Fields().ByName("action") -} - -var _ protoreflect.Message = (*fastReflection_EventMessage)(nil) - -type fastReflection_EventMessage EventMessage - -func (x *EventMessage) ProtoReflect() protoreflect.Message { - return (*fastReflection_EventMessage)(x) -} - -func (x *EventMessage) slowProtoReflect() protoreflect.Message { - mi := &file_stratos_pot_v1_event_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_EventMessage_messageType fastReflection_EventMessage_messageType -var _ protoreflect.MessageType = fastReflection_EventMessage_messageType{} - -type fastReflection_EventMessage_messageType struct{} - -func (x fastReflection_EventMessage_messageType) Zero() protoreflect.Message { - return (*fastReflection_EventMessage)(nil) -} -func (x fastReflection_EventMessage_messageType) New() protoreflect.Message { - return new(fastReflection_EventMessage) -} -func (x fastReflection_EventMessage_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_EventMessage -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_EventMessage) Descriptor() protoreflect.MessageDescriptor { - return md_EventMessage -} - -// 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_EventMessage) Type() protoreflect.MessageType { - return _fastReflection_EventMessage_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_EventMessage) New() protoreflect.Message { - return new(fastReflection_EventMessage) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_EventMessage) Interface() protoreflect.ProtoMessage { - return (*EventMessage)(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_EventMessage) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Module != "" { - value := protoreflect.ValueOfString(x.Module) - if !f(fd_EventMessage_module, value) { - return - } - } - if x.Sender != "" { - value := protoreflect.ValueOfString(x.Sender) - if !f(fd_EventMessage_sender, value) { - return - } - } - if x.Action != "" { - value := protoreflect.ValueOfString(x.Action) - if !f(fd_EventMessage_action, 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_EventMessage) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stratos.pot.v1.EventMessage.module": - return x.Module != "" - case "stratos.pot.v1.EventMessage.sender": - return x.Sender != "" - case "stratos.pot.v1.EventMessage.action": - return x.Action != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.pot.v1.EventMessage")) - } - panic(fmt.Errorf("message stratos.pot.v1.EventMessage 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_EventMessage) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stratos.pot.v1.EventMessage.module": - x.Module = "" - case "stratos.pot.v1.EventMessage.sender": - x.Sender = "" - case "stratos.pot.v1.EventMessage.action": - x.Action = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.pot.v1.EventMessage")) - } - panic(fmt.Errorf("message stratos.pot.v1.EventMessage 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_EventMessage) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stratos.pot.v1.EventMessage.module": - value := x.Module - return protoreflect.ValueOfString(value) - case "stratos.pot.v1.EventMessage.sender": - value := x.Sender - return protoreflect.ValueOfString(value) - case "stratos.pot.v1.EventMessage.action": - value := x.Action - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.pot.v1.EventMessage")) - } - panic(fmt.Errorf("message stratos.pot.v1.EventMessage 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_EventMessage) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stratos.pot.v1.EventMessage.module": - x.Module = value.Interface().(string) - case "stratos.pot.v1.EventMessage.sender": - x.Sender = value.Interface().(string) - case "stratos.pot.v1.EventMessage.action": - x.Action = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.pot.v1.EventMessage")) - } - panic(fmt.Errorf("message stratos.pot.v1.EventMessage 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_EventMessage) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stratos.pot.v1.EventMessage.module": - panic(fmt.Errorf("field module of message stratos.pot.v1.EventMessage is not mutable")) - case "stratos.pot.v1.EventMessage.sender": - panic(fmt.Errorf("field sender of message stratos.pot.v1.EventMessage is not mutable")) - case "stratos.pot.v1.EventMessage.action": - panic(fmt.Errorf("field action of message stratos.pot.v1.EventMessage is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.pot.v1.EventMessage")) - } - panic(fmt.Errorf("message stratos.pot.v1.EventMessage 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_EventMessage) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stratos.pot.v1.EventMessage.module": - return protoreflect.ValueOfString("") - case "stratos.pot.v1.EventMessage.sender": - return protoreflect.ValueOfString("") - case "stratos.pot.v1.EventMessage.action": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.pot.v1.EventMessage")) - } - panic(fmt.Errorf("message stratos.pot.v1.EventMessage 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_EventMessage) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stratos.pot.v1.EventMessage", 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_EventMessage) 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_EventMessage) 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_EventMessage) 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_EventMessage) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*EventMessage) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Module) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Sender) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Action) - if l > 0 { - 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().(*EventMessage) - 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 len(x.Action) > 0 { - i -= len(x.Action) - copy(dAtA[i:], x.Action) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Action))) - i-- - dAtA[i] = 0x1a - } - if len(x.Sender) > 0 { - i -= len(x.Sender) - copy(dAtA[i:], x.Sender) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) - i-- - dAtA[i] = 0x12 - } - if len(x.Module) > 0 { - i -= len(x.Module) - copy(dAtA[i:], x.Module) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Module))) - 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().(*EventMessage) - 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: EventMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventMessage: 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 Module", wireType) - } - var stringLen 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++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - 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 - } - x.Module = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) - } - var stringLen 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++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - 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 - } - x.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) - } - var stringLen 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++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - 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 - } - x.Action = string(dAtA[iNdEx:postIndex]) - 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, - } -} - // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -2901,61 +2353,6 @@ func (x *EventSlashing) GetSuspend() string { return "" } -// EventMessage -type EventMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // module which emits the event - Module string `protobuf:"bytes,1,opt,name=module,proto3" json:"module,omitempty"` - // sender of the message - Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` - // tx_type is the type of the message - Action string `protobuf:"bytes,3,opt,name=action,proto3" json:"action,omitempty"` -} - -func (x *EventMessage) Reset() { - *x = EventMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_stratos_pot_v1_event_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EventMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EventMessage) ProtoMessage() {} - -// Deprecated: Use EventMessage.ProtoReflect.Descriptor instead. -func (*EventMessage) Descriptor() ([]byte, []int) { - return file_stratos_pot_v1_event_proto_rawDescGZIP(), []int{4} -} - -func (x *EventMessage) GetModule() string { - if x != nil { - return x.Module - } - return "" -} - -func (x *EventMessage) GetSender() string { - if x != nil { - return x.Sender - } - return "" -} - -func (x *EventMessage) GetAction() string { - if x != nil { - return x.Action - } - return "" -} - var File_stratos_pot_v1_event_proto protoreflect.FileDescriptor var file_stratos_pot_v1_event_proto_rawDesc = []byte{ @@ -2989,23 +2386,17 @@ var file_stratos_pot_v1_event_proto_rawDesc = []byte{ 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x73, - 0x70, 0x65, 0x6e, 0x64, 0x22, 0x56, 0x0a, 0x0c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0xa1, 0x01, 0x0a, - 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x70, 0x6f, 0x74, - 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x25, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2f, 0x70, 0x6f, 0x74, 0x2f, - 0x76, 0x31, 0x3b, 0x70, 0x6f, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x50, 0x58, 0xaa, 0x02, - 0x0e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x50, 0x6f, 0x74, 0x2e, 0x56, 0x31, 0xca, - 0x02, 0x0e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x5c, 0x50, 0x6f, 0x74, 0x5c, 0x56, 0x31, - 0xe2, 0x02, 0x1a, 0x53, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x5c, 0x50, 0x6f, 0x74, 0x5c, 0x56, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, - 0x53, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x3a, 0x3a, 0x50, 0x6f, 0x74, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x65, 0x6e, 0x64, 0x42, 0xa1, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x70, 0x6f, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x25, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x6f, 0x73, 0x2f, 0x70, 0x6f, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x6f, 0x74, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x53, 0x50, 0x58, 0xaa, 0x02, 0x0e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, + 0x2e, 0x50, 0x6f, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x6f, + 0x73, 0x5c, 0x50, 0x6f, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1a, 0x53, 0x74, 0x72, 0x61, 0x74, + 0x6f, 0x73, 0x5c, 0x50, 0x6f, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x3a, + 0x3a, 0x50, 0x6f, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3020,13 +2411,12 @@ func file_stratos_pot_v1_event_proto_rawDescGZIP() []byte { return file_stratos_pot_v1_event_proto_rawDescData } -var file_stratos_pot_v1_event_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_stratos_pot_v1_event_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_stratos_pot_v1_event_proto_goTypes = []interface{}{ (*EventVolumeReport)(nil), // 0: stratos.pot.v1.EventVolumeReport (*EventWithdraw)(nil), // 1: stratos.pot.v1.EventWithdraw (*EventFoundationDeposit)(nil), // 2: stratos.pot.v1.EventFoundationDeposit (*EventSlashing)(nil), // 3: stratos.pot.v1.EventSlashing - (*EventMessage)(nil), // 4: stratos.pot.v1.EventMessage } var file_stratos_pot_v1_event_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type @@ -3090,18 +2480,6 @@ func file_stratos_pot_v1_event_proto_init() { return nil } } - file_stratos_pot_v1_event_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } type x struct{} out := protoimpl.TypeBuilder{ @@ -3109,7 +2487,7 @@ func file_stratos_pot_v1_event_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_stratos_pot_v1_event_proto_rawDesc, NumEnums: 0, - NumMessages: 5, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, diff --git a/api/stratos/register/v1/event.pulsar.go b/api/stratos/register/v1/event.pulsar.go index 6caf1ceb..3ffdc8cc 100644 --- a/api/stratos/register/v1/event.pulsar.go +++ b/api/stratos/register/v1/event.pulsar.go @@ -7904,554 +7904,6 @@ func (x *fastReflection_EventCompleteUnBondingMetaNode) ProtoMethods() *protoifa } } -var ( - md_EventMessage protoreflect.MessageDescriptor - fd_EventMessage_module protoreflect.FieldDescriptor - fd_EventMessage_sender protoreflect.FieldDescriptor - fd_EventMessage_action protoreflect.FieldDescriptor -) - -func init() { - file_stratos_register_v1_event_proto_init() - md_EventMessage = File_stratos_register_v1_event_proto.Messages().ByName("EventMessage") - fd_EventMessage_module = md_EventMessage.Fields().ByName("module") - fd_EventMessage_sender = md_EventMessage.Fields().ByName("sender") - fd_EventMessage_action = md_EventMessage.Fields().ByName("action") -} - -var _ protoreflect.Message = (*fastReflection_EventMessage)(nil) - -type fastReflection_EventMessage EventMessage - -func (x *EventMessage) ProtoReflect() protoreflect.Message { - return (*fastReflection_EventMessage)(x) -} - -func (x *EventMessage) slowProtoReflect() protoreflect.Message { - mi := &file_stratos_register_v1_event_proto_msgTypes[13] - 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_EventMessage_messageType fastReflection_EventMessage_messageType -var _ protoreflect.MessageType = fastReflection_EventMessage_messageType{} - -type fastReflection_EventMessage_messageType struct{} - -func (x fastReflection_EventMessage_messageType) Zero() protoreflect.Message { - return (*fastReflection_EventMessage)(nil) -} -func (x fastReflection_EventMessage_messageType) New() protoreflect.Message { - return new(fastReflection_EventMessage) -} -func (x fastReflection_EventMessage_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_EventMessage -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_EventMessage) Descriptor() protoreflect.MessageDescriptor { - return md_EventMessage -} - -// 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_EventMessage) Type() protoreflect.MessageType { - return _fastReflection_EventMessage_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_EventMessage) New() protoreflect.Message { - return new(fastReflection_EventMessage) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_EventMessage) Interface() protoreflect.ProtoMessage { - return (*EventMessage)(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_EventMessage) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Module != "" { - value := protoreflect.ValueOfString(x.Module) - if !f(fd_EventMessage_module, value) { - return - } - } - if x.Sender != "" { - value := protoreflect.ValueOfString(x.Sender) - if !f(fd_EventMessage_sender, value) { - return - } - } - if x.Action != "" { - value := protoreflect.ValueOfString(x.Action) - if !f(fd_EventMessage_action, 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_EventMessage) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stratos.register.v1.EventMessage.module": - return x.Module != "" - case "stratos.register.v1.EventMessage.sender": - return x.Sender != "" - case "stratos.register.v1.EventMessage.action": - return x.Action != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1.EventMessage")) - } - panic(fmt.Errorf("message stratos.register.v1.EventMessage 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_EventMessage) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stratos.register.v1.EventMessage.module": - x.Module = "" - case "stratos.register.v1.EventMessage.sender": - x.Sender = "" - case "stratos.register.v1.EventMessage.action": - x.Action = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1.EventMessage")) - } - panic(fmt.Errorf("message stratos.register.v1.EventMessage 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_EventMessage) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stratos.register.v1.EventMessage.module": - value := x.Module - return protoreflect.ValueOfString(value) - case "stratos.register.v1.EventMessage.sender": - value := x.Sender - return protoreflect.ValueOfString(value) - case "stratos.register.v1.EventMessage.action": - value := x.Action - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1.EventMessage")) - } - panic(fmt.Errorf("message stratos.register.v1.EventMessage 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_EventMessage) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stratos.register.v1.EventMessage.module": - x.Module = value.Interface().(string) - case "stratos.register.v1.EventMessage.sender": - x.Sender = value.Interface().(string) - case "stratos.register.v1.EventMessage.action": - x.Action = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1.EventMessage")) - } - panic(fmt.Errorf("message stratos.register.v1.EventMessage 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_EventMessage) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stratos.register.v1.EventMessage.module": - panic(fmt.Errorf("field module of message stratos.register.v1.EventMessage is not mutable")) - case "stratos.register.v1.EventMessage.sender": - panic(fmt.Errorf("field sender of message stratos.register.v1.EventMessage is not mutable")) - case "stratos.register.v1.EventMessage.action": - panic(fmt.Errorf("field action of message stratos.register.v1.EventMessage is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1.EventMessage")) - } - panic(fmt.Errorf("message stratos.register.v1.EventMessage 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_EventMessage) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stratos.register.v1.EventMessage.module": - return protoreflect.ValueOfString("") - case "stratos.register.v1.EventMessage.sender": - return protoreflect.ValueOfString("") - case "stratos.register.v1.EventMessage.action": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.register.v1.EventMessage")) - } - panic(fmt.Errorf("message stratos.register.v1.EventMessage 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_EventMessage) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stratos.register.v1.EventMessage", 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_EventMessage) 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_EventMessage) 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_EventMessage) 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_EventMessage) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*EventMessage) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Module) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Sender) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Action) - if l > 0 { - 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().(*EventMessage) - 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 len(x.Action) > 0 { - i -= len(x.Action) - copy(dAtA[i:], x.Action) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Action))) - i-- - dAtA[i] = 0x1a - } - if len(x.Sender) > 0 { - i -= len(x.Sender) - copy(dAtA[i:], x.Sender) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) - i-- - dAtA[i] = 0x12 - } - if len(x.Module) > 0 { - i -= len(x.Module) - copy(dAtA[i:], x.Module) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Module))) - 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().(*EventMessage) - 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: EventMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventMessage: 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 Module", wireType) - } - var stringLen 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++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - 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 - } - x.Module = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) - } - var stringLen 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++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - 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 - } - x.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) - } - var stringLen 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++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - 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 - } - x.Action = string(dAtA[iNdEx:postIndex]) - 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, - } -} - // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -9237,61 +8689,6 @@ func (x *EventCompleteUnBondingMetaNode) GetNetworkAddress() string { return "" } -// EventMessage -type EventMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // module which emits the event - Module string `protobuf:"bytes,1,opt,name=module,proto3" json:"module,omitempty"` - // sender of the message - Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` - // tx_type is the type of the message - Action string `protobuf:"bytes,3,opt,name=action,proto3" json:"action,omitempty"` -} - -func (x *EventMessage) Reset() { - *x = EventMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_stratos_register_v1_event_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EventMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EventMessage) ProtoMessage() {} - -// Deprecated: Use EventMessage.ProtoReflect.Descriptor instead. -func (*EventMessage) Descriptor() ([]byte, []int) { - return file_stratos_register_v1_event_proto_rawDescGZIP(), []int{13} -} - -func (x *EventMessage) GetModule() string { - if x != nil { - return x.Module - } - return "" -} - -func (x *EventMessage) GetSender() string { - if x != nil { - return x.Sender - } - return "" -} - -func (x *EventMessage) GetAction() string { - if x != nil { - return x.Action - } - return "" -} - var File_stratos_register_v1_event_proto protoreflect.FileDescriptor var file_stratos_register_v1_event_proto_rawDesc = []byte{ @@ -9451,25 +8848,20 @@ var file_stratos_register_v1_event_proto_rawDesc = []byte{ 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x22, 0x56, 0x0a, 0x0c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0xc4, 0x01, 0x0a, 0x17, 0x63, - 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, - 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2f, 0x72, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x72, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x52, 0x58, 0xaa, 0x02, 0x13, 0x53, 0x74, - 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x56, - 0x31, 0xca, 0x02, 0x13, 0x53, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x5c, 0x52, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x65, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1f, 0x53, 0x74, 0x72, 0x61, 0x74, 0x6f, - 0x73, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x53, 0x74, 0x72, 0x61, - 0x74, 0x6f, 0x73, 0x3a, 0x3a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x73, 0x42, 0xc4, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x74, + 0x6f, 0x73, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0a, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x2f, + 0x76, 0x31, 0x3b, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, + 0x53, 0x52, 0x58, 0xaa, 0x02, 0x13, 0x53, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x13, 0x53, 0x74, 0x72, 0x61, + 0x74, 0x6f, 0x73, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x5c, 0x56, 0x31, 0xe2, + 0x02, 0x1f, 0x53, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x15, 0x53, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x3a, 0x3a, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -9484,7 +8876,7 @@ func file_stratos_register_v1_event_proto_rawDescGZIP() []byte { return file_stratos_register_v1_event_proto_rawDescData } -var file_stratos_register_v1_event_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_stratos_register_v1_event_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_stratos_register_v1_event_proto_goTypes = []interface{}{ (*EventCreateResourceNode)(nil), // 0: stratos.register.v1.EventCreateResourceNode (*EventCreateMetaNode)(nil), // 1: stratos.register.v1.EventCreateMetaNode @@ -9499,7 +8891,6 @@ var file_stratos_register_v1_event_proto_goTypes = []interface{}{ (*EventUpdateMetaNodeDeposit)(nil), // 10: stratos.register.v1.EventUpdateMetaNodeDeposit (*EventCompleteUnBondingResourceNode)(nil), // 11: stratos.register.v1.EventCompleteUnBondingResourceNode (*EventCompleteUnBondingMetaNode)(nil), // 12: stratos.register.v1.EventCompleteUnBondingMetaNode - (*EventMessage)(nil), // 13: stratos.register.v1.EventMessage } var file_stratos_register_v1_event_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type @@ -9671,18 +9062,6 @@ func file_stratos_register_v1_event_proto_init() { return nil } } - file_stratos_register_v1_event_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } type x struct{} out := protoimpl.TypeBuilder{ @@ -9690,7 +9069,7 @@ func file_stratos_register_v1_event_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_stratos_register_v1_event_proto_rawDesc, NumEnums: 0, - NumMessages: 14, + NumMessages: 13, NumExtensions: 0, NumServices: 0, }, diff --git a/api/stratos/sds/v1/event.pulsar.go b/api/stratos/sds/v1/event.pulsar.go index 63c128ce..843e27c1 100644 --- a/api/stratos/sds/v1/event.pulsar.go +++ b/api/stratos/sds/v1/event.pulsar.go @@ -1236,554 +1236,6 @@ func (x *fastReflection_EventFileUpload) ProtoMethods() *protoiface.Methods { } } -var ( - md_EventMessage protoreflect.MessageDescriptor - fd_EventMessage_module protoreflect.FieldDescriptor - fd_EventMessage_sender protoreflect.FieldDescriptor - fd_EventMessage_action protoreflect.FieldDescriptor -) - -func init() { - file_stratos_sds_v1_event_proto_init() - md_EventMessage = File_stratos_sds_v1_event_proto.Messages().ByName("EventMessage") - fd_EventMessage_module = md_EventMessage.Fields().ByName("module") - fd_EventMessage_sender = md_EventMessage.Fields().ByName("sender") - fd_EventMessage_action = md_EventMessage.Fields().ByName("action") -} - -var _ protoreflect.Message = (*fastReflection_EventMessage)(nil) - -type fastReflection_EventMessage EventMessage - -func (x *EventMessage) ProtoReflect() protoreflect.Message { - return (*fastReflection_EventMessage)(x) -} - -func (x *EventMessage) slowProtoReflect() protoreflect.Message { - mi := &file_stratos_sds_v1_event_proto_msgTypes[2] - 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_EventMessage_messageType fastReflection_EventMessage_messageType -var _ protoreflect.MessageType = fastReflection_EventMessage_messageType{} - -type fastReflection_EventMessage_messageType struct{} - -func (x fastReflection_EventMessage_messageType) Zero() protoreflect.Message { - return (*fastReflection_EventMessage)(nil) -} -func (x fastReflection_EventMessage_messageType) New() protoreflect.Message { - return new(fastReflection_EventMessage) -} -func (x fastReflection_EventMessage_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_EventMessage -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_EventMessage) Descriptor() protoreflect.MessageDescriptor { - return md_EventMessage -} - -// 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_EventMessage) Type() protoreflect.MessageType { - return _fastReflection_EventMessage_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_EventMessage) New() protoreflect.Message { - return new(fastReflection_EventMessage) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_EventMessage) Interface() protoreflect.ProtoMessage { - return (*EventMessage)(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_EventMessage) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Module != "" { - value := protoreflect.ValueOfString(x.Module) - if !f(fd_EventMessage_module, value) { - return - } - } - if x.Sender != "" { - value := protoreflect.ValueOfString(x.Sender) - if !f(fd_EventMessage_sender, value) { - return - } - } - if x.Action != "" { - value := protoreflect.ValueOfString(x.Action) - if !f(fd_EventMessage_action, 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_EventMessage) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stratos.sds.v1.EventMessage.module": - return x.Module != "" - case "stratos.sds.v1.EventMessage.sender": - return x.Sender != "" - case "stratos.sds.v1.EventMessage.action": - return x.Action != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.sds.v1.EventMessage")) - } - panic(fmt.Errorf("message stratos.sds.v1.EventMessage 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_EventMessage) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stratos.sds.v1.EventMessage.module": - x.Module = "" - case "stratos.sds.v1.EventMessage.sender": - x.Sender = "" - case "stratos.sds.v1.EventMessage.action": - x.Action = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.sds.v1.EventMessage")) - } - panic(fmt.Errorf("message stratos.sds.v1.EventMessage 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_EventMessage) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stratos.sds.v1.EventMessage.module": - value := x.Module - return protoreflect.ValueOfString(value) - case "stratos.sds.v1.EventMessage.sender": - value := x.Sender - return protoreflect.ValueOfString(value) - case "stratos.sds.v1.EventMessage.action": - value := x.Action - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.sds.v1.EventMessage")) - } - panic(fmt.Errorf("message stratos.sds.v1.EventMessage 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_EventMessage) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stratos.sds.v1.EventMessage.module": - x.Module = value.Interface().(string) - case "stratos.sds.v1.EventMessage.sender": - x.Sender = value.Interface().(string) - case "stratos.sds.v1.EventMessage.action": - x.Action = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.sds.v1.EventMessage")) - } - panic(fmt.Errorf("message stratos.sds.v1.EventMessage 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_EventMessage) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stratos.sds.v1.EventMessage.module": - panic(fmt.Errorf("field module of message stratos.sds.v1.EventMessage is not mutable")) - case "stratos.sds.v1.EventMessage.sender": - panic(fmt.Errorf("field sender of message stratos.sds.v1.EventMessage is not mutable")) - case "stratos.sds.v1.EventMessage.action": - panic(fmt.Errorf("field action of message stratos.sds.v1.EventMessage is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.sds.v1.EventMessage")) - } - panic(fmt.Errorf("message stratos.sds.v1.EventMessage 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_EventMessage) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stratos.sds.v1.EventMessage.module": - return protoreflect.ValueOfString("") - case "stratos.sds.v1.EventMessage.sender": - return protoreflect.ValueOfString("") - case "stratos.sds.v1.EventMessage.action": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stratos.sds.v1.EventMessage")) - } - panic(fmt.Errorf("message stratos.sds.v1.EventMessage 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_EventMessage) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stratos.sds.v1.EventMessage", 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_EventMessage) 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_EventMessage) 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_EventMessage) 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_EventMessage) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*EventMessage) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Module) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Sender) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Action) - if l > 0 { - 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().(*EventMessage) - 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 len(x.Action) > 0 { - i -= len(x.Action) - copy(dAtA[i:], x.Action) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Action))) - i-- - dAtA[i] = 0x1a - } - if len(x.Sender) > 0 { - i -= len(x.Sender) - copy(dAtA[i:], x.Sender) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) - i-- - dAtA[i] = 0x12 - } - if len(x.Module) > 0 { - i -= len(x.Module) - copy(dAtA[i:], x.Module) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Module))) - 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().(*EventMessage) - 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: EventMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventMessage: 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 Module", wireType) - } - var stringLen 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++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - 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 - } - x.Module = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) - } - var stringLen 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++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - 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 - } - x.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) - } - var stringLen 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++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - 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 - } - x.Action = string(dAtA[iNdEx:postIndex]) - 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, - } -} - // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -1917,61 +1369,6 @@ func (x *EventFileUpload) GetFileHash() string { return "" } -// EventMessage -type EventMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // module which emits the event - Module string `protobuf:"bytes,1,opt,name=module,proto3" json:"module,omitempty"` - // sender of the message - Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` - // tx_type is the type of the message - Action string `protobuf:"bytes,3,opt,name=action,proto3" json:"action,omitempty"` -} - -func (x *EventMessage) Reset() { - *x = EventMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_stratos_sds_v1_event_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EventMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EventMessage) ProtoMessage() {} - -// Deprecated: Use EventMessage.ProtoReflect.Descriptor instead. -func (*EventMessage) Descriptor() ([]byte, []int) { - return file_stratos_sds_v1_event_proto_rawDescGZIP(), []int{2} -} - -func (x *EventMessage) GetModule() string { - if x != nil { - return x.Module - } - return "" -} - -func (x *EventMessage) GetSender() string { - if x != nil { - return x.Sender - } - return "" -} - -func (x *EventMessage) GetAction() string { - if x != nil { - return x.Action - } - return "" -} - var File_stratos_sds_v1_event_proto protoreflect.FileDescriptor var file_stratos_sds_v1_event_proto_rawDesc = []byte{ @@ -1994,23 +1391,17 @@ var file_stratos_sds_v1_event_proto_rawDesc = []byte{ 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x48, - 0x61, 0x73, 0x68, 0x22, 0x56, 0x0a, 0x0c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0xa1, 0x01, 0x0a, 0x12, - 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x73, 0x64, 0x73, 0x2e, - 0x76, 0x31, 0x42, 0x0a, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x25, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2f, 0x73, 0x64, 0x73, 0x2f, 0x76, - 0x31, 0x3b, 0x73, 0x64, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x53, 0x58, 0xaa, 0x02, 0x0e, - 0x53, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x53, 0x64, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, - 0x0e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x5c, 0x53, 0x64, 0x73, 0x5c, 0x56, 0x31, 0xe2, - 0x02, 0x1a, 0x53, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x5c, 0x53, 0x64, 0x73, 0x5c, 0x56, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, - 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x3a, 0x3a, 0x53, 0x64, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x73, 0x68, 0x42, 0xa1, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x6f, 0x73, 0x2e, 0x73, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x25, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x74, 0x72, 0x61, 0x74, + 0x6f, 0x73, 0x2f, 0x73, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x64, 0x73, 0x76, 0x31, 0xa2, + 0x02, 0x03, 0x53, 0x53, 0x58, 0xaa, 0x02, 0x0e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, + 0x53, 0x64, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, + 0x5c, 0x53, 0x64, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1a, 0x53, 0x74, 0x72, 0x61, 0x74, 0x6f, + 0x73, 0x5c, 0x53, 0x64, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x3a, 0x3a, + 0x53, 0x64, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2025,11 +1416,10 @@ func file_stratos_sds_v1_event_proto_rawDescGZIP() []byte { return file_stratos_sds_v1_event_proto_rawDescData } -var file_stratos_sds_v1_event_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_stratos_sds_v1_event_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_stratos_sds_v1_event_proto_goTypes = []interface{}{ (*EventPrePay)(nil), // 0: stratos.sds.v1.EventPrePay (*EventFileUpload)(nil), // 1: stratos.sds.v1.EventFileUpload - (*EventMessage)(nil), // 2: stratos.sds.v1.EventMessage } var file_stratos_sds_v1_event_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type @@ -2069,18 +1459,6 @@ func file_stratos_sds_v1_event_proto_init() { return nil } } - file_stratos_sds_v1_event_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } type x struct{} out := protoimpl.TypeBuilder{ @@ -2088,7 +1466,7 @@ func file_stratos_sds_v1_event_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_stratos_sds_v1_event_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 2, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/stratos/pot/v1/event.proto b/proto/stratos/pot/v1/event.proto index 721265f6..10f1c419 100644 --- a/proto/stratos/pot/v1/event.proto +++ b/proto/stratos/pot/v1/event.proto @@ -29,13 +29,3 @@ message EventSlashing { string slashing_type = 4; string suspend = 5; } - -// EventMessage -message EventMessage { - // module which emits the event - string module = 1; - // sender of the message - string sender = 2; - // tx_type is the type of the message - string action = 3; -} diff --git a/proto/stratos/register/v1/event.proto b/proto/stratos/register/v1/event.proto index b79c2cbc..ba84bd09 100644 --- a/proto/stratos/register/v1/event.proto +++ b/proto/stratos/register/v1/event.proto @@ -105,13 +105,3 @@ message EventCompleteUnBondingMetaNode{ string amount = 1; string network_address = 2; } - -// EventMessage -message EventMessage { - // module which emits the event - string module = 1; - // sender of the message - string sender = 2; - // tx_type is the type of the message - string action = 3; -} diff --git a/proto/stratos/sds/v1/event.proto b/proto/stratos/sds/v1/event.proto index 9b31777e..31085370 100644 --- a/proto/stratos/sds/v1/event.proto +++ b/proto/stratos/sds/v1/event.proto @@ -18,14 +18,3 @@ message EventFileUpload { string uploader = 3; string file_hash = 4; } - -// EventMessage -message EventMessage { - // module which emits the event - string module = 1; - // sender of the message - string sender = 2; - // tx_type is the type of the message - string action = 3; -} - diff --git a/x/pot/keeper/msg_server.go b/x/pot/keeper/msg_server.go index 17382baf..01f18239 100644 --- a/x/pot/keeper/msg_server.go +++ b/x/pot/keeper/msg_server.go @@ -95,10 +95,6 @@ func (k msgServer) HandleMsgVolumeReport(goCtx context.Context, msg *types.MsgVo ReportReference: msg.GetReportReference(), Epoch: msg.Epoch.String(), }, - &types.EventMessage{ - Module: types.ModuleName, - Sender: msg.GetReporterOwner(), - }, ) if err != nil { return nil, errors.Wrap(types.ErrEmitEvent, err.Error()) @@ -128,10 +124,6 @@ func (k msgServer) HandleMsgWithdraw(goCtx context.Context, msg *types.MsgWithdr WalletAddress: msg.GetWalletAddress(), TargetAddress: msg.GetTargetAddress(), }, - &types.EventMessage{ - Module: types.ModuleName, - Sender: msg.GetWalletAddress(), - }, ) if err != nil { return nil, errors.Wrap(types.ErrEmitEvent, err.Error()) @@ -155,10 +147,6 @@ func (k msgServer) HandleMsgFoundationDeposit(goCtx context.Context, msg *types. &types.EventFoundationDeposit{ Amount: msg.GetAmount().String(), }, - &types.EventMessage{ - Module: types.ModuleName, - Sender: msg.GetFrom(), - }, ) if err != nil { return nil, errors.Wrap(types.ErrEmitEvent, err.Error()) @@ -214,10 +202,6 @@ func (k msgServer) HandleMsgSlashingResourceNode(goCtx context.Context, msg *typ SlashingType: nodeType.String(), Suspend: strconv.FormatBool(msg.GetSuspend()), }, - &types.EventMessage{ - Module: types.ModuleName, - Sender: msg.GetWalletAddress(), - }, ) if err != nil { return nil, errors.Wrap(types.ErrEmitEvent, err.Error()) @@ -238,14 +222,5 @@ func (k msgServer) UpdateParams(goCtx context.Context, msg *types.MsgUpdateParam return nil, err } - err = ctx.EventManager().EmitTypedEvent(&types.EventMessage{ - Module: types.ModuleName, - Sender: msg.Authority, - Action: sdk.MsgTypeURL(msg), - }) - if err != nil { - return nil, errors.Wrap(types.ErrEmitEvent, err.Error()) - } - return &types.MsgUpdateParamsResponse{}, nil } diff --git a/x/pot/types/event.pb.go b/x/pot/types/event.pb.go index e088aa6f..c665b795 100644 --- a/x/pot/types/event.pb.go +++ b/x/pot/types/event.pb.go @@ -258,107 +258,39 @@ func (m *EventSlashing) GetSuspend() string { return "" } -// EventMessage -type EventMessage struct { - // module which emits the event - Module string `protobuf:"bytes,1,opt,name=module,proto3" json:"module,omitempty"` - // sender of the message - Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` - // tx_type is the type of the message - Action string `protobuf:"bytes,3,opt,name=action,proto3" json:"action,omitempty"` -} - -func (m *EventMessage) Reset() { *m = EventMessage{} } -func (m *EventMessage) String() string { return proto.CompactTextString(m) } -func (*EventMessage) ProtoMessage() {} -func (*EventMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_4848852d1aafb62a, []int{4} -} -func (m *EventMessage) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventMessage.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 *EventMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventMessage.Merge(m, src) -} -func (m *EventMessage) XXX_Size() int { - return m.Size() -} -func (m *EventMessage) XXX_DiscardUnknown() { - xxx_messageInfo_EventMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_EventMessage proto.InternalMessageInfo - -func (m *EventMessage) GetModule() string { - if m != nil { - return m.Module - } - return "" -} - -func (m *EventMessage) GetSender() string { - if m != nil { - return m.Sender - } - return "" -} - -func (m *EventMessage) GetAction() string { - if m != nil { - return m.Action - } - return "" -} - func init() { proto.RegisterType((*EventVolumeReport)(nil), "stratos.pot.v1.EventVolumeReport") proto.RegisterType((*EventWithdraw)(nil), "stratos.pot.v1.EventWithdraw") proto.RegisterType((*EventFoundationDeposit)(nil), "stratos.pot.v1.EventFoundationDeposit") proto.RegisterType((*EventSlashing)(nil), "stratos.pot.v1.EventSlashing") - proto.RegisterType((*EventMessage)(nil), "stratos.pot.v1.EventMessage") } func init() { proto.RegisterFile("stratos/pot/v1/event.proto", fileDescriptor_4848852d1aafb62a) } var fileDescriptor_4848852d1aafb62a = []byte{ - // 390 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x52, 0xcb, 0x4e, 0xdb, 0x40, - 0x14, 0x8d, 0x9b, 0x26, 0x55, 0x47, 0x79, 0xb4, 0x56, 0x15, 0x59, 0x5d, 0x58, 0x95, 0xab, 0xaa, - 0xb0, 0xc0, 0x26, 0xe2, 0x0b, 0x40, 0x80, 0xc4, 0x82, 0x4d, 0x88, 0x82, 0xc4, 0x26, 0x9a, 0xd8, - 0x17, 0xdb, 0xc2, 0x9e, 0x19, 0xcd, 0x5c, 0x27, 0xe4, 0x2f, 0xf8, 0x1a, 0xbe, 0x81, 0x65, 0x96, - 0x2c, 0x51, 0xf2, 0x23, 0xc8, 0xe3, 0x31, 0x2f, 0x85, 0xdd, 0x9c, 0x87, 0xee, 0x39, 0xd7, 0xbe, - 0xe4, 0xb7, 0x42, 0x49, 0x91, 0xab, 0x40, 0x70, 0x0c, 0xe6, 0xc3, 0x00, 0xe6, 0xc0, 0xd0, 0x17, - 0x92, 0x23, 0xb7, 0x7b, 0x46, 0xf3, 0x05, 0x47, 0x7f, 0x3e, 0xf4, 0xc6, 0xe4, 0xe7, 0x49, 0x29, - 0x4f, 0x78, 0x56, 0xe4, 0x30, 0x02, 0xc1, 0x25, 0xda, 0xbb, 0xe4, 0x87, 0xd4, 0xaf, 0xa9, 0x84, - 0x6b, 0x90, 0xc0, 0x42, 0x70, 0xac, 0x3f, 0xd6, 0xce, 0xf7, 0x51, 0xbf, 0xe2, 0x47, 0x35, 0x6d, - 0xff, 0x22, 0x2d, 0x10, 0x3c, 0x4c, 0x9c, 0x2f, 0x5a, 0xaf, 0x80, 0x57, 0x90, 0xae, 0x9e, 0x7a, - 0x99, 0x62, 0x12, 0x49, 0xba, 0xb0, 0x07, 0xa4, 0x4d, 0x73, 0x5e, 0x30, 0x34, 0x73, 0x0c, 0xb2, - 0xff, 0x91, 0xde, 0x82, 0x66, 0x19, 0xe0, 0x94, 0x46, 0x91, 0x04, 0xa5, 0xcc, 0x9c, 0x6e, 0xc5, - 0x1e, 0x56, 0x64, 0x69, 0x43, 0x2a, 0xe3, 0x37, 0xb6, 0x66, 0x65, 0xab, 0x58, 0x63, 0xf3, 0xf6, - 0xc9, 0x40, 0xc7, 0x9e, 0xf2, 0x82, 0x45, 0x14, 0x53, 0xce, 0x8e, 0x41, 0x70, 0x95, 0xe2, 0x67, - 0xf9, 0xde, 0xbd, 0x65, 0x9a, 0x5e, 0x64, 0x54, 0x25, 0x29, 0x8b, 0xb7, 0x34, 0xb2, 0xb6, 0x35, - 0xfa, 0x4f, 0xfa, 0x0c, 0x70, 0xc1, 0xe5, 0xcd, 0x87, 0xe6, 0x3d, 0x43, 0xd7, 0xc6, 0xd7, 0xe4, - 0xe6, 0xbb, 0xcd, 0xff, 0x92, 0xae, 0x32, 0x99, 0x53, 0x5c, 0x0a, 0x70, 0xbe, 0x6a, 0xb9, 0x53, - 0x93, 0xe3, 0xa5, 0x00, 0xdb, 0x21, 0xdf, 0x54, 0xa1, 0x04, 0xb0, 0xc8, 0x69, 0x69, 0xb9, 0x86, - 0xde, 0x84, 0x74, 0x74, 0xef, 0x73, 0x50, 0x8a, 0xc6, 0x50, 0xc6, 0xe4, 0x3c, 0x2a, 0xb2, 0xfa, - 0x47, 0x19, 0x54, 0xf2, 0x0a, 0x58, 0x04, 0xd2, 0xd4, 0x33, 0x48, 0xd7, 0x0a, 0xcb, 0x2f, 0xf4, - 0x52, 0x4b, 0xa3, 0xa3, 0xb3, 0x87, 0xb5, 0x6b, 0xad, 0xd6, 0xae, 0xf5, 0xb4, 0x76, 0xad, 0xbb, - 0x8d, 0xdb, 0x58, 0x6d, 0xdc, 0xc6, 0xe3, 0xc6, 0x6d, 0x5c, 0x05, 0x71, 0x8a, 0x49, 0x31, 0xf3, - 0x43, 0x9e, 0x07, 0xe6, 0x88, 0x18, 0x60, 0xfd, 0xdc, 0x0b, 0x13, 0x9a, 0xb2, 0xe0, 0x56, 0xdf, - 0x5c, 0xb9, 0x8f, 0x9a, 0xb5, 0xf5, 0xc5, 0x1d, 0x3c, 0x07, 0x00, 0x00, 0xff, 0xff, 0x64, 0xe5, - 0x88, 0x04, 0x8f, 0x02, 0x00, 0x00, + // 350 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xcd, 0x4a, 0xc3, 0x40, + 0x14, 0x85, 0x3b, 0xd6, 0x56, 0x1c, 0x6c, 0xab, 0x41, 0x4a, 0x70, 0x11, 0x24, 0x22, 0xea, 0xc2, + 0xc4, 0xe2, 0x13, 0x28, 0x2a, 0xb8, 0xad, 0x45, 0xc1, 0x4d, 0x99, 0x26, 0xd7, 0x26, 0x98, 0xce, + 0x0c, 0x33, 0x37, 0xad, 0x7d, 0x0b, 0x9f, 0xc6, 0x67, 0x70, 0xd9, 0xa5, 0x4b, 0x69, 0x5f, 0x44, + 0x3a, 0x99, 0xe0, 0x0f, 0x75, 0x37, 0xf7, 0x3b, 0x87, 0x7b, 0x4e, 0xc8, 0xa5, 0x7b, 0x1a, 0x15, + 0x43, 0xa1, 0x43, 0x29, 0x30, 0x1c, 0x77, 0x42, 0x18, 0x03, 0xc7, 0x40, 0x2a, 0x81, 0xc2, 0x69, + 0x5a, 0x2d, 0x90, 0x02, 0x83, 0x71, 0xc7, 0xef, 0xd1, 0x9d, 0xeb, 0xa5, 0x7c, 0x2f, 0xb2, 0x7c, + 0x04, 0x5d, 0x90, 0x42, 0xa1, 0x73, 0x42, 0xb7, 0x95, 0x79, 0xf5, 0x15, 0x3c, 0x81, 0x02, 0x1e, + 0x81, 0x4b, 0xf6, 0xc9, 0xf1, 0x66, 0xb7, 0x55, 0xf0, 0x6e, 0x89, 0x9d, 0x5d, 0x5a, 0x03, 0x29, + 0xa2, 0xc4, 0x5d, 0x33, 0x7a, 0x31, 0xf8, 0x39, 0x6d, 0x98, 0xad, 0x0f, 0x29, 0x26, 0xb1, 0x62, + 0x13, 0xa7, 0x4d, 0xeb, 0x6c, 0x24, 0x72, 0x8e, 0x76, 0x8f, 0x9d, 0x9c, 0x43, 0xda, 0x9c, 0xb0, + 0x2c, 0x03, 0xec, 0xb3, 0x38, 0x56, 0xa0, 0xb5, 0xdd, 0xd3, 0x28, 0xe8, 0x45, 0x01, 0x97, 0x36, + 0x64, 0x6a, 0xf8, 0xc3, 0x56, 0x2d, 0x6c, 0x05, 0xb5, 0x36, 0xff, 0x8c, 0xb6, 0x4d, 0xec, 0x8d, + 0xc8, 0x79, 0xcc, 0x30, 0x15, 0xfc, 0x0a, 0xa4, 0xd0, 0x29, 0xfe, 0x97, 0xef, 0xbf, 0x11, 0xdb, + 0xf4, 0x2e, 0x63, 0x3a, 0x49, 0xf9, 0x70, 0x45, 0x23, 0xb2, 0xaa, 0xd1, 0x11, 0x6d, 0x71, 0xc0, + 0x89, 0x50, 0xcf, 0x7f, 0x9a, 0x37, 0x2d, 0x2e, 0x8d, 0xdf, 0xc9, 0xd5, 0x5f, 0x5f, 0x7e, 0x40, + 0x1b, 0xda, 0x66, 0xf6, 0x71, 0x2a, 0xc1, 0x5d, 0x37, 0xf2, 0x56, 0x09, 0x7b, 0x53, 0x09, 0x8e, + 0x4b, 0x37, 0x74, 0xae, 0x25, 0xf0, 0xd8, 0xad, 0x19, 0xb9, 0x1c, 0x2f, 0x6f, 0xdf, 0xe7, 0x1e, + 0x99, 0xcd, 0x3d, 0xf2, 0x39, 0xf7, 0xc8, 0xeb, 0xc2, 0xab, 0xcc, 0x16, 0x5e, 0xe5, 0x63, 0xe1, + 0x55, 0x1e, 0xc3, 0x61, 0x8a, 0x49, 0x3e, 0x08, 0x22, 0x31, 0x0a, 0xed, 0xcf, 0xe6, 0x80, 0xe5, + 0xf3, 0x34, 0x4a, 0x58, 0xca, 0xc3, 0x17, 0x73, 0x1b, 0xcb, 0x5c, 0x3d, 0xa8, 0x9b, 0xcb, 0x38, + 0xff, 0x0a, 0x00, 0x00, 0xff, 0xff, 0xe5, 0x34, 0x7c, 0x3d, 0x37, 0x02, 0x00, 0x00, } func (m *EventVolumeReport) Marshal() (dAtA []byte, err error) { @@ -530,50 +462,6 @@ func (m *EventSlashing) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *EventMessage) 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 *EventMessage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Action) > 0 { - i -= len(m.Action) - copy(dAtA[i:], m.Action) - i = encodeVarintEvent(dAtA, i, uint64(len(m.Action))) - i-- - dAtA[i] = 0x1a - } - if len(m.Sender) > 0 { - i -= len(m.Sender) - copy(dAtA[i:], m.Sender) - i = encodeVarintEvent(dAtA, i, uint64(len(m.Sender))) - i-- - dAtA[i] = 0x12 - } - if len(m.Module) > 0 { - i -= len(m.Module) - copy(dAtA[i:], m.Module) - i = encodeVarintEvent(dAtA, i, uint64(len(m.Module))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func encodeVarintEvent(dAtA []byte, offset int, v uint64) int { offset -= sovEvent(v) base := offset @@ -665,27 +553,6 @@ func (m *EventSlashing) Size() (n int) { return n } -func (m *EventMessage) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Module) - if l > 0 { - n += 1 + l + sovEvent(uint64(l)) - } - l = len(m.Sender) - if l > 0 { - n += 1 + l + sovEvent(uint64(l)) - } - l = len(m.Action) - if l > 0 { - n += 1 + l + sovEvent(uint64(l)) - } - return n -} - func sovEvent(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1244,152 +1111,6 @@ func (m *EventSlashing) Unmarshal(dAtA []byte) error { } return nil } -func (m *EventMessage) 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 ErrIntOverflowEvent - } - 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: EventMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventMessage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Module", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - 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 ErrInvalidLengthEvent - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvent - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Module = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - 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 ErrInvalidLengthEvent - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvent - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - 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 ErrInvalidLengthEvent - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvent - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Action = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvent(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvent - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipEvent(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/pot/types/query.pb.gw.go b/x/pot/types/query.pb.gw.go index 59dbc201..e1a2bae4 100644 --- a/x/pot/types/query.pb.gw.go +++ b/x/pot/types/query.pb.gw.go @@ -20,6 +20,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -30,6 +31,7 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage +var _ = metadata.Join func request_Query_VolumeReport_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryVolumeReportRequest @@ -394,12 +396,14 @@ func local_request_Query_Metrics_0(ctx context.Context, marshaler runtime.Marsha // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { mux.Handle("GET", pattern_Query_VolumeReport_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 { @@ -407,6 +411,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_VolumeReport_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) @@ -420,6 +425,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_RewardsByEpoch_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 { @@ -427,6 +434,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_RewardsByEpoch_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) @@ -440,6 +448,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_RewardsByOwner_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 { @@ -447,6 +457,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_RewardsByOwner_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) @@ -460,6 +471,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_SlashingByOwner_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 { @@ -467,6 +480,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_SlashingByOwner_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) @@ -480,6 +494,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Params_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 { @@ -487,6 +503,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Params_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) @@ -500,6 +517,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_TotalMinedToken_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 { @@ -507,6 +526,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_TotalMinedToken_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) @@ -520,6 +540,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_CirculationSupply_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 { @@ -527,6 +549,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_CirculationSupply_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) @@ -540,6 +563,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_TotalRewardByEpoch_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 { @@ -547,6 +572,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_TotalRewardByEpoch_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) @@ -560,6 +586,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Metrics_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 { @@ -567,6 +595,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Metrics_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) diff --git a/x/register/keeper/msg_server.go b/x/register/keeper/msg_server.go index d9dbd598..bbecb191 100644 --- a/x/register/keeper/msg_server.go +++ b/x/register/keeper/msg_server.go @@ -65,10 +65,6 @@ func (k msgServer) HandleMsgCreateResourceNode(goCtx context.Context, msg *types OzoneLimitChanges: ozoneLimitChange.String(), InitialDeposit: msg.GetValue().String(), }, - &types.EventMessage{ - Module: types.ModuleName, - Sender: msg.GetOwnerAddress(), - }, ) if err != nil { return nil, errors.Wrap(types.ErrEmitEvent, err.Error()) @@ -119,10 +115,6 @@ func (k msgServer) HandleMsgCreateMetaNode(goCtx context.Context, msg *types.Msg NetworkAddress: msg.GetNetworkAddress(), OzoneLimitChanges: ozoneLimitChange.String(), }, - &types.EventMessage{ - Module: types.ModuleName, - Sender: msg.GetOwnerAddress(), - }, ) if err != nil { return nil, errors.Wrap(types.ErrEmitEvent, err.Error()) @@ -157,10 +149,6 @@ func (k msgServer) HandleMsgRemoveResourceNode(goCtx context.Context, msg *types DepositToRemove: sdk.NewCoin(k.BondDenom(ctx), depositToRemove).String(), UnbondingMatureTime: completionTime.Format(time.RFC3339), }, - &types.EventMessage{ - Module: types.ModuleName, - Sender: msg.GetOwnerAddress(), - }, ) if err != nil { return nil, errors.Wrap(types.ErrEmitEvent, err.Error()) @@ -202,10 +190,6 @@ func (k msgServer) HandleMsgRemoveMetaNode(goCtx context.Context, msg *types.Msg DepositToRemove: sdk.NewCoin(k.BondDenom(ctx), availableDeposit).String(), UnbondingMatureTime: completionTime.Format(time.RFC3339), }, - &types.EventMessage{ - Module: types.ModuleName, - Sender: msg.GetOwnerAddress(), - }, ) if err != nil { return nil, errors.Wrap(types.ErrEmitEvent, err.Error()) @@ -247,10 +231,6 @@ func (k msgServer) HandleMsgMetaNodeRegistrationVote(goCtx context.Context, msg CandidateNetworkAddress: msg.GetCandidateNetworkAddress(), CandidateStatus: nodeStatus.String(), }, - &types.EventMessage{ - Module: types.ModuleName, - Sender: msg.GetVoterOwnerAddress(), - }, ) if err != nil { return nil, errors.Wrap(types.ErrEmitEvent, err.Error()) @@ -284,10 +264,6 @@ func (k msgServer) HandleMsgWithdrawMetaNodeRegistrationDeposit(goCtx context.Co NetworkAddress: msg.GetNetworkAddress(), UnbondingMatureTime: completionTime.Format(time.RFC3339), }, - &types.EventMessage{ - Module: types.ModuleName, - Sender: msg.GetOwnerAddress(), - }, ) if err != nil { return nil, errors.Wrap(types.ErrEmitEvent, err.Error()) @@ -318,10 +294,6 @@ func (k msgServer) HandleMsgUpdateResourceNode(goCtx context.Context, msg *types Sender: msg.GetOwnerAddress(), NetworkAddress: msg.GetNetworkAddress(), }, - &types.EventMessage{ - Module: types.ModuleName, - Sender: msg.GetOwnerAddress(), - }, ) if err != nil { return nil, errors.Wrap(types.ErrEmitEvent, err.Error()) @@ -362,10 +334,6 @@ func (k msgServer) HandleMsgUpdateResourceNodeDeposit(goCtx context.Context, msg OzoneLimitChanges: ozoneLimitChange.String(), UnbondingMatureTime: completionTime.Format(time.RFC3339), }, - &types.EventMessage{ - Module: types.ModuleName, - Sender: msg.GetOwnerAddress(), - }, ) if err != nil { return nil, errors.Wrap(types.ErrEmitEvent, err.Error()) @@ -457,10 +425,6 @@ func (k msgServer) HandleMsgUpdateMetaNode(goCtx context.Context, msg *types.Msg Sender: msg.GetOwnerAddress(), NetworkAddress: msg.GetNetworkAddress(), }, - &types.EventMessage{ - Module: types.ModuleName, - Sender: msg.GetOwnerAddress(), - }, ) if err != nil { return nil, errors.Wrap(types.ErrEmitEvent, err.Error()) @@ -504,10 +468,6 @@ func (k msgServer) HandleMsgUpdateMetaNodeDeposit(goCtx context.Context, msg *ty OzoneLimitChanges: ozoneLimitChange.String(), UnbondingMatureTime: completionTime.Format(time.RFC3339), }, - &types.EventMessage{ - Module: types.ModuleName, - Sender: msg.GetOwnerAddress(), - }, ) if err != nil { return nil, errors.Wrap(types.ErrEmitEvent, err.Error()) @@ -528,14 +488,5 @@ func (k msgServer) UpdateParams(goCtx context.Context, msg *types.MsgUpdateParam return nil, err } - err = ctx.EventManager().EmitTypedEvent(&types.EventMessage{ - Module: types.ModuleName, - Sender: msg.Authority, - Action: sdk.MsgTypeURL(msg), - }) - if err != nil { - return nil, errors.Wrap(types.ErrEmitEvent, err.Error()) - } - return &types.MsgUpdateParamsResponse{}, nil } diff --git a/x/register/types/event.pb.go b/x/register/types/event.pb.go index 3678413f..4df7d7cc 100644 --- a/x/register/types/event.pb.go +++ b/x/register/types/event.pb.go @@ -913,70 +913,6 @@ func (m *EventCompleteUnBondingMetaNode) GetNetworkAddress() string { return "" } -// EventMessage -type EventMessage struct { - // module which emits the event - Module string `protobuf:"bytes,1,opt,name=module,proto3" json:"module,omitempty"` - // sender of the message - Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` - // tx_type is the type of the message - Action string `protobuf:"bytes,3,opt,name=action,proto3" json:"action,omitempty"` -} - -func (m *EventMessage) Reset() { *m = EventMessage{} } -func (m *EventMessage) String() string { return proto.CompactTextString(m) } -func (*EventMessage) ProtoMessage() {} -func (*EventMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_9f4bedab5b811f13, []int{13} -} -func (m *EventMessage) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventMessage.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 *EventMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventMessage.Merge(m, src) -} -func (m *EventMessage) XXX_Size() int { - return m.Size() -} -func (m *EventMessage) XXX_DiscardUnknown() { - xxx_messageInfo_EventMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_EventMessage proto.InternalMessageInfo - -func (m *EventMessage) GetModule() string { - if m != nil { - return m.Module - } - return "" -} - -func (m *EventMessage) GetSender() string { - if m != nil { - return m.Sender - } - return "" -} - -func (m *EventMessage) GetAction() string { - if m != nil { - return m.Action - } - return "" -} - func init() { proto.RegisterType((*EventCreateResourceNode)(nil), "stratos.register.v1.EventCreateResourceNode") proto.RegisterType((*EventCreateMetaNode)(nil), "stratos.register.v1.EventCreateMetaNode") @@ -991,62 +927,59 @@ func init() { proto.RegisterType((*EventUpdateMetaNodeDeposit)(nil), "stratos.register.v1.EventUpdateMetaNodeDeposit") proto.RegisterType((*EventCompleteUnBondingResourceNode)(nil), "stratos.register.v1.EventCompleteUnBondingResourceNode") proto.RegisterType((*EventCompleteUnBondingMetaNode)(nil), "stratos.register.v1.EventCompleteUnBondingMetaNode") - proto.RegisterType((*EventMessage)(nil), "stratos.register.v1.EventMessage") } func init() { proto.RegisterFile("stratos/register/v1/event.proto", fileDescriptor_9f4bedab5b811f13) } var fileDescriptor_9f4bedab5b811f13 = []byte{ - // 775 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xcb, 0x4e, 0x14, 0x4d, - 0x14, 0xa6, 0x87, 0xcb, 0x0f, 0x15, 0x2e, 0x3f, 0x33, 0x3f, 0x30, 0xbf, 0xc4, 0xd1, 0x34, 0x31, - 0xa2, 0x89, 0x33, 0x01, 0x89, 0x0b, 0x77, 0xdc, 0x76, 0xc2, 0x62, 0x04, 0x4c, 0xd8, 0x74, 0x6a, - 0xba, 0xcf, 0xcc, 0x54, 0x98, 0xae, 0x9a, 0x54, 0x9d, 0x6e, 0xc4, 0x07, 0x70, 0xed, 0x1b, 0xb8, - 0xf2, 0x21, 0x7c, 0x03, 0x13, 0x37, 0xc4, 0x95, 0x1b, 0x13, 0x03, 0x4f, 0xe1, 0xc2, 0xc4, 0x74, - 0x57, 0xd5, 0x30, 0x03, 0xd3, 0x11, 0xc2, 0xc4, 0x95, 0xbb, 0xae, 0x73, 0xeb, 0xf3, 0x7d, 0xe7, - 0x52, 0x45, 0xee, 0x29, 0x94, 0x14, 0x85, 0xaa, 0x48, 0x68, 0x30, 0x85, 0x20, 0x2b, 0xf1, 0x4a, - 0x05, 0x62, 0xe0, 0x58, 0x6e, 0x4b, 0x81, 0x22, 0x5f, 0x30, 0x06, 0x65, 0x6b, 0x50, 0x8e, 0x57, - 0xdc, 0xcf, 0x0e, 0x59, 0xd8, 0x4e, 0x8c, 0x36, 0x25, 0x50, 0x84, 0x2a, 0x28, 0x11, 0x49, 0x1f, - 0x76, 0x45, 0x00, 0xf9, 0x79, 0x32, 0xa6, 0x80, 0x07, 0x20, 0x8b, 0xce, 0x7d, 0x67, 0x79, 0xa2, - 0x6a, 0x4e, 0xf9, 0x87, 0x64, 0x86, 0x03, 0x1e, 0x0b, 0x79, 0xe4, 0xd1, 0x20, 0x90, 0xa0, 0x54, - 0x31, 0x97, 0x1a, 0x4c, 0x1b, 0xf1, 0xba, 0x96, 0x26, 0x01, 0xda, 0x51, 0xed, 0x08, 0x4e, 0x8a, - 0xc3, 0x3a, 0x80, 0x3e, 0xe5, 0xcb, 0xa4, 0x20, 0xde, 0x08, 0x0e, 0x5e, 0x8b, 0x85, 0x0c, 0x3d, - 0xbf, 0x49, 0x79, 0x03, 0x54, 0x71, 0x24, 0x35, 0x9a, 0x4d, 0x55, 0x2f, 0x12, 0xcd, 0xa6, 0x56, - 0x24, 0x3f, 0x64, 0x9c, 0x21, 0xa3, 0x2d, 0x2f, 0x80, 0xb6, 0x50, 0x0c, 0x8b, 0xa3, 0xfa, 0x87, - 0x46, 0xbc, 0xa5, 0xa5, 0xee, 0x5b, 0x87, 0x14, 0xba, 0xd0, 0xec, 0x00, 0xd2, 0xc1, 0x20, 0xc9, - 0xc8, 0x78, 0x38, 0x23, 0x63, 0xf7, 0xa3, 0x43, 0xee, 0xa4, 0x89, 0xec, 0xf3, 0x0d, 0xc1, 0x03, - 0xc6, 0x1b, 0xd7, 0x62, 0x76, 0x89, 0x4c, 0x49, 0x63, 0xe7, 0x71, 0x11, 0x80, 0xc9, 0x66, 0x52, - 0x76, 0x3b, 0x3f, 0x26, 0xb3, 0x86, 0x05, 0x0f, 0x85, 0x27, 0x21, 0x14, 0x31, 0x98, 0x4c, 0x66, - 0x8c, 0x62, 0x4f, 0x54, 0x53, 0x71, 0x7e, 0x95, 0xcc, 0x45, 0xbc, 0xa6, 0x33, 0xf0, 0x42, 0x8a, - 0x91, 0x04, 0x0f, 0x59, 0x08, 0x86, 0xeb, 0x42, 0x47, 0xb9, 0x93, 0xea, 0xf6, 0x58, 0x08, 0xee, - 0x37, 0x87, 0xcc, 0xf7, 0xe6, 0xfe, 0x5b, 0x1e, 0x17, 0xc9, 0x44, 0x08, 0x48, 0xbb, 0x73, 0x1e, - 0x0f, 0xad, 0xd3, 0x0d, 0xb9, 0xeb, 0x8f, 0x6f, 0xe4, 0x86, 0xf8, 0x46, 0xb3, 0xf1, 0x7d, 0x71, - 0xc8, 0xdd, 0x14, 0x9f, 0x85, 0x55, 0x4d, 0xe7, 0x41, 0x52, 0x64, 0x82, 0x1f, 0x08, 0xcc, 0x86, - 0xb9, 0x4a, 0xe6, 0x62, 0x81, 0x20, 0xbd, 0xfe, 0x4d, 0x53, 0x48, 0x95, 0xbb, 0xbd, 0x9d, 0xf3, - 0x9c, 0xfc, 0xef, 0x53, 0x1e, 0xb0, 0x80, 0x22, 0x5c, 0xf1, 0xd3, 0x1c, 0x2c, 0x74, 0x0c, 0x2e, - 0xf9, 0x3e, 0x22, 0xff, 0x5e, 0xf8, 0x2a, 0xa4, 0x18, 0xd9, 0x21, 0x99, 0xe9, 0xc8, 0x5f, 0xa6, - 0x62, 0xf7, 0xbd, 0x43, 0x96, 0x53, 0x50, 0xaf, 0x18, 0x36, 0x03, 0x49, 0x8f, 0xfb, 0x81, 0x33, - 0x63, 0x72, 0xfb, 0x71, 0xc8, 0xa4, 0x7d, 0x38, 0x9b, 0xf6, 0x43, 0xb3, 0x68, 0xf6, 0xdb, 0xc1, - 0xa0, 0x17, 0x8d, 0xfb, 0x33, 0x47, 0x4a, 0x19, 0xc1, 0x07, 0x86, 0x79, 0x89, 0x4c, 0xd9, 0xb6, - 0x0c, 0xa0, 0x85, 0xd4, 0x60, 0x9d, 0x34, 0xc2, 0xad, 0x44, 0x96, 0x44, 0xf3, 0x23, 0x29, 0x81, - 0x63, 0x67, 0x53, 0xe9, 0x82, 0x4d, 0x1b, 0xb1, 0x4d, 0x67, 0x8d, 0xcc, 0xd3, 0x98, 0xb2, 0x16, - 0xad, 0xb5, 0xc0, 0x43, 0x71, 0x04, 0xdc, 0xab, 0x41, 0x5d, 0x48, 0xdb, 0xb9, 0xff, 0x75, 0xb4, - 0x7b, 0x89, 0x72, 0x23, 0xd5, 0x25, 0xbc, 0x5f, 0xf6, 0xa2, 0x75, 0x04, 0x59, 0x1c, 0xd3, 0xbc, - 0xf7, 0x3a, 0xad, 0x27, 0xaa, 0xac, 0xf1, 0xfb, 0x27, 0x6b, 0xfc, 0x32, 0x6b, 0x3b, 0x9e, 0x5d, - 0xdb, 0x0f, 0x0e, 0x59, 0xec, 0xe2, 0x7f, 0xbb, 0x5e, 0x07, 0x1f, 0x59, 0xdc, 0x21, 0xbf, 0x0f, - 0xc9, 0x4e, 0x5f, 0x92, 0x9f, 0x91, 0x05, 0xb0, 0xce, 0x96, 0x41, 0x03, 0x51, 0x57, 0x65, 0x0e, - 0x2e, 0xc5, 0xd6, 0x20, 0x1f, 0x90, 0x69, 0xa6, 0xbc, 0x88, 0xab, 0x48, 0xb5, 0x93, 0xba, 0x06, - 0xa6, 0x3a, 0x53, 0x4c, 0xed, 0x5f, 0x08, 0xdd, 0x03, 0x73, 0x3d, 0xe8, 0x34, 0x07, 0x76, 0x3d, - 0xb8, 0x3f, 0x72, 0x76, 0xdd, 0xf7, 0x04, 0xfe, 0xdb, 0x7b, 0x7f, 0xa0, 0xf7, 0x80, 0xb8, 0xfa, - 0xca, 0x17, 0x61, 0xbb, 0x05, 0x08, 0x99, 0x37, 0x2e, 0x0d, 0x45, 0xc4, 0xd1, 0x96, 0x40, 0x9f, - 0xae, 0x5f, 0x62, 0x6a, 0x36, 0xcc, 0x95, 0xdf, 0x74, 0x77, 0xd1, 0xed, 0x7e, 0x71, 0x40, 0x26, - 0xcd, 0xbd, 0xa4, 0x14, 0x6d, 0xa4, 0x01, 0x43, 0x11, 0x44, 0x2d, 0xb0, 0x01, 0xf5, 0xa9, 0xab, - 0x9d, 0x72, 0x3d, 0xed, 0x94, 0x24, 0xe0, 0x27, 0x7b, 0xde, 0x3e, 0xb7, 0xf4, 0x69, 0x63, 0xf7, - 0xd3, 0x59, 0xc9, 0x39, 0x3d, 0x2b, 0x39, 0xdf, 0xcf, 0x4a, 0xce, 0xbb, 0xf3, 0xd2, 0xd0, 0xe9, - 0x79, 0x69, 0xe8, 0xeb, 0x79, 0x69, 0xe8, 0x70, 0xad, 0xc1, 0xb0, 0x19, 0xd5, 0xca, 0xbe, 0x08, - 0x2b, 0xe6, 0x75, 0xc8, 0x01, 0xed, 0xe7, 0x13, 0xbf, 0x49, 0x19, 0xaf, 0xbc, 0xbe, 0x78, 0x51, - 0xe2, 0x49, 0x1b, 0x54, 0x6d, 0x2c, 0x7d, 0x4f, 0x3e, 0xfd, 0x15, 0x00, 0x00, 0xff, 0xff, 0x1b, - 0xa7, 0x84, 0x36, 0x72, 0x0a, 0x00, 0x00, + // 742 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xcd, 0x4e, 0x14, 0x41, + 0x10, 0x66, 0xf8, 0x13, 0x3a, 0xfc, 0xc8, 0xae, 0xc0, 0x2a, 0x71, 0x34, 0x43, 0x8c, 0x68, 0xe2, + 0x6e, 0x40, 0xe2, 0xc1, 0x1b, 0x7f, 0x37, 0xe1, 0xb0, 0x02, 0x26, 0x5c, 0x26, 0xbd, 0x33, 0xb5, + 0xbb, 0x1d, 0x76, 0xba, 0x27, 0xdd, 0x35, 0x83, 0xf8, 0x00, 0x9e, 0x7d, 0x03, 0x4f, 0x3e, 0x84, + 0x6f, 0x60, 0xe2, 0x85, 0x78, 0xf2, 0x62, 0x62, 0xe0, 0x29, 0x3c, 0x98, 0x98, 0x99, 0xee, 0x59, + 0x76, 0x61, 0x27, 0x42, 0xd8, 0x78, 0xf2, 0x36, 0x53, 0x5f, 0x55, 0x77, 0x7d, 0x5f, 0x55, 0x75, + 0x37, 0x79, 0xa0, 0x50, 0x52, 0x14, 0xaa, 0x22, 0xa1, 0xc1, 0x14, 0x82, 0xac, 0xc4, 0xcb, 0x15, + 0x88, 0x81, 0x63, 0x39, 0x94, 0x02, 0x45, 0xa1, 0x68, 0x1c, 0xca, 0x99, 0x43, 0x39, 0x5e, 0x76, + 0xbe, 0x5a, 0x64, 0x7e, 0x2b, 0x71, 0xda, 0x90, 0x40, 0x11, 0xaa, 0xa0, 0x44, 0x24, 0x3d, 0xd8, + 0x11, 0x3e, 0x14, 0xe6, 0xc8, 0xa8, 0x02, 0xee, 0x83, 0x2c, 0x59, 0x0f, 0xad, 0xa5, 0xf1, 0xaa, + 0xf9, 0x2b, 0x3c, 0x26, 0xd3, 0x1c, 0xf0, 0x48, 0xc8, 0x43, 0x97, 0xfa, 0xbe, 0x04, 0xa5, 0x4a, + 0x83, 0xa9, 0xc3, 0x94, 0x31, 0xaf, 0x69, 0x6b, 0xb2, 0x40, 0x18, 0xd5, 0x0e, 0xe1, 0xb8, 0x34, + 0xa4, 0x17, 0xd0, 0x7f, 0x85, 0x32, 0x29, 0x8a, 0x77, 0x82, 0x83, 0xdb, 0x62, 0x01, 0x43, 0xd7, + 0x6b, 0x52, 0xde, 0x00, 0x55, 0x1a, 0x4e, 0x9d, 0x66, 0x52, 0xe8, 0x55, 0x82, 0x6c, 0x68, 0x20, + 0xd9, 0x90, 0x71, 0x86, 0x8c, 0xb6, 0x5c, 0x1f, 0x42, 0xa1, 0x18, 0x96, 0x46, 0xf4, 0x86, 0xc6, + 0xbc, 0xa9, 0xad, 0xce, 0x7b, 0x8b, 0x14, 0x3b, 0xd8, 0x6c, 0x03, 0xd2, 0xfe, 0x30, 0xc9, 0xc9, + 0x78, 0x28, 0x27, 0x63, 0xe7, 0xb3, 0x45, 0xee, 0xa5, 0x89, 0xec, 0xf1, 0x75, 0xc1, 0x7d, 0xc6, + 0x1b, 0x57, 0x52, 0x76, 0x91, 0x4c, 0x4a, 0xe3, 0xe7, 0x72, 0xe1, 0x83, 0xc9, 0x66, 0x42, 0x76, + 0x06, 0x3f, 0x25, 0x33, 0x46, 0x05, 0x17, 0x85, 0x2b, 0x21, 0x10, 0x31, 0x98, 0x4c, 0xa6, 0x0d, + 0xb0, 0x2b, 0xaa, 0xa9, 0xb9, 0xb0, 0x42, 0x66, 0x23, 0x5e, 0xd3, 0x19, 0xb8, 0x01, 0xc5, 0x48, + 0x82, 0x8b, 0x2c, 0x00, 0xa3, 0x75, 0xb1, 0x0d, 0x6e, 0xa7, 0xd8, 0x2e, 0x0b, 0xc0, 0xf9, 0x61, + 0x91, 0xb9, 0xee, 0xdc, 0xff, 0xaa, 0xe3, 0x02, 0x19, 0x0f, 0x00, 0x69, 0x67, 0xce, 0x63, 0x41, + 0x16, 0x74, 0x4d, 0xed, 0x7a, 0xf3, 0x1b, 0xbe, 0x26, 0xbf, 0x91, 0x7c, 0x7e, 0xdf, 0x2c, 0x72, + 0x3f, 0xe5, 0x97, 0xd1, 0xaa, 0xa6, 0xf3, 0x20, 0x29, 0x32, 0xc1, 0xf7, 0x05, 0xe6, 0xd3, 0x5c, + 0x21, 0xb3, 0xb1, 0x40, 0x90, 0x6e, 0xef, 0xa6, 0x29, 0xa6, 0xe0, 0x4e, 0x77, 0xe7, 0xbc, 0x24, + 0x77, 0x3d, 0xca, 0x7d, 0xe6, 0x53, 0x84, 0x4b, 0x71, 0x5a, 0x83, 0xf9, 0xb6, 0xc3, 0x85, 0xd8, + 0x27, 0xe4, 0xf6, 0x79, 0xac, 0x42, 0x8a, 0x51, 0x36, 0x24, 0xd3, 0x6d, 0xfb, 0xeb, 0xd4, 0xec, + 0x7c, 0xb4, 0xc8, 0x52, 0x4a, 0xea, 0x0d, 0xc3, 0xa6, 0x2f, 0xe9, 0x51, 0x2f, 0x72, 0x66, 0x4c, + 0x6e, 0x3e, 0x0e, 0xb9, 0xb2, 0x0f, 0xe5, 0xcb, 0x7e, 0x60, 0x0e, 0x9a, 0xbd, 0xd0, 0xef, 0xf7, + 0x41, 0xe3, 0xfc, 0x1e, 0x24, 0x76, 0xce, 0xe2, 0x7d, 0xe3, 0xbc, 0x48, 0x26, 0xb3, 0xb6, 0xf4, + 0xa1, 0x85, 0xd4, 0x70, 0x9d, 0x30, 0xc6, 0xcd, 0xc4, 0x96, 0xac, 0xe6, 0x45, 0x52, 0x02, 0xc7, + 0xf6, 0x49, 0xa5, 0x0b, 0x36, 0x65, 0xcc, 0x59, 0x3a, 0xab, 0x64, 0x8e, 0xc6, 0x94, 0xb5, 0x68, + 0xad, 0x05, 0x2e, 0x8a, 0x43, 0xe0, 0x6e, 0x0d, 0xea, 0x42, 0x66, 0x9d, 0x7b, 0xa7, 0x8d, 0xee, + 0x26, 0xe0, 0x7a, 0x8a, 0x25, 0xba, 0x5f, 0x8c, 0xa2, 0x75, 0x04, 0x59, 0x1a, 0xd5, 0xba, 0x77, + 0x07, 0xad, 0x25, 0x50, 0xde, 0xf8, 0xdd, 0xca, 0x1b, 0xbf, 0xdc, 0xda, 0x8e, 0xe5, 0xd7, 0xf6, + 0x93, 0x45, 0x16, 0x3a, 0xf4, 0xdf, 0xaa, 0xd7, 0xc1, 0x43, 0x16, 0xb7, 0xc5, 0xef, 0x21, 0xb2, + 0xd5, 0x53, 0xe4, 0x17, 0x64, 0x1e, 0xb2, 0xe0, 0x4c, 0x41, 0x43, 0x51, 0x57, 0x65, 0x16, 0x2e, + 0xac, 0xad, 0x49, 0x3e, 0x22, 0x53, 0x4c, 0xb9, 0x11, 0x57, 0x91, 0x0a, 0x93, 0xba, 0xfa, 0xa6, + 0x3a, 0x93, 0x4c, 0xed, 0x9d, 0x1b, 0x9d, 0x7d, 0x73, 0x3d, 0xe8, 0x34, 0xfb, 0x76, 0x3d, 0x38, + 0xbf, 0x06, 0xb3, 0xe3, 0xbe, 0x6b, 0xe1, 0xff, 0xbd, 0xf7, 0x0f, 0x7a, 0x0f, 0x88, 0xa3, 0xaf, + 0x7c, 0x11, 0x84, 0x2d, 0x40, 0xc8, 0xbd, 0x71, 0x69, 0x20, 0x22, 0x8e, 0x59, 0x09, 0xf4, 0xdf, + 0xd5, 0x4b, 0x4c, 0xcd, 0x09, 0x73, 0x69, 0x9b, 0xce, 0x2e, 0xba, 0xd1, 0x16, 0xeb, 0x3b, 0x5f, + 0x4e, 0x6d, 0xeb, 0xe4, 0xd4, 0xb6, 0x7e, 0x9e, 0xda, 0xd6, 0x87, 0x33, 0x7b, 0xe0, 0xe4, 0xcc, + 0x1e, 0xf8, 0x7e, 0x66, 0x0f, 0x1c, 0xac, 0x36, 0x18, 0x36, 0xa3, 0x5a, 0xd9, 0x13, 0x41, 0xc5, + 0xbc, 0xe2, 0x38, 0x60, 0xf6, 0xf9, 0xcc, 0x6b, 0x52, 0xc6, 0x2b, 0x6f, 0xcf, 0x5f, 0x7e, 0x78, + 0x1c, 0x82, 0xaa, 0x8d, 0xa6, 0xef, 0xbe, 0xe7, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x1e, 0xc5, + 0xde, 0x43, 0x1a, 0x0a, 0x00, 0x00, } func (m *EventCreateResourceNode) Marshal() (dAtA []byte, err error) { @@ -1705,50 +1638,6 @@ func (m *EventCompleteUnBondingMetaNode) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *EventMessage) 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 *EventMessage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Action) > 0 { - i -= len(m.Action) - copy(dAtA[i:], m.Action) - i = encodeVarintEvent(dAtA, i, uint64(len(m.Action))) - i-- - dAtA[i] = 0x1a - } - if len(m.Sender) > 0 { - i -= len(m.Sender) - copy(dAtA[i:], m.Sender) - i = encodeVarintEvent(dAtA, i, uint64(len(m.Sender))) - i-- - dAtA[i] = 0x12 - } - if len(m.Module) > 0 { - i -= len(m.Module) - copy(dAtA[i:], m.Module) - i = encodeVarintEvent(dAtA, i, uint64(len(m.Module))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func encodeVarintEvent(dAtA []byte, offset int, v uint64) int { offset -= sovEvent(v) base := offset @@ -2081,27 +1970,6 @@ func (m *EventCompleteUnBondingMetaNode) Size() (n int) { return n } -func (m *EventMessage) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Module) - if l > 0 { - n += 1 + l + sovEvent(uint64(l)) - } - l = len(m.Sender) - if l > 0 { - n += 1 + l + sovEvent(uint64(l)) - } - l = len(m.Action) - if l > 0 { - n += 1 + l + sovEvent(uint64(l)) - } - return n -} - func sovEvent(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -4390,152 +4258,6 @@ func (m *EventCompleteUnBondingMetaNode) Unmarshal(dAtA []byte) error { } return nil } -func (m *EventMessage) 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 ErrIntOverflowEvent - } - 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: EventMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventMessage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Module", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - 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 ErrInvalidLengthEvent - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvent - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Module = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - 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 ErrInvalidLengthEvent - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvent - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - 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 ErrInvalidLengthEvent - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvent - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Action = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvent(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvent - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipEvent(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/register/types/query.pb.gw.go b/x/register/types/query.pb.gw.go index 4facc2a6..b1ebfb3c 100644 --- a/x/register/types/query.pb.gw.go +++ b/x/register/types/query.pb.gw.go @@ -20,6 +20,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -30,6 +31,7 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage +var _ = metadata.Join func request_Query_ResourceNode_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryResourceNodeRequest @@ -380,12 +382,14 @@ func local_request_Query_RemainingOzoneLimit_0(ctx context.Context, marshaler ru // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { mux.Handle("GET", pattern_Query_ResourceNode_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 { @@ -393,6 +397,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_ResourceNode_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) @@ -406,6 +411,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_MetaNode_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 { @@ -413,6 +420,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_MetaNode_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) @@ -426,6 +434,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Params_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 { @@ -433,6 +443,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Params_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) @@ -446,6 +457,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_DepositByNode_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 { @@ -453,6 +466,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_DepositByNode_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) @@ -466,6 +480,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_DepositByOwner_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 { @@ -473,6 +489,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_DepositByOwner_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) @@ -486,6 +503,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_DepositTotal_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 { @@ -493,6 +512,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_DepositTotal_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) @@ -506,6 +526,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_BondedResourceNodeCount_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 { @@ -513,6 +535,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_BondedResourceNodeCount_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) @@ -526,6 +549,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_BondedMetaNodeCount_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 { @@ -533,6 +558,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_BondedMetaNodeCount_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) @@ -546,6 +572,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_RemainingOzoneLimit_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 { @@ -553,6 +581,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_RemainingOzoneLimit_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) diff --git a/x/sds/keeper/msg_server.go b/x/sds/keeper/msg_server.go index 68cf2610..167b17f9 100644 --- a/x/sds/keeper/msg_server.go +++ b/x/sds/keeper/msg_server.go @@ -54,10 +54,6 @@ func (k msgServer) HandleMsgFileUpload(c context.Context, msg *types.MsgFileUplo Uploader: msg.GetUploader(), FileHash: msg.GetFileHash(), }, - &types.EventMessage{ - Module: types.ModuleName, - Sender: msg.GetFrom(), - }, ) if err != nil { return nil, errors.Wrap(types.ErrEmitEvent, err.Error()) @@ -92,10 +88,6 @@ func (k msgServer) HandleMsgPrepay(c context.Context, msg *types.MsgPrepay) (*ty Amount: msg.GetAmount().String(), PurchasedNoz: purchased.String(), }, - &types.EventMessage{ - Module: types.ModuleName, - Sender: msg.GetSender(), - }, ) if err != nil { return nil, errors.Wrap(types.ErrEmitEvent, err.Error()) @@ -116,14 +108,5 @@ func (k msgServer) UpdateParams(goCtx context.Context, msg *types.MsgUpdateParam return nil, err } - err = ctx.EventManager().EmitTypedEvent(&types.EventMessage{ - Module: types.ModuleName, - Sender: msg.Authority, - Action: sdk.MsgTypeURL(msg), - }) - if err != nil { - return nil, errors.Wrap(types.ErrEmitEvent, err.Error()) - } - return &types.MsgUpdateParamsResponse{}, nil } diff --git a/x/sds/types/event.pb.go b/x/sds/types/event.pb.go index 81cd4a42..dcf116f3 100644 --- a/x/sds/types/event.pb.go +++ b/x/sds/types/event.pb.go @@ -160,101 +160,33 @@ func (m *EventFileUpload) GetFileHash() string { return "" } -// EventMessage -type EventMessage struct { - // module which emits the event - Module string `protobuf:"bytes,1,opt,name=module,proto3" json:"module,omitempty"` - // sender of the message - Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` - // tx_type is the type of the message - Action string `protobuf:"bytes,3,opt,name=action,proto3" json:"action,omitempty"` -} - -func (m *EventMessage) Reset() { *m = EventMessage{} } -func (m *EventMessage) String() string { return proto.CompactTextString(m) } -func (*EventMessage) ProtoMessage() {} -func (*EventMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_2681e45d6d6589b1, []int{2} -} -func (m *EventMessage) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventMessage.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 *EventMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventMessage.Merge(m, src) -} -func (m *EventMessage) XXX_Size() int { - return m.Size() -} -func (m *EventMessage) XXX_DiscardUnknown() { - xxx_messageInfo_EventMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_EventMessage proto.InternalMessageInfo - -func (m *EventMessage) GetModule() string { - if m != nil { - return m.Module - } - return "" -} - -func (m *EventMessage) GetSender() string { - if m != nil { - return m.Sender - } - return "" -} - -func (m *EventMessage) GetAction() string { - if m != nil { - return m.Action - } - return "" -} - func init() { proto.RegisterType((*EventPrePay)(nil), "stratos.sds.v1.EventPrePay") proto.RegisterType((*EventFileUpload)(nil), "stratos.sds.v1.EventFileUpload") - proto.RegisterType((*EventMessage)(nil), "stratos.sds.v1.EventMessage") } func init() { proto.RegisterFile("stratos/sds/v1/event.proto", fileDescriptor_2681e45d6d6589b1) } var fileDescriptor_2681e45d6d6589b1 = []byte{ - // 323 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0x31, 0x4b, 0x03, 0x31, - 0x14, 0xc7, 0x7b, 0x55, 0x4a, 0x9b, 0x56, 0x85, 0x1b, 0xe4, 0xa8, 0x70, 0x94, 0xba, 0xb8, 0x78, - 0x47, 0xf1, 0x1b, 0x08, 0x8a, 0x0e, 0x4a, 0x11, 0x74, 0x70, 0x29, 0xe9, 0xe5, 0xb5, 0x09, 0x5c, - 0x93, 0x23, 0x2f, 0x57, 0x6c, 0x07, 0x27, 0x3f, 0x80, 0x1f, 0xcb, 0xb1, 0xa3, 0xa3, 0xb4, 0x5f, - 0x44, 0x92, 0xa6, 0x47, 0x1d, 0xdc, 0xf2, 0x7b, 0x7f, 0x1e, 0xef, 0x17, 0xfe, 0xa4, 0x8b, 0x46, - 0x53, 0xa3, 0x30, 0x45, 0x86, 0xe9, 0x7c, 0x90, 0xc2, 0x1c, 0xa4, 0x49, 0x0a, 0xad, 0x8c, 0x0a, - 0x8f, 0x7d, 0x96, 0x20, 0xc3, 0x64, 0x3e, 0xe8, 0x7f, 0x04, 0xa4, 0x7d, 0x63, 0xf3, 0xa1, 0x86, - 0x21, 0x5d, 0x84, 0xa7, 0xa4, 0x81, 0x20, 0x19, 0xe8, 0x28, 0xe8, 0x05, 0x17, 0xad, 0x27, 0x4f, - 0x61, 0x8f, 0xb4, 0xc7, 0x20, 0x61, 0x22, 0x32, 0x41, 0xf5, 0x22, 0xaa, 0xbb, 0x70, 0x7f, 0x64, - 0x37, 0xe9, 0x4c, 0x95, 0xd2, 0x44, 0x07, 0xdb, 0xcd, 0x2d, 0x85, 0xe7, 0xe4, 0xa8, 0x28, 0x75, - 0xc6, 0x29, 0x02, 0x1b, 0x49, 0xb5, 0x8c, 0x0e, 0x5d, 0xdc, 0xa9, 0x86, 0x8f, 0x6a, 0xd9, 0x7f, - 0x27, 0x27, 0xce, 0xe2, 0x56, 0xe4, 0xf0, 0x5c, 0xe4, 0x8a, 0xb2, 0x7f, 0x4d, 0xba, 0xa4, 0xa9, - 0xa1, 0x50, 0xda, 0x80, 0xf6, 0x1a, 0x15, 0xdb, 0xac, 0x74, 0xdb, 0xa0, 0xbd, 0x45, 0xc5, 0xe1, - 0x19, 0x69, 0x4d, 0x44, 0x0e, 0x23, 0x4e, 0x91, 0x7b, 0x87, 0xa6, 0x1d, 0xdc, 0x51, 0xe4, 0xfd, - 0x17, 0xd2, 0x71, 0xf7, 0x1f, 0x00, 0x91, 0x4e, 0xc1, 0x1e, 0x9f, 0x29, 0x56, 0xe6, 0xb0, 0x3b, - 0xbe, 0xa5, 0x3d, 0xa9, 0xfa, 0x1f, 0x29, 0xfb, 0xf9, 0xcc, 0x08, 0x25, 0xab, 0xcf, 0x3b, 0xba, - 0xbe, 0xff, 0x5a, 0xc7, 0xc1, 0x6a, 0x1d, 0x07, 0x3f, 0xeb, 0x38, 0xf8, 0xdc, 0xc4, 0xb5, 0xd5, - 0x26, 0xae, 0x7d, 0x6f, 0xe2, 0xda, 0x6b, 0x3a, 0x15, 0x86, 0x97, 0xe3, 0x24, 0x53, 0xb3, 0xd4, - 0x77, 0x22, 0xc1, 0xec, 0x9e, 0x97, 0x19, 0xa7, 0x42, 0xa6, 0x6f, 0xae, 0x42, 0xb3, 0x28, 0x00, - 0xc7, 0x0d, 0x57, 0xe0, 0xd5, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa5, 0x2d, 0xab, 0x3a, 0xde, - 0x01, 0x00, 0x00, + // 287 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x90, 0x4f, 0x4b, 0xc3, 0x30, + 0x18, 0xc6, 0x1b, 0x95, 0xb1, 0x65, 0xfe, 0x81, 0x1e, 0xa4, 0x4c, 0x08, 0x63, 0x5e, 0xbc, 0xd8, + 0x30, 0xfc, 0x06, 0x82, 0xa2, 0x17, 0x19, 0x82, 0x17, 0x2f, 0x23, 0x6d, 0xdf, 0x99, 0x40, 0x97, + 0x94, 0x24, 0x2d, 0x76, 0x07, 0x4f, 0x7e, 0x00, 0x3f, 0x96, 0xc7, 0x1d, 0x3d, 0x4a, 0xfb, 0x45, + 0xa4, 0x59, 0x2c, 0x5e, 0xbc, 0xbd, 0xcf, 0xfb, 0xe3, 0x81, 0x1f, 0x0f, 0x9e, 0x18, 0xab, 0x99, + 0x55, 0x86, 0x9a, 0xcc, 0xd0, 0x6a, 0x4e, 0xa1, 0x02, 0x69, 0xe3, 0x42, 0x2b, 0xab, 0xc2, 0x63, + 0xcf, 0x62, 0x93, 0x99, 0xb8, 0x9a, 0xcf, 0xde, 0x11, 0x1e, 0xdf, 0x74, 0x7c, 0xa1, 0x61, 0xc1, + 0xea, 0xf0, 0x14, 0x0f, 0x0c, 0xc8, 0x0c, 0x74, 0x84, 0xa6, 0xe8, 0x62, 0xf4, 0xe8, 0x53, 0x38, + 0xc5, 0xe3, 0x04, 0x24, 0xac, 0x44, 0x2a, 0x98, 0xae, 0xa3, 0x3d, 0x07, 0xff, 0xbe, 0xba, 0x26, + 0x5b, 0xab, 0x52, 0xda, 0x68, 0x7f, 0xd7, 0xdc, 0xa5, 0xf0, 0x1c, 0x1f, 0x15, 0xa5, 0x4e, 0x39, + 0x33, 0x90, 0x2d, 0xa5, 0xda, 0x44, 0x07, 0x0e, 0x1f, 0xf6, 0xcf, 0x07, 0xb5, 0x99, 0xbd, 0xe1, + 0x13, 0x67, 0x71, 0x2b, 0x72, 0x78, 0x2a, 0x72, 0xc5, 0xb2, 0x7f, 0x4d, 0x26, 0x78, 0xa8, 0xa1, + 0x50, 0xda, 0x82, 0xf6, 0x1a, 0x7d, 0xee, 0x58, 0xe9, 0xda, 0xa0, 0xbd, 0x45, 0x9f, 0xc3, 0x33, + 0x3c, 0x5a, 0x89, 0x1c, 0x96, 0x9c, 0x19, 0xee, 0x1d, 0x86, 0xdd, 0xe3, 0x8e, 0x19, 0x7e, 0x7d, + 0xff, 0xd9, 0x10, 0xb4, 0x6d, 0x08, 0xfa, 0x6e, 0x08, 0xfa, 0x68, 0x49, 0xb0, 0x6d, 0x49, 0xf0, + 0xd5, 0x92, 0xe0, 0x99, 0xbe, 0x08, 0xcb, 0xcb, 0x24, 0x4e, 0xd5, 0x9a, 0xfa, 0xed, 0x24, 0xd8, + 0xdf, 0xf3, 0x32, 0xe5, 0x4c, 0x48, 0xfa, 0xea, 0xa6, 0xb6, 0x75, 0x01, 0x26, 0x19, 0xb8, 0xa1, + 0xaf, 0x7e, 0x02, 0x00, 0x00, 0xff, 0xff, 0xd9, 0xe7, 0x17, 0x76, 0x86, 0x01, 0x00, 0x00, } func (m *EventPrePay) Marshal() (dAtA []byte, err error) { @@ -359,50 +291,6 @@ func (m *EventFileUpload) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *EventMessage) 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 *EventMessage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Action) > 0 { - i -= len(m.Action) - copy(dAtA[i:], m.Action) - i = encodeVarintEvent(dAtA, i, uint64(len(m.Action))) - i-- - dAtA[i] = 0x1a - } - if len(m.Sender) > 0 { - i -= len(m.Sender) - copy(dAtA[i:], m.Sender) - i = encodeVarintEvent(dAtA, i, uint64(len(m.Sender))) - i-- - dAtA[i] = 0x12 - } - if len(m.Module) > 0 { - i -= len(m.Module) - copy(dAtA[i:], m.Module) - i = encodeVarintEvent(dAtA, i, uint64(len(m.Module))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func encodeVarintEvent(dAtA []byte, offset int, v uint64) int { offset -= sovEvent(v) base := offset @@ -464,27 +352,6 @@ func (m *EventFileUpload) Size() (n int) { return n } -func (m *EventMessage) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Module) - if l > 0 { - n += 1 + l + sovEvent(uint64(l)) - } - l = len(m.Sender) - if l > 0 { - n += 1 + l + sovEvent(uint64(l)) - } - l = len(m.Action) - if l > 0 { - n += 1 + l + sovEvent(uint64(l)) - } - return n -} - func sovEvent(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -847,152 +714,6 @@ func (m *EventFileUpload) Unmarshal(dAtA []byte) error { } return nil } -func (m *EventMessage) 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 ErrIntOverflowEvent - } - 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: EventMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventMessage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Module", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - 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 ErrInvalidLengthEvent - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvent - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Module = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - 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 ErrInvalidLengthEvent - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvent - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvent - } - 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 ErrInvalidLengthEvent - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvent - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Action = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvent(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvent - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipEvent(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/sds/types/query.pb.gw.go b/x/sds/types/query.pb.gw.go index 732e37b7..1144aec2 100644 --- a/x/sds/types/query.pb.gw.go +++ b/x/sds/types/query.pb.gw.go @@ -20,6 +20,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -30,6 +31,7 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage +var _ = metadata.Join func request_Query_Fileupload_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryFileUploadRequest @@ -178,12 +180,14 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { mux.Handle("GET", pattern_Query_Fileupload_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 { @@ -191,6 +195,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Fileupload_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) @@ -204,6 +209,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_SimPrepay_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 { @@ -211,6 +218,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_SimPrepay_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) @@ -224,6 +232,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_NozPrice_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 { @@ -231,6 +241,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_NozPrice_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) @@ -244,6 +255,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_NozSupply_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 { @@ -251,6 +264,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_NozSupply_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) @@ -264,6 +278,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Params_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 { @@ -271,6 +287,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Params_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)