fabric: github.com/hyperledger/fabric/peer/gossip/mocks Index | Files

package mocks

import "github.com/hyperledger/fabric/peer/gossip/mocks"


Package Files


type ChannelPolicyManager Uses

type ChannelPolicyManager struct {
    Policy policies.Policy

func (*ChannelPolicyManager) GetPolicy Uses

func (m *ChannelPolicyManager) GetPolicy(id string) (policies.Policy, bool)

func (*ChannelPolicyManager) Manager Uses

func (m *ChannelPolicyManager) Manager(path []string) (policies.Manager, bool)

type ChannelPolicyManagerGetter Uses

type ChannelPolicyManagerGetter struct{}

func (*ChannelPolicyManagerGetter) Manager Uses

func (c *ChannelPolicyManagerGetter) Manager(channelID string) (policies.Manager, bool)

type ChannelPolicyManagerGetterWithManager Uses

type ChannelPolicyManagerGetterWithManager struct {
    Managers map[string]policies.Manager

func (*ChannelPolicyManagerGetterWithManager) Manager Uses

func (c *ChannelPolicyManagerGetterWithManager) Manager(channelID string) (policies.Manager, bool)

type DeserializersManager Uses

type DeserializersManager struct {
    LocalDeserializer    msp.IdentityDeserializer
    ChannelDeserializers map[string]msp.IdentityDeserializer

func (*DeserializersManager) Deserialize Uses

func (m *DeserializersManager) Deserialize(raw []byte) (*mspproto.SerializedIdentity, error)

func (*DeserializersManager) GetChannelDeserializers Uses

func (m *DeserializersManager) GetChannelDeserializers() map[string]msp.IdentityDeserializer

func (*DeserializersManager) GetLocalDeserializer Uses

func (m *DeserializersManager) GetLocalDeserializer() msp.IdentityDeserializer

func (*DeserializersManager) GetLocalMSPIdentifier Uses

func (m *DeserializersManager) GetLocalMSPIdentifier() string

type Identity Uses

type Identity struct {
    Msg []byte
    // contains filtered or unexported fields

func (*Identity) Anonymous Uses

func (id *Identity) Anonymous() bool

func (*Identity) ExpiresAt Uses

func (id *Identity) ExpiresAt() time.Time

func (*Identity) GetIdentifier Uses

func (id *Identity) GetIdentifier() *msp.IdentityIdentifier

func (*Identity) GetMSPIdentifier Uses

func (id *Identity) GetMSPIdentifier() string

func (*Identity) GetOrganizationalUnits Uses

func (id *Identity) GetOrganizationalUnits() []*msp.OUIdentifier

func (*Identity) SatisfiesPrincipal Uses

func (id *Identity) SatisfiesPrincipal(*mspproto.MSPPrincipal) error

func (*Identity) Serialize Uses

func (id *Identity) Serialize() ([]byte, error)

func (*Identity) Validate Uses

func (id *Identity) Validate() error

func (*Identity) Verify Uses

func (id *Identity) Verify(msg []byte, sig []byte) error

type IdentityDeserializer Uses

type IdentityDeserializer struct {
    Identity []byte
    Msg      []byte

func (*IdentityDeserializer) DeserializeIdentity Uses

func (d *IdentityDeserializer) DeserializeIdentity(serializedIdentity []byte) (msp.Identity, error)

func (*IdentityDeserializer) IsWellFormed Uses

func (d *IdentityDeserializer) IsWellFormed(identity *mspproto.SerializedIdentity) error

type IdentityDeserializerWithExpiration Uses

type IdentityDeserializerWithExpiration struct {
    Expiration time.Time

func (*IdentityDeserializerWithExpiration) DeserializeIdentity Uses

func (d *IdentityDeserializerWithExpiration) DeserializeIdentity(serializedIdentity []byte) (msp.Identity, error)

type Policy Uses

type Policy struct {
    Deserializer msp.IdentityDeserializer

func (*Policy) Evaluate Uses

func (m *Policy) Evaluate(signatureSet []*common.SignedData) error

Evaluate takes a set of SignedData and evaluates whether this set of signatures satisfies the policy

Package mocks imports 10 packages (graph). Updated 2018-07-31. Refresh now. Tools for package owners.