...

Package mocks

import "github.com/hyperledger/fabric/msp/mocks"
Overview
Index

Overview ▾

Index ▾

type MockIdentity
    func (m *MockIdentity) Anonymous() bool
    func (m *MockIdentity) ExpiresAt() time.Time
    func (m *MockIdentity) GetIdentifier() *msp.IdentityIdentifier
    func (*MockIdentity) GetMSPIdentifier() string
    func (*MockIdentity) GetOrganizationalUnits() []*msp.OUIdentifier
    func (m *MockIdentity) SatisfiesPrincipal(principal *pmsp.MSPPrincipal) error
    func (*MockIdentity) Serialize() ([]byte, error)
    func (m *MockIdentity) Validate() error
    func (*MockIdentity) Verify(msg []byte, sig []byte) error
type MockMSP
    func (m *MockMSP) DeserializeIdentity(serializedIdentity []byte) (msp.Identity, error)
    func (m *MockMSP) GetDefaultSigningIdentity() (msp.SigningIdentity, error)
    func (m *MockMSP) GetIdentifier() (string, error)
    func (m *MockMSP) GetSigningIdentity(identifier *msp.IdentityIdentifier) (msp.SigningIdentity, error)
    func (m *MockMSP) GetTLSIntermediateCerts() [][]byte
    func (m *MockMSP) GetTLSRootCerts() [][]byte
    func (m *MockMSP) GetType() msp.ProviderType
    func (m *MockMSP) GetVersion() msp.MSPVersion
    func (m *MockMSP) IsWellFormed(_ *pmsp.SerializedIdentity) error
    func (m *MockMSP) SatisfiesPrincipal(id msp.Identity, principal *pmsp.MSPPrincipal) error
    func (m *MockMSP) Setup(config *pmsp.MSPConfig) error
    func (m *MockMSP) Validate(id msp.Identity) error
type MockSigningIdentity
    func (*MockSigningIdentity) GetPublicVersion() msp.Identity
    func (*MockSigningIdentity) Sign(msg []byte) ([]byte, error)

Package files

mocks.go

type MockIdentity

type MockIdentity struct {
    mock.Mock

    ID string
}

func (*MockIdentity) Anonymous

func (m *MockIdentity) Anonymous() bool

func (*MockIdentity) ExpiresAt

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

func (*MockIdentity) GetIdentifier

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

func (*MockIdentity) GetMSPIdentifier

func (*MockIdentity) GetMSPIdentifier() string

func (*MockIdentity) GetOrganizationalUnits

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

func (*MockIdentity) SatisfiesPrincipal

func (m *MockIdentity) SatisfiesPrincipal(principal *pmsp.MSPPrincipal) error

func (*MockIdentity) Serialize

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

func (*MockIdentity) Validate

func (m *MockIdentity) Validate() error

func (*MockIdentity) Verify

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

type MockMSP

type MockMSP struct {
    mock.Mock
}

func (*MockMSP) DeserializeIdentity

func (m *MockMSP) DeserializeIdentity(serializedIdentity []byte) (msp.Identity, error)

func (*MockMSP) GetDefaultSigningIdentity

func (m *MockMSP) GetDefaultSigningIdentity() (msp.SigningIdentity, error)

func (*MockMSP) GetIdentifier

func (m *MockMSP) GetIdentifier() (string, error)

func (*MockMSP) GetSigningIdentity

func (m *MockMSP) GetSigningIdentity(identifier *msp.IdentityIdentifier) (msp.SigningIdentity, error)

func (*MockMSP) GetTLSIntermediateCerts

func (m *MockMSP) GetTLSIntermediateCerts() [][]byte

func (*MockMSP) GetTLSRootCerts

func (m *MockMSP) GetTLSRootCerts() [][]byte

func (*MockMSP) GetType

func (m *MockMSP) GetType() msp.ProviderType

func (*MockMSP) GetVersion

func (m *MockMSP) GetVersion() msp.MSPVersion

func (*MockMSP) IsWellFormed

func (m *MockMSP) IsWellFormed(_ *pmsp.SerializedIdentity) error

func (*MockMSP) SatisfiesPrincipal

func (m *MockMSP) SatisfiesPrincipal(id msp.Identity, principal *pmsp.MSPPrincipal) error

func (*MockMSP) Setup

func (m *MockMSP) Setup(config *pmsp.MSPConfig) error

func (*MockMSP) Validate

func (m *MockMSP) Validate(id msp.Identity) error

type MockSigningIdentity

type MockSigningIdentity struct {
    mock.Mock
    *MockIdentity
}

func (*MockSigningIdentity) GetPublicVersion

func (*MockSigningIdentity) GetPublicVersion() msp.Identity

func (*MockSigningIdentity) Sign

func (*MockSigningIdentity) Sign(msg []byte) ([]byte, error)