discovery

package
v0.0.0-...-fbe82ab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterDiscoveryServer

func RegisterDiscoveryServer(s *grpc.Server, srv DiscoveryServer)

Types

type AuthInfo

type AuthInfo struct {
	//这是用于验证签名的客户端的标识
	//在SignedRequest的有效载荷上。
	//它是字节形式的msp.serialididEntity
	ClientIdentity []byte `protobuf:"bytes,1,opt,name=client_identity,json=clientIdentity,proto3" json:"client_identity,omitempty"`
	//这是客户端的TLS证书的哈希。
	//当网络使用TLS运行时,不包含证书的客户端
	//将被拒绝访问该服务。
	//因为请求是用一个已签名的signedRequest封装的,
	//这会将TLS会话绑定到客户端的注册标识,并且
	//因此,这两种方法都将客户机认证为服务器,
	//并且还阻止服务器将请求消息中继到另一个服务器。
	ClientTlsCertHash    []byte   `protobuf:"bytes,2,opt,name=client_tls_cert_hash,json=clientTlsCertHash,proto3" json:"client_tls_cert_hash,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

AuthInfo聚合服务器使用的身份验证信息 验证客户端

func (*AuthInfo) Descriptor

func (*AuthInfo) Descriptor() ([]byte, []int)

func (*AuthInfo) GetClientIdentity

func (m *AuthInfo) GetClientIdentity() []byte

func (*AuthInfo) GetClientTlsCertHash

func (m *AuthInfo) GetClientTlsCertHash() []byte

func (*AuthInfo) ProtoMessage

func (*AuthInfo) ProtoMessage()

func (*AuthInfo) Reset

func (m *AuthInfo) Reset()

func (*AuthInfo) String

func (m *AuthInfo) String() string

func (*AuthInfo) XXX_DiscardUnknown

func (m *AuthInfo) XXX_DiscardUnknown()

func (*AuthInfo) XXX_Marshal

func (m *AuthInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AuthInfo) XXX_Merge

func (dst *AuthInfo) XXX_Merge(src proto.Message)

func (*AuthInfo) XXX_Size

func (m *AuthInfo) XXX_Size() int

func (*AuthInfo) XXX_Unmarshal

func (m *AuthInfo) XXX_Unmarshal(b []byte) error

type ChaincodeCall

type ChaincodeCall struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	CollectionNames      []string `protobuf:"bytes,2,rep,name=collection_names,json=collectionNames,proto3" json:"collection_names,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

chaincode call定义对chaincode的调用。 它可能包含与链代码相关的集合

func (*ChaincodeCall) Descriptor

func (*ChaincodeCall) Descriptor() ([]byte, []int)

func (*ChaincodeCall) GetCollectionNames

func (m *ChaincodeCall) GetCollectionNames() []string

func (*ChaincodeCall) GetName

func (m *ChaincodeCall) GetName() string

func (*ChaincodeCall) ProtoMessage

func (*ChaincodeCall) ProtoMessage()

func (*ChaincodeCall) Reset

func (m *ChaincodeCall) Reset()

func (*ChaincodeCall) String

func (m *ChaincodeCall) String() string

func (*ChaincodeCall) XXX_DiscardUnknown

func (m *ChaincodeCall) XXX_DiscardUnknown()

func (*ChaincodeCall) XXX_Marshal

func (m *ChaincodeCall) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ChaincodeCall) XXX_Merge

func (dst *ChaincodeCall) XXX_Merge(src proto.Message)

func (*ChaincodeCall) XXX_Size

func (m *ChaincodeCall) XXX_Size() int

func (*ChaincodeCall) XXX_Unmarshal

func (m *ChaincodeCall) XXX_Unmarshal(b []byte) error

type ChaincodeInterest

