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

package mocks

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

Index

Package Files

channel_policy_manager_getter.go channel_policy_reference_provider.go identity.go identity_deserializer.go mocks.go policy.go policy_manager.go signature_policy_provider.go

type ChannelPolicyManagerGetter Uses

type ChannelPolicyManagerGetter struct {
    mock.Mock
}

ChannelPolicyManagerGetter is an autogenerated mock type for the ChannelPolicyManagerGetter type

func (*ChannelPolicyManagerGetter) Manager Uses

func (_m *ChannelPolicyManagerGetter) Manager(channelID string) policies.Manager

Manager provides a mock function with given fields: channelID

type ChannelPolicyReferenceProvider Uses

type ChannelPolicyReferenceProvider struct {
    mock.Mock
}

ChannelPolicyReferenceProvider is an autogenerated mock type for the ChannelPolicyReferenceProvider type

func (*ChannelPolicyReferenceProvider) NewPolicy Uses

func (_m *ChannelPolicyReferenceProvider) NewPolicy(channelConfigPolicyReference string) (policies.Policy, error)

NewPolicy provides a mock function with given fields: channelConfigPolicyReference

type Identity Uses

type Identity struct {
    mock.Mock
}

Identity is an autogenerated mock type for the Identity type

func (*Identity) Anonymous Uses

func (_m *Identity) Anonymous() bool

Anonymous provides a mock function with given fields:

func (*Identity) ExpiresAt Uses

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

ExpiresAt provides a mock function with given fields:

func (*Identity) GetIdentifier Uses

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

GetIdentifier provides a mock function with given fields:

func (*Identity) GetMSPIdentifier Uses

func (_m *Identity) GetMSPIdentifier() string

GetMSPIdentifier provides a mock function with given fields:

func (*Identity) GetOrganizationalUnits Uses

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

GetOrganizationalUnits provides a mock function with given fields:

func (*Identity) SatisfiesPrincipal Uses

func (_m *Identity) SatisfiesPrincipal(principal *fabric_protos_gomsp.MSPPrincipal) error

SatisfiesPrincipal provides a mock function with given fields: principal

func (*Identity) Serialize Uses

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

Serialize provides a mock function with given fields:

func (*Identity) Validate Uses

func (_m *Identity) Validate() error

Validate provides a mock function with given fields:

func (*Identity) Verify Uses

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

Verify provides a mock function with given fields: msg, sig

type IdentityDeserializer Uses

type IdentityDeserializer struct {
    mock.Mock
}

IdentityDeserializer is an autogenerated mock type for the IdentityDeserializer type

func (*IdentityDeserializer) DeserializeIdentity Uses

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

DeserializeIdentity provides a mock function with given fields: serializedIdentity

func (*IdentityDeserializer) IsWellFormed Uses

func (_m *IdentityDeserializer) IsWellFormed(identity *fabric_protos_gomsp.SerializedIdentity) error

IsWellFormed provides a mock function with given fields: identity

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

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) EvaluateIdentities Uses

func (m *MockPolicy) EvaluateIdentities(identities []msp.Identity) error

EvaluateIdentities takes an array of identities and evaluates whether they satisfy the policy

func (*MockPolicy) EvaluateSignedData Uses

func (m *MockPolicy) EvaluateSignedData(signatureSet []*protoutil.SignedData) error

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

type Policy Uses

type Policy struct {
    mock.Mock
}

Policy is an autogenerated mock type for the Policy type

func (*Policy) EvaluateIdentities Uses

func (_m *Policy) EvaluateIdentities(identities []msp.Identity) error

EvaluateIdentities provides a mock function with given fields: identities

func (*Policy) EvaluateSignedData Uses

func (_m *Policy) EvaluateSignedData(signatureSet []*protoutil.SignedData) error

EvaluateSignedData provides a mock function with given fields: signatureSet

type PolicyManager Uses

type PolicyManager struct {
    mock.Mock
}

PolicyManager is an autogenerated mock type for the PolicyManager type

func (*PolicyManager) GetPolicy Uses

func (_m *PolicyManager) GetPolicy(id string) (policies.Policy, bool)

GetPolicy provides a mock function with given fields: id

func (*PolicyManager) Manager Uses

func (_m *PolicyManager) Manager(path []string) (policies.Manager, bool)

Manager provides a mock function with given fields: path

type SignaturePolicyProvider Uses

type SignaturePolicyProvider struct {
    mock.Mock
}

SignaturePolicyProvider is an autogenerated mock type for the SignaturePolicyProvider type

func (*SignaturePolicyProvider) NewPolicy Uses

func (_m *SignaturePolicyProvider) NewPolicy(signaturePolicy *common.SignaturePolicyEnvelope) (policies.Policy, error)

NewPolicy provides a mock function with given fields: signaturePolicy

Package mocks imports 10 packages (graph). Updated 2019-12-10. Refresh now. Tools for package owners.