Documentation ¶
Overview ¶
Package mocks is a generated GoMock package.
Index ¶
- type MockStateManager
- func (m *MockStateManager) AddCosignature(arg0 context.Context, arg1 *types.PublicKey, arg2 *types.Signature) error
- func (m *MockStateManager) Cosigned(arg0 context.Context) (*types.CosignedTreeHead, error)
- func (m *MockStateManager) EXPECT() *MockStateManagerMockRecorder
- func (m *MockStateManager) Latest(arg0 context.Context) (*types.SignedTreeHead, error)
- func (m *MockStateManager) Run(arg0 context.Context)
- func (m *MockStateManager) ToSign(arg0 context.Context) (*types.SignedTreeHead, error)
- type MockStateManagerMockRecorder
- func (mr *MockStateManagerMockRecorder) AddCosignature(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockStateManagerMockRecorder) Cosigned(arg0 interface{}) *gomock.Call
- func (mr *MockStateManagerMockRecorder) Latest(arg0 interface{}) *gomock.Call
- func (mr *MockStateManagerMockRecorder) Run(arg0 interface{}) *gomock.Call
- func (mr *MockStateManagerMockRecorder) ToSign(arg0 interface{}) *gomock.Call
- type TestSigner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockStateManager ¶
type MockStateManager struct {
// contains filtered or unexported fields
}
MockStateManager is a mock of StateManager interface.
func NewMockStateManager ¶
func NewMockStateManager(ctrl *gomock.Controller) *MockStateManager
NewMockStateManager creates a new mock instance.
func (*MockStateManager) AddCosignature ¶
func (m *MockStateManager) AddCosignature(arg0 context.Context, arg1 *types.PublicKey, arg2 *types.Signature) error
AddCosignature mocks base method.
func (*MockStateManager) Cosigned ¶
func (m *MockStateManager) Cosigned(arg0 context.Context) (*types.CosignedTreeHead, error)
Cosigned mocks base method.
func (*MockStateManager) EXPECT ¶
func (m *MockStateManager) EXPECT() *MockStateManagerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockStateManager) Latest ¶
func (m *MockStateManager) Latest(arg0 context.Context) (*types.SignedTreeHead, error)
Latest mocks base method.
func (*MockStateManager) Run ¶
func (m *MockStateManager) Run(arg0 context.Context)
Run mocks base method.
func (*MockStateManager) ToSign ¶
func (m *MockStateManager) ToSign(arg0 context.Context) (*types.SignedTreeHead, error)
ToSign mocks base method.
type MockStateManagerMockRecorder ¶
type MockStateManagerMockRecorder struct {
// contains filtered or unexported fields
}
MockStateManagerMockRecorder is the mock recorder for MockStateManager.
func (*MockStateManagerMockRecorder) AddCosignature ¶
func (mr *MockStateManagerMockRecorder) AddCosignature(arg0, arg1, arg2 interface{}) *gomock.Call
AddCosignature indicates an expected call of AddCosignature.
func (*MockStateManagerMockRecorder) Cosigned ¶
func (mr *MockStateManagerMockRecorder) Cosigned(arg0 interface{}) *gomock.Call
Cosigned indicates an expected call of Cosigned.
func (*MockStateManagerMockRecorder) Latest ¶
func (mr *MockStateManagerMockRecorder) Latest(arg0 interface{}) *gomock.Call
Latest indicates an expected call of Latest.
func (*MockStateManagerMockRecorder) Run ¶
func (mr *MockStateManagerMockRecorder) Run(arg0 interface{}) *gomock.Call
Run indicates an expected call of Run.
func (*MockStateManagerMockRecorder) ToSign ¶
func (mr *MockStateManagerMockRecorder) ToSign(arg0 interface{}) *gomock.Call
ToSign indicates an expected call of ToSign.
type TestSigner ¶
type TestSigner struct { PublicKey [ed25519.PublicKeySize]byte Signature [ed25519.SignatureSize]byte Error error }
TestSign implements the signer interface. It can be used to mock an Ed25519 signer that always return the same public key, signature, and error.
func (*TestSigner) Public ¶
func (ts *TestSigner) Public() crypto.PublicKey
func (*TestSigner) Sign ¶
func (ts *TestSigner) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) ([]byte, error)