fabric: github.com/hyperledger/fabric/core/policy/mocks Index | Files

package mocks

import "github.com/hyperledger/fabric/core/policy/mocks"

Index

Package Files

mocks.go

type MockChannelPolicyManager Uses

type MockChannelPolicyManager struct {
    MockPolicy policies.Policy
}

func (*MockChannelPolicyManager) GetPolicy Uses

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

func (*MockChannelPolicyManager) Manager Uses

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

type MockChannelPolicyManagerGetter Uses

type MockChannelPolicyManagerGetter struct {
    Managers map[string]policies.Manager
}

func (*MockChannelPolicyManagerGetter) Manager Uses

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

type MockIdentity Uses

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

func (*MockIdentity) Anonymous Uses

func (id *MockIdentity) Anonymous() bool

func (*MockIdentity) ExpiresAt Uses

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

func (*MockIdentity) GetIdentifier Uses

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

func (*MockIdentity) GetMSPIdentifier Uses

func (id *MockIdentity) GetMSPIdentifier() string

func (*MockIdentity) GetOrganizationalUnits Uses

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

func (*MockIdentity) SatisfiesPrincipal Uses

func (id *MockIdentity) SatisfiesPrincipal(p *mspproto.MSPPrincipal) error

func (*MockIdentity) Serialize Uses

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

func (*MockIdentity) Validate Uses

func (id *MockIdentity) Validate() error

func (*MockIdentity) Verify Uses

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

type MockIdentityDeserializer Uses

type MockIdentityDeserializer struct {
    Identity []byte
    Msg      []byte
}

func (*MockIdentityDeserializer) DeserializeIdentity Uses

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

func (*MockIdentityDeserializer) IsWellFormed Uses

func (d *MockIdentityDeserializer) IsWellFormed(_ *mspproto.SerializedIdentity) error

type MockMSPPrincipalGetter Uses

type MockMSPPrincipalGetter struct {
    Principal []byte
}

func (*MockMSPPrincipalGetter) Get Uses

func (m *MockMSPPrincipalGetter) Get(role string) (*mspproto.MSPPrincipal, error)

type MockPolicy Uses

type MockPolicy struct {
    Deserializer msp.IdentityDeserializer
}

func (*MockPolicy) Evaluate Uses

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

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

Package mocks imports 8 packages (graph). Updated 2018-08-23. Refresh now. Tools for package owners.