discovery

package
v0.0.0-...-79afef5 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Discovery_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "discovery.Discovery",
	HandlerType: (*DiscoveryServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Discover",
			Handler:    _Discovery_Discover_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "discovery/protocol.proto",
}

Discovery_ServiceDesc is the grpc.ServiceDesc for Discovery service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_discovery_protocol_proto protoreflect.FileDescriptor

Functions

func RegisterDiscoveryServer

func RegisterDiscoveryServer(s grpc.ServiceRegistrar, srv DiscoveryServer)

Types

type AuthInfo

type AuthInfo struct {

	// This is the identity of the client that is used to verify the signature
	// on the SignedRequest's payload.
	// It is a msp.SerializedIdentity in bytes form
	ClientIdentity []byte `protobuf:"bytes,1,opt,name=client_identity,json=clientIdentity,proto3" json:"client_identity,omitempty"`
	// This is the hash of the client's TLS cert.
	// When the network is running with TLS, clients that don't include a certificate
	// will be denied access to the service.
	// Since the Request is encapsulated with a SignedRequest (which is signed),
	// this binds the TLS session to the enrollement identity of the client and
	// therefore both authenticates the client to the server,
	// and also prevents the server from relaying the request message to another server.
	ClientTlsCertHash []byte `protobuf:"bytes,2,opt,name=client_tls_cert_hash,json=clientTlsCertHash,proto3" json:"client_tls_cert_hash,omitempty"`
	// contains filtered or unexported fields
}

AuthInfo aggregates authentication information that the server uses to authenticate the client

func (*AuthInfo) Descriptor deprecated

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

Deprecated: Use AuthInfo.ProtoReflect.Descriptor instead.

func (*AuthInfo) GetClientIdentity

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

func (*AuthInfo) GetClientTlsCertHash

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

func (*AuthInfo) ProtoMessage

func (*AuthInfo) ProtoMessage()

func (*AuthInfo) ProtoReflect

func (x *AuthInfo) ProtoReflect() protoreflect.Message

func (*AuthInfo) Reset

func (x *AuthInfo) Reset()

func (*AuthInfo) String

func (x *AuthInfo) String() string

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"`
	NoPrivateReads  bool     `protobuf:"varint,3,opt,name=no_private_reads,json=noPrivateReads,proto3" json:"no_private_reads,omitempty"` // Indicates we do not need to read from private data
	NoPublicWrites  bool     `protobuf:"varint,4,opt,name=no_public_writes,json=noPublicWrites,proto3" json:"no_public_writes,omitempty"` // Indicates we do not need to write to the chaincode namespace
	// contains filtered or unexported fields
}

ChaincodeCall defines a call to a chaincode. It may have collections that are related to the chaincode

func (*ChaincodeCall) Descriptor deprecated

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

Deprecated: Use ChaincodeCall.ProtoReflect.Descriptor instead.

func (*ChaincodeCall) GetCollectionNames

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

func (*ChaincodeCall) GetName

func (x *ChaincodeCall) GetName() string

func (*ChaincodeCall) GetNoPrivateReads

func (x *ChaincodeCall) GetNoPrivateReads() bool

func (*ChaincodeCall) GetNoPublicWrites

func (x *ChaincodeCall) GetNoPublicWrites() bool

func (*ChaincodeCall) ProtoMessage

func (*ChaincodeCall) ProtoMessage()

func (*ChaincodeCall) ProtoReflect

func (x *ChaincodeCall) ProtoReflect() protoreflect.Message

func (*ChaincodeCall) Reset

func (x *ChaincodeCall) Reset()

func (*ChaincodeCall) String

func (x *ChaincodeCall) String() string

type ChaincodeInterest

type ChaincodeInterest struct {
	Chaincodes []*ChaincodeCall `protobuf:"bytes,1,rep,name=chaincodes,proto3" json:"chaincodes,omitempty"`
	// contains filtered or unexported fields
}

ChaincodeInterest defines an interest about an endorsement for a specific single chaincode invocation. Multiple chaincodes indicate chaincode to chaincode invocations.

func (*ChaincodeInterest) Descriptor deprecated

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

Deprecated: Use ChaincodeInterest.ProtoReflect.Descriptor instead.

func (*ChaincodeInterest) GetChaincodes

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

func (*ChaincodeInterest) ProtoMessage