type ChaincodeInterest struct {
	Chaincodes           []*ChaincodeCall `protobuf:"bytes,1,rep,name=chaincodes,proto3" json:"chaincodes,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

chaincodeInterest定义了关于背书的兴趣 对于特定的单链代码调用。 多个链码表示链码到链码调用。

func (*ChaincodeInterest) Descriptor

func (*ChaincodeInterest) Descriptor() ([]byte, []int)

func (*ChaincodeInterest) GetChaincodes

func (m *ChaincodeInterest) GetChaincodes() []*ChaincodeCall

func (*ChaincodeInterest) ProtoMessage

func (*ChaincodeInterest) ProtoMessage()

func (*ChaincodeInterest) Reset

func (m *ChaincodeInterest) Reset()

func (*ChaincodeInterest) String

func (m *ChaincodeInterest) String() string

func (*ChaincodeInterest) XXX_DiscardUnknown

func (m *ChaincodeInterest) XXX_DiscardUnknown()

func (*ChaincodeInterest) XXX_Marshal

func (m *ChaincodeInterest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ChaincodeInterest) XXX_Merge

func (dst *ChaincodeInterest) XXX_Merge(src proto.Message)

func (*ChaincodeInterest) XXX_Size

func (m *ChaincodeInterest) XXX_Size() int

func (*ChaincodeInterest) XXX_Unmarshal

func (m *ChaincodeInterest) XXX_Unmarshal(b []byte) error

type ChaincodeQuery

type ChaincodeQuery struct {
	Interests            []*ChaincodeInterest `protobuf:"bytes,1,rep,name=interests,proto3" json:"interests,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

chaincodequery为给定的请求chaincodequeryresults 链码调用列表。 每个调用都是一个单独的调用,并且认可策略 对每个给定的兴趣进行独立评估。

func (*ChaincodeQuery) Descriptor

func (*ChaincodeQuery) Descriptor() ([]byte, []int)

func (*ChaincodeQuery) GetInterests

func (m *ChaincodeQuery) GetInterests() []*ChaincodeInterest

func (*ChaincodeQuery) ProtoMessage

func (*ChaincodeQuery) ProtoMessage()

func (*ChaincodeQuery) Reset

func (m *ChaincodeQuery) Reset()

func (*ChaincodeQuery) String

func (m *ChaincodeQuery) String() string

func (*ChaincodeQuery) XXX_DiscardUnknown

func (m *ChaincodeQuery) XXX_DiscardUnknown()

func (*ChaincodeQuery) XXX_Marshal

func (m *ChaincodeQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ChaincodeQuery) XXX_Merge

func (dst *ChaincodeQuery) XXX_Merge(src proto.Message)

func (*ChaincodeQuery) XXX_Size

func (m *ChaincodeQuery) XXX_Size() int

func (*ChaincodeQuery) XXX_Unmarshal

func (m *ChaincodeQuery) XXX_Unmarshal(b []byte) error

type ChaincodeQueryResult

type ChaincodeQueryResult struct {
	Content              []*EndorsementDescriptor `protobuf:"bytes,1,rep,name=content,proto3" json:"content,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                 `json:"-"`
	XXX_unrecognized     []byte                   `json:"-"`
	XXX_sizecache        int32                    `json:"-"`
}

chaincodequeryresult包含的背书描述符 链码

func (*ChaincodeQueryResult) Descriptor

func (*ChaincodeQueryResult) Descriptor() ([]byte, []int)

func (*ChaincodeQueryResult) GetContent

func (m *ChaincodeQueryResult) GetContent() []*EndorsementDescriptor

func (*ChaincodeQueryResult) ProtoMessage

func (*ChaincodeQueryResult) ProtoMessage()

func (*ChaincodeQueryResult) Reset

func (m *ChaincodeQueryResult) Reset()

func (*ChaincodeQueryResult) String

func (m *ChaincodeQueryResult) String() string

func (*ChaincodeQueryResult) XXX_DiscardUnknown

func (m *ChaincodeQueryResult) XXX_DiscardUnknown()

func (*ChaincodeQueryResult) XXX_Marshal

func (m *ChaincodeQueryResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ChaincodeQueryResult) XXX_Merge

func (dst *ChaincodeQueryResult) XXX_Merge(src proto.Message)

func (*ChaincodeQueryResult) XXX_Size

func (m *ChaincodeQueryResult) XXX_Size() int

func (*ChaincodeQueryResult) XXX_Unmarshal

func (m *ChaincodeQueryResult) XXX_Unmarshal(b []byte) error

type ConfigQuery

type ConfigQuery struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

configquery请求configresult

func (*ConfigQuery) Descriptor

func (*ConfigQuery) Descriptor() ([]byte, []int)

func (*ConfigQuery) ProtoMessage

func (*ConfigQuery) ProtoMessage()

func (*ConfigQuery) Reset

func (m *ConfigQuery) Reset()

func (*ConfigQuery) String

func (m *ConfigQuery) String() string

func (*ConfigQuery) XXX_DiscardUnknown

func (m *ConfigQuery) XXX_DiscardUnknown()

func (*ConfigQuery) XXX_Marshal

func (m *ConfigQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConfigQuery) XXX_Merge

func (dst *ConfigQuery) XXX_Merge(src proto.Message)

func (*ConfigQuery) XXX_Size

func (m *ConfigQuery) XXX_Size() int

func (*ConfigQuery) XXX_Unmarshal

func (m *ConfigQuery) XXX_Unmarshal(b []byte) error

type ConfigResult

type ConfigResult struct {
	//msps是从msp_id到fabricmspconfig的映射
	Msps map[string]*msp.FabricMSPConfig `` /* 149-byte string literal not displayed */
	//医嘱者是从msp_id到医嘱者端点列表的映射
	Orderers             map[string]*Endpoints `` /* 157-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
	XXX_unrecognized     []byte                `json:"-"`
	XXX_sizecache        int32                 `json:"-"`
}

func (*ConfigResult) Descriptor

func (*ConfigResult) Descriptor() ([]byte, []int)

func (*ConfigResult) GetMsps

func (m *ConfigResult) GetMsps() map[string]*msp.FabricMSPConfig

func (*ConfigResult) GetOrderers

func (m *ConfigResult) GetOrderers() map[string]*Endpoints

func (*ConfigResult) ProtoMessage

func (*ConfigResult) ProtoMessage()

func (*ConfigResult) Reset

func (m *ConfigResult) Reset()

func (*ConfigResult) String

func (m *ConfigResult) String() string

func (*ConfigResult) XXX_DiscardUnknown

func (m *ConfigResult) XXX_DiscardUnknown()

func (*ConfigResult) XXX_Marshal

func (m *ConfigResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConfigResult) XXX_Merge

func (dst *ConfigResult) XXX_Merge(src proto.Message)

func (*ConfigResult) XXX_Size

func (m *ConfigResult) XXX_Size() int

func (*ConfigResult) XXX_Unmarshal

func (m *ConfigResult) XXX_Unmarshal(b []byte) error

type DiscoveryClient

type DiscoveryClient interface {
	//发现收到签名请求,并返回响应。
	Discover(ctx context.Context, in *SignedRequest, opts ...grpc.CallOption) (*Response, error)
}

DiscoveryClient是用于发现服务的客户端API。

有关CTX使用和关闭/结束流式RPC的语义,请参阅https://godoc.org/google.golang.org/grpc clientconn.newstream。

func NewDiscoveryClient

func NewDiscoveryClient(cc *grpc.ClientConn) DiscoveryClient

type DiscoveryServer

type DiscoveryServer interface {
	//发现收到签名请求,并返回响应。
	Discover(context.Context, *SignedRequest) (*Response, error)
}

DiscoveryServer是发现服务的服务器API。

type EndorsementDescriptor

type EndorsementDescriptor struct {
	Chaincode string `protobuf:"bytes,1,opt,name=chaincode,proto3" json:"chaincode,omitempty"`
	//指定按组分隔的背书人。
	EndorsersByGroups map[string]*Peers `` /* 202-byte string literal not displayed */
	//指定用于填充背书策略的选项。
	//每个选项都列出组名和所需签名的数量。
	//来自每组。
	Layouts              []*Layout `protobuf:"bytes,3,rep,name=layouts,proto3" json:"layouts,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

背书描述符包含有关可以使用哪些对等方的信息 要求背书,使背书政策得以履行。 下面是如何计算一组对等点以向其请求背书,给定一个背书描述符: 让e:g->p成为将一个组映射到一组对等方的“背书人”字段。 注意,在G组上应用e会产生一组对等体。 1)从给定的布局中选择布局l:g->n。 L是布局的“按组的数量”字段,它将组映射为整数。 2)R=(一组空的对等点) 3)对于布局L中的每组G,计算n=l(g) 3.1)将p_g表示为一组n个随机对等点p0,p1,…p_n从e(g)中选择 3.2)r=r u p_g(加p_g至r) 4)对等方r是客户要求背书的对等方。

