github.com/hyperledger/fabric-protos-go@v0.3.3/orderer/blockattestation.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // source: orderer/blockattestation.proto 3 4 package orderer 5 6 import ( 7 context "context" 8 fmt "fmt" 9 proto "github.com/golang/protobuf/proto" 10 common "github.com/hyperledger/fabric-protos-go/common" 11 grpc "google.golang.org/grpc" 12 codes "google.golang.org/grpc/codes" 13 status "google.golang.org/grpc/status" 14 math "math" 15 ) 16 17 // Reference imports to suppress errors if they are not otherwise used. 18 var _ = proto.Marshal 19 var _ = fmt.Errorf 20 var _ = math.Inf 21 22 // This is a compile-time assertion to ensure that this generated file 23 // is compatible with the proto package it is being compiled against. 24 // A compilation error at this line likely means your copy of the 25 // proto package needs to be updated. 26 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package 27 28 type BlockAttestation struct { 29 Header *common.BlockHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` 30 Metadata *common.BlockMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` 31 XXX_NoUnkeyedLiteral struct{} `json:"-"` 32 XXX_unrecognized []byte `json:"-"` 33 XXX_sizecache int32 `json:"-"` 34 } 35 36 func (m *BlockAttestation) Reset() { *m = BlockAttestation{} } 37 func (m *BlockAttestation) String() string { return proto.CompactTextString(m) } 38 func (*BlockAttestation) ProtoMessage() {} 39 func (*BlockAttestation) Descriptor() ([]byte, []int) { 40 return fileDescriptor_24d99d0b3bd658b0, []int{0} 41 } 42 43 func (m *BlockAttestation) XXX_Unmarshal(b []byte) error { 44 return xxx_messageInfo_BlockAttestation.Unmarshal(m, b) 45 } 46 func (m *BlockAttestation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 47 return xxx_messageInfo_BlockAttestation.Marshal(b, m, deterministic) 48 } 49 func (m *BlockAttestation) XXX_Merge(src proto.Message) { 50 xxx_messageInfo_BlockAttestation.Merge(m, src) 51 } 52 func (m *BlockAttestation) XXX_Size() int { 53 return xxx_messageInfo_BlockAttestation.Size(m) 54 } 55 func (m *BlockAttestation) XXX_DiscardUnknown() { 56 xxx_messageInfo_BlockAttestation.DiscardUnknown(m) 57 } 58 59 var xxx_messageInfo_BlockAttestation proto.InternalMessageInfo 60 61 func (m *BlockAttestation) GetHeader() *common.BlockHeader { 62 if m != nil { 63 return m.Header 64 } 65 return nil 66 } 67 68 func (m *BlockAttestation) GetMetadata() *common.BlockMetadata { 69 if m != nil { 70 return m.Metadata 71 } 72 return nil 73 } 74 75 type BlockAttestationResponse struct { 76 // Types that are valid to be assigned to Type: 77 // 78 // *BlockAttestationResponse_Status 79 // *BlockAttestationResponse_BlockAttestation 80 Type isBlockAttestationResponse_Type `protobuf_oneof:"Type"` 81 XXX_NoUnkeyedLiteral struct{} `json:"-"` 82 XXX_unrecognized []byte `json:"-"` 83 XXX_sizecache int32 `json:"-"` 84 } 85 86 func (m *BlockAttestationResponse) Reset() { *m = BlockAttestationResponse{} } 87 func (m *BlockAttestationResponse) String() string { return proto.CompactTextString(m) } 88 func (*BlockAttestationResponse) ProtoMessage() {} 89 func (*BlockAttestationResponse) Descriptor() ([]byte, []int) { 90 return fileDescriptor_24d99d0b3bd658b0, []int{1} 91 } 92 93 func (m *BlockAttestationResponse) XXX_Unmarshal(b []byte) error { 94 return xxx_messageInfo_BlockAttestationResponse.Unmarshal(m, b) 95 } 96 func (m *BlockAttestationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 97 return xxx_messageInfo_BlockAttestationResponse.Marshal(b, m, deterministic) 98 } 99 func (m *BlockAttestationResponse) XXX_Merge(src proto.Message) { 100 xxx_messageInfo_BlockAttestationResponse.Merge(m, src) 101 } 102 func (m *BlockAttestationResponse) XXX_Size() int { 103 return xxx_messageInfo_BlockAttestationResponse.Size(m) 104 } 105 func (m *BlockAttestationResponse) XXX_DiscardUnknown() { 106 xxx_messageInfo_BlockAttestationResponse.DiscardUnknown(m) 107 } 108 109 var xxx_messageInfo_BlockAttestationResponse proto.InternalMessageInfo 110 111 type isBlockAttestationResponse_Type interface { 112 isBlockAttestationResponse_Type() 113 } 114 115 type BlockAttestationResponse_Status struct { 116 Status common.Status `protobuf:"varint,1,opt,name=status,proto3,enum=common.Status,oneof"` 117 } 118 119 type BlockAttestationResponse_BlockAttestation struct { 120 BlockAttestation *BlockAttestation `protobuf:"bytes,2,opt,name=block_attestation,json=blockAttestation,proto3,oneof"` 121 } 122 123 func (*BlockAttestationResponse_Status) isBlockAttestationResponse_Type() {} 124 125 func (*BlockAttestationResponse_BlockAttestation) isBlockAttestationResponse_Type() {} 126 127 func (m *BlockAttestationResponse) GetType() isBlockAttestationResponse_Type { 128 if m != nil { 129 return m.Type 130 } 131 return nil 132 } 133 134 func (m *BlockAttestationResponse) GetStatus() common.Status { 135 if x, ok := m.GetType().(*BlockAttestationResponse_Status); ok { 136 return x.Status 137 } 138 return common.Status_UNKNOWN 139 } 140 141 func (m *BlockAttestationResponse) GetBlockAttestation() *BlockAttestation { 142 if x, ok := m.GetType().(*BlockAttestationResponse_BlockAttestation); ok { 143 return x.BlockAttestation 144 } 145 return nil 146 } 147 148 // XXX_OneofWrappers is for the internal use of the proto package. 149 func (*BlockAttestationResponse) XXX_OneofWrappers() []interface{} { 150 return []interface{}{ 151 (*BlockAttestationResponse_Status)(nil), 152 (*BlockAttestationResponse_BlockAttestation)(nil), 153 } 154 } 155 156 func init() { 157 proto.RegisterType((*BlockAttestation)(nil), "orderer.BlockAttestation") 158 proto.RegisterType((*BlockAttestationResponse)(nil), "orderer.BlockAttestationResponse") 159 } 160 161 func init() { proto.RegisterFile("orderer/blockattestation.proto", fileDescriptor_24d99d0b3bd658b0) } 162 163 var fileDescriptor_24d99d0b3bd658b0 = []byte{ 164 // 293 bytes of a gzipped FileDescriptorProto 165 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xd1, 0x4a, 0xbc, 0x40, 166 0x18, 0xc5, 0xd7, 0x3f, 0x7f, 0x2c, 0x26, 0x58, 0xdc, 0x59, 0x02, 0xdb, 0x8b, 0xa8, 0x85, 0x60, 167 0x21, 0x76, 0xa6, 0xec, 0x09, 0x12, 0x02, 0x09, 0xba, 0xb1, 0x2e, 0xa2, 0x9b, 0x65, 0xd4, 0x2f, 168 0x95, 0xd4, 0x4f, 0x66, 0x66, 0x83, 0x7d, 0x91, 0x9e, 0x37, 0x1c, 0xc7, 0xda, 0xa4, 0xae, 0x84, 169 0x73, 0x7e, 0x67, 0xce, 0x77, 0x90, 0x9c, 0xa2, 0xcc, 0x40, 0x82, 0xe4, 0x49, 0x85, 0xe9, 0x9b, 170 0xd0, 0x1a, 0x94, 0x16, 0xba, 0xc4, 0x86, 0xb5, 0x12, 0x35, 0xd2, 0x03, 0xeb, 0x2f, 0xe6, 0x29, 171 0xd6, 0x35, 0x36, 0xbc, 0xff, 0xf4, 0xee, 0x52, 0x12, 0x2f, 0xec, 0x72, 0xb7, 0xdf, 0x39, 0x7a, 172 0x49, 0xdc, 0x02, 0x44, 0x06, 0xd2, 0x77, 0xce, 0x9c, 0xd5, 0x51, 0x30, 0x67, 0x36, 0x62, 0xc8, 173 0xc8, 0x58, 0xb1, 0x45, 0xe8, 0x35, 0x39, 0xac, 0x41, 0x8b, 0x4c, 0x68, 0xe1, 0xff, 0x33, 0xf8, 174 0xf1, 0x0f, 0xfc, 0xc1, 0x9a, 0xf1, 0x17, 0xb6, 0xfc, 0x70, 0x88, 0x3f, 0x2e, 0x8d, 0x41, 0xb5, 175 0xd8, 0x28, 0xa0, 0x2b, 0xe2, 0x76, 0xd2, 0x56, 0x99, 0xf2, 0x69, 0x30, 0x1d, 0x5e, 0x7b, 0x34, 176 0x6a, 0x34, 0x89, 0xad, 0x4f, 0x23, 0x32, 0x33, 0x93, 0x37, 0x7b, 0x9b, 0xed, 0x09, 0x27, 0xcc, 177 0x8e, 0x66, 0xe3, 0x9e, 0x68, 0x12, 0x7b, 0xc9, 0x48, 0x0b, 0x5d, 0xf2, 0xff, 0x69, 0xd7, 0x42, 178 0xb0, 0x21, 0xb3, 0x31, 0xaf, 0xe8, 0xfd, 0x6f, 0xa2, 0x37, 0x5c, 0x75, 0xd7, 0xbc, 0x43, 0x85, 179 0x2d, 0x2c, 0xce, 0xff, 0xac, 0x1c, 0xa6, 0x5d, 0x39, 0xe1, 0x33, 0xb9, 0x40, 0x99, 0xb3, 0x62, 180 0xd7, 0x82, 0xac, 0x20, 0xcb, 0x41, 0xb2, 0x57, 0x91, 0xc8, 0x32, 0xed, 0xff, 0x86, 0x1a, 0xde, 181 0x78, 0xe1, 0x79, 0xa9, 0x8b, 0x6d, 0xd2, 0xb5, 0xf0, 0x3d, 0x9a, 0xf7, 0xf4, 0xba, 0xa7, 0xd7, 182 0x39, 0x72, 0x1b, 0x48, 0x5c, 0x23, 0xdd, 0x7c, 0x06, 0x00, 0x00, 0xff, 0xff, 0xe2, 0x54, 0x77, 183 0xb8, 0x0e, 0x02, 0x00, 0x00, 184 } 185 186 // Reference imports to suppress errors if they are not otherwise used. 187 var _ context.Context 188 var _ grpc.ClientConn 189 190 // This is a compile-time assertion to ensure that this generated file 191 // is compatible with the grpc package it is being compiled against. 192 const _ = grpc.SupportPackageIsVersion4 193 194 // BlockAttestationsClient is the client API for BlockAttestations service. 195 // 196 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 197 type BlockAttestationsClient interface { 198 // BlockAttestations receives an Envelope of type DELIVER_SEEK_INFO , then sends back a stream of BlockAttestations. 199 BlockAttestations(ctx context.Context, in *common.Envelope, opts ...grpc.CallOption) (BlockAttestations_BlockAttestationsClient, error) 200 } 201 202 type blockAttestationsClient struct { 203 cc *grpc.ClientConn 204 } 205 206 func NewBlockAttestationsClient(cc *grpc.ClientConn) BlockAttestationsClient { 207 return &blockAttestationsClient{cc} 208 } 209 210 func (c *blockAttestationsClient) BlockAttestations(ctx context.Context, in *common.Envelope, opts ...grpc.CallOption) (BlockAttestations_BlockAttestationsClient, error) { 211 stream, err := c.cc.NewStream(ctx, &_BlockAttestations_serviceDesc.Streams[0], "/orderer.BlockAttestations/BlockAttestations", opts...) 212 if err != nil { 213 return nil, err 214 } 215 x := &blockAttestationsBlockAttestationsClient{stream} 216 if err := x.ClientStream.SendMsg(in); err != nil { 217 return nil, err 218 } 219 if err := x.ClientStream.CloseSend(); err != nil { 220 return nil, err 221 } 222 return x, nil 223 } 224 225 type BlockAttestations_BlockAttestationsClient interface { 226 Recv() (*BlockAttestationResponse, error) 227 grpc.ClientStream 228 } 229 230 type blockAttestationsBlockAttestationsClient struct { 231 grpc.ClientStream 232 } 233 234 func (x *blockAttestationsBlockAttestationsClient) Recv() (*BlockAttestationResponse, error) { 235 m := new(BlockAttestationResponse) 236 if err := x.ClientStream.RecvMsg(m); err != nil { 237 return nil, err 238 } 239 return m, nil 240 } 241 242 // BlockAttestationsServer is the server API for BlockAttestations service. 243 type BlockAttestationsServer interface { 244 // BlockAttestations receives an Envelope of type DELIVER_SEEK_INFO , then sends back a stream of BlockAttestations. 245 BlockAttestations(*common.Envelope, BlockAttestations_BlockAttestationsServer) error 246 } 247 248 // UnimplementedBlockAttestationsServer can be embedded to have forward compatible implementations. 249 type UnimplementedBlockAttestationsServer struct { 250 } 251 252 func (*UnimplementedBlockAttestationsServer) BlockAttestations(req *common.Envelope, srv BlockAttestations_BlockAttestationsServer) error { 253 return status.Errorf(codes.Unimplemented, "method BlockAttestations not implemented") 254 } 255 256 func RegisterBlockAttestationsServer(s *grpc.Server, srv BlockAttestationsServer) { 257 s.RegisterService(&_BlockAttestations_serviceDesc, srv) 258 } 259 260 func _BlockAttestations_BlockAttestations_Handler(srv interface{}, stream grpc.ServerStream) error { 261 m := new(common.Envelope) 262 if err := stream.RecvMsg(m); err != nil { 263 return err 264 } 265 return srv.(BlockAttestationsServer).BlockAttestations(m, &blockAttestationsBlockAttestationsServer{stream}) 266 } 267 268 type BlockAttestations_BlockAttestationsServer interface { 269 Send(*BlockAttestationResponse) error 270 grpc.ServerStream 271 } 272 273 type blockAttestationsBlockAttestationsServer struct { 274 grpc.ServerStream 275 } 276 277 func (x *blockAttestationsBlockAttestationsServer) Send(m *BlockAttestationResponse) error { 278 return x.ServerStream.SendMsg(m) 279 } 280 281 var _BlockAttestations_serviceDesc = grpc.ServiceDesc{ 282 ServiceName: "orderer.BlockAttestations", 283 HandlerType: (*BlockAttestationsServer)(nil), 284 Methods: []grpc.MethodDesc{}, 285 Streams: []grpc.StreamDesc{ 286 { 287 StreamName: "BlockAttestations", 288 Handler: _BlockAttestations_BlockAttestations_Handler, 289 ServerStreams: true, 290 }, 291 }, 292 Metadata: "orderer/blockattestation.proto", 293 }