func (*ChaincodeInterest) ProtoMessage()

func (*ChaincodeInterest) ProtoReflect

func (x *ChaincodeInterest) ProtoReflect() protoreflect.Message

func (*ChaincodeInterest) Reset

func (x *ChaincodeInterest) Reset()

func (*ChaincodeInterest) String

func (x *ChaincodeInterest) String() string

type ChaincodeQuery

type ChaincodeQuery struct {
	Interests []*ChaincodeInterest `protobuf:"bytes,1,rep,name=interests,proto3" json:"interests,omitempty"`
	// contains filtered or unexported fields
}

ChaincodeQuery requests ChaincodeQueryResults for a given list of chaincode invocations. Each invocation is a separate one, and the endorsement policy is evaluated independantly for each given interest.

func (*ChaincodeQuery) Descriptor deprecated

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

Deprecated: Use ChaincodeQuery.ProtoReflect.Descriptor instead.

func (*ChaincodeQuery) GetInterests

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

func (*ChaincodeQuery) ProtoMessage

func (*ChaincodeQuery) ProtoMessage()

func (*ChaincodeQuery) ProtoReflect

func (x *ChaincodeQuery) ProtoReflect() protoreflect.Message

func (*ChaincodeQuery) Reset

func (x *ChaincodeQuery) Reset()

func (*ChaincodeQuery) String

func (x *ChaincodeQuery) String() string

type ChaincodeQueryResult

type ChaincodeQueryResult struct {
	Content []*EndorsementDescriptor `protobuf:"bytes,1,rep,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

ChaincodeQueryResult contains EndorsementDescriptors for chaincodes

func (*ChaincodeQueryResult) Descriptor deprecated

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

Deprecated: Use ChaincodeQueryResult.ProtoReflect.Descriptor instead.

func (*ChaincodeQueryResult) GetContent

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

func (*ChaincodeQueryResult) ProtoMessage

func (*ChaincodeQueryResult) ProtoMessage()

func (*ChaincodeQueryResult) ProtoReflect

func (x *ChaincodeQueryResult) ProtoReflect() protoreflect.Message

func (*ChaincodeQueryResult) Reset

func (x *ChaincodeQueryResult) Reset()

func (*ChaincodeQueryResult) String

func (x *ChaincodeQueryResult) String() string

type ConfigQuery

type ConfigQuery struct {
	// contains filtered or unexported fields
}

ConfigQuery requests a ConfigResult

func (*ConfigQuery) Descriptor deprecated

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

Deprecated: Use ConfigQuery.ProtoReflect.Descriptor instead.

func (*ConfigQuery) ProtoMessage

func (*ConfigQuery) ProtoMessage()

func (*ConfigQuery) ProtoReflect

func (x *ConfigQuery) ProtoReflect() protoreflect.Message

func (*ConfigQuery) Reset

func (x *ConfigQuery) Reset()

func (*ConfigQuery) String

func (x *ConfigQuery) String() string

type ConfigResult

type ConfigResult struct {

	// msps is a map from MSP_ID to FabricMSPConfig
	Msps map[string]*msp.FabricMSPConfig `` /* 149-byte string literal not displayed */
	// orderers is a map from MSP_ID to endpoint lists of orderers
	Orderers map[string]*Endpoints `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ConfigResult) Descriptor deprecated

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

Deprecated: Use ConfigResult.ProtoReflect.Descriptor instead.

func (*ConfigResult) GetMsps

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

func (*ConfigResult) GetOrderers

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

func (*ConfigResult) ProtoMessage

func (*ConfigResult) ProtoMessage()

func (*ConfigResult) ProtoReflect

func (x *ConfigResult) ProtoReflect() protoreflect.Message

func (*ConfigResult) Reset

func (x *ConfigResult) Reset()

func (*ConfigResult) String

func (x *ConfigResult) String() string

type DiscoveryClient

type DiscoveryClient interface {
	// Discover receives a signed request, and returns a response.
	Discover(ctx context.Context, in *SignedRequest, opts ...grpc.CallOption) (*Response, error)
}

DiscoveryClient is the client API for Discovery service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewDiscoveryClient

func NewDiscoveryClient(cc grpc.ClientConnInterface) DiscoveryClient

type DiscoveryServer