func (*EndorsementDescriptor) Descriptor

func (*EndorsementDescriptor) Descriptor() ([]byte, []int)

func (*EndorsementDescriptor) GetChaincode

func (m *EndorsementDescriptor) GetChaincode() string

func (*EndorsementDescriptor) GetEndorsersByGroups

func (m *EndorsementDescriptor) GetEndorsersByGroups() map[string]*Peers

func (*EndorsementDescriptor) GetLayouts

func (m *EndorsementDescriptor) GetLayouts() []*Layout

func (*EndorsementDescriptor) ProtoMessage

func (*EndorsementDescriptor) ProtoMessage()

func (*EndorsementDescriptor) Reset

func (m *EndorsementDescriptor) Reset()

func (*EndorsementDescriptor) String

func (m *EndorsementDescriptor) String() string

func (*EndorsementDescriptor) XXX_DiscardUnknown

func (m *EndorsementDescriptor) XXX_DiscardUnknown()

func (*EndorsementDescriptor) XXX_Marshal

func (m *EndorsementDescriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EndorsementDescriptor) XXX_Merge

func (dst *EndorsementDescriptor) XXX_Merge(src proto.Message)

func (*EndorsementDescriptor) XXX_Size

func (m *EndorsementDescriptor) XXX_Size() int

