fabric-sdk-go: github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/gossip/protoext Index | Files

package protoext

import "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/gossip/protoext"


Package Files

message.go signing.go stringers.go

func AliveMessageToString Uses

func AliveMessageToString(am *gossip.AliveMessage) string

AliveMessageToString of AliveMessage prints Alive Message, Identity and Timestamp

func DataDigestToString Uses

func DataDigestToString(dig *gossip.DataDigest) string

DataDigestToString prints nonce, msg_type and digests

func DataRequestToString Uses

func DataRequestToString(dataReq *gossip.DataRequest) string

DataRequestToString prints nonce, msg_type and digests

func DataUpdateToString Uses

func DataUpdateToString(du *gossip.DataUpdate) string

DataUpdateToString prints Type, items and nonce

func GetPullMsgType Uses

func GetPullMsgType(m *gossip.GossipMessage) gossip.PullMsgType

GetPullMsgType returns the phase of the pull mechanism this GossipMessage belongs to for example: Hello, Digest, etc. If this isn't a pull message, PullMsgType_UNDEFINED is returned.

func InternalEndpoint Uses

func InternalEndpoint(s *gossip.SecretEnvelope) string

InternalEndpoint returns the internal endpoint in the secret envelope, or an empty string if a failure occurs.

func IsAck Uses

func IsAck(m *gossip.GossipMessage) bool

IsAck returns whether this GossipMessage is an acknowledgement

func IsAliveMsg Uses

func IsAliveMsg(m *gossip.GossipMessage) bool

IsAliveMsg returns whether this GossipMessage is an AliveMessage

func IsChannelRestricted Uses

func IsChannelRestricted(m *gossip.GossipMessage) bool

IsChannelRestricted returns whether this GossipMessage should be routed only in its channel

func IsDataMsg Uses

func IsDataMsg(m *gossip.GossipMessage) bool

IsDataMsg returns whether this GossipMessage is a data message

func IsDataReq Uses

func IsDataReq(m *gossip.GossipMessage) bool

IsDataReq returns whether this GossipMessage is a data request message

func IsDataUpdate Uses

func IsDataUpdate(m *gossip.GossipMessage) bool

IsDataUpdate returns whether this GossipMessage is a data update message

func IsDigestMsg Uses

func IsDigestMsg(m *gossip.GossipMessage) bool

IsDigestMsg returns whether this GossipMessage is a digest message

func IsHelloMsg Uses

func IsHelloMsg(m *gossip.GossipMessage) bool

IsHelloMsg returns whether this GossipMessage is a hello message

func IsIdentityMsg Uses

func IsIdentityMsg(m *gossip.GossipMessage) bool

IsIdentityMsg returns whether this GossipMessage is an identity message

func IsLeadershipMsg Uses

func IsLeadershipMsg(m *gossip.GossipMessage) bool

IsLeadershipMsg returns whether this GossipMessage is a leadership (leader election) message

func IsOrgRestricted Uses

func IsOrgRestricted(m *gossip.GossipMessage) bool

IsOrgRestricted returns whether this GossipMessage should be routed only inside the organization

func IsPrivateDataMsg Uses

func IsPrivateDataMsg(m *gossip.GossipMessage) bool

IsPrivateDataMsg returns whether this message is related to private data

func IsPullMsg Uses

func IsPullMsg(m *gossip.GossipMessage) bool

IsPullMsg returns whether this GossipMessage is a message that belongs to the pull mechanism

func IsRemoteStateMessage Uses

func IsRemoteStateMessage(m *gossip.GossipMessage) bool

IsRemoteStateMessage returns whether this GossipMessage is related to state synchronization

func IsStateInfoMsg Uses

func IsStateInfoMsg(m *gossip.GossipMessage) bool

IsStateInfoMsg returns whether this GossipMessage is a stateInfo message

func IsStateInfoPullRequestMsg Uses

func IsStateInfoPullRequestMsg(m *gossip.GossipMessage) bool

