fabric-sdk-go: github.com/hyperledger/fabric-sdk-go/pkg/msp/test/mockmsp Index | Files

package mockmsp

import "github.com/hyperledger/fabric-sdk-go/pkg/msp/test/mockmsp"


Package Files

mockfabriccaserver.go mockkey.go mockuser.go mockuserstore.go

type MockFabricCAServer Uses

type MockFabricCAServer struct {
    // contains filtered or unexported fields

MockFabricCAServer is a mock for FabricCAServer

func (*MockFabricCAServer) Running Uses

func (s *MockFabricCAServer) Running() bool

Running returns the status of the mock server

func (*MockFabricCAServer) Start Uses

func (s *MockFabricCAServer) Start(lis net.Listener, cryptoSuite core.CryptoSuite)

Start fabric CA mock server

type MockKey Uses

type MockKey struct {

MockKey mockcore BCCSP key

func (*MockKey) Bytes Uses

func (m *MockKey) Bytes() ([]byte, error)

Bytes ...

func (*MockKey) Private Uses

func (m *MockKey) Private() bool

Private ...

func (*MockKey) PublicKey Uses

func (m *MockKey) PublicKey() (bccsp.Key, error)

PublicKey ...

func (*MockKey) SKI Uses

func (m *MockKey) SKI() []byte

SKI ...

func (*MockKey) Symmetric Uses

func (m *MockKey) Symmetric() bool

Symmetric ...

type MockSigningIdentity Uses

type MockSigningIdentity struct {
    // contains filtered or unexported fields

MockSigningIdentity ...

func NewMockSigningIdentity Uses

func NewMockSigningIdentity(id string, mspid string) *MockSigningIdentity

NewMockSigningIdentity to return mock user with MSPID

func (*MockSigningIdentity) EnrollmentCertificate Uses

func (m *MockSigningIdentity) EnrollmentCertificate() []byte

EnrollmentCertificate Returns the underlying ECert representing this user’s identity.

func (*MockSigningIdentity) Identifier Uses

func (m *MockSigningIdentity) Identifier() *msp.IdentityIdentifier

Identifier returns the identifier of that identity

func (*MockSigningIdentity) PrivateKey Uses

func (m *MockSigningIdentity) PrivateKey() core.Key

PrivateKey returns the crypto suite representation of the private key

func (*MockSigningIdentity) PublicVersion Uses

func (m *MockSigningIdentity) PublicVersion() msp.Identity

PublicVersion returns the public parts of this identity

func (*MockSigningIdentity) Serialize Uses

func (m *MockSigningIdentity) Serialize() ([]byte, error)

Serialize converts an identity to bytes

func (*MockSigningIdentity) SetEnrollmentCertificate Uses

func (m *MockSigningIdentity) SetEnrollmentCertificate(cert []byte)

SetEnrollmentCertificate sets yhe enrollment certificate.

func (*MockSigningIdentity) SetPrivateKey Uses

func (m *MockSigningIdentity) SetPrivateKey(key core.Key)

SetPrivateKey sets the private key

func (*MockSigningIdentity) Sign Uses

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

Sign the message

func (*MockSigningIdentity) Verify Uses

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

Verify a signature over some message using this identity as reference

type MockUserStore Uses

type MockUserStore struct {

MockUserStore ...

func (*MockUserStore) Load Uses

func (m *MockUserStore) Load(identifier msp.IdentityIdentifier) (*msp.UserData, error)

Load ...

func (*MockUserStore) Store Uses

func (m *MockUserStore) Store(*msp.UserData) error

Store ...

Package mockmsp imports 11 packages (graph) and is imported by 3 packages. Updated 2020-08-05. Refresh now. Tools for package owners.