diff --git a/Makefile b/Makefile index 634f5894f..06a08fa1b 100644 --- a/Makefile +++ b/Makefile @@ -131,7 +131,7 @@ install: .PHONY: install_gen install_gen: - go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.2 + go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.36.5 go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.5.1 go install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@v2.3.0 go install github.com/matryer/moq@v0.4.0 diff --git a/internal/blocktx/blocktx_api/blocktx_api.pb.go b/internal/blocktx/blocktx_api/blocktx_api.pb.go index 37f2000f2..c5a75fc18 100644 --- a/internal/blocktx/blocktx_api/blocktx_api.pb.go +++ b/internal/blocktx/blocktx_api/blocktx_api.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.36.5 // protoc v5.29.3 // source: internal/blocktx/blocktx_api/blocktx_api.proto @@ -13,6 +13,7 @@ import ( timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -78,22 +79,19 @@ func (Status) EnumDescriptor() ([]byte, []int) { // swagger:model HealthResponse type HealthResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"` + Details string `protobuf:"bytes,2,opt,name=details,proto3" json:"details,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"` - Details string `protobuf:"bytes,2,opt,name=details,proto3" json:"details,omitempty"` - Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *HealthResponse) Reset() { *x = HealthResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HealthResponse) String() string { @@ -104,7 +102,7 @@ func (*HealthResponse) ProtoMessage() {} func (x *HealthResponse) ProtoReflect() protoreflect.Message { mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -142,26 +140,23 @@ func (x *HealthResponse) GetTimestamp() *timestamppb.Timestamp { // swagger:model Block { type Block struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // Little endian + PreviousHash []byte `protobuf:"bytes,2,opt,name=previous_hash,json=previousHash,proto3" json:"previous_hash,omitempty"` // Little endian + MerkleRoot []byte `protobuf:"bytes,3,opt,name=merkle_root,json=merkleRoot,proto3" json:"merkle_root,omitempty"` // Little endian + Height uint64 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` + Processed bool `protobuf:"varint,5,opt,name=processed,proto3" json:"processed,omitempty"` + Status Status `protobuf:"varint,6,opt,name=status,proto3,enum=blocktx_api.Status" json:"status,omitempty"` + Chainwork string `protobuf:"bytes,7,opt,name=chainwork,proto3" json:"chainwork,omitempty"` unknownFields protoimpl.UnknownFields - - Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // Little endian - PreviousHash []byte `protobuf:"bytes,2,opt,name=previous_hash,json=previousHash,proto3" json:"previous_hash,omitempty"` // Little endian - MerkleRoot []byte `protobuf:"bytes,3,opt,name=merkle_root,json=merkleRoot,proto3" json:"merkle_root,omitempty"` // Little endian - Height uint64 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` - Processed bool `protobuf:"varint,5,opt,name=processed,proto3" json:"processed,omitempty"` - Status Status `protobuf:"varint,6,opt,name=status,proto3,enum=blocktx_api.Status" json:"status,omitempty"` - Chainwork string `protobuf:"bytes,7,opt,name=chainwork,proto3" json:"chainwork,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Block) Reset() { *x = Block{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Block) String() string { @@ -172,7 +167,7 @@ func (*Block) ProtoMessage() {} func (x *Block) ProtoReflect() protoreflect.Message { mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -238,20 +233,17 @@ func (x *Block) GetChainwork() string { // swagger:model Transactions type Transactions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Transactions []*Transaction `protobuf:"bytes,1,rep,name=transactions,proto3" json:"transactions,omitempty"` unknownFields protoimpl.UnknownFields - - Transactions []*Transaction `protobuf:"bytes,1,rep,name=transactions,proto3" json:"transactions,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Transactions) Reset() { *x = Transactions{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Transactions) String() string { @@ -262,7 +254,7 @@ func (*Transactions) ProtoMessage() {} func (x *Transactions) ProtoReflect() protoreflect.Message { mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -285,24 +277,21 @@ func (x *Transactions) GetTransactions() []*Transaction { } type TransactionBlock struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BlockHash []byte `protobuf:"bytes,1,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // Little endian - BlockHeight uint64 `protobuf:"varint,2,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` - TransactionHash []byte `protobuf:"bytes,3,opt,name=transaction_hash,json=transactionHash,proto3" json:"transaction_hash,omitempty"` // Little endian - MerklePath string `protobuf:"bytes,4,opt,name=merklePath,proto3" json:"merklePath,omitempty"` - BlockStatus Status `protobuf:"varint,5,opt,name=block_status,json=blockStatus,proto3,enum=blocktx_api.Status" json:"block_status,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + BlockHash []byte `protobuf:"bytes,1,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // Little endian + BlockHeight uint64 `protobuf:"varint,2,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + TransactionHash []byte `protobuf:"bytes,3,opt,name=transaction_hash,json=transactionHash,proto3" json:"transaction_hash,omitempty"` // Little endian + MerklePath string `protobuf:"bytes,4,opt,name=merklePath,proto3" json:"merklePath,omitempty"` + BlockStatus Status `protobuf:"varint,5,opt,name=block_status,json=blockStatus,proto3,enum=blocktx_api.Status" json:"block_status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *TransactionBlock) Reset() { *x = TransactionBlock{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionBlock) String() string { @@ -313,7 +302,7 @@ func (*TransactionBlock) ProtoMessage() {} func (x *TransactionBlock) ProtoReflect() protoreflect.Message { mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -364,20 +353,17 @@ func (x *TransactionBlock) GetBlockStatus() Status { } type TransactionBlocks struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - TransactionBlocks []*TransactionBlock `protobuf:"bytes,1,rep,name=transaction_blocks,json=transactionBlocks,proto3" json:"transaction_blocks,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + TransactionBlocks []*TransactionBlock `protobuf:"bytes,1,rep,name=transaction_blocks,json=transactionBlocks,proto3" json:"transaction_blocks,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *TransactionBlocks) Reset() { *x = TransactionBlocks{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionBlocks) String() string { @@ -388,7 +374,7 @@ func (*TransactionBlocks) ProtoMessage() {} func (x *TransactionBlocks) ProtoReflect() protoreflect.Message { mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -412,21 +398,18 @@ func (x *TransactionBlocks) GetTransactionBlocks() []*TransactionBlock { // swagger:model Transaction type Transaction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // Little endian + Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"` // This is the metamorph address:port unknownFields protoimpl.UnknownFields - - Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // Little endian - Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"` // This is the metamorph address:port + sizeCache protoimpl.SizeCache } func (x *Transaction) Reset() { *x = Transaction{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Transaction) String() string { @@ -437,7 +420,7 @@ func (*Transaction) ProtoMessage() {} func (x *Transaction) ProtoReflect() protoreflect.Message { mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -468,20 +451,17 @@ func (x *Transaction) GetSource() string { // swagger:model ClearData type ClearData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + RetentionDays int32 `protobuf:"varint,1,opt,name=retentionDays,proto3" json:"retentionDays,omitempty"` unknownFields protoimpl.UnknownFields - - RetentionDays int32 `protobuf:"varint,1,opt,name=retentionDays,proto3" json:"retentionDays,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ClearData) Reset() { *x = ClearData{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClearData) String() string { @@ -492,7 +472,7 @@ func (*ClearData) ProtoMessage() {} func (x *ClearData) ProtoReflect() protoreflect.Message { mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -516,20 +496,17 @@ func (x *ClearData) GetRetentionDays() int32 { // swagger:model RowsAffectedResponse type RowsAffectedResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Rows int64 `protobuf:"varint,1,opt,name=rows,proto3" json:"rows,omitempty"` unknownFields protoimpl.UnknownFields - - Rows int64 `protobuf:"varint,1,opt,name=rows,proto3" json:"rows,omitempty"` + sizeCache protoimpl.SizeCache } func (x *RowsAffectedResponse) Reset() { *x = RowsAffectedResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RowsAffectedResponse) String() string { @@ -540,7 +517,7 @@ func (*RowsAffectedResponse) ProtoMessage() {} func (x *RowsAffectedResponse) ProtoReflect() protoreflect.Message { mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -563,20 +540,17 @@ func (x *RowsAffectedResponse) GetRows() int64 { } type DelUnfinishedBlockProcessingRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + ProcessedBy string `protobuf:"bytes,1,opt,name=processed_by,json=processedBy,proto3" json:"processed_by,omitempty"` unknownFields protoimpl.UnknownFields - - ProcessedBy string `protobuf:"bytes,1,opt,name=processed_by,json=processedBy,proto3" json:"processed_by,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DelUnfinishedBlockProcessingRequest) Reset() { *x = DelUnfinishedBlockProcessingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DelUnfinishedBlockProcessingRequest) String() string { @@ -587,7 +561,7 @@ func (*DelUnfinishedBlockProcessingRequest) ProtoMessage() {} func (x *DelUnfinishedBlockProcessingRequest) ProtoReflect() protoreflect.Message { mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -610,21 +584,18 @@ func (x *DelUnfinishedBlockProcessingRequest) GetProcessedBy() string { } type MerkleRootVerificationRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + MerkleRoot string `protobuf:"bytes,1,opt,name=merkle_root,json=merkleRoot,proto3" json:"merkle_root,omitempty"` + BlockHeight uint64 `protobuf:"varint,2,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` unknownFields protoimpl.UnknownFields - - MerkleRoot string `protobuf:"bytes,1,opt,name=merkle_root,json=merkleRoot,proto3" json:"merkle_root,omitempty"` - BlockHeight uint64 `protobuf:"varint,2,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + sizeCache protoimpl.SizeCache } func (x *MerkleRootVerificationRequest) Reset() { *x = MerkleRootVerificationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MerkleRootVerificationRequest) String() string { @@ -635,7 +606,7 @@ func (*MerkleRootVerificationRequest) ProtoMessage() {} func (x *MerkleRootVerificationRequest) ProtoReflect() protoreflect.Message { mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -665,20 +636,17 @@ func (x *MerkleRootVerificationRequest) GetBlockHeight() uint64 { } type MerkleRootsVerificationRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + MerkleRoots []*MerkleRootVerificationRequest `protobuf:"bytes,1,rep,name=merkle_roots,json=merkleRoots,proto3" json:"merkle_roots,omitempty"` unknownFields protoimpl.UnknownFields - - MerkleRoots []*MerkleRootVerificationRequest `protobuf:"bytes,1,rep,name=merkle_roots,json=merkleRoots,proto3" json:"merkle_roots,omitempty"` + sizeCache protoimpl.SizeCache } func (x *MerkleRootsVerificationRequest) Reset() { *x = MerkleRootsVerificationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MerkleRootsVerificationRequest) String() string { @@ -689,7 +657,7 @@ func (*MerkleRootsVerificationRequest) ProtoMessage() {} func (x *MerkleRootsVerificationRequest) ProtoReflect() protoreflect.Message { mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -712,20 +680,17 @@ func (x *MerkleRootsVerificationRequest) GetMerkleRoots() []*MerkleRootVerificat } type MerkleRootVerificationResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UnverifiedBlockHeights []uint64 `protobuf:"varint,1,rep,packed,name=unverified_block_heights,json=unverifiedBlockHeights,proto3" json:"unverified_block_heights,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + UnverifiedBlockHeights []uint64 `protobuf:"varint,1,rep,packed,name=unverified_block_heights,json=unverifiedBlockHeights,proto3" json:"unverified_block_heights,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *MerkleRootVerificationResponse) Reset() { *x = MerkleRootVerificationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MerkleRootVerificationResponse) String() string { @@ -736,7 +701,7 @@ func (*MerkleRootVerificationResponse) ProtoMessage() {} func (x *MerkleRootVerificationResponse) ProtoReflect() protoreflect.Message { mi := &file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -760,7 +725,7 @@ func (x *MerkleRootVerificationResponse) GetUnverifiedBlockHeights() []uint64 { var File_internal_blocktx_blocktx_api_blocktx_api_proto protoreflect.FileDescriptor -var file_internal_blocktx_blocktx_api_blocktx_api_proto_rawDesc = []byte{ +var file_internal_blocktx_blocktx_api_blocktx_api_proto_rawDesc = string([]byte{ 0x0a, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x74, 0x78, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x74, 0x78, 0x5f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x74, 0x78, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, @@ -877,16 +842,16 @@ var file_internal_blocktx_blocktx_api_blocktx_api_proto_rawDesc = []byte{ 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x0f, 0x5a, 0x0d, 0x2e, 0x3b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x74, 0x78, 0x5f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_internal_blocktx_blocktx_api_blocktx_api_proto_rawDescOnce sync.Once - file_internal_blocktx_blocktx_api_blocktx_api_proto_rawDescData = file_internal_blocktx_blocktx_api_blocktx_api_proto_rawDesc + file_internal_blocktx_blocktx_api_blocktx_api_proto_rawDescData []byte ) func file_internal_blocktx_blocktx_api_blocktx_api_proto_rawDescGZIP() []byte { file_internal_blocktx_blocktx_api_blocktx_api_proto_rawDescOnce.Do(func() { - file_internal_blocktx_blocktx_api_blocktx_api_proto_rawDescData = protoimpl.X.CompressGZIP(file_internal_blocktx_blocktx_api_blocktx_api_proto_rawDescData) + file_internal_blocktx_blocktx_api_blocktx_api_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_internal_blocktx_blocktx_api_blocktx_api_proto_rawDesc), len(file_internal_blocktx_blocktx_api_blocktx_api_proto_rawDesc))) }) return file_internal_blocktx_blocktx_api_blocktx_api_proto_rawDescData } @@ -937,157 +902,11 @@ func file_internal_blocktx_blocktx_api_blocktx_api_proto_init() { if File_internal_blocktx_blocktx_api_blocktx_api_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*HealthResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Block); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Transactions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TransactionBlock); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*TransactionBlocks); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*Transaction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*ClearData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*RowsAffectedResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DelUnfinishedBlockProcessingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*MerkleRootVerificationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*MerkleRootsVerificationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*MerkleRootVerificationResponse); 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{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_internal_blocktx_blocktx_api_blocktx_api_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_internal_blocktx_blocktx_api_blocktx_api_proto_rawDesc), len(file_internal_blocktx_blocktx_api_blocktx_api_proto_rawDesc)), NumEnums: 1, NumMessages: 12, NumExtensions: 0, @@ -1099,7 +918,6 @@ func file_internal_blocktx_blocktx_api_blocktx_api_proto_init() { MessageInfos: file_internal_blocktx_blocktx_api_blocktx_api_proto_msgTypes, }.Build() File_internal_blocktx_blocktx_api_blocktx_api_proto = out.File - file_internal_blocktx_blocktx_api_blocktx_api_proto_rawDesc = nil file_internal_blocktx_blocktx_api_blocktx_api_proto_goTypes = nil file_internal_blocktx_blocktx_api_blocktx_api_proto_depIdxs = nil } diff --git a/internal/callbacker/callbacker_api/callbacker_api.pb.go b/internal/callbacker/callbacker_api/callbacker_api.pb.go index 5b1561d06..858024233 100644 --- a/internal/callbacker/callbacker_api/callbacker_api.pb.go +++ b/internal/callbacker/callbacker_api/callbacker_api.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.36.5 // protoc v5.29.3 // source: internal/callbacker/callbacker_api/callbacker_api.proto @@ -13,6 +13,7 @@ import ( timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -109,20 +110,17 @@ func (Status) EnumDescriptor() ([]byte, []int) { // swagger:model HealthResponse type HealthResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` unknownFields protoimpl.UnknownFields - - Timestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + sizeCache protoimpl.SizeCache } func (x *HealthResponse) Reset() { *x = HealthResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_callbacker_callbacker_api_callbacker_api_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_internal_callbacker_callbacker_api_callbacker_api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HealthResponse) String() string { @@ -133,7 +131,7 @@ func (*HealthResponse) ProtoMessage() {} func (x *HealthResponse) ProtoReflect() protoreflect.Message { mi := &file_internal_callbacker_callbacker_api_callbacker_api_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -155,12 +153,54 @@ func (x *HealthResponse) GetTimestamp() *timestamppb.Timestamp { return nil } -// swagger:model SendRequest -type SendRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache +// swagger:model DeleteURLMappingResponse +type DeleteURLMappingResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Rows int64 `protobuf:"varint,1,opt,name=rows,proto3" json:"rows,omitempty"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteURLMappingResponse) Reset() { + *x = DeleteURLMappingResponse{} + mi := &file_internal_callbacker_callbacker_api_callbacker_api_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} +func (x *DeleteURLMappingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteURLMappingResponse) ProtoMessage() {} + +func (x *DeleteURLMappingResponse) ProtoReflect() protoreflect.Message { + mi := &file_internal_callbacker_callbacker_api_callbacker_api_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteURLMappingResponse.ProtoReflect.Descriptor instead. +func (*DeleteURLMappingResponse) Descriptor() ([]byte, []int) { + return file_internal_callbacker_callbacker_api_callbacker_api_proto_rawDescGZIP(), []int{1} +} + +func (x *DeleteURLMappingResponse) GetRows() int64 { + if x != nil { + return x.Rows + } + return 0 +} + +// swagger:model SendRequest +type SendRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` CallbackRouting *CallbackRouting `protobuf:"bytes,1,opt,name=callback_routing,json=callbackRouting,proto3" json:"callback_routing,omitempty"` Txid string `protobuf:"bytes,2,opt,name=txid,proto3" json:"txid,omitempty"` Status Status `protobuf:"varint,3,opt,name=status,proto3,enum=callbacker_api.Status" json:"status,omitempty"` @@ -170,15 +210,15 @@ type SendRequest struct { BlockHash string `protobuf:"bytes,7,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` BlockHeight uint64 `protobuf:"varint,8,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` Timestamp *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SendRequest) Reset() { *x = SendRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_callbacker_callbacker_api_callbacker_api_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_internal_callbacker_callbacker_api_callbacker_api_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SendRequest) String() string { @@ -188,8 +228,8 @@ func (x *SendRequest) String() string { func (*SendRequest) ProtoMessage() {} func (x *SendRequest) ProtoReflect() protoreflect.Message { - mi := &file_internal_callbacker_callbacker_api_callbacker_api_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + mi := &file_internal_callbacker_callbacker_api_callbacker_api_proto_msgTypes[2] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -201,7 +241,7 @@ func (x *SendRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SendRequest.ProtoReflect.Descriptor instead. func (*SendRequest) Descriptor() ([]byte, []int) { - return file_internal_callbacker_callbacker_api_callbacker_api_proto_rawDescGZIP(), []int{1} + return file_internal_callbacker_callbacker_api_callbacker_api_proto_rawDescGZIP(), []int{2} } func (x *SendRequest) GetCallbackRouting() *CallbackRouting { @@ -269,27 +309,24 @@ func (x *SendRequest) GetTimestamp() *timestamppb.Timestamp { // swagger:model SendCallbackRequest type SendCallbackRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - CallbackRoutings []*CallbackRouting `protobuf:"bytes,1,rep,name=callback_routings,json=callbackRoutings,proto3" json:"callback_routings,omitempty"` - Txid string `protobuf:"bytes,2,opt,name=txid,proto3" json:"txid,omitempty"` - Status Status `protobuf:"varint,3,opt,name=status,proto3,enum=callbacker_api.Status" json:"status,omitempty"` - MerklePath string `protobuf:"bytes,4,opt,name=merkle_path,json=merklePath,proto3" json:"merkle_path,omitempty"` - ExtraInfo string `protobuf:"bytes,5,opt,name=extra_info,json=extraInfo,proto3" json:"extra_info,omitempty"` - CompetingTxs []string `protobuf:"bytes,6,rep,name=competing_txs,json=competingTxs,proto3" json:"competing_txs,omitempty"` - BlockHash string `protobuf:"bytes,7,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` - BlockHeight uint64 `protobuf:"varint,8,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + CallbackRoutings []*CallbackRouting `protobuf:"bytes,1,rep,name=callback_routings,json=callbackRoutings,proto3" json:"callback_routings,omitempty"` + Txid string `protobuf:"bytes,2,opt,name=txid,proto3" json:"txid,omitempty"` + Status Status `protobuf:"varint,3,opt,name=status,proto3,enum=callbacker_api.Status" json:"status,omitempty"` + MerklePath string `protobuf:"bytes,4,opt,name=merkle_path,json=merklePath,proto3" json:"merkle_path,omitempty"` + ExtraInfo string `protobuf:"bytes,5,opt,name=extra_info,json=extraInfo,proto3" json:"extra_info,omitempty"` + CompetingTxs []string `protobuf:"bytes,6,rep,name=competing_txs,json=competingTxs,proto3" json:"competing_txs,omitempty"` + BlockHash string `protobuf:"bytes,7,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + BlockHeight uint64 `protobuf:"varint,8,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SendCallbackRequest) Reset() { *x = SendCallbackRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_callbacker_callbacker_api_callbacker_api_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_internal_callbacker_callbacker_api_callbacker_api_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SendCallbackRequest) String() string { @@ -299,8 +336,8 @@ func (x *SendCallbackRequest) String() string { func (*SendCallbackRequest) ProtoMessage() {} func (x *SendCallbackRequest) ProtoReflect() protoreflect.Message { - mi := &file_internal_callbacker_callbacker_api_callbacker_api_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + mi := &file_internal_callbacker_callbacker_api_callbacker_api_proto_msgTypes[3] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -312,7 +349,7 @@ func (x *SendCallbackRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SendCallbackRequest.ProtoReflect.Descriptor instead. func (*SendCallbackRequest) Descriptor() ([]byte, []int) { - return file_internal_callbacker_callbacker_api_callbacker_api_proto_rawDescGZIP(), []int{2} + return file_internal_callbacker_callbacker_api_callbacker_api_proto_rawDescGZIP(), []int{3} } func (x *SendCallbackRequest) GetCallbackRoutings() []*CallbackRouting { @@ -373,20 +410,17 @@ func (x *SendCallbackRequest) GetBlockHeight() uint64 { // swagger:model RemovePodMappings type DeleteURLMappingRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Instance string `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` unknownFields protoimpl.UnknownFields - - Instance string `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` + sizeCache protoimpl.SizeCache } func (x *DeleteURLMappingRequest) Reset() { *x = DeleteURLMappingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_callbacker_callbacker_api_callbacker_api_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_internal_callbacker_callbacker_api_callbacker_api_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteURLMappingRequest) String() string { @@ -396,8 +430,8 @@ func (x *DeleteURLMappingRequest) String() string { func (*DeleteURLMappingRequest) ProtoMessage() {} func (x *DeleteURLMappingRequest) ProtoReflect() protoreflect.Message { - mi := &file_internal_callbacker_callbacker_api_callbacker_api_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + mi := &file_internal_callbacker_callbacker_api_callbacker_api_proto_msgTypes[4] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -409,7 +443,7 @@ func (x *DeleteURLMappingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteURLMappingRequest.ProtoReflect.Descriptor instead. func (*DeleteURLMappingRequest) Descriptor() ([]byte, []int) { - return file_internal_callbacker_callbacker_api_callbacker_api_proto_rawDescGZIP(), []int{3} + return file_internal_callbacker_callbacker_api_callbacker_api_proto_rawDescGZIP(), []int{4} } func (x *DeleteURLMappingRequest) GetInstance() string { @@ -421,22 +455,19 @@ func (x *DeleteURLMappingRequest) GetInstance() string { // swagger:model CallbackRouting type CallbackRouting struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` + Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` + AllowBatch bool `protobuf:"varint,3,opt,name=allow_batch,json=allowBatch,proto3" json:"allow_batch,omitempty"` unknownFields protoimpl.UnknownFields - - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` - Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` - AllowBatch bool `protobuf:"varint,3,opt,name=allow_batch,json=allowBatch,proto3" json:"allow_batch,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CallbackRouting) Reset() { *x = CallbackRouting{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_callbacker_callbacker_api_callbacker_api_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_internal_callbacker_callbacker_api_callbacker_api_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CallbackRouting) String() string { @@ -446,8 +477,8 @@ func (x *CallbackRouting) String() string { func (*CallbackRouting) ProtoMessage() {} func (x *CallbackRouting) ProtoReflect() protoreflect.Message { - mi := &file_internal_callbacker_callbacker_api_callbacker_api_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + mi := &file_internal_callbacker_callbacker_api_callbacker_api_proto_msgTypes[5] + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -459,7 +490,7 @@ func (x *CallbackRouting) ProtoReflect() protoreflect.Message { // Deprecated: Use CallbackRouting.ProtoReflect.Descriptor instead. func (*CallbackRouting) Descriptor() ([]byte, []int) { - return file_internal_callbacker_callbacker_api_callbacker_api_proto_rawDescGZIP(), []int{4} + return file_internal_callbacker_callbacker_api_callbacker_api_proto_rawDescGZIP(), []int{5} } func (x *CallbackRouting) GetUrl() string { @@ -485,7 +516,7 @@ func (x *CallbackRouting) GetAllowBatch() bool { var File_internal_callbacker_callbacker_api_callbacker_api_proto protoreflect.FileDescriptor -var file_internal_callbacker_callbacker_api_callbacker_api_proto_rawDesc = []byte{ +var file_internal_callbacker_callbacker_api_callbacker_api_proto_rawDesc = string([]byte{ 0x0a, 0x37, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x5f, @@ -499,7 +530,10 @@ var file_internal_callbacker_callbacker_api_callbacker_api_proto_rawDesc = []byt 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x22, 0xfe, 0x02, 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x61, 0x6d, 0x70, 0x22, 0x2e, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x52, 0x4c, + 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x72, + 0x6f, 0x77, 0x73, 0x22, 0xfe, 0x02, 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4a, 0x0a, 0x10, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x43, @@ -571,7 +605,7 @@ var file_internal_callbacker_callbacker_api_callbacker_api_proto_rawDesc = []byt 0x54, 0x45, 0x44, 0x10, 0x64, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x6e, 0x12, 0x18, 0x0a, 0x14, 0x4d, 0x49, 0x4e, 0x45, 0x44, 0x5f, 0x49, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x4c, 0x45, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0x73, 0x12, 0x09, 0x0a, - 0x05, 0x4d, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x78, 0x32, 0xf9, 0x01, 0x0a, 0x0d, 0x43, 0x61, 0x6c, + 0x05, 0x4d, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x78, 0x32, 0x8b, 0x02, 0x0a, 0x0d, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x41, 0x50, 0x49, 0x12, 0x42, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1e, 0x2e, 0x63, @@ -581,53 +615,56 @@ var file_internal_callbacker_callbacker_api_callbacker_api_proto_rawDesc = []byt 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x55, 0x0a, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x67, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x52, 0x4c, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x27, 0x2e, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x52, 0x4c, 0x4d, 0x61, 0x70, 0x70, - 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x22, 0x00, 0x42, 0x12, 0x5a, 0x10, 0x2e, 0x3b, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, - 0x63, 0x6b, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} + 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x61, 0x6c, + 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x55, 0x52, 0x4c, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x12, 0x5a, 0x10, 0x2e, 0x3b, 0x63, 0x61, 0x6c, 0x6c, + 0x62, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +}) var ( file_internal_callbacker_callbacker_api_callbacker_api_proto_rawDescOnce sync.Once - file_internal_callbacker_callbacker_api_callbacker_api_proto_rawDescData = file_internal_callbacker_callbacker_api_callbacker_api_proto_rawDesc + file_internal_callbacker_callbacker_api_callbacker_api_proto_rawDescData []byte ) func file_internal_callbacker_callbacker_api_callbacker_api_proto_rawDescGZIP() []byte { file_internal_callbacker_callbacker_api_callbacker_api_proto_rawDescOnce.Do(func() { - file_internal_callbacker_callbacker_api_callbacker_api_proto_rawDescData = protoimpl.X.CompressGZIP(file_internal_callbacker_callbacker_api_callbacker_api_proto_rawDescData) + file_internal_callbacker_callbacker_api_callbacker_api_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_internal_callbacker_callbacker_api_callbacker_api_proto_rawDesc), len(file_internal_callbacker_callbacker_api_callbacker_api_proto_rawDesc))) }) return file_internal_callbacker_callbacker_api_callbacker_api_proto_rawDescData } var file_internal_callbacker_callbacker_api_callbacker_api_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_internal_callbacker_callbacker_api_callbacker_api_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_internal_callbacker_callbacker_api_callbacker_api_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_internal_callbacker_callbacker_api_callbacker_api_proto_goTypes = []any{ - (Status)(0), // 0: callbacker_api.Status - (*HealthResponse)(nil), // 1: callbacker_api.HealthResponse - (*SendRequest)(nil), // 2: callbacker_api.SendRequest - (*SendCallbackRequest)(nil), // 3: callbacker_api.SendCallbackRequest - (*DeleteURLMappingRequest)(nil), // 4: callbacker_api.DeleteURLMappingRequest - (*CallbackRouting)(nil), // 5: callbacker_api.CallbackRouting - (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp - (*emptypb.Empty)(nil), // 7: google.protobuf.Empty + (Status)(0), // 0: callbacker_api.Status + (*HealthResponse)(nil), // 1: callbacker_api.HealthResponse + (*DeleteURLMappingResponse)(nil), // 2: callbacker_api.DeleteURLMappingResponse + (*SendRequest)(nil), // 3: callbacker_api.SendRequest + (*SendCallbackRequest)(nil), // 4: callbacker_api.SendCallbackRequest + (*DeleteURLMappingRequest)(nil), // 5: callbacker_api.DeleteURLMappingRequest + (*CallbackRouting)(nil), // 6: callbacker_api.CallbackRouting + (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp + (*emptypb.Empty)(nil), // 8: google.protobuf.Empty } var file_internal_callbacker_callbacker_api_callbacker_api_proto_depIdxs = []int32{ - 6, // 0: callbacker_api.HealthResponse.timestamp:type_name -> google.protobuf.Timestamp - 5, // 1: callbacker_api.SendRequest.callback_routing:type_name -> callbacker_api.CallbackRouting + 7, // 0: callbacker_api.HealthResponse.timestamp:type_name -> google.protobuf.Timestamp + 6, // 1: callbacker_api.SendRequest.callback_routing:type_name -> callbacker_api.CallbackRouting 0, // 2: callbacker_api.SendRequest.status:type_name -> callbacker_api.Status - 6, // 3: callbacker_api.SendRequest.timestamp:type_name -> google.protobuf.Timestamp - 5, // 4: callbacker_api.SendCallbackRequest.callback_routings:type_name -> callbacker_api.CallbackRouting + 7, // 3: callbacker_api.SendRequest.timestamp:type_name -> google.protobuf.Timestamp + 6, // 4: callbacker_api.SendCallbackRequest.callback_routings:type_name -> callbacker_api.CallbackRouting 0, // 5: callbacker_api.SendCallbackRequest.status:type_name -> callbacker_api.Status - 7, // 6: callbacker_api.CallbackerAPI.Health:input_type -> google.protobuf.Empty - 3, // 7: callbacker_api.CallbackerAPI.SendCallback:input_type -> callbacker_api.SendCallbackRequest - 4, // 8: callbacker_api.CallbackerAPI.DeleteURLMapping:input_type -> callbacker_api.DeleteURLMappingRequest + 8, // 6: callbacker_api.CallbackerAPI.Health:input_type -> google.protobuf.Empty + 4, // 7: callbacker_api.CallbackerAPI.SendCallback:input_type -> callbacker_api.SendCallbackRequest + 5, // 8: callbacker_api.CallbackerAPI.DeleteURLMapping:input_type -> callbacker_api.DeleteURLMappingRequest 1, // 9: callbacker_api.CallbackerAPI.Health:output_type -> callbacker_api.HealthResponse - 7, // 10: callbacker_api.CallbackerAPI.SendCallback:output_type -> google.protobuf.Empty - 7, // 11: callbacker_api.CallbackerAPI.DeleteURLMapping:output_type -> google.protobuf.Empty + 8, // 10: callbacker_api.CallbackerAPI.SendCallback:output_type -> google.protobuf.Empty + 2, // 11: callbacker_api.CallbackerAPI.DeleteURLMapping:output_type -> callbacker_api.DeleteURLMappingResponse 9, // [9:12] is the sub-list for method output_type 6, // [6:9] is the sub-list for method input_type 6, // [6:6] is the sub-list for extension type_name @@ -640,75 +677,13 @@ func file_internal_callbacker_callbacker_api_callbacker_api_proto_init() { if File_internal_callbacker_callbacker_api_callbacker_api_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_internal_callbacker_callbacker_api_callbacker_api_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*HealthResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_callbacker_callbacker_api_callbacker_api_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SendRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_callbacker_callbacker_api_callbacker_api_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SendCallbackRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_callbacker_callbacker_api_callbacker_api_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DeleteURLMappingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_callbacker_callbacker_api_callbacker_api_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CallbackRouting); 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{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_internal_callbacker_callbacker_api_callbacker_api_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_internal_callbacker_callbacker_api_callbacker_api_proto_rawDesc), len(file_internal_callbacker_callbacker_api_callbacker_api_proto_rawDesc)), NumEnums: 1, - NumMessages: 5, + NumMessages: 6, NumExtensions: 0, NumServices: 1, }, @@ -718,7 +693,6 @@ func file_internal_callbacker_callbacker_api_callbacker_api_proto_init() { MessageInfos: file_internal_callbacker_callbacker_api_callbacker_api_proto_msgTypes, }.Build() File_internal_callbacker_callbacker_api_callbacker_api_proto = out.File - file_internal_callbacker_callbacker_api_callbacker_api_proto_rawDesc = nil file_internal_callbacker_callbacker_api_callbacker_api_proto_goTypes = nil file_internal_callbacker_callbacker_api_callbacker_api_proto_depIdxs = nil } diff --git a/internal/callbacker/callbacker_api/callbacker_api.proto b/internal/callbacker/callbacker_api/callbacker_api.proto index a42f4655b..c4faf89a4 100644 --- a/internal/callbacker/callbacker_api/callbacker_api.proto +++ b/internal/callbacker/callbacker_api/callbacker_api.proto @@ -10,7 +10,7 @@ import "google/protobuf/empty.proto"; service CallbackerAPI { rpc Health (google.protobuf.Empty) returns (HealthResponse) {} rpc SendCallback (SendCallbackRequest) returns (google.protobuf.Empty) {} - rpc DeleteURLMapping (DeleteURLMappingRequest) returns (google.protobuf.Empty) {} + rpc DeleteURLMapping (DeleteURLMappingRequest) returns (DeleteURLMappingResponse) {} } // Note: Values of the statuses have a difference between them in case @@ -38,6 +38,11 @@ message HealthResponse { google.protobuf.Timestamp timestamp = 1; } +// swagger:model DeleteURLMappingResponse +message DeleteURLMappingResponse { + int64 rows = 1; +} + // swagger:model SendRequest message SendRequest { CallbackRouting callback_routing = 1; diff --git a/internal/callbacker/callbacker_api/callbacker_api_grpc.pb.go b/internal/callbacker/callbacker_api/callbacker_api_grpc.pb.go index 723046f44..98f3aeee9 100644 --- a/internal/callbacker/callbacker_api/callbacker_api_grpc.pb.go +++ b/internal/callbacker/callbacker_api/callbacker_api_grpc.pb.go @@ -31,7 +31,7 @@ const ( type CallbackerAPIClient interface { Health(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*HealthResponse, error) SendCallback(ctx context.Context, in *SendCallbackRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - DeleteURLMapping(ctx context.Context, in *DeleteURLMappingRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + DeleteURLMapping(ctx context.Context, in *DeleteURLMappingRequest, opts ...grpc.CallOption) (*DeleteURLMappingResponse, error) } type callbackerAPIClient struct { @@ -62,9 +62,9 @@ func (c *callbackerAPIClient) SendCallback(ctx context.Context, in *SendCallback return out, nil } -func (c *callbackerAPIClient) DeleteURLMapping(ctx context.Context, in *DeleteURLMappingRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *callbackerAPIClient) DeleteURLMapping(ctx context.Context, in *DeleteURLMappingRequest, opts ...grpc.CallOption) (*DeleteURLMappingResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(emptypb.Empty) + out := new(DeleteURLMappingResponse) err := c.cc.Invoke(ctx, CallbackerAPI_DeleteURLMapping_FullMethodName, in, out, cOpts...) if err != nil { return nil, err @@ -78,7 +78,7 @@ func (c *callbackerAPIClient) DeleteURLMapping(ctx context.Context, in *DeleteUR type CallbackerAPIServer interface { Health(context.Context, *emptypb.Empty) (*HealthResponse, error) SendCallback(context.Context, *SendCallbackRequest) (*emptypb.Empty, error) - DeleteURLMapping(context.Context, *DeleteURLMappingRequest) (*emptypb.Empty, error) + DeleteURLMapping(context.Context, *DeleteURLMappingRequest) (*DeleteURLMappingResponse, error) mustEmbedUnimplementedCallbackerAPIServer() } @@ -95,7 +95,7 @@ func (UnimplementedCallbackerAPIServer) Health(context.Context, *emptypb.Empty) func (UnimplementedCallbackerAPIServer) SendCallback(context.Context, *SendCallbackRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method SendCallback not implemented") } -func (UnimplementedCallbackerAPIServer) DeleteURLMapping(context.Context, *DeleteURLMappingRequest) (*emptypb.Empty, error) { +func (UnimplementedCallbackerAPIServer) DeleteURLMapping(context.Context, *DeleteURLMappingRequest) (*DeleteURLMappingResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteURLMapping not implemented") } func (UnimplementedCallbackerAPIServer) mustEmbedUnimplementedCallbackerAPIServer() {} diff --git a/internal/callbacker/mocks/callbacker_api_client_mock.go b/internal/callbacker/mocks/callbacker_api_client_mock.go index fbc98ac6f..4d9313b4b 100644 --- a/internal/callbacker/mocks/callbacker_api_client_mock.go +++ b/internal/callbacker/mocks/callbacker_api_client_mock.go @@ -21,7 +21,7 @@ var _ callbacker_api.CallbackerAPIClient = &CallbackerAPIClientMock{} // // // make and configure a mocked callbacker_api.CallbackerAPIClient // mockedCallbackerAPIClient := &CallbackerAPIClientMock{ -// DeleteURLMappingFunc: func(ctx context.Context, in *callbacker_api.DeleteURLMappingRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { +// DeleteURLMappingFunc: func(ctx context.Context, in *callbacker_api.DeleteURLMappingRequest, opts ...grpc.CallOption) (*callbacker_api.DeleteURLMappingResponse, error) { // panic("mock out the DeleteURLMapping method") // }, // HealthFunc: func(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*callbacker_api.HealthResponse, error) { @@ -38,7 +38,7 @@ var _ callbacker_api.CallbackerAPIClient = &CallbackerAPIClientMock{} // } type CallbackerAPIClientMock struct { // DeleteURLMappingFunc mocks the DeleteURLMapping method. - DeleteURLMappingFunc func(ctx context.Context, in *callbacker_api.DeleteURLMappingRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + DeleteURLMappingFunc func(ctx context.Context, in *callbacker_api.DeleteURLMappingRequest, opts ...grpc.CallOption) (*callbacker_api.DeleteURLMappingResponse, error) // HealthFunc mocks the Health method. HealthFunc func(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*callbacker_api.HealthResponse, error) @@ -82,7 +82,7 @@ type CallbackerAPIClientMock struct { } // DeleteURLMapping calls DeleteURLMappingFunc. -func (mock *CallbackerAPIClientMock) DeleteURLMapping(ctx context.Context, in *callbacker_api.DeleteURLMappingRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (mock *CallbackerAPIClientMock) DeleteURLMapping(ctx context.Context, in *callbacker_api.DeleteURLMappingRequest, opts ...grpc.CallOption) (*callbacker_api.DeleteURLMappingResponse, error) { if mock.DeleteURLMappingFunc == nil { panic("CallbackerAPIClientMock.DeleteURLMappingFunc: method is nil but CallbackerAPIClient.DeleteURLMapping was just called") } diff --git a/internal/callbacker/mocks/processor_store_mock.go b/internal/callbacker/mocks/processor_store_mock.go index 066632ed5..c92a214a3 100644 --- a/internal/callbacker/mocks/processor_store_mock.go +++ b/internal/callbacker/mocks/processor_store_mock.go @@ -23,7 +23,7 @@ var _ store.ProcessorStore = &ProcessorStoreMock{} // DeleteOlderThanFunc: func(ctx context.Context, t time.Time) error { // panic("mock out the DeleteOlderThan method") // }, -// DeleteURLMappingFunc: func(ctx context.Context, instance string) error { +// DeleteURLMappingFunc: func(ctx context.Context, instance string) (int64, error) { // panic("mock out the DeleteURLMapping method") // }, // GetAndDeleteFunc: func(ctx context.Context, url string, limit int) ([]*store.CallbackData, error) { @@ -49,7 +49,7 @@ type ProcessorStoreMock struct { DeleteOlderThanFunc func(ctx context.Context, t time.Time) error // DeleteURLMappingFunc mocks the DeleteURLMapping method. - DeleteURLMappingFunc func(ctx context.Context, instance string) error + DeleteURLMappingFunc func(ctx context.Context, instance string) (int64, error) // GetAndDeleteFunc mocks the GetAndDelete method. GetAndDeleteFunc func(ctx context.Context, url string, limit int) ([]*store.CallbackData, error) @@ -151,7 +151,7 @@ func (mock *ProcessorStoreMock) DeleteOlderThanCalls() []struct { } // DeleteURLMapping calls DeleteURLMappingFunc. -func (mock *ProcessorStoreMock) DeleteURLMapping(ctx context.Context, instance string) error { +func (mock *ProcessorStoreMock) DeleteURLMapping(ctx context.Context, instance string) (int64, error) { if mock.DeleteURLMappingFunc == nil { panic("ProcessorStoreMock.DeleteURLMappingFunc: method is nil but ProcessorStore.DeleteURLMapping was just called") } diff --git a/internal/callbacker/processor.go b/internal/callbacker/processor.go index b1d690b95..7f2e08235 100644 --- a/internal/callbacker/processor.go +++ b/internal/callbacker/processor.go @@ -290,9 +290,11 @@ func toCallback(dto *store.CallbackData) *Callback { } func (p *Processor) GracefulStop() { - err := p.store.DeleteURLMapping(p.ctx, p.hostName) + rowsAffected, err := p.store.DeleteURLMapping(p.ctx, p.hostName) if err != nil { - p.logger.Error("failed to delete URL mapping", slog.String("err", err.Error())) + p.logger.Error("Failed to delete URL mapping", slog.String("err", err.Error())) + } else { + p.logger.Info("Deleted URL mapping", slog.String("hostname", p.hostName), slog.Int64("rows", rowsAffected)) } p.cancelAll() diff --git a/internal/callbacker/processor_test.go b/internal/callbacker/processor_test.go index 71f5bb7cb..547ca32c4 100644 --- a/internal/callbacker/processor_test.go +++ b/internal/callbacker/processor_test.go @@ -167,8 +167,10 @@ func TestProcessorStart(t *testing.T) { DispatchFunc: func(_ string, _ *callbacker.CallbackEntry) {}, } processorStore := &mocks.ProcessorStoreMock{ - SetURLMappingFunc: func(_ context.Context, _ store.URLMapping) error { return tc.setURLMappingErr }, - DeleteURLMappingFunc: func(_ context.Context, _ string) error { return nil }, + SetURLMappingFunc: func(_ context.Context, _ store.URLMapping) error { return tc.setURLMappingErr }, + DeleteURLMappingFunc: func(_ context.Context, _ string) (int64, error) { + return 0, nil + }, GetURLMappingsFunc: func(_ context.Context) (map[string]string, error) { return tc.mappings, nil }, @@ -278,10 +280,12 @@ func TestDispatchPersistedCallbacks(t *testing.T) { ShutdownFunc: func() {}, } processorStore := &mocks.ProcessorStoreMock{ - SetURLMappingFunc: func(_ context.Context, _ store.URLMapping) error { return tc.setURLMappingErr }, - DeleteURLMappingFunc: func(_ context.Context, _ string) error { return nil }, - GetURLMappingsFunc: func(_ context.Context) (map[string]string, error) { return nil, nil }, - GetUnmappedURLFunc: func(_ context.Context) (string, error) { return "https://abcdefg.com", nil }, + SetURLMappingFunc: func(_ context.Context, _ store.URLMapping) error { return tc.setURLMappingErr }, + DeleteURLMappingFunc: func(_ context.Context, _ string) (int64, error) { + return 0, nil + }, + GetURLMappingsFunc: func(_ context.Context) (map[string]string, error) { return nil, nil }, + GetUnmappedURLFunc: func(_ context.Context) (string, error) { return "https://abcdefg.com", nil }, GetAndDeleteFunc: func(_ context.Context, _ string, _ int) ([]*store.CallbackData, error) { return tc.storedCallbacks, tc.getAndDeleteErr }, @@ -325,8 +329,8 @@ func TestStartCallbackStoreCleanup(t *testing.T) { DeleteOlderThanFunc: func(_ context.Context, _ time.Time) error { return tc.deleteFailedOlderThanErr }, - DeleteURLMappingFunc: func(_ context.Context, _ string) error { - return nil + DeleteURLMappingFunc: func(_ context.Context, _ string) (int64, error) { + return 0, nil }, } dispatcher := &mocks.DispatcherMock{} diff --git a/internal/callbacker/server.go b/internal/callbacker/server.go index 919f5ab71..249144e95 100644 --- a/internal/callbacker/server.go +++ b/internal/callbacker/server.go @@ -60,8 +60,13 @@ func (s *Server) SendCallback(_ context.Context, request *callbacker_api.SendCal return nil, nil } -func (s *Server) DeleteURLMapping(_ context.Context, request *callbacker_api.DeleteURLMappingRequest) (*emptypb.Empty, error) { - return nil, s.store.DeleteURLMapping(context.Background(), request.Instance) +func (s *Server) DeleteURLMapping(_ context.Context, request *callbacker_api.DeleteURLMappingRequest) (*callbacker_api.DeleteURLMappingResponse, error) { + rowsAffected, err := s.store.DeleteURLMapping(context.Background(), request.Instance) + if err != nil { + return nil, err + } + + return &callbacker_api.DeleteURLMappingResponse{Rows: rowsAffected}, nil } func toCallbackDto(r *callbacker_api.SendCallbackRequest) *Callback { diff --git a/internal/callbacker/store/postgresql/postgres.go b/internal/callbacker/store/postgresql/postgres.go index ca61ab7e3..3bbd4e0bf 100644 --- a/internal/callbacker/store/postgresql/postgres.go +++ b/internal/callbacker/store/postgresql/postgres.go @@ -200,16 +200,21 @@ func (p *PostgreSQL) GetUnmappedURL(ctx context.Context) (url string, err error) return url, nil } -func (p *PostgreSQL) DeleteURLMapping(ctx context.Context, instance string) error { +func (p *PostgreSQL) DeleteURLMapping(ctx context.Context, instance string) (rowsAffected int64, err error) { const q = `DELETE FROM callbacker.url_mapping WHERE instance=$1` - _, err := p.db.ExecContext(ctx, q, instance) + rows, err := p.db.ExecContext(ctx, q, instance) if err != nil { - return store.ErrURLMappingDeleteFailed + return 0, store.ErrURLMappingDeleteFailed } - return nil + rowsAffected, err = rows.RowsAffected() + if err != nil { + return 0, nil + } + + return rowsAffected, nil } func (p *PostgreSQL) GetURLMappings(ctx context.Context) (map[string]string, error) { diff --git a/internal/callbacker/store/postgresql/postgres_test.go b/internal/callbacker/store/postgresql/postgres_test.go index dbabe017a..00ad68116 100644 --- a/internal/callbacker/store/postgresql/postgres_test.go +++ b/internal/callbacker/store/postgresql/postgres_test.go @@ -256,8 +256,9 @@ func TestPostgresDBt(t *testing.T) { require.NoError(t, err) // when - err = postgresDB.DeleteURLMapping(ctx, "host1") + rowsAffected, err := postgresDB.DeleteURLMapping(ctx, "host1") require.NoError(t, err) + require.Equal(t, int64(1), rowsAffected) // then mappings, err := postgresDB.GetURLMappings(ctx) diff --git a/internal/callbacker/store/store.go b/internal/callbacker/store/store.go index eb92cf2ec..30f53abfa 100644 --- a/internal/callbacker/store/store.go +++ b/internal/callbacker/store/store.go @@ -33,14 +33,14 @@ type CallbackData struct { type ProcessorStore interface { SetURLMapping(ctx context.Context, m URLMapping) error GetURLMappings(ctx context.Context) (urlInstanceMappings map[string]string, err error) - DeleteURLMapping(ctx context.Context, instance string) error + DeleteURLMapping(ctx context.Context, instance string) (rowsAffected int64, err error) GetUnmappedURL(ctx context.Context) (url string, err error) GetAndDelete(ctx context.Context, url string, limit int) ([]*CallbackData, error) DeleteOlderThan(ctx context.Context, t time.Time) error } type CallbackStore interface { - DeleteURLMapping(ctx context.Context, instance string) error + DeleteURLMapping(ctx context.Context, instance string) (rowsAffected int64, err error) } type URLMapping struct { diff --git a/internal/k8s_watcher/watcher.go b/internal/k8s_watcher/watcher.go index 37b496bc3..29ed726f1 100644 --- a/internal/k8s_watcher/watcher.go +++ b/internal/k8s_watcher/watcher.go @@ -113,11 +113,11 @@ func (c *Watcher) Start() error { }) c.watch(callbackerService, c.tickerCallbacker, func(podName string) error { - _, err := c.callbackerClient.DeleteURLMapping(context.Background(), &callbacker_api.DeleteURLMappingRequest{ + deleteMappingResponse, err := c.callbackerClient.DeleteURLMapping(context.Background(), &callbacker_api.DeleteURLMappingRequest{ Instance: podName, }) if err == nil { - c.logger.Info("mapping removed", slog.String("pod-name", podName)) + c.logger.Info("mapping removed", slog.String("pod-name", podName), slog.Int64("rows", deleteMappingResponse.Rows)) } return err }) diff --git a/internal/k8s_watcher/watcher_test.go b/internal/k8s_watcher/watcher_test.go index e101d8870..d0a69e2ce 100644 --- a/internal/k8s_watcher/watcher_test.go +++ b/internal/k8s_watcher/watcher_test.go @@ -10,7 +10,6 @@ import ( "github.com/stretchr/testify/require" "google.golang.org/grpc" - "google.golang.org/protobuf/types/known/emptypb" "github.com/bitcoin-sv/arc/internal/callbacker/callbacker_api" cbcMocks "github.com/bitcoin-sv/arc/internal/callbacker/mocks" @@ -101,11 +100,11 @@ func TestStartMetamorphWatcher(t *testing.T) { }, } callbackerClient := &cbcMocks.CallbackerAPIClientMock{ - DeleteURLMappingFunc: func(_ context.Context, _ *callbacker_api.DeleteURLMappingRequest, _ ...grpc.CallOption) (*emptypb.Empty, error) { + DeleteURLMappingFunc: func(_ context.Context, _ *callbacker_api.DeleteURLMappingRequest, _ ...grpc.CallOption) (*callbacker_api.DeleteURLMappingResponse, error) { if setUnlockedErrTest != nil { return nil, setUnlockedErrTest } - return nil, nil + return &callbacker_api.DeleteURLMappingResponse{Rows: 20}, nil }, } diff --git a/internal/metamorph/metamorph_api/metamorph_api.pb.go b/internal/metamorph/metamorph_api/metamorph_api.pb.go index 4b3c230b3..0551145bb 100644 --- a/internal/metamorph/metamorph_api/metamorph_api.pb.go +++ b/internal/metamorph/metamorph_api/metamorph_api.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.36.5 // protoc v5.29.3 // source: internal/metamorph/metamorph_api/metamorph_api.proto @@ -13,6 +13,7 @@ import ( timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -109,23 +110,20 @@ func (Status) EnumDescriptor() ([]byte, []int) { // swagger:model HealthResponse type HealthResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` Timestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` MapSize int32 `protobuf:"varint,2,opt,name=mapSize,proto3" json:"mapSize,omitempty"` PeersConnected string `protobuf:"bytes,3,opt,name=PeersConnected,proto3" json:"PeersConnected,omitempty"` PeersDisconnected string `protobuf:"bytes,4,opt,name=PeersDisconnected,proto3" json:"PeersDisconnected,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *HealthResponse) Reset() { *x = HealthResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HealthResponse) String() string { @@ -136,7 +134,7 @@ func (*HealthResponse) ProtoMessage() {} func (x *HealthResponse) ProtoReflect() protoreflect.Message { mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -181,32 +179,29 @@ func (x *HealthResponse) GetPeersDisconnected() string { // swagger:model TransactionRequest type TransactionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ApiKeyId int64 `protobuf:"varint,1,opt,name=api_key_id,json=apiKeyId,proto3" json:"api_key_id,omitempty"` - StandardFeeId int64 `protobuf:"varint,2,opt,name=standard_fee_id,json=standardFeeId,proto3" json:"standard_fee_id,omitempty"` - DataFeeId int64 `protobuf:"varint,3,opt,name=data_fee_id,json=dataFeeId,proto3" json:"data_fee_id,omitempty"` - SourceIp string `protobuf:"bytes,4,opt,name=source_ip,json=sourceIp,proto3" json:"source_ip,omitempty"` - CallbackUrl string `protobuf:"bytes,5,opt,name=callback_url,json=callbackUrl,proto3" json:"callback_url,omitempty"` - CallbackToken string `protobuf:"bytes,6,opt,name=callback_token,json=callbackToken,proto3" json:"callback_token,omitempty"` - CallbackBatch bool `protobuf:"varint,7,opt,name=callback_batch,json=callbackBatch,proto3" json:"callback_batch,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + ApiKeyId int64 `protobuf:"varint,1,opt,name=api_key_id,json=apiKeyId,proto3" json:"api_key_id,omitempty"` + StandardFeeId int64 `protobuf:"varint,2,opt,name=standard_fee_id,json=standardFeeId,proto3" json:"standard_fee_id,omitempty"` + DataFeeId int64 `protobuf:"varint,3,opt,name=data_fee_id,json=dataFeeId,proto3" json:"data_fee_id,omitempty"` + SourceIp string `protobuf:"bytes,4,opt,name=source_ip,json=sourceIp,proto3" json:"source_ip,omitempty"` + CallbackUrl string `protobuf:"bytes,5,opt,name=callback_url,json=callbackUrl,proto3" json:"callback_url,omitempty"` + CallbackToken string `protobuf:"bytes,6,opt,name=callback_token,json=callbackToken,proto3" json:"callback_token,omitempty"` + CallbackBatch bool `protobuf:"varint,7,opt,name=callback_batch,json=callbackBatch,proto3" json:"callback_batch,omitempty"` // Deprecated: Marked as deprecated in internal/metamorph/metamorph_api/metamorph_api.proto. MerkleProof bool `protobuf:"varint,8,opt,name=merkle_proof,json=merkleProof,proto3" json:"merkle_proof,omitempty"` RawTx []byte `protobuf:"bytes,9,opt,name=raw_tx,json=rawTx,proto3" json:"raw_tx,omitempty"` WaitForStatus Status `protobuf:"varint,10,opt,name=wait_for_status,json=waitForStatus,proto3,enum=metamorph_api.Status" json:"wait_for_status,omitempty"` FullStatusUpdates bool `protobuf:"varint,11,opt,name=full_status_updates,json=fullStatusUpdates,proto3" json:"full_status_updates,omitempty"` EventId string `protobuf:"bytes,13,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *TransactionRequest) Reset() { *x = TransactionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionRequest) String() string { @@ -217,7 +212,7 @@ func (*TransactionRequest) ProtoMessage() {} func (x *TransactionRequest) ProtoReflect() protoreflect.Message { mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -319,21 +314,18 @@ func (x *TransactionRequest) GetEventId() string { // swagger:model TransactionRequests type TransactionRequests struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Transactions []*TransactionRequest `protobuf:"bytes,1,rep,name=Transactions,proto3" json:"Transactions,omitempty"` + EventId string `protobuf:"bytes,2,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"` unknownFields protoimpl.UnknownFields - - Transactions []*TransactionRequest `protobuf:"bytes,1,rep,name=Transactions,proto3" json:"Transactions,omitempty"` - EventId string `protobuf:"bytes,2,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *TransactionRequests) Reset() { *x = TransactionRequests{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionRequests) String() string { @@ -344,7 +336,7 @@ func (*TransactionRequests) ProtoMessage() {} func (x *TransactionRequests) ProtoReflect() protoreflect.Message { mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -375,30 +367,27 @@ func (x *TransactionRequests) GetEventId() string { // swagger:model Transaction type Transaction struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + TimedOut bool `protobuf:"varint,1,opt,name=timed_out,json=timedOut,proto3" json:"timed_out,omitempty"` + StoredAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=stored_at,json=storedAt,proto3" json:"stored_at,omitempty"` + AnnouncedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=announced_at,json=announcedAt,proto3" json:"announced_at,omitempty"` + MinedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=mined_at,json=minedAt,proto3" json:"mined_at,omitempty"` + Txid string `protobuf:"bytes,5,opt,name=txid,proto3" json:"txid,omitempty"` + Status Status `protobuf:"varint,6,opt,name=status,proto3,enum=metamorph_api.Status" json:"status,omitempty"` + RejectReason string `protobuf:"bytes,7,opt,name=reject_reason,json=rejectReason,proto3" json:"reject_reason,omitempty"` + CompetingTxs []string `protobuf:"bytes,8,rep,name=competingTxs,proto3" json:"competingTxs,omitempty"` + BlockHeight uint64 `protobuf:"varint,9,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + BlockHash string `protobuf:"bytes,10,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + RawTx []byte `protobuf:"bytes,11,opt,name=raw_tx,json=rawTx,proto3" json:"raw_tx,omitempty"` unknownFields protoimpl.UnknownFields - - TimedOut bool `protobuf:"varint,1,opt,name=timed_out,json=timedOut,proto3" json:"timed_out,omitempty"` - StoredAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=stored_at,json=storedAt,proto3" json:"stored_at,omitempty"` - AnnouncedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=announced_at,json=announcedAt,proto3" json:"announced_at,omitempty"` - MinedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=mined_at,json=minedAt,proto3" json:"mined_at,omitempty"` - Txid string `protobuf:"bytes,5,opt,name=txid,proto3" json:"txid,omitempty"` - Status Status `protobuf:"varint,6,opt,name=status,proto3,enum=metamorph_api.Status" json:"status,omitempty"` - RejectReason string `protobuf:"bytes,7,opt,name=reject_reason,json=rejectReason,proto3" json:"reject_reason,omitempty"` - CompetingTxs []string `protobuf:"bytes,8,rep,name=competingTxs,proto3" json:"competingTxs,omitempty"` - BlockHeight uint64 `protobuf:"varint,9,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` - BlockHash string `protobuf:"bytes,10,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` - RawTx []byte `protobuf:"bytes,11,opt,name=raw_tx,json=rawTx,proto3" json:"raw_tx,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Transaction) Reset() { *x = Transaction{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Transaction) String() string { @@ -409,7 +398,7 @@ func (*Transaction) ProtoMessage() {} func (x *Transaction) ProtoReflect() protoreflect.Message { mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -502,22 +491,19 @@ func (x *Transaction) GetRawTx() []byte { } type Callback struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + CallbackUrl string `protobuf:"bytes,1,opt,name=callback_url,json=callbackUrl,proto3" json:"callback_url,omitempty"` + CallbackToken string `protobuf:"bytes,2,opt,name=callback_token,json=callbackToken,proto3" json:"callback_token,omitempty"` + AllowBatch bool `protobuf:"varint,3,opt,name=allow_batch,json=allowBatch,proto3" json:"allow_batch,omitempty"` unknownFields protoimpl.UnknownFields - - CallbackUrl string `protobuf:"bytes,1,opt,name=callback_url,json=callbackUrl,proto3" json:"callback_url,omitempty"` - CallbackToken string `protobuf:"bytes,2,opt,name=callback_token,json=callbackToken,proto3" json:"callback_token,omitempty"` - AllowBatch bool `protobuf:"varint,3,opt,name=allow_batch,json=allowBatch,proto3" json:"allow_batch,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Callback) Reset() { *x = Callback{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Callback) String() string { @@ -528,7 +514,7 @@ func (*Callback) ProtoMessage() {} func (x *Callback) ProtoReflect() protoreflect.Message { mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -566,10 +552,7 @@ func (x *Callback) GetAllowBatch() bool { // swagger:model TransactionStatus type TransactionStatus struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` TimedOut bool `protobuf:"varint,1,opt,name=timed_out,json=timedOut,proto3" json:"timed_out,omitempty"` StoredAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=stored_at,json=storedAt,proto3" json:"stored_at,omitempty"` Txid string `protobuf:"bytes,3,opt,name=txid,proto3" json:"txid,omitempty"` @@ -581,15 +564,15 @@ type TransactionStatus struct { MerklePath string `protobuf:"bytes,9,opt,name=merkle_path,json=merklePath,proto3" json:"merkle_path,omitempty"` LastSubmitted *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=last_submitted,json=lastSubmitted,proto3" json:"last_submitted,omitempty"` Callbacks []*Callback `protobuf:"bytes,11,rep,name=callbacks,proto3" json:"callbacks,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *TransactionStatus) Reset() { *x = TransactionStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionStatus) String() string { @@ -600,7 +583,7 @@ func (*TransactionStatus) ProtoMessage() {} func (x *TransactionStatus) ProtoReflect() protoreflect.Message { mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -694,21 +677,18 @@ func (x *TransactionStatus) GetCallbacks() []*Callback { // swagger:model TransactionStatuses type TransactionStatuses struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Statuses []*TransactionStatus `protobuf:"bytes,1,rep,name=Statuses,proto3" json:"Statuses,omitempty"` + EventId string `protobuf:"bytes,2,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"` unknownFields protoimpl.UnknownFields - - Statuses []*TransactionStatus `protobuf:"bytes,1,rep,name=Statuses,proto3" json:"Statuses,omitempty"` - EventId string `protobuf:"bytes,2,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *TransactionStatuses) Reset() { *x = TransactionStatuses{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionStatuses) String() string { @@ -719,7 +699,7 @@ func (*TransactionStatuses) ProtoMessage() {} func (x *TransactionStatuses) ProtoReflect() protoreflect.Message { mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -750,21 +730,18 @@ func (x *TransactionStatuses) GetEventId() string { // swagger:model TransactionRequest type TransactionStatusRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Txid string `protobuf:"bytes,1,opt,name=txid,proto3" json:"txid,omitempty"` + EventId string `protobuf:"bytes,2,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"` unknownFields protoimpl.UnknownFields - - Txid string `protobuf:"bytes,1,opt,name=txid,proto3" json:"txid,omitempty"` - EventId string `protobuf:"bytes,2,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"` + sizeCache protoimpl.SizeCache } func (x *TransactionStatusRequest) Reset() { *x = TransactionStatusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionStatusRequest) String() string { @@ -775,7 +752,7 @@ func (*TransactionStatusRequest) ProtoMessage() {} func (x *TransactionStatusRequest) ProtoReflect() protoreflect.Message { mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -806,20 +783,17 @@ func (x *TransactionStatusRequest) GetEventId() string { // swagger:model SetUnlockedByNameRequest type SetUnlockedByNameRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SetUnlockedByNameRequest) Reset() { *x = SetUnlockedByNameRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetUnlockedByNameRequest) String() string { @@ -830,7 +804,7 @@ func (*SetUnlockedByNameRequest) ProtoMessage() {} func (x *SetUnlockedByNameRequest) ProtoReflect() protoreflect.Message { mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -854,20 +828,17 @@ func (x *SetUnlockedByNameRequest) GetName() string { // swagger:model SetUnlockedRequest type SetUnlockedByNameResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RecordsAffected int64 `protobuf:"varint,1,opt,name=records_affected,json=recordsAffected,proto3" json:"records_affected,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + RecordsAffected int64 `protobuf:"varint,1,opt,name=records_affected,json=recordsAffected,proto3" json:"records_affected,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SetUnlockedByNameResponse) Reset() { *x = SetUnlockedByNameResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetUnlockedByNameResponse) String() string { @@ -878,7 +849,7 @@ func (*SetUnlockedByNameResponse) ProtoMessage() {} func (x *SetUnlockedByNameResponse) ProtoReflect() protoreflect.Message { mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -902,20 +873,17 @@ func (x *SetUnlockedByNameResponse) GetRecordsAffected() int64 { // swagger:model ClearDataRequest type ClearDataRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + RetentionDays int32 `protobuf:"varint,1,opt,name=retentionDays,proto3" json:"retentionDays,omitempty"` unknownFields protoimpl.UnknownFields - - RetentionDays int32 `protobuf:"varint,1,opt,name=retentionDays,proto3" json:"retentionDays,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ClearDataRequest) Reset() { *x = ClearDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClearDataRequest) String() string { @@ -926,7 +894,7 @@ func (*ClearDataRequest) ProtoMessage() {} func (x *ClearDataRequest) ProtoReflect() protoreflect.Message { mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -950,20 +918,17 @@ func (x *ClearDataRequest) GetRetentionDays() int32 { // swagger:model ClearDataResponse type ClearDataResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RecordsAffected int64 `protobuf:"varint,1,opt,name=records_affected,json=recordsAffected,proto3" json:"records_affected,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + RecordsAffected int64 `protobuf:"varint,1,opt,name=records_affected,json=recordsAffected,proto3" json:"records_affected,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ClearDataResponse) Reset() { *x = ClearDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ClearDataResponse) String() string { @@ -974,7 +939,7 @@ func (*ClearDataResponse) ProtoMessage() {} func (x *ClearDataResponse) ProtoReflect() protoreflect.Message { mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -998,20 +963,17 @@ func (x *ClearDataResponse) GetRecordsAffected() int64 { // swagger:model TransactionsStatusRequest type TransactionsStatusRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + TxIDs []string `protobuf:"bytes,1,rep,name=txIDs,proto3" json:"txIDs,omitempty"` unknownFields protoimpl.UnknownFields - - TxIDs []string `protobuf:"bytes,1,rep,name=txIDs,proto3" json:"txIDs,omitempty"` + sizeCache protoimpl.SizeCache } func (x *TransactionsStatusRequest) Reset() { *x = TransactionsStatusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactionsStatusRequest) String() string { @@ -1022,7 +984,7 @@ func (*TransactionsStatusRequest) ProtoMessage() {} func (x *TransactionsStatusRequest) ProtoReflect() protoreflect.Message { mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1046,20 +1008,17 @@ func (x *TransactionsStatusRequest) GetTxIDs() []string { // swagger:model Transactions type Transactions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Transactions []*Transaction `protobuf:"bytes,1,rep,name=transactions,proto3" json:"transactions,omitempty"` unknownFields protoimpl.UnknownFields - - Transactions []*Transaction `protobuf:"bytes,1,rep,name=transactions,proto3" json:"transactions,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Transactions) Reset() { *x = Transactions{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Transactions) String() string { @@ -1070,7 +1029,7 @@ func (*Transactions) ProtoMessage() {} func (x *Transactions) ProtoReflect() protoreflect.Message { mi := &file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1094,7 +1053,7 @@ func (x *Transactions) GetTransactions() []*Transaction { var File_internal_metamorph_metamorph_api_metamorph_api_proto protoreflect.FileDescriptor -var file_internal_metamorph_metamorph_api_metamorph_api_proto_rawDesc = []byte{ +var file_internal_metamorph_metamorph_api_metamorph_api_proto_rawDesc = string([]byte{ 0x0a, 0x34, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x5f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x5f, 0x61, 0x70, 0x69, @@ -1324,16 +1283,16 @@ var file_internal_metamorph_metamorph_api_metamorph_api_proto_rawDesc = []byte{ 0x43, 0x6c, 0x65, 0x61, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x11, 0x5a, 0x0f, 0x2e, 0x3b, 0x6d, 0x65, 0x74, 0x61, 0x6d, 0x6f, 0x72, 0x70, 0x68, 0x5f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_internal_metamorph_metamorph_api_metamorph_api_proto_rawDescOnce sync.Once - file_internal_metamorph_metamorph_api_metamorph_api_proto_rawDescData = file_internal_metamorph_metamorph_api_metamorph_api_proto_rawDesc + file_internal_metamorph_metamorph_api_metamorph_api_proto_rawDescData []byte ) func file_internal_metamorph_metamorph_api_metamorph_api_proto_rawDescGZIP() []byte { file_internal_metamorph_metamorph_api_metamorph_api_proto_rawDescOnce.Do(func() { - file_internal_metamorph_metamorph_api_metamorph_api_proto_rawDescData = protoimpl.X.CompressGZIP(file_internal_metamorph_metamorph_api_metamorph_api_proto_rawDescData) + file_internal_metamorph_metamorph_api_metamorph_api_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_internal_metamorph_metamorph_api_metamorph_api_proto_rawDesc), len(file_internal_metamorph_metamorph_api_metamorph_api_proto_rawDesc))) }) return file_internal_metamorph_metamorph_api_metamorph_api_proto_rawDescData } @@ -1403,181 +1362,11 @@ func file_internal_metamorph_metamorph_api_metamorph_api_proto_init() { if File_internal_metamorph_metamorph_api_metamorph_api_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*HealthResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*TransactionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TransactionRequests); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Transaction); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Callback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*TransactionStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*TransactionStatuses); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*TransactionStatusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SetUnlockedByNameRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*SetUnlockedByNameResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ClearDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*ClearDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*TransactionsStatusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Transactions); 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{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_internal_metamorph_metamorph_api_metamorph_api_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_internal_metamorph_metamorph_api_metamorph_api_proto_rawDesc), len(file_internal_metamorph_metamorph_api_metamorph_api_proto_rawDesc)), NumEnums: 1, NumMessages: 14, NumExtensions: 0, @@ -1589,7 +1378,6 @@ func file_internal_metamorph_metamorph_api_metamorph_api_proto_init() { MessageInfos: file_internal_metamorph_metamorph_api_metamorph_api_proto_msgTypes, }.Build() File_internal_metamorph_metamorph_api_metamorph_api_proto = out.File - file_internal_metamorph_metamorph_api_metamorph_api_proto_rawDesc = nil file_internal_metamorph_metamorph_api_metamorph_api_proto_goTypes = nil file_internal_metamorph_metamorph_api_metamorph_api_proto_depIdxs = nil } diff --git a/pkg/message_queue/nats/client/test_api/test_api.pb.go b/pkg/message_queue/nats/client/test_api/test_api.pb.go index aca863e56..1a7f5f0dd 100644 --- a/pkg/message_queue/nats/client/test_api/test_api.pb.go +++ b/pkg/message_queue/nats/client/test_api/test_api.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.36.5 // protoc v5.29.3 // source: pkg/message_queue/nats/client/test_api/test_api.proto @@ -11,6 +11,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -21,20 +22,17 @@ const ( ) type TestMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"` unknownFields protoimpl.UnknownFields - - Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"` + sizeCache protoimpl.SizeCache } func (x *TestMessage) Reset() { *x = TestMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_pkg_message_queue_nats_client_test_api_test_api_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_pkg_message_queue_nats_client_test_api_test_api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestMessage) String() string { @@ -45,7 +43,7 @@ func (*TestMessage) ProtoMessage() {} func (x *TestMessage) ProtoReflect() protoreflect.Message { mi := &file_pkg_message_queue_nats_client_test_api_test_api_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -69,7 +67,7 @@ func (x *TestMessage) GetOk() bool { var File_pkg_message_queue_nats_client_test_api_test_api_proto protoreflect.FileDescriptor -var file_pkg_message_queue_nats_client_test_api_test_api_proto_rawDesc = []byte{ +var file_pkg_message_queue_nats_client_test_api_test_api_proto_rawDesc = string([]byte{ 0x0a, 0x35, 0x70, 0x6b, 0x67, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x2f, 0x6e, 0x61, 0x74, 0x73, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x70, @@ -78,16 +76,16 @@ var file_pkg_message_queue_nats_client_test_api_test_api_proto_rawDesc = []byte{ 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x6f, 0x6b, 0x42, 0x0c, 0x5a, 0x0a, 0x2e, 0x3b, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +}) var ( file_pkg_message_queue_nats_client_test_api_test_api_proto_rawDescOnce sync.Once - file_pkg_message_queue_nats_client_test_api_test_api_proto_rawDescData = file_pkg_message_queue_nats_client_test_api_test_api_proto_rawDesc + file_pkg_message_queue_nats_client_test_api_test_api_proto_rawDescData []byte ) func file_pkg_message_queue_nats_client_test_api_test_api_proto_rawDescGZIP() []byte { file_pkg_message_queue_nats_client_test_api_test_api_proto_rawDescOnce.Do(func() { - file_pkg_message_queue_nats_client_test_api_test_api_proto_rawDescData = protoimpl.X.CompressGZIP(file_pkg_message_queue_nats_client_test_api_test_api_proto_rawDescData) + file_pkg_message_queue_nats_client_test_api_test_api_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_pkg_message_queue_nats_client_test_api_test_api_proto_rawDesc), len(file_pkg_message_queue_nats_client_test_api_test_api_proto_rawDesc))) }) return file_pkg_message_queue_nats_client_test_api_test_api_proto_rawDescData } @@ -109,25 +107,11 @@ func file_pkg_message_queue_nats_client_test_api_test_api_proto_init() { if File_pkg_message_queue_nats_client_test_api_test_api_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_pkg_message_queue_nats_client_test_api_test_api_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TestMessage); 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{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_pkg_message_queue_nats_client_test_api_test_api_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_pkg_message_queue_nats_client_test_api_test_api_proto_rawDesc), len(file_pkg_message_queue_nats_client_test_api_test_api_proto_rawDesc)), NumEnums: 0, NumMessages: 1, NumExtensions: 0, @@ -138,7 +122,6 @@ func file_pkg_message_queue_nats_client_test_api_test_api_proto_init() { MessageInfos: file_pkg_message_queue_nats_client_test_api_test_api_proto_msgTypes, }.Build() File_pkg_message_queue_nats_client_test_api_test_api_proto = out.File - file_pkg_message_queue_nats_client_test_api_test_api_proto_rawDesc = nil file_pkg_message_queue_nats_client_test_api_test_api_proto_goTypes = nil file_pkg_message_queue_nats_client_test_api_test_api_proto_depIdxs = nil }