IsStateInfoPullRequestMsg returns whether this GossipMessage is a stateInfoPullRequest

func IsStateInfoSnapshot Uses

func IsStateInfoSnapshot(m *gossip.GossipMessage) bool

IsStateInfoSnapshot returns whether this GossipMessage is a stateInfo snapshot

func IsTagLegal Uses

func IsTagLegal(m *gossip.GossipMessage) error

IsTagLegal checks the GossipMessage tags and inner type and returns an error if the tag doesn't match the type.

func LeadershipMessageToString Uses

func LeadershipMessageToString(lm *gossip.LeadershipMessage) string

LeadershipMessageToString prints PKI-id, Timestamp and Is Declaration

func MemberToString Uses

func MemberToString(m *gossip.Member) string

MemberToString prints Endpoint and PKI-id

func MembershipRequestToString Uses

func MembershipRequestToString(mr *gossip.MembershipRequest) string

MembershipRequestToString prints self information

func MembershipResponseToString Uses

func MembershipResponseToString(mr *gossip.MembershipResponse) string

MembershipResponseToString of MembershipResponse prints number of Alive and number of Dead

func PayloadToString Uses

func PayloadToString(p *gossip.Payload) string

PayloadToString prints Block message: Data and seq

func RemovePvtDataResponseToString Uses

func RemovePvtDataResponseToString(res *gossip.RemotePvtDataResponse) string

RemovePvtDataResponseToString returns a string representation of this RemotePvtDataResponse

func SignSecret Uses

func SignSecret(e *gossip.Envelope, signer Signer, secret *gossip.Secret) error

SignSecret signs the secret payload and creates a secret envelope out of it.

func StateInfoPullRequestToString Uses

func StateInfoPullRequestToString(sipr *gossip.StateInfoPullRequest) string

StateInfoPullRequestToString prints Channel MAC

func StateInfoSnapshotToString Uses

func StateInfoSnapshotToString(sis *gossip.StateInfoSnapshot) string

StateInfoSnapshotToString prints items

func StateInfoToString Uses

func StateInfoToString(si *gossip.StateInfo) string

StateInfoToString prints Timestamp and PKI-id

type SignedGossipMessage Uses

type SignedGossipMessage struct {

SignedGossipMessage contains a GossipMessage and the Envelope from which it came from

func EnvelopeToGossipMessage Uses

func EnvelopeToGossipMessage(e *gossip.Envelope) (*SignedGossipMessage, error)

EnvelopeToGossipMessage un-marshals a given envelope and creates a SignedGossipMessage out of it. Returns an error if un-marshaling fails.

func NoopSign Uses

func NoopSign(m *gossip.GossipMessage) (*SignedGossipMessage, error)

NoopSign creates a SignedGossipMessage with a nil signature

func (*SignedGossipMessage) IsSigned Uses

func (m *SignedGossipMessage) IsSigned() bool

IsSigned returns whether the message has a signature in the envelope.

func (*SignedGossipMessage) Sign Uses

func (m *SignedGossipMessage) Sign(signer Signer) (*gossip.Envelope, error)

Sign signs a GossipMessage with given Signer. Returns an Envelope on success, panics on failure.

func (*SignedGossipMessage) String Uses

func (m *SignedGossipMessage) String() string

String returns a string representation of a SignedGossipMessage

func (*SignedGossipMessage) Verify Uses

func (m *SignedGossipMessage) Verify(peerIdentity []byte, verify Verifier) error

Verify verifies a signed GossipMessage with a given Verifier. Returns nil on success, error on failure.

type Signer Uses

type Signer func(msg []byte) ([]byte, error)

Signer signs a message, and returns (signature, nil) on success, and nil and an error on failure.

type Verifier Uses

type Verifier func(peerIdentity []byte, signature, message []byte) error

Verifier receives a peer identity, a signature and a message and returns nil if the signature on the message could be verified using the given identity.

Package protoext imports 6 packages (graph) and is imported by 2 packages. Updated 2020-01-01. Refresh now. Tools for package owners.