github.com/tenywen/fabric@v1.0.0-beta.0.20170620030522-a5b1ed380643/protos/peer/proposal_response.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // source: peer/proposal_response.proto 3 4 package peer 5 6 import proto "github.com/golang/protobuf/proto" 7 import fmt "fmt" 8 import math "math" 9 import google_protobuf1 "github.com/golang/protobuf/ptypes/timestamp" 10 11 // Reference imports to suppress errors if they are not otherwise used. 12 var _ = proto.Marshal 13 var _ = fmt.Errorf 14 var _ = math.Inf 15 16 // A ProposalResponse is returned from an endorser to the proposal submitter. 17 // The idea is that this message contains the endorser's response to the 18 // request of a client to perform an action over a chaincode (or more 19 // generically on the ledger); the response might be success/error (conveyed in 20 // the Response field) together with a description of the action and a 21 // signature over it by that endorser. If a sufficient number of distinct 22 // endorsers agree on the same action and produce signature to that effect, a 23 // transaction can be generated and sent for ordering. 24 type ProposalResponse struct { 25 // Version indicates message protocol version 26 Version int32 `protobuf:"varint,1,opt,name=version" json:"version,omitempty"` 27 // Timestamp is the time that the message 28 // was created as defined by the sender 29 Timestamp *google_protobuf1.Timestamp `protobuf:"bytes,2,opt,name=timestamp" json:"timestamp,omitempty"` 30 // A response message indicating whether the 31 // endorsement of the action was successful 32 Response *Response `protobuf:"bytes,4,opt,name=response" json:"response,omitempty"` 33 // The payload of response. It is the bytes of ProposalResponsePayload 34 Payload []byte `protobuf:"bytes,5,opt,name=payload,proto3" json:"payload,omitempty"` 35 // The endorsement of the proposal, basically 36 // the endorser's signature over the payload 37 Endorsement *Endorsement `protobuf:"bytes,6,opt,name=endorsement" json:"endorsement,omitempty"` 38 } 39 40 func (m *ProposalResponse) Reset() { *m = ProposalResponse{} } 41 func (m *ProposalResponse) String() string { return proto.CompactTextString(m) } 42 func (*ProposalResponse) ProtoMessage() {} 43 func (*ProposalResponse) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{0} } 44 45 func (m *ProposalResponse) GetVersion() int32 { 46 if m != nil { 47 return m.Version 48 } 49 return 0 50 } 51 52 func (m *ProposalResponse) GetTimestamp() *google_protobuf1.Timestamp { 53 if m != nil { 54 return m.Timestamp 55 } 56 return nil 57 } 58 59 func (m *ProposalResponse) GetResponse() *Response { 60 if m != nil { 61 return m.Response 62 } 63 return nil 64 } 65 66 func (m *ProposalResponse) GetPayload() []byte { 67 if m != nil { 68 return m.Payload 69 } 70 return nil 71 } 72 73 func (m *ProposalResponse) GetEndorsement() *Endorsement { 74 if m != nil { 75 return m.Endorsement 76 } 77 return nil 78 } 79 80 // A response with a representation similar to an HTTP response that can 81 // be used within another message. 82 type Response struct { 83 // A status code that should follow the HTTP status codes. 84 Status int32 `protobuf:"varint,1,opt,name=status" json:"status,omitempty"` 85 // A message associated with the response code. 86 Message string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"` 87 // A payload that can be used to include metadata with this response. 88 Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` 89 } 90 91 func (m *Response) Reset() { *m = Response{} } 92 func (m *Response) String() string { return proto.CompactTextString(m) } 93 func (*Response) ProtoMessage() {} 94 func (*Response) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{1} } 95 96 func (m *Response) GetStatus() int32 { 97 if m != nil { 98 return m.Status 99 } 100 return 0 101 } 102 103 func (m *Response) GetMessage() string { 104 if m != nil { 105 return m.Message 106 } 107 return "" 108 } 109 110 func (m *Response) GetPayload() []byte { 111 if m != nil { 112 return m.Payload 113 } 114 return nil 115 } 116 117 // ProposalResponsePayload is the payload of a proposal response. This message 118 // is the "bridge" between the client's request and the endorser's action in 119 // response to that request. Concretely, for chaincodes, it contains a hashed 120 // representation of the proposal (proposalHash) and a representation of the 121 // chaincode state changes and events inside the extension field. 122 type ProposalResponsePayload struct { 123 // Hash of the proposal that triggered this response. The hash is used to 124 // link a response with its proposal, both for bookeeping purposes on an 125 // asynchronous system and for security reasons (accountability, 126 // non-repudiation). The hash usually covers the entire Proposal message 127 // (byte-by-byte). However this implies that the hash can only be verified 128 // if the entire proposal message is available when ProposalResponsePayload is 129 // included in a transaction or stored in the ledger. For confidentiality 130 // reasons, with chaincodes it might be undesirable to store the proposal 131 // payload in the ledger. If the type is CHAINCODE, this is handled by 132 // separating the proposal's header and 133 // the payload: the header is always hashed in its entirety whereas the 134 // payload can either be hashed fully, or only its hash may be hashed, or 135 // nothing from the payload can be hashed. The PayloadVisibility field in the 136 // Header's extension controls to which extent the proposal payload is 137 // "visible" in the sense that was just explained. 138 ProposalHash []byte `protobuf:"bytes,1,opt,name=proposal_hash,json=proposalHash,proto3" json:"proposal_hash,omitempty"` 139 // Extension should be unmarshaled to a type-specific message. The type of 140 // the extension in any proposal response depends on the type of the proposal 141 // that the client selected when the proposal was initially sent out. In 142 // particular, this information is stored in the type field of a Header. For 143 // chaincode, it's a ChaincodeAction message 144 Extension []byte `protobuf:"bytes,2,opt,name=extension,proto3" json:"extension,omitempty"` 145 } 146 147 func (m *ProposalResponsePayload) Reset() { *m = ProposalResponsePayload{} } 148 func (m *ProposalResponsePayload) String() string { return proto.CompactTextString(m) } 149 func (*ProposalResponsePayload) ProtoMessage() {} 150 func (*ProposalResponsePayload) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{2} } 151 152 func (m *ProposalResponsePayload) GetProposalHash() []byte { 153 if m != nil { 154 return m.ProposalHash 155 } 156 return nil 157 } 158 159 func (m *ProposalResponsePayload) GetExtension() []byte { 160 if m != nil { 161 return m.Extension 162 } 163 return nil 164 } 165 166 // An endorsement is a signature of an endorser over a proposal response. By 167 // producing an endorsement message, an endorser implicitly "approves" that 168 // proposal response and the actions contained therein. When enough 169 // endorsements have been collected, a transaction can be generated out of a 170 // set of proposal responses. Note that this message only contains an identity 171 // and a signature but no signed payload. This is intentional because 172 // endorsements are supposed to be collected in a transaction, and they are all 173 // expected to endorse a single proposal response/action (many endorsements 174 // over a single proposal response) 175 type Endorsement struct { 176 // Identity of the endorser (e.g. its certificate) 177 Endorser []byte `protobuf:"bytes,1,opt,name=endorser,proto3" json:"endorser,omitempty"` 178 // Signature of the payload included in ProposalResponse concatenated with 179 // the endorser's certificate; ie, sign(ProposalResponse.payload + endorser) 180 Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` 181 } 182 183 func (m *Endorsement) Reset() { *m = Endorsement{} } 184 func (m *Endorsement) String() string { return proto.CompactTextString(m) } 185 func (*Endorsement) ProtoMessage() {} 186 func (*Endorsement) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{3} } 187 188 func (m *Endorsement) GetEndorser() []byte { 189 if m != nil { 190 return m.Endorser 191 } 192 return nil 193 } 194 195 func (m *Endorsement) GetSignature() []byte { 196 if m != nil { 197 return m.Signature 198 } 199 return nil 200 } 201 202 func init() { 203 proto.RegisterType((*ProposalResponse)(nil), "protos.ProposalResponse") 204 proto.RegisterType((*Response)(nil), "protos.Response") 205 proto.RegisterType((*ProposalResponsePayload)(nil), "protos.ProposalResponsePayload") 206 proto.RegisterType((*Endorsement)(nil), "protos.Endorsement") 207 } 208 209 func init() { proto.RegisterFile("peer/proposal_response.proto", fileDescriptor8) } 210 211 var fileDescriptor8 = []byte{ 212 // 367 bytes of a gzipped FileDescriptorProto 213 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x6c, 0x92, 0x51, 0x4b, 0xfb, 0x30, 214 0x14, 0xc5, 0xe9, 0xfe, 0xff, 0xcd, 0x2d, 0x9b, 0x30, 0x2a, 0x68, 0x19, 0x03, 0x47, 0x7d, 0x99, 215 0x20, 0x29, 0x28, 0x82, 0xcf, 0x03, 0xd1, 0xc7, 0x11, 0xc4, 0x07, 0x11, 0x24, 0xdd, 0xee, 0xd2, 216 0x62, 0xdb, 0x84, 0xdc, 0x54, 0xdc, 0x07, 0xf6, 0x7b, 0x48, 0xd3, 0xa6, 0xab, 0xe2, 0xd3, 0x38, 217 0x77, 0x27, 0xbf, 0x7b, 0xcf, 0xed, 0x25, 0x73, 0x05, 0xa0, 0x23, 0xa5, 0xa5, 0x92, 0xc8, 0xb3, 218 0x37, 0x0d, 0xa8, 0x64, 0x81, 0x40, 0x95, 0x96, 0x46, 0xfa, 0x03, 0xfb, 0x83, 0xb3, 0x73, 0x21, 219 0xa5, 0xc8, 0x20, 0xb2, 0x32, 0x2e, 0x77, 0x91, 0x49, 0x73, 0x40, 0xc3, 0x73, 0x55, 0x1b, 0xc3, 220 0x2f, 0x8f, 0x4c, 0xd7, 0x0d, 0x84, 0x35, 0x0c, 0x3f, 0x20, 0x47, 0x1f, 0xa0, 0x31, 0x95, 0x45, 221 0xe0, 0x2d, 0xbc, 0x65, 0x9f, 0x39, 0xe9, 0xdf, 0x91, 0x51, 0x4b, 0x08, 0x7a, 0x0b, 0x6f, 0x39, 222 0xbe, 0x9e, 0xd1, 0xba, 0x07, 0x75, 0x3d, 0xe8, 0x93, 0x73, 0xb0, 0x83, 0xd9, 0xbf, 0x22, 0x43, 223 0x37, 0x63, 0xf0, 0xdf, 0x3e, 0x9c, 0xd6, 0x2f, 0x90, 0xba, 0xbe, 0xac, 0x75, 0x54, 0x13, 0x28, 224 0xbe, 0xcf, 0x24, 0xdf, 0x06, 0xfd, 0x85, 0xb7, 0x9c, 0x30, 0x27, 0xfd, 0x5b, 0x32, 0x86, 0x62, 225 0x2b, 0x35, 0x42, 0x0e, 0x85, 0x09, 0x06, 0x16, 0x75, 0xe2, 0x50, 0xf7, 0x87, 0xbf, 0x58, 0xd7, 226 0x17, 0x3e, 0x93, 0x61, 0x1b, 0xef, 0x94, 0x0c, 0xd0, 0x70, 0x53, 0x62, 0x93, 0xae, 0x51, 0x55, 227 0xd3, 0x1c, 0x10, 0xb9, 0x00, 0x1b, 0x6d, 0xc4, 0x9c, 0xec, 0x8e, 0xf3, 0xef, 0xc7, 0x38, 0xe1, 228 0x2b, 0x39, 0xfb, 0xbd, 0xbe, 0x75, 0x33, 0xe9, 0x05, 0x39, 0x6e, 0x3f, 0x4f, 0xc2, 0x31, 0xb1, 229 0xdd, 0x26, 0x6c, 0xe2, 0x8a, 0x8f, 0x1c, 0x13, 0x7f, 0x4e, 0x46, 0xf0, 0x69, 0xa0, 0xb0, 0xcb, 230 0xee, 0x59, 0xc3, 0xa1, 0x10, 0x3e, 0x90, 0x71, 0x27, 0x91, 0x3f, 0x23, 0xc3, 0x26, 0x93, 0x6e, 231 0x60, 0xad, 0xae, 0x40, 0x98, 0x8a, 0x82, 0x9b, 0x52, 0x83, 0x03, 0xb5, 0x85, 0x55, 0x42, 0x42, 232 0xa9, 0x05, 0x4d, 0xf6, 0x0a, 0x74, 0x06, 0x5b, 0x01, 0x9a, 0xee, 0x78, 0xac, 0xd3, 0x8d, 0x5b, 233 0x5c, 0x75, 0x4d, 0xab, 0x3f, 0xa2, 0x6c, 0xde, 0xb9, 0x80, 0x97, 0x4b, 0x91, 0x9a, 0xa4, 0x8c, 234 0xe9, 0x46, 0xe6, 0x51, 0x87, 0x11, 0xd5, 0x8c, 0xfa, 0xba, 0x30, 0xaa, 0x18, 0x71, 0x7d, 0x79, 235 0x37, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x0e, 0x52, 0x0b, 0x35, 0xa0, 0x02, 0x00, 0x00, 236 }