1 Star 0 Fork 0

peter/fabric

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
prover.pb.go 28.69 KB
一键复制 编辑 原始数据 按行查看 历史
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: token/prover.proto
package token // import "github.com/hyperledger/fabric/protos/token"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import timestamp "github.com/golang/protobuf/ptypes/timestamp"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// TokenToIssue describes a token to be issued in the system
type TokenToIssue struct {
// Recipient refers to the owner of the token to be issued
Recipient []byte `protobuf:"bytes,1,opt,name=recipient,proto3" json:"recipient,omitempty"`
// Type refers to the token type
Type string `protobuf:"bytes,2,opt,name=type" json:"type,omitempty"`
// Quantity refers to the number of token units to be issued
Quantity uint64 `protobuf:"varint,3,opt,name=quantity" json:"quantity,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TokenToIssue) Reset() { *m = TokenToIssue{} }
func (m *TokenToIssue) String() string { return proto.CompactTextString(m) }
func (*TokenToIssue) ProtoMessage() {}
func (*TokenToIssue) Descriptor() ([]byte, []int) {
return fileDescriptor_prover_886d64b71f8f88fa, []int{0}
}
func (m *TokenToIssue) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TokenToIssue.Unmarshal(m, b)
}
func (m *TokenToIssue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TokenToIssue.Marshal(b, m, deterministic)
}
func (dst *TokenToIssue) XXX_Merge(src proto.Message) {
xxx_messageInfo_TokenToIssue.Merge(dst, src)
}
func (m *TokenToIssue) XXX_Size() int {
return xxx_messageInfo_TokenToIssue.Size(m)
}
func (m *TokenToIssue) XXX_DiscardUnknown() {
xxx_messageInfo_TokenToIssue.DiscardUnknown(m)
}
var xxx_messageInfo_TokenToIssue proto.InternalMessageInfo
func (m *TokenToIssue) GetRecipient() []byte {
if m != nil {
return m.Recipient
}
return nil
}
func (m *TokenToIssue) GetType() string {
if m != nil {
return m.Type
}
return ""
}
func (m *TokenToIssue) GetQuantity() uint64 {
if m != nil {
return m.Quantity
}
return 0
}
// ImportRequest is used to request creation of imports
type ImportRequest struct {
// Credential contains information about the party who is requesting the operation
// the content of this field depends on the charateristic of the token manager system used.
Credential []byte `protobuf:"bytes,1,opt,name=credential,proto3" json:"credential,omitempty"`
// TokenToIssue contains the information about the tokens to be issued
TokensToIssue []*TokenToIssue `protobuf:"bytes,2,rep,name=tokens_to_issue,json=tokensToIssue" json:"tokens_to_issue,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ImportRequest) Reset() { *m = ImportRequest{} }
func (m *ImportRequest) String() string { return proto.CompactTextString(m) }
func (*ImportRequest) ProtoMessage() {}
func (*ImportRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_prover_886d64b71f8f88fa, []int{1}
}
func (m *ImportRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ImportRequest.Unmarshal(m, b)
}
func (m *ImportRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ImportRequest.Marshal(b, m, deterministic)
}
func (dst *ImportRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ImportRequest.Merge(dst, src)
}
func (m *ImportRequest) XXX_Size() int {
return xxx_messageInfo_ImportRequest.Size(m)
}
func (m *ImportRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ImportRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ImportRequest proto.InternalMessageInfo
func (m *ImportRequest) GetCredential() []byte {
if m != nil {
return m.Credential
}
return nil
}
func (m *ImportRequest) GetTokensToIssue() []*TokenToIssue {
if m != nil {
return m.TokensToIssue
}
return nil
}
// Header is a generic replay prevention and identity message to include in a signed command
type Header struct {
// Timestamp is the local time when the message was created
// by the sender
Timestamp *timestamp.Timestamp `protobuf:"bytes,1,opt,name=timestamp" json:"timestamp,omitempty"`
// ChannelId identifies the channel this message is bound for
ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId" json:"channel_id,omitempty"`
// Nonce is a sufficientley long random value
// used to ensure the request has enough entropy.
Nonce []byte `protobuf:"bytes,3,opt,name=nonce,proto3" json:"nonce,omitempty"`
// Creator of the message.
// Typically, a marshaled msp.SerializedIdentity
Creator []byte `protobuf:"bytes,4,opt,name=creator,proto3" json:"creator,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Header) Reset() { *m = Header{} }
func (m *Header) String() string { return proto.CompactTextString(m) }
func (*Header) ProtoMessage() {}
func (*Header) Descriptor() ([]byte, []int) {
return fileDescriptor_prover_886d64b71f8f88fa, []int{2}
}
func (m *Header) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Header.Unmarshal(m, b)
}
func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Header.Marshal(b, m, deterministic)
}
func (dst *Header) XXX_Merge(src proto.Message) {
xxx_messageInfo_Header.Merge(dst, src)
}
func (m *Header) XXX_Size() int {
return xxx_messageInfo_Header.Size(m)
}
func (m *Header) XXX_DiscardUnknown() {
xxx_messageInfo_Header.DiscardUnknown(m)
}
var xxx_messageInfo_Header proto.InternalMessageInfo
func (m *Header) GetTimestamp() *timestamp.Timestamp {
if m != nil {
return m.Timestamp
}
return nil
}
func (m *Header) GetChannelId() string {
if m != nil {
return m.ChannelId
}
return ""
}
func (m *Header) GetNonce() []byte {
if m != nil {
return m.Nonce
}
return nil
}
func (m *Header) GetCreator() []byte {
if m != nil {
return m.Creator
}
return nil
}
// Command describes the type of operation that a client is requesting.
type Command struct {
// Header is the header of this command
Header *Header `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
// Payload is the payload of this command. It can assume one of the following value
//
// Types that are valid to be assigned to Payload:
// *Command_ImportRequest
Payload isCommand_Payload `protobuf_oneof:"payload"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Command) Reset() { *m = Command{} }
func (m *Command) String() string { return proto.CompactTextString(m) }
func (*Command) ProtoMessage() {}
func (*Command) Descriptor() ([]byte, []int) {
return fileDescriptor_prover_886d64b71f8f88fa, []int{3}
}
func (m *Command) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Command.Unmarshal(m, b)
}
func (m *Command) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Command.Marshal(b, m, deterministic)
}
func (dst *Command) XXX_Merge(src proto.Message) {
xxx_messageInfo_Command.Merge(dst, src)
}
func (m *Command) XXX_Size() int {
return xxx_messageInfo_Command.Size(m)
}
func (m *Command) XXX_DiscardUnknown() {
xxx_messageInfo_Command.DiscardUnknown(m)
}
var xxx_messageInfo_Command proto.InternalMessageInfo
type isCommand_Payload interface {
isCommand_Payload()
}
type Command_ImportRequest struct {
ImportRequest *ImportRequest `protobuf:"bytes,2,opt,name=import_request,json=importRequest,oneof"`
}
func (*Command_ImportRequest) isCommand_Payload() {}
func (m *Command) GetPayload() isCommand_Payload {
if m != nil {
return m.Payload
}
return nil
}
func (m *Command) GetHeader() *Header {
if m != nil {
return m.Header
}
return nil
}
func (m *Command) GetImportRequest() *ImportRequest {
if x, ok := m.GetPayload().(*Command_ImportRequest); ok {
return x.ImportRequest
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*Command) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _Command_OneofMarshaler, _Command_OneofUnmarshaler, _Command_OneofSizer, []interface{}{
(*Command_ImportRequest)(nil),
}
}
func _Command_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*Command)
// payload
switch x := m.Payload.(type) {
case *Command_ImportRequest:
b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.ImportRequest); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("Command.Payload has unexpected type %T", x)
}
return nil
}
func _Command_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*Command)
switch tag {
case 2: // payload.import_request
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(ImportRequest)
err := b.DecodeMessage(msg)
m.Payload = &Command_ImportRequest{msg}
return true, err
default:
return false, nil
}
}
func _Command_OneofSizer(msg proto.Message) (n int) {
m := msg.(*Command)
// payload
switch x := m.Payload.(type) {
case *Command_ImportRequest:
s := proto.Size(x.ImportRequest)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// SignedCommand is a command that carries the signature of the command's creator.
type SignedCommand struct {
// Command is the serialised version of a Command message
Command []byte `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"`
// Signature is the signature over command
Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SignedCommand) Reset() { *m = SignedCommand{} }
func (m *SignedCommand) String() string { return proto.CompactTextString(m) }
func (*SignedCommand) ProtoMessage() {}
func (*SignedCommand) Descriptor() ([]byte, []int) {
return fileDescriptor_prover_886d64b71f8f88fa, []int{4}
}
func (m *SignedCommand) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignedCommand.Unmarshal(m, b)
}
func (m *SignedCommand) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SignedCommand.Marshal(b, m, deterministic)
}
func (dst *SignedCommand) XXX_Merge(src proto.Message) {
xxx_messageInfo_SignedCommand.Merge(dst, src)
}
func (m *SignedCommand) XXX_Size() int {
return xxx_messageInfo_SignedCommand.Size(m)
}
func (m *SignedCommand) XXX_DiscardUnknown() {
xxx_messageInfo_SignedCommand.DiscardUnknown(m)
}
var xxx_messageInfo_SignedCommand proto.InternalMessageInfo
func (m *SignedCommand) GetCommand() []byte {
if m != nil {
return m.Command
}
return nil
}
func (m *SignedCommand) GetSignature() []byte {
if m != nil {
return m.Signature
}
return nil
}
type CommandResponseHeader struct {
// Timestamp is the time that the message
// was created as defined by the sender
Timestamp *timestamp.Timestamp `protobuf:"bytes,1,opt,name=timestamp" json:"timestamp,omitempty"`
// CommandHash is the hash computed on the concatenation of the SignedCommand's command and signature fields.
// If not specified differently, SHA256 is used
// The hash is used to link a response with its request, both for bookeeping purposes on an
// asynchronous system and for security reasons (accountability, non-repudiation)
CommandHash []byte `protobuf:"bytes,2,opt,name=command_hash,json=commandHash,proto3" json:"command_hash,omitempty"`
// Creator is the identity of the party creating this message
Creator []byte `protobuf:"bytes,3,opt,name=creator,proto3" json:"creator,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CommandResponseHeader) Reset() { *m = CommandResponseHeader{} }
func (m *CommandResponseHeader) String() string { return proto.CompactTextString(m) }
func (*CommandResponseHeader) ProtoMessage() {}
func (*CommandResponseHeader) Descriptor() ([]byte, []int) {
return fileDescriptor_prover_886d64b71f8f88fa, []int{5}
}
func (m *CommandResponseHeader) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CommandResponseHeader.Unmarshal(m, b)
}
func (m *CommandResponseHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CommandResponseHeader.Marshal(b, m, deterministic)
}
func (dst *CommandResponseHeader) XXX_Merge(src proto.Message) {
xxx_messageInfo_CommandResponseHeader.Merge(dst, src)
}
func (m *CommandResponseHeader) XXX_Size() int {
return xxx_messageInfo_CommandResponseHeader.Size(m)
}
func (m *CommandResponseHeader) XXX_DiscardUnknown() {
xxx_messageInfo_CommandResponseHeader.DiscardUnknown(m)
}
var xxx_messageInfo_CommandResponseHeader proto.InternalMessageInfo
func (m *CommandResponseHeader) GetTimestamp() *timestamp.Timestamp {
if m != nil {
return m.Timestamp
}
return nil
}
func (m *CommandResponseHeader) GetCommandHash() []byte {
if m != nil {
return m.CommandHash
}
return nil
}
func (m *CommandResponseHeader) GetCreator() []byte {
if m != nil {
return m.Creator
}
return nil
}
// Error reports an applicaton error
type Error struct {
// Message associated with this response.
Message string `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"`
// Payload that can be used to include metadata with this response.
Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Error) Reset() { *m = Error{} }
func (m *Error) String() string { return proto.CompactTextString(m) }
func (*Error) ProtoMessage() {}
func (*Error) Descriptor() ([]byte, []int) {
return fileDescriptor_prover_886d64b71f8f88fa, []int{6}
}
func (m *Error) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Error.Unmarshal(m, b)
}
func (m *Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Error.Marshal(b, m, deterministic)
}
func (dst *Error) XXX_Merge(src proto.Message) {
xxx_messageInfo_Error.Merge(dst, src)
}
func (m *Error) XXX_Size() int {
return xxx_messageInfo_Error.Size(m)
}
func (m *Error) XXX_DiscardUnknown() {
xxx_messageInfo_Error.DiscardUnknown(m)
}
var xxx_messageInfo_Error proto.InternalMessageInfo
func (m *Error) GetMessage() string {
if m != nil {
return m.Message
}
return ""
}
func (m *Error) GetPayload() []byte {
if m != nil {
return m.Payload
}
return nil
}
// A CommnandResponse is returned from a prover to the command submitter.
type CommandResponse struct {
// Header of the response.
Header *CommandResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
// Payload of the response.
//
// Types that are valid to be assigned to Payload:
// *CommandResponse_Err
// *CommandResponse_TokenTransaction
Payload isCommandResponse_Payload `protobuf_oneof:"payload"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CommandResponse) Reset() { *m = CommandResponse{} }
func (m *CommandResponse) String() string { return proto.CompactTextString(m) }
func (*CommandResponse) ProtoMessage() {}
func (*CommandResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_prover_886d64b71f8f88fa, []int{7}
}
func (m *CommandResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CommandResponse.Unmarshal(m, b)
}
func (m *CommandResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CommandResponse.Marshal(b, m, deterministic)
}
func (dst *CommandResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_CommandResponse.Merge(dst, src)
}
func (m *CommandResponse) XXX_Size() int {
return xxx_messageInfo_CommandResponse.Size(m)
}
func (m *CommandResponse) XXX_DiscardUnknown() {
xxx_messageInfo_CommandResponse.DiscardUnknown(m)
}
var xxx_messageInfo_CommandResponse proto.InternalMessageInfo
type isCommandResponse_Payload interface {
isCommandResponse_Payload()
}
type CommandResponse_Err struct {
Err *Error `protobuf:"bytes,2,opt,name=err,oneof"`
}
type CommandResponse_TokenTransaction struct {
TokenTransaction *TokenTransaction `protobuf:"bytes,3,opt,name=token_transaction,json=tokenTransaction,oneof"`
}
func (*CommandResponse_Err) isCommandResponse_Payload() {}
func (*CommandResponse_TokenTransaction) isCommandResponse_Payload() {}
func (m *CommandResponse) GetPayload() isCommandResponse_Payload {
if m != nil {
return m.Payload
}
return nil
}
func (m *CommandResponse) GetHeader() *CommandResponseHeader {
if m != nil {
return m.Header
}
return nil
}
func (m *CommandResponse) GetErr() *Error {
if x, ok := m.GetPayload().(*CommandResponse_Err); ok {
return x.Err
}
return nil
}
func (m *CommandResponse) GetTokenTransaction() *TokenTransaction {
if x, ok := m.GetPayload().(*CommandResponse_TokenTransaction); ok {
return x.TokenTransaction
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*CommandResponse) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _CommandResponse_OneofMarshaler, _CommandResponse_OneofUnmarshaler, _CommandResponse_OneofSizer, []interface{}{
(*CommandResponse_Err)(nil),
(*CommandResponse_TokenTransaction)(nil),
}
}
func _CommandResponse_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*CommandResponse)
// payload
switch x := m.Payload.(type) {
case *CommandResponse_Err:
b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Err); err != nil {
return err
}
case *CommandResponse_TokenTransaction:
b.EncodeVarint(3<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.TokenTransaction); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("CommandResponse.Payload has unexpected type %T", x)
}
return nil
}
func _CommandResponse_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*CommandResponse)
switch tag {
case 2: // payload.err
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(Error)
err := b.DecodeMessage(msg)
m.Payload = &CommandResponse_Err{msg}
return true, err
case 3: // payload.token_transaction
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(TokenTransaction)
err := b.DecodeMessage(msg)
m.Payload = &CommandResponse_TokenTransaction{msg}
return true, err
default:
return false, nil
}
}
func _CommandResponse_OneofSizer(msg proto.Message) (n int) {
m := msg.(*CommandResponse)
// payload
switch x := m.Payload.(type) {
case *CommandResponse_Err:
s := proto.Size(x.Err)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *CommandResponse_TokenTransaction:
s := proto.Size(x.TokenTransaction)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// SignedCommandResponse is a signed command response
type SignedCommandResponse struct {
// Response is the serialised version of a CommandResponse message
Response []byte `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
// Signature is the signature over command
Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SignedCommandResponse) Reset() { *m = SignedCommandResponse{} }
func (m *SignedCommandResponse) String() string { return proto.CompactTextString(m) }
func (*SignedCommandResponse) ProtoMessage() {}
func (*SignedCommandResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_prover_886d64b71f8f88fa, []int{8}
}
func (m *SignedCommandResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignedCommandResponse.Unmarshal(m, b)
}
func (m *SignedCommandResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SignedCommandResponse.Marshal(b, m, deterministic)
}
func (dst *SignedCommandResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_SignedCommandResponse.Merge(dst, src)
}
func (m *SignedCommandResponse) XXX_Size() int {
return xxx_messageInfo_SignedCommandResponse.Size(m)
}
func (m *SignedCommandResponse) XXX_DiscardUnknown() {
xxx_messageInfo_SignedCommandResponse.DiscardUnknown(m)
}
var xxx_messageInfo_SignedCommandResponse proto.InternalMessageInfo
func (m *SignedCommandResponse) GetResponse() []byte {
if m != nil {
return m.Response
}
return nil
}
func (m *SignedCommandResponse) GetSignature() []byte {
if m != nil {
return m.Signature
}
return nil
}
func init() {
proto.RegisterType((*TokenToIssue)(nil), "protos.TokenToIssue")
proto.RegisterType((*ImportRequest)(nil), "protos.ImportRequest")
proto.RegisterType((*Header)(nil), "protos.Header")
proto.RegisterType((*Command)(nil), "protos.Command")
proto.RegisterType((*SignedCommand)(nil), "protos.SignedCommand")
proto.RegisterType((*CommandResponseHeader)(nil), "protos.CommandResponseHeader")
proto.RegisterType((*Error)(nil), "protos.Error")
proto.RegisterType((*CommandResponse)(nil), "protos.CommandResponse")
proto.RegisterType((*SignedCommandResponse)(nil), "protos.SignedCommandResponse")
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// Client API for Prover service
type ProverClient interface {
// ProcessCommand processes the passed command ensuring proper access control.
// The returned response allows the client to understand if the
// operation was succeffully executed and if not, the response
// reports the reason of the failure.
ProcessCommand(ctx context.Context, in *SignedCommand, opts ...grpc.CallOption) (*SignedCommandResponse, error)
}
type proverClient struct {
cc *grpc.ClientConn
}
func NewProverClient(cc *grpc.ClientConn) ProverClient {
return &proverClient{cc}
}
func (c *proverClient) ProcessCommand(ctx context.Context, in *SignedCommand, opts ...grpc.CallOption) (*SignedCommandResponse, error) {
out := new(SignedCommandResponse)
err := grpc.Invoke(ctx, "/protos.Prover/ProcessCommand", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for Prover service
type ProverServer interface {
// ProcessCommand processes the passed command ensuring proper access control.
// The returned response allows the client to understand if the
// operation was succeffully executed and if not, the response
// reports the reason of the failure.
ProcessCommand(context.Context, *SignedCommand) (*SignedCommandResponse, error)
}
func RegisterProverServer(s *grpc.Server, srv ProverServer) {
s.RegisterService(&_Prover_serviceDesc, srv)
}
func _Prover_ProcessCommand_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SignedCommand)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ProverServer).ProcessCommand(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/protos.Prover/ProcessCommand",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ProverServer).ProcessCommand(ctx, req.(*SignedCommand))
}
return interceptor(ctx, in, info, handler)
}
var _Prover_serviceDesc = grpc.ServiceDesc{
ServiceName: "protos.Prover",
HandlerType: (*ProverServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ProcessCommand",
Handler: _Prover_ProcessCommand_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "token/prover.proto",
}
func init() { proto.RegisterFile("token/prover.proto", fileDescriptor_prover_886d64b71f8f88fa) }
var fileDescriptor_prover_886d64b71f8f88fa = []byte{
// 613 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x51, 0x6b, 0xdb, 0x30,
0x10, 0x4e, 0x9a, 0x36, 0x6d, 0x2e, 0x49, 0xbb, 0x8a, 0x96, 0x85, 0xb0, 0x6e, 0xa9, 0x07, 0x23,
0xec, 0xc1, 0x81, 0x8c, 0xc1, 0x60, 0x63, 0x8c, 0x8e, 0xb1, 0xf4, 0xad, 0xd5, 0xfa, 0x34, 0x06,
0x41, 0xb1, 0xaf, 0xb6, 0x58, 0x2c, 0xb9, 0x92, 0x32, 0x08, 0xec, 0x37, 0x0c, 0xf6, 0x6f, 0xf6,
0xf3, 0x86, 0x25, 0xd9, 0x71, 0x4a, 0xd9, 0xcb, 0x9e, 0xac, 0xbb, 0xfb, 0xa4, 0xfb, 0xee, 0xfb,
0x64, 0x01, 0x31, 0xf2, 0x3b, 0x8a, 0x49, 0xae, 0xe4, 0x0f, 0x54, 0x61, 0xae, 0xa4, 0x91, 0xa4,
0x6d, 0x3f, 0x7a, 0xf8, 0x2c, 0x91, 0x32, 0x59, 0xe2, 0xc4, 0x86, 0x8b, 0xd5, 0xed, 0xc4, 0xf0,
0x0c, 0xb5, 0x61, 0x59, 0xee, 0x80, 0xc3, 0xc7, 0x6e, 0xb3, 0x51, 0x4c, 0x68, 0x16, 0x19, 0x2e,
0x85, 0x2b, 0x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x79, 0x53, 0x98, 0x35, 0xe8, 0x23, 0x73, 0x2f, 0x57, 0x77, 0xf4, 0x1a, 0x4e, 0xb7, 0x1c, 0xad,
0xf8, 0x0f, 0xe1, 0x40, 0xf9, 0xb5, 0xb7, 0xb6, 0x8a, 0xff, 0xed, 0xed, 0x94, 0x42, 0xfb, 0xca,
0xbe, 0x2a, 0x64, 0x06, 0x87, 0x57, 0x4a, 0x46, 0xa8, 0x75, 0x79, 0x5f, 0xaa, 0x3b, 0xb7, 0xd5,
0x74, 0x78, 0xf6, 0x60, 0xba, 0xe4, 0x12, 0x34, 0x2e, 0xae, 0xe1, 0xb9, 0x54, 0x49, 0x98, 0xae,
0x73, 0x54, 0x4b, 0x8c, 0x13, 0x54, 0xe1, 0x2d, 0x5b, 0x28, 0x1e, 0x95, 0x1b, 0xed, 0x8c, 0x5f,
0x5f, 0x26, 0xdc, 0xa4, 0xab, 0x45, 0x18, 0xc9, 0x6c, 0x52, 0xc3, 0x4e, 0x1c, 0xd6, 0xbd, 0x67,
0x7a, 0x62, 0xb1, 0x0b, 0xf7, 0xd8, 0xbd, 0xfa, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xeb, 0xc4, 0xe5,
0x53, 0x09, 0x05, 0x00, 0x00,
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/peter_code_git/fabric.git
git@gitee.com:peter_code_git/fabric.git
peter_code_git
fabric
fabric
v1.3.0-rc1

搜索帮助