type DiscoveryServer interface {
	// Discover receives a signed request, and returns a response.
	Discover(context.Context, *SignedRequest) (*Response, error)
	// contains filtered or unexported methods
}

DiscoveryServer is the server API for Discovery service. All implementations must embed UnimplementedDiscoveryServer for forward compatibility

type EndorsementDescriptor

type EndorsementDescriptor struct {
	Chaincode string `protobuf:"bytes,1,opt,name=chaincode,proto3" json:"chaincode,omitempty"`
	// Specifies the endorsers, separated to groups.
	EndorsersByGroups map[string]*Peers `` /* 202-byte string literal not displayed */
	// Specifies options of fulfulling the endorsement policy.
	// Each option lists the group names, and the amount of signatures needed
	// from each group.
	Layouts []*Layout `protobuf:"bytes,3,rep,name=layouts,proto3" json:"layouts,omitempty"`
	// contains filtered or unexported fields
}

EndorsementDescriptor contains information about which peers can be used to request endorsement from, such that the endorsement policy would be fulfilled. Here is how to compute a set of peers to ask an endorsement from, given an EndorsementDescriptor: Let e: G --> P be the endorsers_by_groups field that maps a group to a set of peers. Note that applying e on a group g yields a set of peers.

  1. Select a layout l: G --> N out of the layouts given. l is the quantities_by_group field of a Layout, and it maps a group to an integer.
  2. R = {} (an empty set of peers)
  3. For each group g in the layout l, compute n = l(g) 3.1) Denote P_g as a set of n random peers {p0, p1, ... p_n} selected from e(g) 3.2) R = R U P_g (add P_g to R)
  4. The set of peers R is the peers the client needs to request endorsements from

func (*EndorsementDescriptor) Descriptor deprecated

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

Deprecated: Use EndorsementDescriptor.ProtoReflect.Descriptor instead.

func (*EndorsementDescriptor) GetChaincode

func (x *EndorsementDescriptor) GetChaincode() string

func (*EndorsementDescriptor) GetEndorsersByGroups

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

func (*EndorsementDescriptor) GetLayouts

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

func (*EndorsementDescriptor) ProtoMessage

func (*EndorsementDescriptor) ProtoMessage()

func (*EndorsementDescriptor) ProtoReflect

func (x *EndorsementDescriptor) ProtoReflect() protoreflect.Message

func (*EndorsementDescriptor) Reset

func (x *EndorsementDescriptor) Reset()

func (*EndorsementDescriptor) String

func (x *EndorsementDescriptor) String() string

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"`
	// contains filtered or unexported fields
}

Endpoint is a combination of a host and a port

func (*Endpoint) Descriptor deprecated

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

Deprecated: Use Endpoint.ProtoReflect.Descriptor instead.

func (*Endpoint) GetHost

func (x *Endpoint) GetHost() string

func (*Endpoint) GetPort

func (x *Endpoint) GetPort() uint32

func (*Endpoint) ProtoMessage

func (*Endpoint) ProtoMessage()

func (*Endpoint) ProtoReflect

func (x *Endpoint) ProtoReflect() protoreflect.Message

func (*Endpoint) Reset

func (x *Endpoint) Reset()

func (*Endpoint) String

func (x *Endpoint) String() string

type Endpoints

type Endpoints struct {
	Endpoint []*Endpoint `protobuf:"bytes,1,rep,name=endpoint,proto3" json:"endpoint,omitempty"`
	// contains filtered or unexported fields
}

Endpoints is a list of Endpoint(s)

func (*Endpoints) Descriptor deprecated

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

Deprecated: Use Endpoints.ProtoReflect.Descriptor instead.

func (*Endpoints) GetEndpoint

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

func (*Endpoints) ProtoMessage

func (*Endpoints) ProtoMessage()

func (*Endpoints) ProtoReflect

func (x *Endpoints) ProtoReflect() protoreflect.Message

func (*Endpoints) Reset

func (x *Endpoints) Reset()

func (*Endpoints) String

func (x *Endpoints) String() string

type Error

