mockmsp

package
v1.0.0-alpha5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockFabricCAServer

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

MockFabricCAServer is a mock for FabricCAServer

func (*MockFabricCAServer) Running

func (s *MockFabricCAServer) Running() bool

Running returns the status of the mock server

func (*MockFabricCAServer) Start

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

Start fabric CA mock server

type MockKey

type MockKey struct {
}

MockKey mockcore BCCSP key

func (*MockKey) Bytes

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

Bytes ...

func (*MockKey) Private

func (m *MockKey) Private() bool

Private ...

func (*MockKey) PublicKey

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

PublicKey ...

func (*MockKey) SKI

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

SKI ...

func (*MockKey) Symmetric

func (m *MockKey) Symmetric() bool

Symmetric ...

type MockSigningIdentity

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

MockSigningIdentity ...

func NewMockSigningIdentity

func NewMockSigningIdentity(id string, mspid string) *MockSigningIdentity

NewMockSigningIdentity to return mock user with MSPID

func (*MockSigningIdentity) EnrollmentCertificate

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

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

func (*MockSigningIdentity) Identifier

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

Identifier returns the identifier of that identity

func (*MockSigningIdentity) PrivateKey

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

PrivateKey returns the crypto suite representation of the private key

func (*MockSigningIdentity) PublicVersion

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

PublicVersion returns the public parts of this identity

func (*MockSigningIdentity) Serialize

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

Serialize converts an identity to bytes

func (*MockSigningIdentity) SetEnrollmentCertificate

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

SetEnrollmentCertificate sets yhe enrollment certificate.

func (*MockSigningIdentity) SetPrivateKey

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

SetPrivateKey sets the private key

func (*MockSigningIdentity) Sign

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

Sign the message

func (*MockSigningIdentity) Verify

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

Verify a signature over some message using this identity as reference

type MockUserStore

type MockUserStore struct {
}

MockUserStore ...

func (*MockUserStore) Load

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

Load ...

func (*MockUserStore) Store

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

Store ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL