Documentation
¶
Index ¶
- type ChannelPolicyManagerGetter
- type ChannelPolicyReferenceProvider
- type Identity
- func (_m *Identity) Anonymous() bool
- func (_m *Identity) ExpiresAt() time.Time
- func (_m *Identity) GetCertificatePEM() ([]byte, error)
- func (_m *Identity) GetIdentifier() *msp.IdentityIdentifier
- func (_m *Identity) GetMSPIdentifier() string
- func (_m *Identity) GetOrganizationalUnits() []*msp.OUIdentifier
- func (_m *Identity) SatisfiesPrincipal(principal *fabric_protos_go_apiv2msp.MSPPrincipal) error
- func (_m *Identity) Serialize() ([]byte, error)
- func (_m *Identity) SerializeWithIDOfCert() ([]byte, error)
- func (_m *Identity) Validate() error
- func (_m *Identity) Verify(msg []byte, sig []byte) error
- type IdentityDeserializer
- type MockChannelPolicyManager
- type MockChannelPolicyManagerGetter
- type MockIdentity
- func (id *MockIdentity) Anonymous() bool
- func (id *MockIdentity) ExpiresAt() time.Time
- func (*MockIdentity) GetCertificatePEM() ([]byte, error)
- func (id *MockIdentity) GetIdentifier() *msp.IdentityIdentifier
- func (id *MockIdentity) GetMSPIdentifier() string
- func (id *MockIdentity) GetOrganizationalUnits() []*msp.OUIdentifier
- func (id *MockIdentity) SatisfiesPrincipal(p *mspproto.MSPPrincipal) error
- func (*MockIdentity) Serialize() ([]byte, error)
- func (*MockIdentity) SerializeWithIDOfCert() ([]byte, error)
- func (id *MockIdentity) Validate() error
- func (id *MockIdentity) Verify(msg []byte, sig []byte) error
- type MockIdentityDeserializer
- type MockMSPPrincipalGetter
- type MockPolicy
- type Policy
- type PolicyManager
- type SignaturePolicyProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChannelPolicyManagerGetter ¶
ChannelPolicyManagerGetter is an autogenerated mock type for the ChannelPolicyManagerGetter type
func NewChannelPolicyManagerGetter ¶
func NewChannelPolicyManagerGetter(t interface {
mock.TestingT
Cleanup(func())
}) *ChannelPolicyManagerGetter
NewChannelPolicyManagerGetter creates a new instance of ChannelPolicyManagerGetter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
type ChannelPolicyReferenceProvider ¶
ChannelPolicyReferenceProvider is an autogenerated mock type for the ChannelPolicyReferenceProvider type
func NewChannelPolicyReferenceProvider ¶
func NewChannelPolicyReferenceProvider(t interface {
mock.TestingT
Cleanup(func())
}) *ChannelPolicyReferenceProvider
NewChannelPolicyReferenceProvider creates a new instance of ChannelPolicyReferenceProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
type Identity ¶
Identity is an autogenerated mock type for the Identity type
func NewIdentity ¶
NewIdentity creates a new instance of Identity. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*Identity) GetCertificatePEM ¶
GetCertificatePEM provides a mock function with no fields
func (*Identity) GetIdentifier ¶
func (_m *Identity) GetIdentifier() *msp.IdentityIdentifier
GetIdentifier provides a mock function with no fields
func (*Identity) GetMSPIdentifier ¶
GetMSPIdentifier provides a mock function with no fields
func (*Identity) GetOrganizationalUnits ¶
func (_m *Identity) GetOrganizationalUnits() []*msp.OUIdentifier
GetOrganizationalUnits provides a mock function with no fields
func (*Identity) SatisfiesPrincipal ¶
func (_m *Identity) SatisfiesPrincipal(principal *fabric_protos_go_apiv2msp.MSPPrincipal) error
SatisfiesPrincipal provides a mock function with given fields: principal
func (*Identity) SerializeWithIDOfCert ¶
SerializeWithIDOfCert provides a mock function with no fields
type IdentityDeserializer ¶
IdentityDeserializer is an autogenerated mock type for the IdentityDeserializer type
func NewIdentityDeserializer ¶
func NewIdentityDeserializer(t interface {
mock.TestingT
Cleanup(func())
}) *IdentityDeserializer
NewIdentityDeserializer creates a new instance of IdentityDeserializer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*IdentityDeserializer) DeserializeIdentity ¶
DeserializeIdentity provides a mock function with given fields: identity
func (*IdentityDeserializer) GetKnownDeserializedIdentity ¶
func (_m *IdentityDeserializer) GetKnownDeserializedIdentity(_a0 msp.IdentityIdentifier) msp.Identity
GetKnownDeserializedIdentity provides a mock function with given fields: _a0
func (*IdentityDeserializer) IsWellFormed ¶
func (_m *IdentityDeserializer) IsWellFormed(identity *msppb.Identity) error
IsWellFormed provides a mock function with given fields: identity
type MockChannelPolicyManager ¶
type MockIdentity ¶
type MockIdentity struct {
// contains filtered or unexported fields
}
func (*MockIdentity) Anonymous ¶
func (id *MockIdentity) Anonymous() bool
func (*MockIdentity) ExpiresAt ¶
func (id *MockIdentity) ExpiresAt() time.Time
func (*MockIdentity) GetCertificatePEM ¶
func (*MockIdentity) GetCertificatePEM() ([]byte, error)
GetCertificatePEM return the certificate in PEM format.
func (*MockIdentity) GetIdentifier ¶
func (id *MockIdentity) GetIdentifier() *msp.IdentityIdentifier
func (*MockIdentity) GetMSPIdentifier ¶
func (id *MockIdentity) GetMSPIdentifier() string
func (*MockIdentity) GetOrganizationalUnits ¶
func (id *MockIdentity) GetOrganizationalUnits() []*msp.OUIdentifier
func (*MockIdentity) SatisfiesPrincipal ¶
func (id *MockIdentity) SatisfiesPrincipal(p *mspproto.MSPPrincipal) error
func (*MockIdentity) Serialize ¶
func (*MockIdentity) Serialize() ([]byte, error)
Serialize converts identity to bytes.
func (*MockIdentity) SerializeWithIDOfCert ¶
func (*MockIdentity) SerializeWithIDOfCert() ([]byte, error)
SerializeWithIDOfCert converts identity to bytes.
func (*MockIdentity) Validate ¶
func (id *MockIdentity) Validate() error
type MockIdentityDeserializer ¶
func (*MockIdentityDeserializer) DeserializeIdentity ¶
func (d *MockIdentityDeserializer) DeserializeIdentity(identity *msppb.Identity) (msp.Identity, error)
DeserializeIdentity converts a proto identity into a msp.Identity.
func (*MockIdentityDeserializer) GetKnownDeserializedIdentity ¶
func (*MockIdentityDeserializer) GetKnownDeserializedIdentity( msp.IdentityIdentifier, ) msp.Identity
GetKnownDeserializedIdentity returns a known identity matching the given IdentityIdentifier.
func (*MockIdentityDeserializer) IsWellFormed ¶
func (*MockIdentityDeserializer) IsWellFormed(_ *msppb.Identity) error
IsWellFormed checks whether the certificate provided in the identity is valid.
type MockMSPPrincipalGetter ¶
type MockMSPPrincipalGetter struct {
Principal []byte
}
func (*MockMSPPrincipalGetter) Get ¶
func (m *MockMSPPrincipalGetter) Get(role string) (*mspproto.MSPPrincipal, error)
type MockPolicy ¶
type MockPolicy struct {
Deserializer msp.IdentityDeserializer
}
func (*MockPolicy) EvaluateIdentities ¶
func (m *MockPolicy) EvaluateIdentities(identities []msp.Identity) error
EvaluateIdentities takes an array of identities and evaluates whether they satisfy the policy
func (*MockPolicy) EvaluateSignedData ¶
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 ¶
Policy is an autogenerated mock type for the Policy type
func NewPolicy ¶
NewPolicy creates a new instance of Policy. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*Policy) EvaluateIdentities ¶
EvaluateIdentities provides a mock function with given fields: identities
func (*Policy) EvaluateSignedData ¶
func (_m *Policy) EvaluateSignedData(signatureSet []*protoutil.SignedData) error
EvaluateSignedData provides a mock function with given fields: signatureSet
type PolicyManager ¶
PolicyManager is an autogenerated mock type for the PolicyManager type
func NewPolicyManager ¶
func NewPolicyManager(t interface {
mock.TestingT
Cleanup(func())
}) *PolicyManager
NewPolicyManager creates a new instance of PolicyManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
type SignaturePolicyProvider ¶
SignaturePolicyProvider is an autogenerated mock type for the SignaturePolicyProvider type
func NewSignaturePolicyProvider ¶
func NewSignaturePolicyProvider(t interface {
mock.TestingT
Cleanup(func())
}) *SignaturePolicyProvider
NewSignaturePolicyProvider creates a new instance of SignaturePolicyProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*SignaturePolicyProvider) NewPolicy ¶
func (_m *SignaturePolicyProvider) NewPolicy(signaturePolicy *common.SignaturePolicyEnvelope) (policies.Policy, error)
NewPolicy provides a mock function with given fields: signaturePolicy