type Error struct {
	Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

Error denotes that something went wrong and contains the error message

func (*Error) Descriptor deprecated

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

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetContent

func (x *Error) GetContent() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

func (x *Error) ProtoReflect() protoreflect.Message

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

type Layout

type Layout struct {

	// Specifies how many non repeated signatures of each group
	// are needed for endorsement
	QuantitiesByGroup map[string]uint32 `` /* 203-byte string literal not displayed */
	// contains filtered or unexported fields
}

Layout contains a mapping from a group name to number of peers that are needed for fulfilling an endorsement policy

func (*Layout) Descriptor deprecated

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

Deprecated: Use Layout.ProtoReflect.Descriptor instead.

func (*Layout) GetQuantitiesByGroup

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

func (*Layout) ProtoMessage

func (*Layout) ProtoMessage()

func (*Layout) ProtoReflect

func (x *Layout) ProtoReflect() protoreflect.Message

func (*Layout) Reset

func (x *Layout) Reset()

func (*Layout) String

func (x *Layout) String() string

type LocalPeerQuery

type LocalPeerQuery struct {
	// contains filtered or unexported fields
}

LocalPeerQuery queries for peers in a non channel context

func (*LocalPeerQuery) Descriptor deprecated

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

Deprecated: Use LocalPeerQuery.ProtoReflect.Descriptor instead.

func (*LocalPeerQuery) ProtoMessage

func (*LocalPeerQuery) ProtoMessage()

func (*LocalPeerQuery) ProtoReflect

func (x *LocalPeerQuery) ProtoReflect() protoreflect.Message

func (*LocalPeerQuery) Reset

func (x *LocalPeerQuery) Reset()

func (*LocalPeerQuery) String

func (x *LocalPeerQuery) String() string

type Peer

type Peer struct {

	// This is an Envelope of a GossipMessage with a gossip.StateInfo message
	StateInfo *gossip.Envelope `protobuf:"bytes,1,opt,name=state_info,json=stateInfo,proto3" json:"state_info,omitempty"`
	// This is an Envelope of a GossipMessage with a gossip.AliveMessage message
	MembershipInfo *gossip.Envelope `protobuf:"bytes,2,opt,name=membership_info,json=membershipInfo,proto3" json:"membership_info,omitempty"`
	// This is the msp.SerializedIdentity of the peer, represented in bytes.
	Identity []byte `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"`
	// contains filtered or unexported fields
}

Peer contains information about the peer such as its channel specific state, and membership information.

func (*Peer) Descriptor deprecated

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

Deprecated: Use Peer.ProtoReflect.Descriptor instead.

func (*Peer) GetIdentity

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

func (*Peer) GetMembershipInfo

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

func (*Peer) GetStateInfo

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

func (*Peer) ProtoMessage

func (*Peer) ProtoMessage()

func (*Peer) ProtoReflect

func (x *Peer) ProtoReflect() protoreflect.Message

func (*Peer) Reset

func (x *Peer) Reset()

func (*Peer) String

func (x *Peer) String() string

type PeerMembershipQuery

type PeerMembershipQuery struct {
	Filter *ChaincodeInterest `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"`
	// contains filtered or unexported fields
}

PeerMembershipQuery requests PeerMembershipResult. The filter field may be optionally populated in order for the peer membership to be filtered according to chaincodes that are installed on peers and collection access control policies.

func (*PeerMembershipQuery) Descriptor deprecated

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

Deprecated: Use PeerMembershipQuery.ProtoReflect.Descriptor instead.

func (*PeerMembershipQuery) GetFilter

func (x *PeerMembershipQuery) GetFilter() *ChaincodeInterest

func (*PeerMembershipQuery) ProtoMessage

func (*PeerMembershipQuery) ProtoMessage()

func (*PeerMembershipQuery) ProtoReflect

func (x *PeerMembershipQuery) ProtoReflect() protoreflect.Message

func (*PeerMembershipQuery) Reset

func (x *PeerMembershipQuery) Reset()

func (*PeerMembershipQuery) String

func (x *PeerMembershipQuery) String() string

type PeerMembershipResult

type PeerMembershipResult struct {
	PeersByOrg map[string]*Peers `` /* 181-byte string literal not displayed */
	// contains filtered or unexported fields
}

PeerMembershipResult contains peers mapped by their organizations (MSP_ID)

func (*PeerMembershipResult) Descriptor deprecated

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

Deprecated: Use PeerMembershipResult.ProtoReflect.Descriptor instead.

func (*PeerMembershipResult) GetPeersByOrg

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

func (*PeerMembershipResult) ProtoMessage

func (*PeerMembershipResult) ProtoMessage()

func (*PeerMembershipResult) ProtoReflect

func (x *PeerMembershipResult) ProtoReflect() protoreflect.Message

func (*PeerMembershipResult) Reset

func (x *PeerMembershipResult) Reset()

func (*PeerMembershipResult) String

func (x *PeerMembershipResult) String() string

type Peers

type Peers struct {
	Peers []*Peer `protobuf:"bytes,1,rep,name=peers,proto3" json:"peers,omitempty"`
	// contains filtered or unexported fields
}

Peers contains a list of Peer(s)

func (*Peers) Descriptor deprecated

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

Deprecated: Use Peers.ProtoReflect.Descriptor instead.

func (*Peers) GetPeers

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

func (*Peers) ProtoMessage

func (*Peers) ProtoMessage()

func (*Peers) ProtoReflect

func (x *Peers) ProtoReflect() protoreflect.Message

func (*Peers) Reset

func (x *Peers) Reset()

func (*Peers) String

func (x *Peers) String() string

type Query

type Query struct {
	Channel string `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel,omitempty"`
	// Types that are assignable to Query:
	//	*Query_ConfigQuery
	//	*Query_PeerQuery
	//	*Query_CcQuery
	//	*Query_LocalPeers
	Query isQuery_Query `protobuf_oneof:"query"`
	// contains filtered or unexported fields
}

Query asks for information in the context of a specific channel

func (*Query) Descriptor deprecated

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

Deprecated: Use Query.ProtoReflect.Descriptor instead.

func (*Query) GetCcQuery

func (x *Query) GetCcQuery() *ChaincodeQuery

func (*Query) GetChannel

func (x *Query) GetChannel() string

func (*Query) GetConfigQuery

func (x *Query) GetConfigQuery() *ConfigQuery

func (*Query) GetLocalPeers

func (x *Query) GetLocalPeers() *LocalPeerQuery

func (*Query) GetPeerQuery

func (x *Query) GetPeerQuery() *PeerMembershipQuery

func (*Query) GetQuery

func (m *Query) GetQuery() isQuery_Query

func (*Query) ProtoMessage

func (*Query) ProtoMessage()

func (*Query) ProtoReflect

func (x *Query) ProtoReflect() protoreflect.Message

func (*Query) Reset

func (x *Query) Reset()

func (*Query) String

func (x *Query) String() string

type QueryResult

type QueryResult struct {

	// Types that are assignable to Result:
	//	*QueryResult_Error
	//	*QueryResult_ConfigResult
	//	*QueryResult_CcQueryRes
	//	*QueryResult_Members
	Result isQueryResult_Result `protobuf_oneof:"result"`
	// contains filtered or unexported fields
}

QueryResult contains a result for a given Query. The corresponding Query can be inferred by the index of the QueryResult from its enclosing Response message. QueryResults are ordered in the same order as the Queries are ordered in their enclosing Request.

func (*QueryResult) Descriptor deprecated

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

Deprecated: Use QueryResult.ProtoReflect.Descriptor instead.

func (*QueryResult) GetCcQueryRes

func (x *QueryResult) GetCcQueryRes() *ChaincodeQueryResult

func (*QueryResult) GetConfigResult

func (x *QueryResult) GetConfigResult() *ConfigResult

func (*QueryResult) GetError

func (x *QueryResult) GetError() *Error

func (*QueryResult) GetMembers

func (x *QueryResult) GetMembers() *PeerMembershipResult

func (*QueryResult) GetResult

func (m *QueryResult) GetResult() isQueryResult_Result

func (*QueryResult) ProtoMessage

func (*QueryResult) ProtoMessage()

func (*QueryResult) ProtoReflect

func (x *QueryResult) ProtoReflect() protoreflect.Message

func (*QueryResult) Reset

func (x *QueryResult) Reset()

func (*QueryResult) String

func (x *QueryResult) String() string

type QueryResult_CcQueryRes

type QueryResult_CcQueryRes struct {
	// ChaincodeQueryResult contains information about chaincodes,
	// and their corresponding endorsers
	CcQueryRes *ChaincodeQueryResult `protobuf:"bytes,3,opt,name=cc_query_res,json=ccQueryRes,proto3,oneof"`
}

type QueryResult_ConfigResult

type QueryResult_ConfigResult struct {
	// ConfigResult contains the configuration of the channel,
	// such as FabricMSPConfig and orderer endpoints
	ConfigResult *ConfigResult `protobuf:"bytes,2,opt,name=config_result,json=configResult,proto3,oneof"`
}

type QueryResult_Error

type QueryResult_Error struct {
	// Error indicates failure or refusal to process the query
	Error *Error `protobuf:"bytes,1,opt,name=error,proto3,oneof"`
}

type QueryResult_Members

type QueryResult_Members struct {
	// PeerMembershipResult contains information about peers,
	// such as their identity, endpoints, and channel related state.
	Members *PeerMembershipResult `protobuf:"bytes,4,opt,name=members,proto3,oneof"`
}

type Query_CcQuery

type Query_CcQuery struct {
	// ChaincodeQuery queries for chaincodes by their name and version.
	// An empty version means any version can by returned.
	CcQuery *ChaincodeQuery `protobuf:"bytes,4,opt,name=cc_query,json=ccQuery,proto3,oneof"`
}

type Query_ConfigQuery

type Query_ConfigQuery struct {
	// ConfigQuery is used to query for the configuration of the channel,
	// such as FabricMSPConfig, and rorderer endpoints.
	// The client has to query a peer it trusts as it doesn't have means to self-verify
	// the authenticity of the returned result.
	// The result is returned in the form of ConfigResult.
	ConfigQuery *ConfigQuery `protobuf:"bytes,2,opt,name=config_query,json=configQuery,proto3,oneof"`
}

type Query_LocalPeers

type Query_LocalPeers struct {
	// LocalPeerQuery queries for peers in a non channel context,
	// and returns PeerMembershipResult
	LocalPeers *LocalPeerQuery `protobuf:"bytes,5,opt,name=local_peers,json=localPeers,proto3,oneof"`
}

type Query_PeerQuery

type Query_PeerQuery struct {
	// PeerMembershipQuery queries for peers in a channel context,
	// and returns PeerMembershipResult
	PeerQuery *PeerMembershipQuery `protobuf:"bytes,3,opt,name=peer_query,json=peerQuery,proto3,oneof"`
}

type Request

type Request struct {

	// authentication contains information that the service uses to check
	// the client's eligibility for the queries.
	Authentication *AuthInfo `protobuf:"bytes,1,opt,name=authentication,proto3" json:"authentication,omitempty"`
	// queries
	Queries []*Query `protobuf:"bytes,2,rep,name=queries,proto3" json:"queries,omitempty"`
	// contains filtered or unexported fields
}

Request contains authentication info about the client that sent the request and the queries it wishes to query the service

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetAuthentication

func (x *Request) GetAuthentication() *AuthInfo

func (*Request) GetQueries

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

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

func (x *Request) ProtoReflect() protoreflect.Message

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Response

type Response struct {

	// The results are returned in the same order of the queries
	Results []*QueryResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetResults

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

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

func (x *Response) ProtoReflect() protoreflect.Message

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

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"`
	// contains filtered or unexported fields
}

SignedRequest contains a serialized Request in the payload field and a signature. The identity that is used to verify the signature can be extracted from the authentication field of type AuthInfo in the Request itself after deserializing it.

func (*SignedRequest) Descriptor deprecated

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

Deprecated: Use SignedRequest.ProtoReflect.Descriptor instead.

func (*SignedRequest) GetPayload

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

func (*SignedRequest) GetSignature

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

func (*SignedRequest) ProtoMessage

func (*SignedRequest) ProtoMessage()

func (*SignedRequest) ProtoReflect

func (x *SignedRequest) ProtoReflect() protoreflect.Message

func (*SignedRequest) Reset

func (x *SignedRequest) Reset()

func (*SignedRequest) String

func (x *SignedRequest) String() string

type UnimplementedDiscoveryServer

type UnimplementedDiscoveryServer struct {
}

UnimplementedDiscoveryServer must be embedded to have forward compatible implementations.

func (UnimplementedDiscoveryServer) Discover

type UnsafeDiscoveryServer

type UnsafeDiscoveryServer interface {
	// contains filtered or unexported methods
}

UnsafeDiscoveryServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DiscoveryServer will result in compilation errors.

Jump to

Keyboard shortcuts

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