Documentation
¶
Index ¶
- type BroadcastWriterMock
- type DerivationReaderMock
- type DestinationsReaderWriterMock
- func (mock *DestinationsReaderWriterMock) Destinations(ctx context.Context, args payd.DestinationsArgs) ([]payd.Output, error)
- func (mock *DestinationsReaderWriterMock) DestinationsCalls() []struct{ ... }
- func (mock *DestinationsReaderWriterMock) DestinationsCreate(ctx context.Context, args payd.DestinationsCreateArgs, ...) ([]payd.Output, error)
- func (mock *DestinationsReaderWriterMock) DestinationsCreateCalls() []struct{ ... }
- type DestinationsServiceMock
- func (mock *DestinationsServiceMock) Destinations(ctx context.Context, args payd.DestinationsArgs) (*payd.Destination, error)
- func (mock *DestinationsServiceMock) DestinationsCalls() []struct{ ... }
- func (mock *DestinationsServiceMock) DestinationsCreate(ctx context.Context, req payd.DestinationsCreate) (*payd.Destination, error)
- func (mock *DestinationsServiceMock) DestinationsCreateCalls() []struct{ ... }
- type EnvelopeCreatorMock
- type EnvelopeServiceMock
- type FeeReaderMock
- type InvoiceReaderWriterMock
- func (mock *InvoiceReaderWriterMock) Invoice(ctx context.Context, args payd.InvoiceArgs) (*payd.Invoice, error)
- func (mock *InvoiceReaderWriterMock) InvoiceCalls() []struct{ ... }
- func (mock *InvoiceReaderWriterMock) InvoiceCreate(ctx context.Context, req payd.InvoiceCreate) (*payd.Invoice, error)
- func (mock *InvoiceReaderWriterMock) InvoiceCreateCalls() []struct{ ... }
- func (mock *InvoiceReaderWriterMock) InvoiceDelete(ctx context.Context, args payd.InvoiceArgs) error
- func (mock *InvoiceReaderWriterMock) InvoiceDeleteCalls() []struct{ ... }
- func (mock *InvoiceReaderWriterMock) InvoiceUpdate(ctx context.Context, args payd.InvoiceUpdateArgs, req payd.InvoiceUpdatePaid) (*payd.Invoice, error)
- func (mock *InvoiceReaderWriterMock) InvoiceUpdateCalls() []struct{ ... }
- func (mock *InvoiceReaderWriterMock) Invoices(ctx context.Context) ([]payd.Invoice, error)
- func (mock *InvoiceReaderWriterMock) InvoicesCalls() []struct{ ... }
- type OwnerStoreMock
- type P4Mock
- func (mock *P4Mock) PaymentRequest(ctx context.Context, req payd.PayRequest) (*p4.PaymentRequest, error)
- func (mock *P4Mock) PaymentRequestCalls() []struct{ ... }
- func (mock *P4Mock) PaymentSend(ctx context.Context, args payd.PayRequest, req p4.Payment) (*p4.PaymentACK, error)
- func (mock *P4Mock) PaymentSendCalls() []struct{ ... }
- type PaymentVerifierMock
- func (mock *PaymentVerifierMock) VerifyMerkleProof(contextMoqParam context.Context, bytes []byte) (bool, bool, error)
- func (mock *PaymentVerifierMock) VerifyMerkleProofCalls() []struct{ ... }
- func (mock *PaymentVerifierMock) VerifyMerkleProofJSON(contextMoqParam context.Context, merkleProof *bc.MerkleProof) (bool, bool, error)
- func (mock *PaymentVerifierMock) VerifyMerkleProofJSONCalls() []struct{ ... }
- func (mock *PaymentVerifierMock) VerifyPayment(contextMoqParam context.Context, envelope *spv.Envelope, ...) (*bt.Tx, error)
- func (mock *PaymentVerifierMock) VerifyPaymentCalls() []struct{ ... }
- type PrivateKeyReaderWriterMock
- func (mock *PrivateKeyReaderWriterMock) PrivateKey(ctx context.Context, args payd.KeyArgs) (*payd.PrivateKey, error)
- func (mock *PrivateKeyReaderWriterMock) PrivateKeyCalls() []struct{ ... }
- func (mock *PrivateKeyReaderWriterMock) PrivateKeyCreate(ctx context.Context, req payd.PrivateKey) (*payd.PrivateKey, error)
- func (mock *PrivateKeyReaderWriterMock) PrivateKeyCreateCalls() []struct{ ... }
- type PrivateKeyServiceMock
- func (mock *PrivateKeyServiceMock) Create(ctx context.Context, keyName string) error
- func (mock *PrivateKeyServiceMock) CreateCalls() []struct{ ... }
- func (mock *PrivateKeyServiceMock) PrivateKey(ctx context.Context, keyName string) (*bip32.ExtendedKey, error)
- func (mock *PrivateKeyServiceMock) PrivateKeyCalls() []struct{ ... }
- type ProofCallbackWriterMock
- type ProofsWriterMock
- type SeedServiceMock
- type TimestampServiceMock
- type TransacterMock
- func (mock *TransacterMock) Commit(ctx context.Context) error
- func (mock *TransacterMock) CommitCalls() []struct{ ... }
- func (mock *TransacterMock) Rollback(ctx context.Context) error
- func (mock *TransacterMock) RollbackCalls() []struct{ ... }
- func (mock *TransacterMock) WithTx(ctx context.Context) context.Context
- func (mock *TransacterMock) WithTxCalls() []struct{ ... }
- type TransactionWriterMock
- func (mock *TransactionWriterMock) TransactionCreate(ctx context.Context, req payd.TransactionCreate) error
- func (mock *TransactionWriterMock) TransactionCreateCalls() []struct{ ... }
- func (mock *TransactionWriterMock) TransactionUpdateState(ctx context.Context, args payd.TransactionArgs, ...) error
- func (mock *TransactionWriterMock) TransactionUpdateStateCalls() []struct{ ... }
- type TxoWriterMock
- func (mock *TxoWriterMock) UTXOReserve(ctx context.Context, req payd.UTXOReserve) ([]payd.UTXO, error)
- func (mock *TxoWriterMock) UTXOReserveCalls() []struct{ ... }
- func (mock *TxoWriterMock) UTXOSpend(ctx context.Context, req payd.UTXOSpend) error
- func (mock *TxoWriterMock) UTXOSpendCalls() []struct{ ... }
- func (mock *TxoWriterMock) UTXOUnreserve(ctx context.Context, req payd.UTXOUnreserve) error
- func (mock *TxoWriterMock) UTXOUnreserveCalls() []struct{ ... }
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BroadcastWriterMock ¶ added in v0.1.1
type BroadcastWriterMock struct { // BroadcastFunc mocks the Broadcast method. BroadcastFunc func(ctx context.Context, args payd.BroadcastArgs, tx *bt.Tx) error // contains filtered or unexported fields }
BroadcastWriterMock is a mock implementation of payd.BroadcastWriter.
func TestSomethingThatUsesBroadcastWriter(t *testing.T) { // make and configure a mocked payd.BroadcastWriter mockedBroadcastWriter := &BroadcastWriterMock{ BroadcastFunc: func(ctx context.Context, args payd.BroadcastArgs, tx *bt.Tx) error { panic("mock out the Broadcast method") }, } // use mockedBroadcastWriter in code that requires payd.BroadcastWriter // and then make assertions. }
func (*BroadcastWriterMock) Broadcast ¶ added in v0.1.1
func (mock *BroadcastWriterMock) Broadcast(ctx context.Context, args payd.BroadcastArgs, tx *bt.Tx) error
Broadcast calls BroadcastFunc.
func (*BroadcastWriterMock) BroadcastCalls ¶ added in v0.1.1
func (mock *BroadcastWriterMock) BroadcastCalls() []struct { Ctx context.Context Args payd.BroadcastArgs Tx *bt.Tx }
BroadcastCalls gets all the calls that were made to Broadcast. Check the length with:
len(mockedBroadcastWriter.BroadcastCalls())
type DerivationReaderMock ¶ added in v0.1.1
type DerivationReaderMock struct { // DerivationPathExistsFunc mocks the DerivationPathExists method. DerivationPathExistsFunc func(ctx context.Context, args payd.DerivationExistsArgs) (bool, error) // contains filtered or unexported fields }
DerivationReaderMock is a mock implementation of payd.DerivationReader.
func TestSomethingThatUsesDerivationReader(t *testing.T) { // make and configure a mocked payd.DerivationReader mockedDerivationReader := &DerivationReaderMock{ DerivationPathExistsFunc: func(ctx context.Context, args payd.DerivationExistsArgs) (bool, error) { panic("mock out the DerivationPathExists method") }, } // use mockedDerivationReader in code that requires payd.DerivationReader // and then make assertions. }
func (*DerivationReaderMock) DerivationPathExists ¶ added in v0.1.1
func (mock *DerivationReaderMock) DerivationPathExists(ctx context.Context, args payd.DerivationExistsArgs) (bool, error)
DerivationPathExists calls DerivationPathExistsFunc.
func (*DerivationReaderMock) DerivationPathExistsCalls ¶ added in v0.1.1
func (mock *DerivationReaderMock) DerivationPathExistsCalls() []struct { Ctx context.Context Args payd.DerivationExistsArgs }
DerivationPathExistsCalls gets all the calls that were made to DerivationPathExists. Check the length with:
len(mockedDerivationReader.DerivationPathExistsCalls())
type DestinationsReaderWriterMock ¶ added in v0.1.1
type DestinationsReaderWriterMock struct { // DestinationsFunc mocks the Destinations method. DestinationsFunc func(ctx context.Context, args payd.DestinationsArgs) ([]payd.Output, error) // DestinationsCreateFunc mocks the DestinationsCreate method. DestinationsCreateFunc func(ctx context.Context, args payd.DestinationsCreateArgs, req []payd.DestinationCreate) ([]payd.Output, error) // contains filtered or unexported fields }
DestinationsReaderWriterMock is a mock implementation of payd.DestinationsReaderWriter.
func TestSomethingThatUsesDestinationsReaderWriter(t *testing.T) { // make and configure a mocked payd.DestinationsReaderWriter mockedDestinationsReaderWriter := &DestinationsReaderWriterMock{ DestinationsFunc: func(ctx context.Context, args payd.DestinationsArgs) ([]payd.Output, error) { panic("mock out the Destinations method") }, DestinationsCreateFunc: func(ctx context.Context, args payd.DestinationsCreateArgs, req []payd.DestinationCreate) ([]payd.Output, error) { panic("mock out the DestinationsCreate method") }, } // use mockedDestinationsReaderWriter in code that requires payd.DestinationsReaderWriter // and then make assertions. }
func (*DestinationsReaderWriterMock) Destinations ¶ added in v0.1.1
func (mock *DestinationsReaderWriterMock) Destinations(ctx context.Context, args payd.DestinationsArgs) ([]payd.Output, error)
Destinations calls DestinationsFunc.
func (*DestinationsReaderWriterMock) DestinationsCalls ¶ added in v0.1.1
func (mock *DestinationsReaderWriterMock) DestinationsCalls() []struct { Ctx context.Context Args payd.DestinationsArgs }
DestinationsCalls gets all the calls that were made to Destinations. Check the length with:
len(mockedDestinationsReaderWriter.DestinationsCalls())
func (*DestinationsReaderWriterMock) DestinationsCreate ¶ added in v0.1.1
func (mock *DestinationsReaderWriterMock) DestinationsCreate(ctx context.Context, args payd.DestinationsCreateArgs, req []payd.DestinationCreate) ([]payd.Output, error)
DestinationsCreate calls DestinationsCreateFunc.
func (*DestinationsReaderWriterMock) DestinationsCreateCalls ¶ added in v0.1.1
func (mock *DestinationsReaderWriterMock) DestinationsCreateCalls() []struct { Ctx context.Context Args payd.DestinationsCreateArgs Req []payd.DestinationCreate }
DestinationsCreateCalls gets all the calls that were made to DestinationsCreate. Check the length with:
len(mockedDestinationsReaderWriter.DestinationsCreateCalls())
type DestinationsServiceMock ¶ added in v0.1.1
type DestinationsServiceMock struct { // DestinationsFunc mocks the Destinations method. DestinationsFunc func(ctx context.Context, args payd.DestinationsArgs) (*payd.Destination, error) // DestinationsCreateFunc mocks the DestinationsCreate method. DestinationsCreateFunc func(ctx context.Context, req payd.DestinationsCreate) (*payd.Destination, error) // contains filtered or unexported fields }
DestinationsServiceMock is a mock implementation of payd.DestinationsService.
func TestSomethingThatUsesDestinationsService(t *testing.T) { // make and configure a mocked payd.DestinationsService mockedDestinationsService := &DestinationsServiceMock{ DestinationsFunc: func(ctx context.Context, args payd.DestinationsArgs) (*payd.Destination, error) { panic("mock out the Destinations method") }, DestinationsCreateFunc: func(ctx context.Context, req payd.DestinationsCreate) (*payd.Destination, error) { panic("mock out the DestinationsCreate method") }, } // use mockedDestinationsService in code that requires payd.DestinationsService // and then make assertions. }
func (*DestinationsServiceMock) Destinations ¶ added in v0.1.1
func (mock *DestinationsServiceMock) Destinations(ctx context.Context, args payd.DestinationsArgs) (*payd.Destination, error)
Destinations calls DestinationsFunc.
func (*DestinationsServiceMock) DestinationsCalls ¶ added in v0.1.1
func (mock *DestinationsServiceMock) DestinationsCalls() []struct { Ctx context.Context Args payd.DestinationsArgs }
DestinationsCalls gets all the calls that were made to Destinations. Check the length with:
len(mockedDestinationsService.DestinationsCalls())
func (*DestinationsServiceMock) DestinationsCreate ¶ added in v0.1.1
func (mock *DestinationsServiceMock) DestinationsCreate(ctx context.Context, req payd.DestinationsCreate) (*payd.Destination, error)
DestinationsCreate calls DestinationsCreateFunc.
func (*DestinationsServiceMock) DestinationsCreateCalls ¶ added in v0.1.1
func (mock *DestinationsServiceMock) DestinationsCreateCalls() []struct { Ctx context.Context Req payd.DestinationsCreate }
DestinationsCreateCalls gets all the calls that were made to DestinationsCreate. Check the length with:
len(mockedDestinationsService.DestinationsCreateCalls())
type EnvelopeCreatorMock ¶ added in v0.1.1
type EnvelopeCreatorMock struct { // CreateEnvelopeFunc mocks the CreateEnvelope method. CreateEnvelopeFunc func(contextMoqParam context.Context, tx *bt.Tx) (*spv.Envelope, error) // contains filtered or unexported fields }
EnvelopeCreatorMock is a mock implementation of spv.EnvelopeCreator.
func TestSomethingThatUsesEnvelopeCreator(t *testing.T) { // make and configure a mocked spv.EnvelopeCreator mockedEnvelopeCreator := &EnvelopeCreatorMock{ CreateEnvelopeFunc: func(contextMoqParam context.Context, tx *bt.Tx) (*spv.Envelope, error) { panic("mock out the CreateEnvelope method") }, } // use mockedEnvelopeCreator in code that requires spv.EnvelopeCreator // and then make assertions. }
func (*EnvelopeCreatorMock) CreateEnvelope ¶ added in v0.1.1
func (mock *EnvelopeCreatorMock) CreateEnvelope(contextMoqParam context.Context, tx *bt.Tx) (*spv.Envelope, error)
CreateEnvelope calls CreateEnvelopeFunc.
func (*EnvelopeCreatorMock) CreateEnvelopeCalls ¶ added in v0.1.1
func (mock *EnvelopeCreatorMock) CreateEnvelopeCalls() []struct { ContextMoqParam context.Context Tx *bt.Tx }
CreateEnvelopeCalls gets all the calls that were made to CreateEnvelope. Check the length with:
len(mockedEnvelopeCreator.CreateEnvelopeCalls())
type EnvelopeServiceMock ¶ added in v0.1.1
type EnvelopeServiceMock struct { // EnvelopeFunc mocks the Envelope method. EnvelopeFunc func(ctx context.Context, args payd.EnvelopeArgs, req p4.PaymentRequest) (*spv.Envelope, error) // contains filtered or unexported fields }
EnvelopeServiceMock is a mock implementation of payd.EnvelopeService.
func TestSomethingThatUsesEnvelopeService(t *testing.T) { // make and configure a mocked payd.EnvelopeService mockedEnvelopeService := &EnvelopeServiceMock{ EnvelopeFunc: func(ctx context.Context, args payd.EnvelopeArgs, req p4.PaymentRequest) (*spv.Envelope, error) { panic("mock out the Envelope method") }, } // use mockedEnvelopeService in code that requires payd.EnvelopeService // and then make assertions. }
func (*EnvelopeServiceMock) Envelope ¶ added in v0.1.1
func (mock *EnvelopeServiceMock) Envelope(ctx context.Context, args payd.EnvelopeArgs, req p4.PaymentRequest) (*spv.Envelope, error)
Envelope calls EnvelopeFunc.
func (*EnvelopeServiceMock) EnvelopeCalls ¶ added in v0.1.1
func (mock *EnvelopeServiceMock) EnvelopeCalls() []struct { Ctx context.Context Args payd.EnvelopeArgs Req p4.PaymentRequest }
EnvelopeCalls gets all the calls that were made to Envelope. Check the length with:
len(mockedEnvelopeService.EnvelopeCalls())
type FeeReaderMock ¶ added in v0.1.1
type FeeReaderMock struct { // FeesFunc mocks the Fees method. FeesFunc func(ctx context.Context) (*bt.FeeQuote, error) // contains filtered or unexported fields }
FeeReaderMock is a mock implementation of payd.FeeReader.
func TestSomethingThatUsesFeeReader(t *testing.T) { // make and configure a mocked payd.FeeReader mockedFeeReader := &FeeReaderMock{ FeesFunc: func(ctx context.Context) (*bt.FeeQuote, error) { panic("mock out the Fees method") }, } // use mockedFeeReader in code that requires payd.FeeReader // and then make assertions. }
func (*FeeReaderMock) Fees ¶ added in v0.1.1
func (mock *FeeReaderMock) Fees(ctx context.Context) (*bt.FeeQuote, error)
Fees calls FeesFunc.
func (*FeeReaderMock) FeesCalls ¶ added in v0.1.1
func (mock *FeeReaderMock) FeesCalls() []struct { Ctx context.Context }
FeesCalls gets all the calls that were made to Fees. Check the length with:
len(mockedFeeReader.FeesCalls())
type InvoiceReaderWriterMock ¶ added in v0.1.1
type InvoiceReaderWriterMock struct { // InvoiceFunc mocks the Invoice method. InvoiceFunc func(ctx context.Context, args payd.InvoiceArgs) (*payd.Invoice, error) // InvoiceCreateFunc mocks the InvoiceCreate method. InvoiceCreateFunc func(ctx context.Context, req payd.InvoiceCreate) (*payd.Invoice, error) // InvoiceDeleteFunc mocks the InvoiceDelete method. InvoiceDeleteFunc func(ctx context.Context, args payd.InvoiceArgs) error // InvoiceUpdateFunc mocks the InvoiceUpdate method. InvoiceUpdateFunc func(ctx context.Context, args payd.InvoiceUpdateArgs, req payd.InvoiceUpdatePaid) (*payd.Invoice, error) // InvoicesFunc mocks the Invoices method. InvoicesFunc func(ctx context.Context) ([]payd.Invoice, error) // contains filtered or unexported fields }
InvoiceReaderWriterMock is a mock implementation of payd.InvoiceReaderWriter.
func TestSomethingThatUsesInvoiceReaderWriter(t *testing.T) { // make and configure a mocked payd.InvoiceReaderWriter mockedInvoiceReaderWriter := &InvoiceReaderWriterMock{ InvoiceFunc: func(ctx context.Context, args payd.InvoiceArgs) (*payd.Invoice, error) { panic("mock out the Invoice method") }, InvoiceCreateFunc: func(ctx context.Context, req payd.InvoiceCreate) (*payd.Invoice, error) { panic("mock out the InvoiceCreate method") }, InvoiceDeleteFunc: func(ctx context.Context, args payd.InvoiceArgs) error { panic("mock out the InvoiceDelete method") }, InvoiceUpdateFunc: func(ctx context.Context, args payd.InvoiceUpdateArgs, req payd.InvoiceUpdatePaid) (*payd.Invoice, error) { panic("mock out the InvoiceUpdate method") }, InvoicesFunc: func(ctx context.Context) ([]payd.Invoice, error) { panic("mock out the Invoices method") }, } // use mockedInvoiceReaderWriter in code that requires payd.InvoiceReaderWriter // and then make assertions. }
func (*InvoiceReaderWriterMock) Invoice ¶ added in v0.1.1
func (mock *InvoiceReaderWriterMock) Invoice(ctx context.Context, args payd.InvoiceArgs) (*payd.Invoice, error)
Invoice calls InvoiceFunc.
func (*InvoiceReaderWriterMock) InvoiceCalls ¶ added in v0.1.1
func (mock *InvoiceReaderWriterMock) InvoiceCalls() []struct { Ctx context.Context Args payd.InvoiceArgs }
InvoiceCalls gets all the calls that were made to Invoice. Check the length with:
len(mockedInvoiceReaderWriter.InvoiceCalls())
func (*InvoiceReaderWriterMock) InvoiceCreate ¶ added in v0.1.1
func (mock *InvoiceReaderWriterMock) InvoiceCreate(ctx context.Context, req payd.InvoiceCreate) (*payd.Invoice, error)
InvoiceCreate calls InvoiceCreateFunc.
func (*InvoiceReaderWriterMock) InvoiceCreateCalls ¶ added in v0.1.1
func (mock *InvoiceReaderWriterMock) InvoiceCreateCalls() []struct { Ctx context.Context Req payd.InvoiceCreate }
InvoiceCreateCalls gets all the calls that were made to InvoiceCreate. Check the length with:
len(mockedInvoiceReaderWriter.InvoiceCreateCalls())
func (*InvoiceReaderWriterMock) InvoiceDelete ¶ added in v0.1.1
func (mock *InvoiceReaderWriterMock) InvoiceDelete(ctx context.Context, args payd.InvoiceArgs) error
InvoiceDelete calls InvoiceDeleteFunc.
func (*InvoiceReaderWriterMock) InvoiceDeleteCalls ¶ added in v0.1.1
func (mock *InvoiceReaderWriterMock) InvoiceDeleteCalls() []struct { Ctx context.Context Args payd.InvoiceArgs }
InvoiceDeleteCalls gets all the calls that were made to InvoiceDelete. Check the length with:
len(mockedInvoiceReaderWriter.InvoiceDeleteCalls())
func (*InvoiceReaderWriterMock) InvoiceUpdate ¶ added in v0.1.1
func (mock *InvoiceReaderWriterMock) InvoiceUpdate(ctx context.Context, args payd.InvoiceUpdateArgs, req payd.InvoiceUpdatePaid) (*payd.Invoice, error)
InvoiceUpdate calls InvoiceUpdateFunc.
func (*InvoiceReaderWriterMock) InvoiceUpdateCalls ¶ added in v0.1.1
func (mock *InvoiceReaderWriterMock) InvoiceUpdateCalls() []struct { Ctx context.Context Args payd.InvoiceUpdateArgs Req payd.InvoiceUpdatePaid }
InvoiceUpdateCalls gets all the calls that were made to InvoiceUpdate. Check the length with:
len(mockedInvoiceReaderWriter.InvoiceUpdateCalls())
func (*InvoiceReaderWriterMock) InvoicesCalls ¶ added in v0.1.1
func (mock *InvoiceReaderWriterMock) InvoicesCalls() []struct { Ctx context.Context }
InvoicesCalls gets all the calls that were made to Invoices. Check the length with:
len(mockedInvoiceReaderWriter.InvoicesCalls())
type OwnerStoreMock ¶ added in v0.1.1
type OwnerStoreMock struct { // OwnerFunc mocks the Owner method. OwnerFunc func(ctx context.Context) (*payd.User, error) // contains filtered or unexported fields }
OwnerStoreMock is a mock implementation of payd.OwnerStore.
func TestSomethingThatUsesOwnerStore(t *testing.T) { // make and configure a mocked payd.OwnerStore mockedOwnerStore := &OwnerStoreMock{ OwnerFunc: func(ctx context.Context) (*payd.User, error) { panic("mock out the Owner method") }, } // use mockedOwnerStore in code that requires payd.OwnerStore // and then make assertions. }
func (*OwnerStoreMock) OwnerCalls ¶ added in v0.1.1
func (mock *OwnerStoreMock) OwnerCalls() []struct { Ctx context.Context }
OwnerCalls gets all the calls that were made to Owner. Check the length with:
len(mockedOwnerStore.OwnerCalls())
type P4Mock ¶ added in v0.1.1
type P4Mock struct { // PaymentRequestFunc mocks the PaymentRequest method. PaymentRequestFunc func(ctx context.Context, req payd.PayRequest) (*p4.PaymentRequest, error) // PaymentSendFunc mocks the PaymentSend method. PaymentSendFunc func(ctx context.Context, args payd.PayRequest, req p4.Payment) (*p4.PaymentACK, error) // contains filtered or unexported fields }
P4Mock is a mock implementation of http.P4.
func TestSomethingThatUsesP4(t *testing.T) { // make and configure a mocked http.P4 mockedP4 := &P4Mock{ PaymentRequestFunc: func(ctx context.Context, req payd.PayRequest) (*p4.PaymentRequest, error) { panic("mock out the PaymentRequest method") }, PaymentSendFunc: func(ctx context.Context, args payd.PayRequest, req p4.Payment) (*p4.PaymentACK, error) { panic("mock out the PaymentSend method") }, } // use mockedP4 in code that requires http.P4 // and then make assertions. }
func (*P4Mock) PaymentRequest ¶ added in v0.1.1
func (mock *P4Mock) PaymentRequest(ctx context.Context, req payd.PayRequest) (*p4.PaymentRequest, error)
PaymentRequest calls PaymentRequestFunc.
func (*P4Mock) PaymentRequestCalls ¶ added in v0.1.1
func (mock *P4Mock) PaymentRequestCalls() []struct { Ctx context.Context Req payd.PayRequest }
PaymentRequestCalls gets all the calls that were made to PaymentRequest. Check the length with:
len(mockedP4.PaymentRequestCalls())
func (*P4Mock) PaymentSend ¶ added in v0.1.1
func (mock *P4Mock) PaymentSend(ctx context.Context, args payd.PayRequest, req p4.Payment) (*p4.PaymentACK, error)
PaymentSend calls PaymentSendFunc.
func (*P4Mock) PaymentSendCalls ¶ added in v0.1.1
func (mock *P4Mock) PaymentSendCalls() []struct { Ctx context.Context Args payd.PayRequest Req p4.Payment }
PaymentSendCalls gets all the calls that were made to PaymentSend. Check the length with:
len(mockedP4.PaymentSendCalls())
type PaymentVerifierMock ¶ added in v0.1.1
type PaymentVerifierMock struct { // VerifyMerkleProofFunc mocks the VerifyMerkleProof method. VerifyMerkleProofFunc func(contextMoqParam context.Context, bytes []byte) (bool, bool, error) // VerifyMerkleProofJSONFunc mocks the VerifyMerkleProofJSON method. VerifyMerkleProofJSONFunc func(contextMoqParam context.Context, merkleProof *bc.MerkleProof) (bool, bool, error) // VerifyPaymentFunc mocks the VerifyPayment method. VerifyPaymentFunc func(contextMoqParam context.Context, envelope *spv.Envelope, verifyOpts ...spv.VerifyOpt) (*bt.Tx, error) // contains filtered or unexported fields }
PaymentVerifierMock is a mock implementation of spv.PaymentVerifier.
func TestSomethingThatUsesPaymentVerifier(t *testing.T) { // make and configure a mocked spv.PaymentVerifier mockedPaymentVerifier := &PaymentVerifierMock{ VerifyMerkleProofFunc: func(contextMoqParam context.Context, bytes []byte) (bool, bool, error) { panic("mock out the VerifyMerkleProof method") }, VerifyMerkleProofJSONFunc: func(contextMoqParam context.Context, merkleProof *bc.MerkleProof) (bool, bool, error) { panic("mock out the VerifyMerkleProofJSON method") }, VerifyPaymentFunc: func(contextMoqParam context.Context, envelope *spv.Envelope, verifyOpts ...spv.VerifyOpt) (*bt.Tx, error) { panic("mock out the VerifyPayment method") }, } // use mockedPaymentVerifier in code that requires spv.PaymentVerifier // and then make assertions. }
func (*PaymentVerifierMock) VerifyMerkleProof ¶ added in v0.1.1
func (mock *PaymentVerifierMock) VerifyMerkleProof(contextMoqParam context.Context, bytes []byte) (bool, bool, error)
VerifyMerkleProof calls VerifyMerkleProofFunc.
func (*PaymentVerifierMock) VerifyMerkleProofCalls ¶ added in v0.1.1
func (mock *PaymentVerifierMock) VerifyMerkleProofCalls() []struct { ContextMoqParam context.Context Bytes []byte }
VerifyMerkleProofCalls gets all the calls that were made to VerifyMerkleProof. Check the length with:
len(mockedPaymentVerifier.VerifyMerkleProofCalls())
func (*PaymentVerifierMock) VerifyMerkleProofJSON ¶ added in v0.1.1
func (mock *PaymentVerifierMock) VerifyMerkleProofJSON(contextMoqParam context.Context, merkleProof *bc.MerkleProof) (bool, bool, error)
VerifyMerkleProofJSON calls VerifyMerkleProofJSONFunc.
func (*PaymentVerifierMock) VerifyMerkleProofJSONCalls ¶ added in v0.1.1
func (mock *PaymentVerifierMock) VerifyMerkleProofJSONCalls() []struct { ContextMoqParam context.Context MerkleProof *bc.MerkleProof }
VerifyMerkleProofJSONCalls gets all the calls that were made to VerifyMerkleProofJSON. Check the length with:
len(mockedPaymentVerifier.VerifyMerkleProofJSONCalls())
func (*PaymentVerifierMock) VerifyPayment ¶ added in v0.1.1
func (mock *PaymentVerifierMock) VerifyPayment(contextMoqParam context.Context, envelope *spv.Envelope, verifyOpts ...spv.VerifyOpt) (*bt.Tx, error)
VerifyPayment calls VerifyPaymentFunc.
func (*PaymentVerifierMock) VerifyPaymentCalls ¶ added in v0.1.1
func (mock *PaymentVerifierMock) VerifyPaymentCalls() []struct { ContextMoqParam context.Context Envelope *spv.Envelope VerifyOpts []spv.VerifyOpt }
VerifyPaymentCalls gets all the calls that were made to VerifyPayment. Check the length with:
len(mockedPaymentVerifier.VerifyPaymentCalls())
type PrivateKeyReaderWriterMock ¶ added in v0.1.1
type PrivateKeyReaderWriterMock struct { // PrivateKeyFunc mocks the PrivateKey method. PrivateKeyFunc func(ctx context.Context, args payd.KeyArgs) (*payd.PrivateKey, error) // PrivateKeyCreateFunc mocks the PrivateKeyCreate method. PrivateKeyCreateFunc func(ctx context.Context, req payd.PrivateKey) (*payd.PrivateKey, error) // contains filtered or unexported fields }
PrivateKeyReaderWriterMock is a mock implementation of payd.PrivateKeyReaderWriter.
func TestSomethingThatUsesPrivateKeyReaderWriter(t *testing.T) { // make and configure a mocked payd.PrivateKeyReaderWriter mockedPrivateKeyReaderWriter := &PrivateKeyReaderWriterMock{ PrivateKeyFunc: func(ctx context.Context, args payd.KeyArgs) (*payd.PrivateKey, error) { panic("mock out the PrivateKey method") }, PrivateKeyCreateFunc: func(ctx context.Context, req payd.PrivateKey) (*payd.PrivateKey, error) { panic("mock out the PrivateKeyCreate method") }, } // use mockedPrivateKeyReaderWriter in code that requires payd.PrivateKeyReaderWriter // and then make assertions. }
func (*PrivateKeyReaderWriterMock) PrivateKey ¶ added in v0.1.1
func (mock *PrivateKeyReaderWriterMock) PrivateKey(ctx context.Context, args payd.KeyArgs) (*payd.PrivateKey, error)
PrivateKey calls PrivateKeyFunc.
func (*PrivateKeyReaderWriterMock) PrivateKeyCalls ¶ added in v0.1.1
func (mock *PrivateKeyReaderWriterMock) PrivateKeyCalls() []struct { Ctx context.Context Args payd.KeyArgs }
PrivateKeyCalls gets all the calls that were made to PrivateKey. Check the length with:
len(mockedPrivateKeyReaderWriter.PrivateKeyCalls())
func (*PrivateKeyReaderWriterMock) PrivateKeyCreate ¶ added in v0.1.1
func (mock *PrivateKeyReaderWriterMock) PrivateKeyCreate(ctx context.Context, req payd.PrivateKey) (*payd.PrivateKey, error)
PrivateKeyCreate calls PrivateKeyCreateFunc.
func (*PrivateKeyReaderWriterMock) PrivateKeyCreateCalls ¶ added in v0.1.1
func (mock *PrivateKeyReaderWriterMock) PrivateKeyCreateCalls() []struct { Ctx context.Context Req payd.PrivateKey }
PrivateKeyCreateCalls gets all the calls that were made to PrivateKeyCreate. Check the length with:
len(mockedPrivateKeyReaderWriter.PrivateKeyCreateCalls())
type PrivateKeyServiceMock ¶ added in v0.1.1
type PrivateKeyServiceMock struct { // CreateFunc mocks the Create method. CreateFunc func(ctx context.Context, keyName string) error // PrivateKeyFunc mocks the PrivateKey method. PrivateKeyFunc func(ctx context.Context, keyName string) (*bip32.ExtendedKey, error) // contains filtered or unexported fields }
PrivateKeyServiceMock is a mock implementation of payd.PrivateKeyService.
func TestSomethingThatUsesPrivateKeyService(t *testing.T) { // make and configure a mocked payd.PrivateKeyService mockedPrivateKeyService := &PrivateKeyServiceMock{ CreateFunc: func(ctx context.Context, keyName string) error { panic("mock out the Create method") }, PrivateKeyFunc: func(ctx context.Context, keyName string) (*bip32.ExtendedKey, error) { panic("mock out the PrivateKey method") }, } // use mockedPrivateKeyService in code that requires payd.PrivateKeyService // and then make assertions. }
func (*PrivateKeyServiceMock) Create ¶ added in v0.1.1
func (mock *PrivateKeyServiceMock) Create(ctx context.Context, keyName string) error
Create calls CreateFunc.
func (*PrivateKeyServiceMock) CreateCalls ¶ added in v0.1.1
func (mock *PrivateKeyServiceMock) CreateCalls() []struct { Ctx context.Context KeyName string }
CreateCalls gets all the calls that were made to Create. Check the length with:
len(mockedPrivateKeyService.CreateCalls())
func (*PrivateKeyServiceMock) PrivateKey ¶ added in v0.1.1
func (mock *PrivateKeyServiceMock) PrivateKey(ctx context.Context, keyName string) (*bip32.ExtendedKey, error)
PrivateKey calls PrivateKeyFunc.
func (*PrivateKeyServiceMock) PrivateKeyCalls ¶ added in v0.1.1
func (mock *PrivateKeyServiceMock) PrivateKeyCalls() []struct { Ctx context.Context KeyName string }
PrivateKeyCalls gets all the calls that were made to PrivateKey. Check the length with:
len(mockedPrivateKeyService.PrivateKeyCalls())
type ProofCallbackWriterMock ¶ added in v0.1.1
type ProofCallbackWriterMock struct { // ProofCallBacksCreateFunc mocks the ProofCallBacksCreate method. ProofCallBacksCreateFunc func(ctx context.Context, args payd.ProofCallbackArgs, callbacks map[string]p4.ProofCallback) error // contains filtered or unexported fields }
ProofCallbackWriterMock is a mock implementation of payd.ProofCallbackWriter.
func TestSomethingThatUsesProofCallbackWriter(t *testing.T) { // make and configure a mocked payd.ProofCallbackWriter mockedProofCallbackWriter := &ProofCallbackWriterMock{ ProofCallBacksCreateFunc: func(ctx context.Context, args payd.ProofCallbackArgs, callbacks map[string]p4.ProofCallback) error { panic("mock out the ProofCallBacksCreate method") }, } // use mockedProofCallbackWriter in code that requires payd.ProofCallbackWriter // and then make assertions. }
func (*ProofCallbackWriterMock) ProofCallBacksCreate ¶ added in v0.1.1
func (mock *ProofCallbackWriterMock) ProofCallBacksCreate(ctx context.Context, args payd.ProofCallbackArgs, callbacks map[string]p4.ProofCallback) error
ProofCallBacksCreate calls ProofCallBacksCreateFunc.
func (*ProofCallbackWriterMock) ProofCallBacksCreateCalls ¶ added in v0.1.1
func (mock *ProofCallbackWriterMock) ProofCallBacksCreateCalls() []struct { Ctx context.Context Args payd.ProofCallbackArgs Callbacks map[string]p4.ProofCallback }
ProofCallBacksCreateCalls gets all the calls that were made to ProofCallBacksCreate. Check the length with:
len(mockedProofCallbackWriter.ProofCallBacksCreateCalls())
type ProofsWriterMock ¶
type ProofsWriterMock struct { // ProofCreateFunc mocks the ProofCreate method. ProofCreateFunc func(ctx context.Context, req p4.ProofWrapper) error // contains filtered or unexported fields }
ProofsWriterMock is a mock implementation of payd.ProofsWriter.
func TestSomethingThatUsesProofsWriter(t *testing.T) { // make and configure a mocked payd.ProofsWriter mockedProofsWriter := &ProofsWriterMock{ ProofCreateFunc: func(ctx context.Context, req p4.ProofWrapper) error { panic("mock out the ProofCreate method") }, } // use mockedProofsWriter in code that requires payd.ProofsWriter // and then make assertions. }
func (*ProofsWriterMock) ProofCreate ¶
func (mock *ProofsWriterMock) ProofCreate(ctx context.Context, req p4.ProofWrapper) error
ProofCreate calls ProofCreateFunc.
func (*ProofsWriterMock) ProofCreateCalls ¶
func (mock *ProofsWriterMock) ProofCreateCalls() []struct { Ctx context.Context Req p4.ProofWrapper }
ProofCreateCalls gets all the calls that were made to ProofCreate. Check the length with:
len(mockedProofsWriter.ProofCreateCalls())
type SeedServiceMock ¶ added in v0.1.1
type SeedServiceMock struct { // Uint64Func mocks the Uint64 method. Uint64Func func() (uint64, error) // contains filtered or unexported fields }
SeedServiceMock is a mock implementation of payd.SeedService.
func TestSomethingThatUsesSeedService(t *testing.T) { // make and configure a mocked payd.SeedService mockedSeedService := &SeedServiceMock{ Uint64Func: func() (uint64, error) { panic("mock out the Uint64 method") }, } // use mockedSeedService in code that requires payd.SeedService // and then make assertions. }
func (*SeedServiceMock) Uint64 ¶ added in v0.1.1
func (mock *SeedServiceMock) Uint64() (uint64, error)
Uint64 calls Uint64Func.
func (*SeedServiceMock) Uint64Calls ¶ added in v0.1.1
func (mock *SeedServiceMock) Uint64Calls() []struct { }
Uint64Calls gets all the calls that were made to Uint64. Check the length with:
len(mockedSeedService.Uint64Calls())
type TimestampServiceMock ¶ added in v0.1.1
type TimestampServiceMock struct { // NanosecondFunc mocks the Nanosecond method. NanosecondFunc func() int // NowUTCFunc mocks the NowUTC method. NowUTCFunc func() time.Time // contains filtered or unexported fields }
TimestampServiceMock is a mock implementation of payd.TimestampService.
func TestSomethingThatUsesTimestampService(t *testing.T) { // make and configure a mocked payd.TimestampService mockedTimestampService := &TimestampServiceMock{ NanosecondFunc: func() int { panic("mock out the Nanosecond method") }, NowUTCFunc: func() time.Time { panic("mock out the NowUTC method") }, } // use mockedTimestampService in code that requires payd.TimestampService // and then make assertions. }
func (*TimestampServiceMock) Nanosecond ¶ added in v0.1.1
func (mock *TimestampServiceMock) Nanosecond() int
Nanosecond calls NanosecondFunc.
func (*TimestampServiceMock) NanosecondCalls ¶ added in v0.1.1
func (mock *TimestampServiceMock) NanosecondCalls() []struct { }
NanosecondCalls gets all the calls that were made to Nanosecond. Check the length with:
len(mockedTimestampService.NanosecondCalls())
func (*TimestampServiceMock) NowUTC ¶ added in v0.1.1
func (mock *TimestampServiceMock) NowUTC() time.Time
NowUTC calls NowUTCFunc.
func (*TimestampServiceMock) NowUTCCalls ¶ added in v0.1.1
func (mock *TimestampServiceMock) NowUTCCalls() []struct { }
NowUTCCalls gets all the calls that were made to NowUTC. Check the length with:
len(mockedTimestampService.NowUTCCalls())
type TransacterMock ¶ added in v0.1.1
type TransacterMock struct { // CommitFunc mocks the Commit method. CommitFunc func(ctx context.Context) error // RollbackFunc mocks the Rollback method. RollbackFunc func(ctx context.Context) error // WithTxFunc mocks the WithTx method. WithTxFunc func(ctx context.Context) context.Context // contains filtered or unexported fields }
TransacterMock is a mock implementation of payd.Transacter.
func TestSomethingThatUsesTransacter(t *testing.T) { // make and configure a mocked payd.Transacter mockedTransacter := &TransacterMock{ CommitFunc: func(ctx context.Context) error { panic("mock out the Commit method") }, RollbackFunc: func(ctx context.Context) error { panic("mock out the Rollback method") }, WithTxFunc: func(ctx context.Context) context.Context { panic("mock out the WithTx method") }, } // use mockedTransacter in code that requires payd.Transacter // and then make assertions. }
func (*TransacterMock) Commit ¶ added in v0.1.1
func (mock *TransacterMock) Commit(ctx context.Context) error
Commit calls CommitFunc.
func (*TransacterMock) CommitCalls ¶ added in v0.1.1
func (mock *TransacterMock) CommitCalls() []struct { Ctx context.Context }
CommitCalls gets all the calls that were made to Commit. Check the length with:
len(mockedTransacter.CommitCalls())
func (*TransacterMock) Rollback ¶ added in v0.1.1
func (mock *TransacterMock) Rollback(ctx context.Context) error
Rollback calls RollbackFunc.
func (*TransacterMock) RollbackCalls ¶ added in v0.1.1
func (mock *TransacterMock) RollbackCalls() []struct { Ctx context.Context }
RollbackCalls gets all the calls that were made to Rollback. Check the length with:
len(mockedTransacter.RollbackCalls())
func (*TransacterMock) WithTx ¶ added in v0.1.1
func (mock *TransacterMock) WithTx(ctx context.Context) context.Context
WithTx calls WithTxFunc.
func (*TransacterMock) WithTxCalls ¶ added in v0.1.1
func (mock *TransacterMock) WithTxCalls() []struct { Ctx context.Context }
WithTxCalls gets all the calls that were made to WithTx. Check the length with:
len(mockedTransacter.WithTxCalls())
type TransactionWriterMock ¶ added in v0.1.1
type TransactionWriterMock struct { // TransactionCreateFunc mocks the TransactionCreate method. TransactionCreateFunc func(ctx context.Context, req payd.TransactionCreate) error // TransactionUpdateStateFunc mocks the TransactionUpdateState method. TransactionUpdateStateFunc func(ctx context.Context, args payd.TransactionArgs, req payd.TransactionStateUpdate) error // contains filtered or unexported fields }
TransactionWriterMock is a mock implementation of payd.TransactionWriter.
func TestSomethingThatUsesTransactionWriter(t *testing.T) { // make and configure a mocked payd.TransactionWriter mockedTransactionWriter := &TransactionWriterMock{ TransactionCreateFunc: func(ctx context.Context, req payd.TransactionCreate) error { panic("mock out the TransactionCreate method") }, TransactionUpdateStateFunc: func(ctx context.Context, args payd.TransactionArgs, req payd.TransactionStateUpdate) error { panic("mock out the TransactionUpdateState method") }, } // use mockedTransactionWriter in code that requires payd.TransactionWriter // and then make assertions. }
func (*TransactionWriterMock) TransactionCreate ¶ added in v0.1.1
func (mock *TransactionWriterMock) TransactionCreate(ctx context.Context, req payd.TransactionCreate) error
TransactionCreate calls TransactionCreateFunc.
func (*TransactionWriterMock) TransactionCreateCalls ¶ added in v0.1.1
func (mock *TransactionWriterMock) TransactionCreateCalls() []struct { Ctx context.Context Req payd.TransactionCreate }
TransactionCreateCalls gets all the calls that were made to TransactionCreate. Check the length with:
len(mockedTransactionWriter.TransactionCreateCalls())
func (*TransactionWriterMock) TransactionUpdateState ¶ added in v0.1.1
func (mock *TransactionWriterMock) TransactionUpdateState(ctx context.Context, args payd.TransactionArgs, req payd.TransactionStateUpdate) error
TransactionUpdateState calls TransactionUpdateStateFunc.
func (*TransactionWriterMock) TransactionUpdateStateCalls ¶ added in v0.1.1
func (mock *TransactionWriterMock) TransactionUpdateStateCalls() []struct { Ctx context.Context Args payd.TransactionArgs Req payd.TransactionStateUpdate }
TransactionUpdateStateCalls gets all the calls that were made to TransactionUpdateState. Check the length with:
len(mockedTransactionWriter.TransactionUpdateStateCalls())
type TxoWriterMock ¶ added in v0.1.1
type TxoWriterMock struct { // UTXOReserveFunc mocks the UTXOReserve method. UTXOReserveFunc func(ctx context.Context, req payd.UTXOReserve) ([]payd.UTXO, error) // UTXOSpendFunc mocks the UTXOSpend method. UTXOSpendFunc func(ctx context.Context, req payd.UTXOSpend) error // UTXOUnreserveFunc mocks the UTXOUnreserve method. UTXOUnreserveFunc func(ctx context.Context, req payd.UTXOUnreserve) error // contains filtered or unexported fields }
TxoWriterMock is a mock implementation of payd.TxoWriter.
func TestSomethingThatUsesTxoWriter(t *testing.T) { // make and configure a mocked payd.TxoWriter mockedTxoWriter := &TxoWriterMock{ UTXOReserveFunc: func(ctx context.Context, req payd.UTXOReserve) ([]payd.UTXO, error) { panic("mock out the UTXOReserve method") }, UTXOSpendFunc: func(ctx context.Context, req payd.UTXOSpend) error { panic("mock out the UTXOSpend method") }, UTXOUnreserveFunc: func(ctx context.Context, req payd.UTXOUnreserve) error { panic("mock out the UTXOUnreserve method") }, } // use mockedTxoWriter in code that requires payd.TxoWriter // and then make assertions. }
func (*TxoWriterMock) UTXOReserve ¶ added in v0.1.1
func (mock *TxoWriterMock) UTXOReserve(ctx context.Context, req payd.UTXOReserve) ([]payd.UTXO, error)
UTXOReserve calls UTXOReserveFunc.
func (*TxoWriterMock) UTXOReserveCalls ¶ added in v0.1.1
func (mock *TxoWriterMock) UTXOReserveCalls() []struct { Ctx context.Context Req payd.UTXOReserve }
UTXOReserveCalls gets all the calls that were made to UTXOReserve. Check the length with:
len(mockedTxoWriter.UTXOReserveCalls())
func (*TxoWriterMock) UTXOSpendCalls ¶ added in v0.1.1
func (mock *TxoWriterMock) UTXOSpendCalls() []struct { Ctx context.Context Req payd.UTXOSpend }
UTXOSpendCalls gets all the calls that were made to UTXOSpend. Check the length with:
len(mockedTxoWriter.UTXOSpendCalls())
func (*TxoWriterMock) UTXOUnreserve ¶ added in v0.1.1
func (mock *TxoWriterMock) UTXOUnreserve(ctx context.Context, req payd.UTXOUnreserve) error
UTXOUnreserve calls UTXOUnreserveFunc.
func (*TxoWriterMock) UTXOUnreserveCalls ¶ added in v0.1.1
func (mock *TxoWriterMock) UTXOUnreserveCalls() []struct { Ctx context.Context Req payd.UTXOUnreserve }
UTXOUnreserveCalls gets all the calls that were made to UTXOUnreserve. Check the length with:
len(mockedTxoWriter.UTXOUnreserveCalls())
Source Files
¶
- broadcast_writer.go
- derivation_reader.go
- destination_reader_writer.go
- destination_service.go
- envelope_creator.go
- envelope_service.go
- fee_reader.go
- invoice_reader_writer.go
- mocks.go
- owner_store.go
- p4.go
- payment_verifier.go
- private_key_reader_writer.go
- private_key_service.go
- proof_callback_writer.go
- proofs_writer.go
- seed_service.go
- timestamp_service.go
- transacter.go
- tx_writer.go
- txo_writer.go