func (*EndorsementDescriptor) XXX_Unmarshal

func (m *EndorsementDescriptor) XXX_Unmarshal(b []byte) error

type Endpoint

type Endpoint struct {
	Host                 string   `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
	Port                 uint32   `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

端点是主机和端口的组合

func (*Endpoint) Descriptor

func (*Endpoint) Descriptor() ([]byte, []int)

func (*Endpoint) GetHost

func (m *Endpoint) GetHost() string

func (*Endpoint) GetPort

func (m *Endpoint) GetPort() uint32

func (*Endpoint) ProtoMessage

func (*Endpoint) ProtoMessage()

func (*Endpoint) Reset

func (m *Endpoint) Reset()

func (*Endpoint) String

func (m *Endpoint) String() string

func (*Endpoint) XXX_DiscardUnknown

func (m *Endpoint) XXX_DiscardUnknown()

func (*Endpoint) XXX_Marshal

func (m *Endpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Endpoint) XXX_Merge

func (dst *Endpoint) XXX_Merge(src proto.Message)

func (*Endpoint) XXX_Size

func (m *Endpoint) XXX_Size() int

func (*Endpoint) XXX_Unmarshal

func (m *Endpoint) XXX_Unmarshal(b []byte) error

type Endpoints

type Endpoints struct {
	Endpoint             []*Endpoint `protobuf:"bytes,1,rep,name=endpoint,proto3" json:"endpoint,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

端点是端点列表

func (*Endpoints) Descriptor

func (*Endpoints) Descriptor() ([]byte, []int)

func (*Endpoints) GetEndpoint

func (m *Endpoints) GetEndpoint() []*Endpoint

func (*Endpoints) ProtoMessage

func (*Endpoints) ProtoMessage()

func (*Endpoints) Reset

func (m *Endpoints) Reset()

func (*Endpoints) String

func (m *Endpoints) String() string

func (*Endpoints) XXX_DiscardUnknown

func (m *Endpoints) XXX_DiscardUnknown()

func (*Endpoints) XXX_Marshal

func (m *Endpoints) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Endpoints) XXX_Merge

func (dst *Endpoints) XXX_Merge(src proto.Message)

func (*Endpoints) XXX_Size

func (m *Endpoints) XXX_Size() int

func (*Endpoints) XXX_Unmarshal

func (m *Endpoints) XXX_Unmarshal(b []byte) error

type Error

type Error struct {
	Content              string   `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

错误表示发生错误并包含错误消息

func (*Error) Descriptor

func (*Error) Descriptor() ([]byte, []int)

func (*Error) GetContent

func (m *Error) GetContent() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) Reset

func (m *Error) Reset()

func (*Error) String

func (m *Error) String() string

func (*Error) XXX_DiscardUnknown

func (m *Error) XXX_DiscardUnknown()

func (*Error) XXX_Marshal

func (m *Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Error) XXX_Merge

func (dst *Error) XXX_Merge(src proto.Message)

func (*Error) XXX_Size

func (m *Error) XXX_Size() int

func (*Error) XXX_Unmarshal

func (m *Error) XXX_Unmarshal(b []byte) error

type Layout

type Layout struct {
	//指定每个组的非重复签名数
	//需要背书
	QuantitiesByGroup    map[string]uint32 `` /* 203-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

布局包含从组名到对等数的映射 这是履行代言政策所必需的

func (*Layout) Descriptor

func (*Layout) Descriptor() ([]byte, []int)

func (*Layout) GetQuantitiesByGroup

func (m *Layout) GetQuantitiesByGroup() map[string]uint32

func (*Layout) ProtoMessage

func (*Layout) ProtoMessage()

func (*Layout) Reset

func (m *Layout) Reset()

func (*Layout) String

func (m *Layout) String() string

func (*Layout) XXX_DiscardUnknown

func (m *Layout) XXX_DiscardUnknown()

func (*Layout) XXX_Marshal

func (m *Layout) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Layout) XXX_Merge

func (dst *Layout) XXX_Merge(src proto.Message)

func (*Layout) XXX_Size

func (m *Layout) XXX_Size() int

func (*Layout) XXX_Unmarshal

func (m *Layout) XXX_Unmarshal(b []byte) error

type LocalPeerQuery

type LocalPeerQuery struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

非通道上下文中对等的localpeerquery查询

func (*LocalPeerQuery) Descriptor

func (*LocalPeerQuery) Descriptor() ([]byte, []int)

func (*LocalPeerQuery) ProtoMessage

func (*LocalPeerQuery) ProtoMessage()

func (*LocalPeerQuery) Reset

func (m *LocalPeerQuery) Reset()

func (*LocalPeerQuery) String

func (m *LocalPeerQuery) String() string

func (*LocalPeerQuery) XXX_DiscardUnknown

func (m *LocalPeerQuery) XXX_DiscardUnknown()

func (*LocalPeerQuery) XXX_Marshal

func (m *LocalPeerQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LocalPeerQuery) XXX_Merge

func (dst *LocalPeerQuery) XXX_Merge(src proto.Message)

func (*LocalPeerQuery) XXX_Size

func (m *LocalPeerQuery) XXX_Size() int

func (*LocalPeerQuery) XXX_Unmarshal

func (m *LocalPeerQuery) XXX_Unmarshal(b []byte) error

type Peer

type Peer struct {
	//这是一个带有八卦.stateinfo消息的八卦消息的信封
	StateInfo *gossip.Envelope `protobuf:"bytes,1,opt,name=state_info,json=stateInfo,proto3" json:"state_info,omitempty"`
	//这是一个带有八卦消息的八卦消息的信封。
	MembershipInfo *gossip.Envelope `protobuf:"bytes,2,opt,name=membership_info,json=membershipInfo,proto3" json:"membership_info,omitempty"`
	//这是对等机的msp.serialididEntity,以字节表示。
	Identity             []byte   `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

对等端包含有关对等端的信息,例如其特定于通道的信息 州和会员信息。

func (*Peer) Descriptor

func (*Peer) Descriptor() ([]byte, []int)

func (*Peer) GetIdentity

func (m *Peer) GetIdentity() []byte

func (*Peer) GetMembershipInfo

func (m *Peer) GetMembershipInfo() *gossip.Envelope

func (*Peer) GetStateInfo

func (m *Peer) GetStateInfo() *gossip.Envelope

func (*Peer) ProtoMessage

func (*Peer) ProtoMessage()

func (*Peer) Reset

func (m *Peer) Reset()

func (*Peer) String

func (m *Peer) String() string

func (*Peer) XXX_DiscardUnknown

func (m *Peer) XXX_DiscardUnknown()

func (*Peer) XXX_Marshal

func (m *Peer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Peer) XXX_Merge

func (dst *Peer) XXX_Merge(src proto.Message)

func (*Peer) XXX_Size

func (m *Peer) XXX_Size() int

func (*Peer) XXX_Unmarshal

func (m *Peer) XXX_Unmarshal(b []byte) error

type PeerMembershipQuery

type PeerMembershipQuery struct {
	Filter               *ChaincodeInterest `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

peermembershipquery请求peermembershipresult。 筛选字段可以按顺序可选地填充。 对于要根据筛选的对等成员身份 安装在对等端和集合上的链码 访问控制策略。

func (*PeerMembershipQuery) Descriptor

func (*PeerMembershipQuery) Descriptor() ([]byte, []int)

func (*PeerMembershipQuery) GetFilter

func (m *PeerMembershipQuery) GetFilter() *ChaincodeInterest

func (*PeerMembershipQuery) ProtoMessage

func (*PeerMembershipQuery) ProtoMessage()

func (*PeerMembershipQuery) Reset

func (m *PeerMembershipQuery) Reset()

func (*PeerMembershipQuery) String

func (m *PeerMembershipQuery) String() string

func (*PeerMembershipQuery) XXX_DiscardUnknown

func (m *PeerMembershipQuery) XXX_DiscardUnknown()

func (*PeerMembershipQuery) XXX_Marshal

func (m *PeerMembershipQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PeerMembershipQuery) XXX_Merge

func (dst *PeerMembershipQuery) XXX_Merge(src proto.Message)

func (*PeerMembershipQuery) XXX_Size

func (m *PeerMembershipQuery) XXX_Size() int

func (*PeerMembershipQuery) XXX_Unmarshal

func (m *PeerMembershipQuery) XXX_Unmarshal(b []byte) error

type PeerMembershipResult

type PeerMembershipResult struct {
	PeersByOrg           map[string]*Peers `` /* 181-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

peermembershipresult包含由其组织映射的对等方(msp_id)

func (*PeerMembershipResult) Descriptor

func (*PeerMembershipResult) Descriptor() ([]byte, []int)

func (*PeerMembershipResult) GetPeersByOrg

func (m *PeerMembershipResult) GetPeersByOrg() map[string]*Peers

func (*PeerMembershipResult) ProtoMessage

func (*PeerMembershipResult) ProtoMessage()

func (*PeerMembershipResult) Reset

func (m *PeerMembershipResult) Reset()

func (*PeerMembershipResult) String

func (m *PeerMembershipResult) String() string

func (*PeerMembershipResult) XXX_DiscardUnknown

func (m *PeerMembershipResult) XXX_DiscardUnknown()

func (*PeerMembershipResult) XXX_Marshal

func (m *PeerMembershipResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PeerMembershipResult) XXX_Merge

func (dst *PeerMembershipResult) XXX_Merge(src proto.Message)

func (*PeerMembershipResult) XXX_Size

func (m *PeerMembershipResult) XXX_Size() int

func (*PeerMembershipResult) XXX_Unmarshal

func (m *PeerMembershipResult) XXX_Unmarshal(b []byte) error

type Peers

type Peers struct {
	Peers                []*Peer  `protobuf:"bytes,1,rep,name=peers,proto3" json:"peers,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

对等方包含对等方列表

func (*Peers) Descriptor

func (*Peers) Descriptor() ([]byte, []int)

func (*Peers) GetPeers

func (m *Peers) GetPeers() []*Peer

func (*Peers) ProtoMessage

func (*Peers) ProtoMessage()

func (*Peers) Reset

func (m *Peers) Reset()

func (*Peers) String

func (m *Peers) String() string

func (*Peers) XXX_DiscardUnknown

func (m *Peers) XXX_DiscardUnknown()

func (*Peers) XXX_Marshal

func (m *Peers) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Peers) XXX_Merge

func (dst *Peers) XXX_Merge(src proto.Message)

func (*Peers) XXX_Size

func (m *Peers) XXX_Size() int

func (*Peers) XXX_Unmarshal

func (m *Peers) XXX_Unmarshal(b []byte) error

type Query

type Query struct {
	Channel string `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel,omitempty"`
	//有效分配给查询的类型:
	//*查询配置查询
	//*查询对等查询
	//*QualyCccQuQuy
	//*查询本地对等
	Query                isQuery_Query `protobuf_oneof:"query"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

查询请求特定通道上下文中的信息

func (*Query) Descriptor

func (*Query) Descriptor() ([]byte, []int)

func (*Query) GetCcQuery

func (m *Query) GetCcQuery() *ChaincodeQuery

func (*Query) GetChannel

func (m *Query) GetChannel() string

func (*Query) GetConfigQuery

func (m *Query) GetConfigQuery() *ConfigQuery

func (*Query) GetLocalPeers

func (m *Query) GetLocalPeers() *LocalPeerQuery

func (*Query) GetPeerQuery

func (m *Query) GetPeerQuery() *PeerMembershipQuery

func (*Query) GetQuery

func (m *Query) GetQuery() isQuery_Query

func (*Query) GetType

func (q *Query) GetType() QueryType

GetType返回请求的类型

func (*Query) ProtoMessage

func (*Query) ProtoMessage()

func (*Query) Reset

func (m *Query) Reset()

func (*Query) String

func (m *Query) String() string

func (*Query) XXX_DiscardUnknown

func (m *Query) XXX_DiscardUnknown()

func (*Query) XXX_Marshal

func (m *Query) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Query) XXX_Merge

func (dst *Query) XXX_Merge(src proto.Message)

func (*Query) XXX_OneofFuncs

func (*Query) 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{})

xxxoneoffuncs用于Proto包的内部使用。

func (*Query) XXX_Size

func (m *Query) XXX_Size() int

func (*Query) XXX_Unmarshal

func (m *Query) XXX_Unmarshal(b []byte) error

type QueryResult

type QueryResult struct {
	//有效分配给结果的类型:
	//*查询结果\错误
	//*查询结果配置结果
	//*查询结果
	//*查询结果\成员
	Result               isQueryResult_Result `protobuf_oneof:"result"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

query result包含给定查询的结果。 通过查询结果的索引可以推断出相应的查询 它的封闭响应消息。 查询结果的顺序与查询在其封闭请求中的顺序相同。

func (*QueryResult) Descriptor

func (*QueryResult) Descriptor() ([]byte, []int)

func (*QueryResult) GetCcQueryRes

func (m *QueryResult) GetCcQueryRes() *ChaincodeQueryResult

func (*QueryResult) GetConfigResult

func (m *QueryResult) GetConfigResult() *ConfigResult

func (*QueryResult) GetError

func (m *QueryResult) GetError() *Error

func (*QueryResult) GetMembers

func (m *QueryResult) GetMembers() *PeerMembershipResult

func (*QueryResult) GetResult

func (m *QueryResult) GetResult() isQueryResult_Result

func (*QueryResult) ProtoMessage

func (*QueryResult) ProtoMessage()

func (*QueryResult) Reset

func (m *QueryResult) Reset()

func (*QueryResult) String

func (m *QueryResult) String() string

func (*QueryResult) XXX_DiscardUnknown

func (m *QueryResult) XXX_DiscardUnknown()

func (*QueryResult) XXX_Marshal

func (m *QueryResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryResult) XXX_Merge

func (dst *QueryResult) XXX_Merge(src proto.Message)

func (*QueryResult) XXX_OneofFuncs

func (*QueryResult) 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{})

xxxoneoffuncs用于Proto包的内部使用。

func (*QueryResult) XXX_Size

func (m *QueryResult) XXX_Size() int

func (*QueryResult) XXX_Unmarshal

func (m *QueryResult) XXX_Unmarshal(b []byte) error

type QueryResult_CcQueryRes

type QueryResult_CcQueryRes struct {
	CcQueryRes *ChaincodeQueryResult `protobuf:"bytes,3,opt,name=cc_query_res,json=ccQueryRes,proto3,oneof"`
}

type QueryResult_ConfigResult

type QueryResult_ConfigResult struct {
	ConfigResult *ConfigResult `protobuf:"bytes,2,opt,name=config_result,json=configResult,proto3,oneof"`
}

type QueryResult_Error

type QueryResult_Error struct {
	Error *Error `protobuf:"bytes,1,opt,name=error,proto3,oneof"`
}

type QueryResult_Members

type QueryResult_Members struct {
	Members *PeerMembershipResult `protobuf:"bytes,4,opt,name=members,proto3,oneof"`
}

type QueryType

type QueryType uint8

querytype定义服务发现请求的类型

const (
	InvalidQueryType QueryType = iota
	ConfigQueryType
	PeerMembershipQueryType
	ChaincodeQueryType
	LocalMembershipQueryType
)

type Query_CcQuery

type Query_CcQuery struct {
	CcQuery *ChaincodeQuery `protobuf:"bytes,4,opt,name=cc_query,json=ccQuery,proto3,oneof"`
}

type Query_ConfigQuery

type Query_ConfigQuery struct {
	ConfigQuery *ConfigQuery `protobuf:"bytes,2,opt,name=config_query,json=configQuery,proto3,oneof"`
}

type Query_LocalPeers

type Query_LocalPeers struct {
	LocalPeers *LocalPeerQuery `protobuf:"bytes,5,opt,name=local_peers,json=localPeers,proto3,oneof"`
}

type Query_PeerQuery

type Query_PeerQuery struct {
	PeerQuery *PeerMembershipQuery `protobuf:"bytes,3,opt,name=peer_query,json=peerQuery,proto3,oneof"`
}

type Request

type Request struct {
	//身份验证包含服务用于检查的信息
	//客户的查询资格。
	Authentication *AuthInfo `protobuf:"bytes,1,opt,name=authentication,proto3" json:"authentication,omitempty"`
	//查询
	Queries              []*Query `protobuf:"bytes,2,rep,name=queries,proto3" json:"queries,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

请求包含有关发送请求的客户端的身份验证信息 以及它希望查询服务的查询

func (*Request) Descriptor

func (*Request) Descriptor() ([]byte, []int)

func (*Request) GetAuthentication

func (m *Request) GetAuthentication() *AuthInfo

func (*Request) GetQueries

func (m *Request) GetQueries() []*Query

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) String

func (m *Request) String() string

func (*Request) XXX_DiscardUnknown

func (m *Request) XXX_DiscardUnknown()

func (*Request) XXX_Marshal

func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Request) XXX_Merge

func (dst *Request) XXX_Merge(src proto.Message)

func (*Request) XXX_Size

func (m *Request) XXX_Size() int

func (*Request) XXX_Unmarshal

func (m *Request) XXX_Unmarshal(b []byte) error

type Response

type Response struct {
	//结果按查询的相同顺序返回
	Results              []*QueryResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func (*Response) ConfigAt

func (m *Response) ConfigAt(i int) (*ConfigResult, *Error)

configat返回响应中给定索引的configresult, 或错误(如果存在)。

func (*Response) Descriptor

func (*Response) Descriptor() ([]byte, []int)

func (*Response) EndorsersAt

func (m *Response) EndorsersAt(i int) (*ChaincodeQueryResult, *Error)

背书返回响应中给定索引处的对等成员身份结果, 或错误(如果存在)。

func (*Response) GetResults

func (m *Response) GetResults() []*QueryResult

func (*Response) MembershipAt

func (m *Response) MembershipAt(i int) (*PeerMembershipResult, *Error)

membershipat返回响应中给定索引处的peermembershipresult, 或错误(如果存在)。

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) String

func (m *Response) String() string

func (*Response) XXX_DiscardUnknown

func (m *Response) XXX_DiscardUnknown()

func (*Response) XXX_Marshal

func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Response) XXX_Merge

func (dst *Response) XXX_Merge(src proto.Message)

func (*Response) XXX_Size

func (m *Response) XXX_Size() int

func (*Response) XXX_Unmarshal

func (m *Response) XXX_Unmarshal(b []byte) error

type SignedRequest

type SignedRequest struct {
	Payload              []byte   `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	Signature            []byte   `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

SignedRequest在有效负载字段中包含一个序列化请求 还有签名。 用于验证签名的标识 可以从authinfo类型的身份验证字段中提取 在对请求进行反序列化之后。

func (*SignedRequest) Descriptor

func (*SignedRequest) Descriptor() ([]byte, []int)

func (*SignedRequest) GetPayload

func (m *SignedRequest) GetPayload() []byte

func (*SignedRequest) GetSignature

func (m *SignedRequest) GetSignature() []byte

func (*SignedRequest) ProtoMessage

func (*SignedRequest) ProtoMessage()

func (*SignedRequest) Reset

func (m *SignedRequest) Reset()

func (*SignedRequest) String

func (m *SignedRequest) String() string

func (*SignedRequest) ToRequest

func (sr *SignedRequest) ToRequest() (*Request, error)

ToRequest反序列化此SignedRequest的负载 并以其对象形式返回序列化请求。 如果操作失败,则返回错误。

func (*SignedRequest) XXX_DiscardUnknown

func (m *SignedRequest) XXX_DiscardUnknown()

func (*SignedRequest) XXX_Marshal

func (m *SignedRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SignedRequest) XXX_Merge

func (dst *SignedRequest) XXX_Merge(src proto.Message)

func (*SignedRequest) XXX_Size

func (m *SignedRequest) XXX_Size() int

func (*SignedRequest) XXX_Unmarshal

func (m *SignedRequest) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL