Documentation
¶
Index ¶
- type BroadcastWriterMock
- type DPPMock
- func (mock *DPPMock) PaymentRequest(ctx context.Context, req payd.PayRequest) (*dpp.PaymentRequest, error)
- func (mock *DPPMock) PaymentRequestCalls() []struct{ ... }
- func (mock *DPPMock) PaymentSend(ctx context.Context, args payd.PayRequest, req dpp.Payment) (*dpp.PaymentACK, error)
- func (mock *DPPMock) PaymentSendCalls() []struct{ ... }
- 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 FeeQuoteFetcherMock
- type FeeQuoteReaderMock
- 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{ ... }
- func (mock *InvoiceReaderWriterMock) InvoicesPending(ctx context.Context) ([]payd.Invoice, error)
- func (mock *InvoiceReaderWriterMock) InvoicesPendingCalls() []struct{ ... }
- type OwnerStoreMock
- type PaymentVerifierMock
- func (mock *PaymentVerifierMock) VerifyMerkleProof(contextMoqParam context.Context, bytes []byte) (*spv.MerkleProofValidation, 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(ctx context.Context, pTx *bt.Tx, ancestors []byte, opts ...spv.VerifyOpt) (*bt.Tx, error)
- func (mock *PaymentVerifierMock) VerifyPaymentCalls() []struct{ ... }
- type PeerChannelsNotifyServiceMock
- func (mock *PeerChannelsNotifyServiceMock) RegisterHandler(ht payd.PeerChannelHandlerType, hdlr payd.PeerChannelsMessageHandler) payd.PeerChannelsNotifyService
- func (mock *PeerChannelsNotifyServiceMock) RegisterHandlerCalls() []struct{ ... }
- func (mock *PeerChannelsNotifyServiceMock) Subscribe(ctx context.Context, args *payd.PeerChannel) error
- func (mock *PeerChannelsNotifyServiceMock) SubscribeCalls() []struct{ ... }
- type PeerChannelsServiceMock
- func (mock *PeerChannelsServiceMock) ActiveProofChannels(ctx context.Context) ([]payd.PeerChannel, error)
- func (mock *PeerChannelsServiceMock) ActiveProofChannelsCalls() []struct{ ... }
- func (mock *PeerChannelsServiceMock) CloseChannel(ctx context.Context, channelID string) error
- func (mock *PeerChannelsServiceMock) CloseChannelCalls() []struct{ ... }
- func (mock *PeerChannelsServiceMock) PeerChannelAPITokensCreate(ctx context.Context, reqs ...*payd.PeerChannelAPITokenCreateArgs) ([]*spvchannels.TokenCreateReply, error)
- func (mock *PeerChannelsServiceMock) PeerChannelAPITokensCreateCalls() []struct{ ... }
- func (mock *PeerChannelsServiceMock) PeerChannelCreate(ctx context.Context, req spvchannels.ChannelCreateRequest) (*payd.PeerChannel, error)
- func (mock *PeerChannelsServiceMock) PeerChannelCreateCalls() []struct{ ... }
- func (mock *PeerChannelsServiceMock) PeerChannelsMessage(ctx context.Context, args *payd.PeerChannelMessageArgs) (spvchannels.MessagesReply, error)
- func (mock *PeerChannelsServiceMock) PeerChannelsMessageCalls() []struct{ ... }
- type PeerChannelsStoreMock
- func (mock *PeerChannelsStoreMock) PeerChannelAPITokenCreate(ctx context.Context, args *payd.PeerChannelAPITokenStoreArgs) error
- func (mock *PeerChannelsStoreMock) PeerChannelAPITokenCreateCalls() []struct{ ... }
- func (mock *PeerChannelsStoreMock) PeerChannelAPITokensCreate(ctx context.Context, args ...*payd.PeerChannelAPITokenStoreArgs) error
- func (mock *PeerChannelsStoreMock) PeerChannelAPITokensCreateCalls() []struct{ ... }
- func (mock *PeerChannelsStoreMock) PeerChannelAccount(ctx context.Context, args *payd.PeerChannelIDArgs) (*payd.PeerChannelAccount, error)
- func (mock *PeerChannelsStoreMock) PeerChannelAccountCalls() []struct{ ... }
- func (mock *PeerChannelsStoreMock) PeerChannelCloseChannel(ctx context.Context, channelID string) error
- func (mock *PeerChannelsStoreMock) PeerChannelCloseChannelCalls() []struct{ ... }
- func (mock *PeerChannelsStoreMock) PeerChannelCreate(ctx context.Context, args *payd.PeerChannelCreateArgs) error
- func (mock *PeerChannelsStoreMock) PeerChannelCreateCalls() []struct{ ... }
- func (mock *PeerChannelsStoreMock) PeerChannelsOpened(ctx context.Context, channelType payd.PeerChannelHandlerType) ([]payd.PeerChannel, error)
- func (mock *PeerChannelsStoreMock) PeerChannelsOpenedCalls() []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, userID uint64) error
- func (mock *PrivateKeyServiceMock) CreateCalls() []struct{ ... }
- func (mock *PrivateKeyServiceMock) PrivateKey(ctx context.Context, keyName string, userID uint64) (*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 DPPMock ¶ added in v0.1.6
type DPPMock struct {
// PaymentRequestFunc mocks the PaymentRequest method.
PaymentRequestFunc func(ctx context.Context, req payd.PayRequest) (*dpp.PaymentRequest, error)
// PaymentSendFunc mocks the PaymentSend method.
PaymentSendFunc func(ctx context.Context, args payd.PayRequest, req dpp.Payment) (*dpp.PaymentACK, error)
// contains filtered or unexported fields
}
DPPMock is a mock implementation of http.DPP.
func TestSomethingThatUsesDPP(t *testing.T) {
// make and configure a mocked http.DPP
mockedDPP := &DPPMock{
PaymentRequestFunc: func(ctx context.Context, req payd.PayRequest) (*dpp.PaymentRequest, error) {
panic("mock out the PaymentRequest method")
},
PaymentSendFunc: func(ctx context.Context, args payd.PayRequest, req dpp.Payment) (*dpp.PaymentACK, error) {
panic("mock out the PaymentSend method")
},
}
// use mockedDPP in code that requires http.DPP
// and then make assertions.
}
func (*DPPMock) PaymentRequest ¶ added in v0.1.6
func (mock *DPPMock) PaymentRequest(ctx context.Context, req payd.PayRequest) (*dpp.PaymentRequest, error)
PaymentRequest calls PaymentRequestFunc.
func (*DPPMock) PaymentRequestCalls ¶ added in v0.1.6
func (mock *DPPMock) PaymentRequestCalls() []struct { Ctx context.Context Req payd.PayRequest }
PaymentRequestCalls gets all the calls that were made to PaymentRequest. Check the length with:
len(mockedDPP.PaymentRequestCalls())
func (*DPPMock) PaymentSend ¶ added in v0.1.6
func (mock *DPPMock) PaymentSend(ctx context.Context, args payd.PayRequest, req dpp.Payment) (*dpp.PaymentACK, error)
PaymentSend calls PaymentSendFunc.
func (*DPPMock) PaymentSendCalls ¶ added in v0.1.6
func (mock *DPPMock) PaymentSendCalls() []struct { Ctx context.Context Args payd.PayRequest Req dpp.Payment }
PaymentSendCalls gets all the calls that were made to PaymentSend. Check the length with:
len(mockedDPP.PaymentSendCalls())
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 dpp.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 dpp.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 dpp.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 dpp.PaymentRequest }
EnvelopeCalls gets all the calls that were made to Envelope. Check the length with:
len(mockedEnvelopeService.EnvelopeCalls())
type FeeQuoteFetcherMock ¶ added in v0.1.3
type FeeQuoteFetcherMock struct {
// FeeQuoteFunc mocks the FeeQuote method.
FeeQuoteFunc func(ctx context.Context) (*bt.FeeQuote, error)
// contains filtered or unexported fields
}
FeeQuoteFetcherMock is a mock implementation of payd.FeeQuoteFetcher.
func TestSomethingThatUsesFeeQuoteFetcher(t *testing.T) {
// make and configure a mocked payd.FeeQuoteFetcher
mockedFeeQuoteFetcher := &FeeQuoteFetcherMock{
FeeQuoteFunc: func(ctx context.Context) (*bt.FeeQuote, error) {
panic("mock out the FeeQuote method")
},
}
// use mockedFeeQuoteFetcher in code that requires payd.FeeQuoteFetcher
// and then make assertions.
}
func (*FeeQuoteFetcherMock) FeeQuoteCalls ¶ added in v0.1.3
func (mock *FeeQuoteFetcherMock) FeeQuoteCalls() []struct { Ctx context.Context }
FeeQuoteCalls gets all the calls that were made to FeeQuote. Check the length with:
len(mockedFeeQuoteFetcher.FeeQuoteCalls())
type FeeQuoteReaderMock ¶ added in v0.1.3
type FeeQuoteReaderMock struct {
// FeeQuoteFunc mocks the FeeQuote method.
FeeQuoteFunc func(ctx context.Context, invoiceID string) (*bt.FeeQuote, error)
// contains filtered or unexported fields
}
FeeQuoteReaderMock is a mock implementation of payd.FeeQuoteReader.
func TestSomethingThatUsesFeeQuoteReader(t *testing.T) {
// make and configure a mocked payd.FeeQuoteReader
mockedFeeQuoteReader := &FeeQuoteReaderMock{
FeeQuoteFunc: func(ctx context.Context, invoiceID string) (*bt.FeeQuote, error) {
panic("mock out the FeeQuote method")
},
}
// use mockedFeeQuoteReader in code that requires payd.FeeQuoteReader
// and then make assertions.
}
func (*FeeQuoteReaderMock) FeeQuote ¶ added in v0.1.3
func (mock *FeeQuoteReaderMock) FeeQuote(ctx context.Context, invoiceID string) (*bt.FeeQuote, error)
FeeQuote calls FeeQuoteFunc.
func (*FeeQuoteReaderMock) FeeQuoteCalls ¶ added in v0.1.3
func (mock *FeeQuoteReaderMock) FeeQuoteCalls() []struct { Ctx context.Context InvoiceID string }
FeeQuoteCalls gets all the calls that were made to FeeQuote. Check the length with:
len(mockedFeeQuoteReader.FeeQuoteCalls())
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)
// InvoicesPendingFunc mocks the InvoicesPending method.
InvoicesPendingFunc 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")
},
InvoicesPendingFunc: func(ctx context.Context) ([]payd.Invoice, error) {
panic("mock out the InvoicesPending 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())
func (*InvoiceReaderWriterMock) InvoicesPending ¶ added in v0.1.5
InvoicesPending calls InvoicesPendingFunc.
func (*InvoiceReaderWriterMock) InvoicesPendingCalls ¶ added in v0.1.5
func (mock *InvoiceReaderWriterMock) InvoicesPendingCalls() []struct { Ctx context.Context }
InvoicesPendingCalls gets all the calls that were made to InvoicesPending. Check the length with:
len(mockedInvoiceReaderWriter.InvoicesPendingCalls())
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 PaymentVerifierMock ¶ added in v0.1.1
type PaymentVerifierMock struct {
// VerifyMerkleProofFunc mocks the VerifyMerkleProof method.
VerifyMerkleProofFunc func(contextMoqParam context.Context, bytes []byte) (*spv.MerkleProofValidation, error)
// VerifyMerkleProofJSONFunc mocks the VerifyMerkleProofJSON method.
VerifyMerkleProofJSONFunc func(contextMoqParam context.Context, merkleProof *bc.MerkleProof) (bool, bool, error)
// VerifyPaymentFunc mocks the VerifyPayment method.
VerifyPaymentFunc func(ctx context.Context, pTx *bt.Tx, ancestors []byte, opts ...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) (*spv.MerkleProofValidation, 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(ctx context.Context, pTx *bt.Tx, ancestors []byte, opts ...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) (*spv.MerkleProofValidation, 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(ctx context.Context, pTx *bt.Tx, ancestors []byte, opts ...spv.VerifyOpt) (*bt.Tx, error)
VerifyPayment calls VerifyPaymentFunc.
func (*PaymentVerifierMock) VerifyPaymentCalls ¶ added in v0.1.1
func (mock *PaymentVerifierMock) VerifyPaymentCalls() []struct { Ctx context.Context PTx *bt.Tx Ancestors []byte Opts []spv.VerifyOpt }
VerifyPaymentCalls gets all the calls that were made to VerifyPayment. Check the length with:
len(mockedPaymentVerifier.VerifyPaymentCalls())
type PeerChannelsNotifyServiceMock ¶ added in v0.1.3
type PeerChannelsNotifyServiceMock struct {
// RegisterHandlerFunc mocks the RegisterHandler method.
RegisterHandlerFunc func(ht payd.PeerChannelHandlerType, hdlr payd.PeerChannelsMessageHandler) payd.PeerChannelsNotifyService
// SubscribeFunc mocks the Subscribe method.
SubscribeFunc func(ctx context.Context, args *payd.PeerChannel) error
// contains filtered or unexported fields
}
PeerChannelsNotifyServiceMock is a mock implementation of payd.PeerChannelsNotifyService.
func TestSomethingThatUsesPeerChannelsNotifyService(t *testing.T) {
// make and configure a mocked payd.PeerChannelsNotifyService
mockedPeerChannelsNotifyService := &PeerChannelsNotifyServiceMock{
RegisterHandlerFunc: func(ht payd.PeerChannelHandlerType, hdlr payd.PeerChannelsMessageHandler) payd.PeerChannelsNotifyService {
panic("mock out the RegisterHandler method")
},
SubscribeFunc: func(ctx context.Context, args *payd.PeerChannel) error {
panic("mock out the Subscribe method")
},
}
// use mockedPeerChannelsNotifyService in code that requires payd.PeerChannelsNotifyService
// and then make assertions.
}
func (*PeerChannelsNotifyServiceMock) RegisterHandler ¶ added in v0.1.3
func (mock *PeerChannelsNotifyServiceMock) RegisterHandler(ht payd.PeerChannelHandlerType, hdlr payd.PeerChannelsMessageHandler) payd.PeerChannelsNotifyService
RegisterHandler calls RegisterHandlerFunc.
func (*PeerChannelsNotifyServiceMock) RegisterHandlerCalls ¶ added in v0.1.3
func (mock *PeerChannelsNotifyServiceMock) RegisterHandlerCalls() []struct { Ht payd.PeerChannelHandlerType Hdlr payd.PeerChannelsMessageHandler }
RegisterHandlerCalls gets all the calls that were made to RegisterHandler. Check the length with:
len(mockedPeerChannelsNotifyService.RegisterHandlerCalls())
func (*PeerChannelsNotifyServiceMock) Subscribe ¶ added in v0.1.3
func (mock *PeerChannelsNotifyServiceMock) Subscribe(ctx context.Context, args *payd.PeerChannel) error
Subscribe calls SubscribeFunc.
func (*PeerChannelsNotifyServiceMock) SubscribeCalls ¶ added in v0.1.3
func (mock *PeerChannelsNotifyServiceMock) SubscribeCalls() []struct { Ctx context.Context Args *payd.PeerChannel }
SubscribeCalls gets all the calls that were made to Subscribe. Check the length with:
len(mockedPeerChannelsNotifyService.SubscribeCalls())
type PeerChannelsServiceMock ¶ added in v0.1.3
type PeerChannelsServiceMock struct {
// ActiveProofChannelsFunc mocks the ActiveProofChannels method.
ActiveProofChannelsFunc func(ctx context.Context) ([]payd.PeerChannel, error)
// CloseChannelFunc mocks the CloseChannel method.
CloseChannelFunc func(ctx context.Context, channelID string) error
// PeerChannelAPITokensCreateFunc mocks the PeerChannelAPITokensCreate method.
PeerChannelAPITokensCreateFunc func(ctx context.Context, reqs ...*payd.PeerChannelAPITokenCreateArgs) ([]*spvchannels.TokenCreateReply, error)
// PeerChannelCreateFunc mocks the PeerChannelCreate method.
PeerChannelCreateFunc func(ctx context.Context, req spvchannels.ChannelCreateRequest) (*payd.PeerChannel, error)
// PeerChannelsMessageFunc mocks the PeerChannelsMessage method.
PeerChannelsMessageFunc func(ctx context.Context, args *payd.PeerChannelMessageArgs) (spvchannels.MessagesReply, error)
// contains filtered or unexported fields
}
PeerChannelsServiceMock is a mock implementation of payd.PeerChannelsService.
func TestSomethingThatUsesPeerChannelsService(t *testing.T) {
// make and configure a mocked payd.PeerChannelsService
mockedPeerChannelsService := &PeerChannelsServiceMock{
ActiveProofChannelsFunc: func(ctx context.Context) ([]payd.PeerChannel, error) {
panic("mock out the ActiveProofChannels method")
},
CloseChannelFunc: func(ctx context.Context, channelID string) error {
panic("mock out the CloseChannel method")
},
PeerChannelAPITokensCreateFunc: func(ctx context.Context, reqs ...*payd.PeerChannelAPITokenCreateArgs) ([]*spvchannels.TokenCreateReply, error) {
panic("mock out the PeerChannelAPITokensCreate method")
},
PeerChannelCreateFunc: func(ctx context.Context, req spvchannels.ChannelCreateRequest) (*payd.PeerChannel, error) {
panic("mock out the PeerChannelCreate method")
},
PeerChannelsMessageFunc: func(ctx context.Context, args *payd.PeerChannelMessageArgs) (spvchannels.MessagesReply, error) {
panic("mock out the PeerChannelsMessage method")
},
}
// use mockedPeerChannelsService in code that requires payd.PeerChannelsService
// and then make assertions.
}
func (*PeerChannelsServiceMock) ActiveProofChannels ¶ added in v0.1.3
func (mock *PeerChannelsServiceMock) ActiveProofChannels(ctx context.Context) ([]payd.PeerChannel, error)
ActiveProofChannels calls ActiveProofChannelsFunc.
func (*PeerChannelsServiceMock) ActiveProofChannelsCalls ¶ added in v0.1.3
func (mock *PeerChannelsServiceMock) ActiveProofChannelsCalls() []struct { Ctx context.Context }
ActiveProofChannelsCalls gets all the calls that were made to ActiveProofChannels. Check the length with:
len(mockedPeerChannelsService.ActiveProofChannelsCalls())
func (*PeerChannelsServiceMock) CloseChannel ¶ added in v0.1.3
func (mock *PeerChannelsServiceMock) CloseChannel(ctx context.Context, channelID string) error
CloseChannel calls CloseChannelFunc.
func (*PeerChannelsServiceMock) CloseChannelCalls ¶ added in v0.1.3
func (mock *PeerChannelsServiceMock) CloseChannelCalls() []struct { Ctx context.Context ChannelID string }
CloseChannelCalls gets all the calls that were made to CloseChannel. Check the length with:
len(mockedPeerChannelsService.CloseChannelCalls())
func (*PeerChannelsServiceMock) PeerChannelAPITokensCreate ¶ added in v0.1.3
func (mock *PeerChannelsServiceMock) PeerChannelAPITokensCreate(ctx context.Context, reqs ...*payd.PeerChannelAPITokenCreateArgs) ([]*spvchannels.TokenCreateReply, error)
PeerChannelAPITokensCreate calls PeerChannelAPITokensCreateFunc.
func (*PeerChannelsServiceMock) PeerChannelAPITokensCreateCalls ¶ added in v0.1.3
func (mock *PeerChannelsServiceMock) PeerChannelAPITokensCreateCalls() []struct { Ctx context.Context Reqs []*payd.PeerChannelAPITokenCreateArgs }
PeerChannelAPITokensCreateCalls gets all the calls that were made to PeerChannelAPITokensCreate. Check the length with:
len(mockedPeerChannelsService.PeerChannelAPITokensCreateCalls())
func (*PeerChannelsServiceMock) PeerChannelCreate ¶ added in v0.1.3
func (mock *PeerChannelsServiceMock) PeerChannelCreate(ctx context.Context, req spvchannels.ChannelCreateRequest) (*payd.PeerChannel, error)
PeerChannelCreate calls PeerChannelCreateFunc.
func (*PeerChannelsServiceMock) PeerChannelCreateCalls ¶ added in v0.1.3
func (mock *PeerChannelsServiceMock) PeerChannelCreateCalls() []struct { Ctx context.Context Req spvchannels.ChannelCreateRequest }
PeerChannelCreateCalls gets all the calls that were made to PeerChannelCreate. Check the length with:
len(mockedPeerChannelsService.PeerChannelCreateCalls())
func (*PeerChannelsServiceMock) PeerChannelsMessage ¶ added in v0.1.3
func (mock *PeerChannelsServiceMock) PeerChannelsMessage(ctx context.Context, args *payd.PeerChannelMessageArgs) (spvchannels.MessagesReply, error)
PeerChannelsMessage calls PeerChannelsMessageFunc.
func (*PeerChannelsServiceMock) PeerChannelsMessageCalls ¶ added in v0.1.3
func (mock *PeerChannelsServiceMock) PeerChannelsMessageCalls() []struct { Ctx context.Context Args *payd.PeerChannelMessageArgs }
PeerChannelsMessageCalls gets all the calls that were made to PeerChannelsMessage. Check the length with:
len(mockedPeerChannelsService.PeerChannelsMessageCalls())
type PeerChannelsStoreMock ¶ added in v0.1.3
type PeerChannelsStoreMock struct {
// PeerChannelAPITokenCreateFunc mocks the PeerChannelAPITokenCreate method.
PeerChannelAPITokenCreateFunc func(ctx context.Context, args *payd.PeerChannelAPITokenStoreArgs) error
// PeerChannelAPITokensCreateFunc mocks the PeerChannelAPITokensCreate method.
PeerChannelAPITokensCreateFunc func(ctx context.Context, args ...*payd.PeerChannelAPITokenStoreArgs) error
// PeerChannelAccountFunc mocks the PeerChannelAccount method.
PeerChannelAccountFunc func(ctx context.Context, args *payd.PeerChannelIDArgs) (*payd.PeerChannelAccount, error)
// PeerChannelCloseChannelFunc mocks the PeerChannelCloseChannel method.
PeerChannelCloseChannelFunc func(ctx context.Context, channelID string) error
// PeerChannelCreateFunc mocks the PeerChannelCreate method.
PeerChannelCreateFunc func(ctx context.Context, args *payd.PeerChannelCreateArgs) error
// PeerChannelsOpenedFunc mocks the PeerChannelsOpened method.
PeerChannelsOpenedFunc func(ctx context.Context, channelType payd.PeerChannelHandlerType) ([]payd.PeerChannel, error)
// contains filtered or unexported fields
}
PeerChannelsStoreMock is a mock implementation of payd.PeerChannelsStore.
func TestSomethingThatUsesPeerChannelsStore(t *testing.T) {
// make and configure a mocked payd.PeerChannelsStore
mockedPeerChannelsStore := &PeerChannelsStoreMock{
PeerChannelAPITokenCreateFunc: func(ctx context.Context, args *payd.PeerChannelAPITokenStoreArgs) error {
panic("mock out the PeerChannelAPITokenCreate method")
},
PeerChannelAPITokensCreateFunc: func(ctx context.Context, args ...*payd.PeerChannelAPITokenStoreArgs) error {
panic("mock out the PeerChannelAPITokensCreate method")
},
PeerChannelAccountFunc: func(ctx context.Context, args *payd.PeerChannelIDArgs) (*payd.PeerChannelAccount, error) {
panic("mock out the PeerChannelAccount method")
},
PeerChannelCloseChannelFunc: func(ctx context.Context, channelID string) error {
panic("mock out the PeerChannelCloseChannel method")
},
PeerChannelCreateFunc: func(ctx context.Context, args *payd.PeerChannelCreateArgs) error {
panic("mock out the PeerChannelCreate method")
},
PeerChannelsOpenedFunc: func(ctx context.Context, channelType payd.PeerChannelHandlerType) ([]payd.PeerChannel, error) {
panic("mock out the PeerChannelsOpened method")
},
}
// use mockedPeerChannelsStore in code that requires payd.PeerChannelsStore
// and then make assertions.
}
func (*PeerChannelsStoreMock) PeerChannelAPITokenCreate ¶ added in v0.1.3
func (mock *PeerChannelsStoreMock) PeerChannelAPITokenCreate(ctx context.Context, args *payd.PeerChannelAPITokenStoreArgs) error
PeerChannelAPITokenCreate calls PeerChannelAPITokenCreateFunc.
func (*PeerChannelsStoreMock) PeerChannelAPITokenCreateCalls ¶ added in v0.1.3
func (mock *PeerChannelsStoreMock) PeerChannelAPITokenCreateCalls() []struct { Ctx context.Context Args *payd.PeerChannelAPITokenStoreArgs }
PeerChannelAPITokenCreateCalls gets all the calls that were made to PeerChannelAPITokenCreate. Check the length with:
len(mockedPeerChannelsStore.PeerChannelAPITokenCreateCalls())
func (*PeerChannelsStoreMock) PeerChannelAPITokensCreate ¶ added in v0.1.3
func (mock *PeerChannelsStoreMock) PeerChannelAPITokensCreate(ctx context.Context, args ...*payd.PeerChannelAPITokenStoreArgs) error
PeerChannelAPITokensCreate calls PeerChannelAPITokensCreateFunc.
func (*PeerChannelsStoreMock) PeerChannelAPITokensCreateCalls ¶ added in v0.1.3
func (mock *PeerChannelsStoreMock) PeerChannelAPITokensCreateCalls() []struct { Ctx context.Context Args []*payd.PeerChannelAPITokenStoreArgs }
PeerChannelAPITokensCreateCalls gets all the calls that were made to PeerChannelAPITokensCreate. Check the length with:
len(mockedPeerChannelsStore.PeerChannelAPITokensCreateCalls())
func (*PeerChannelsStoreMock) PeerChannelAccount ¶ added in v0.1.3
func (mock *PeerChannelsStoreMock) PeerChannelAccount(ctx context.Context, args *payd.PeerChannelIDArgs) (*payd.PeerChannelAccount, error)
PeerChannelAccount calls PeerChannelAccountFunc.
func (*PeerChannelsStoreMock) PeerChannelAccountCalls ¶ added in v0.1.3
func (mock *PeerChannelsStoreMock) PeerChannelAccountCalls() []struct { Ctx context.Context Args *payd.PeerChannelIDArgs }
PeerChannelAccountCalls gets all the calls that were made to PeerChannelAccount. Check the length with:
len(mockedPeerChannelsStore.PeerChannelAccountCalls())
func (*PeerChannelsStoreMock) PeerChannelCloseChannel ¶ added in v0.1.3
func (mock *PeerChannelsStoreMock) PeerChannelCloseChannel(ctx context.Context, channelID string) error
PeerChannelCloseChannel calls PeerChannelCloseChannelFunc.
func (*PeerChannelsStoreMock) PeerChannelCloseChannelCalls ¶ added in v0.1.3
func (mock *PeerChannelsStoreMock) PeerChannelCloseChannelCalls() []struct { Ctx context.Context ChannelID string }
PeerChannelCloseChannelCalls gets all the calls that were made to PeerChannelCloseChannel. Check the length with:
len(mockedPeerChannelsStore.PeerChannelCloseChannelCalls())
func (*PeerChannelsStoreMock) PeerChannelCreate ¶ added in v0.1.3
func (mock *PeerChannelsStoreMock) PeerChannelCreate(ctx context.Context, args *payd.PeerChannelCreateArgs) error
PeerChannelCreate calls PeerChannelCreateFunc.
func (*PeerChannelsStoreMock) PeerChannelCreateCalls ¶ added in v0.1.3
func (mock *PeerChannelsStoreMock) PeerChannelCreateCalls() []struct { Ctx context.Context Args *payd.PeerChannelCreateArgs }
PeerChannelCreateCalls gets all the calls that were made to PeerChannelCreate. Check the length with:
len(mockedPeerChannelsStore.PeerChannelCreateCalls())
func (*PeerChannelsStoreMock) PeerChannelsOpened ¶ added in v0.1.3
func (mock *PeerChannelsStoreMock) PeerChannelsOpened(ctx context.Context, channelType payd.PeerChannelHandlerType) ([]payd.PeerChannel, error)
PeerChannelsOpened calls PeerChannelsOpenedFunc.
func (*PeerChannelsStoreMock) PeerChannelsOpenedCalls ¶ added in v0.1.3
func (mock *PeerChannelsStoreMock) PeerChannelsOpenedCalls() []struct { Ctx context.Context ChannelType payd.PeerChannelHandlerType }
PeerChannelsOpenedCalls gets all the calls that were made to PeerChannelsOpened. Check the length with:
len(mockedPeerChannelsStore.PeerChannelsOpenedCalls())
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, userID uint64) error
// PrivateKeyFunc mocks the PrivateKey method.
PrivateKeyFunc func(ctx context.Context, keyName string, userID uint64) (*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, userID uint64) error {
panic("mock out the Create method")
},
PrivateKeyFunc: func(ctx context.Context, keyName string, userID uint64) (*bip32.ExtendedKey, error) {
panic("mock out the PrivateKey method")
},
}
// use mockedPrivateKeyService in code that requires payd.PrivateKeyService
// and then make assertions.
}
func (*PrivateKeyServiceMock) CreateCalls ¶ added in v0.1.1
func (mock *PrivateKeyServiceMock) CreateCalls() []struct { Ctx context.Context KeyName string UserID uint64 }
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, userID uint64) (*bip32.ExtendedKey, error)
PrivateKey calls PrivateKeyFunc.
func (*PrivateKeyServiceMock) PrivateKeyCalls ¶ added in v0.1.1
func (mock *PrivateKeyServiceMock) PrivateKeyCalls() []struct { Ctx context.Context KeyName string UserID uint64 }
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]dpp.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]dpp.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]dpp.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]dpp.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 dpp.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 dpp.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 dpp.ProofWrapper) error
ProofCreate calls ProofCreateFunc.
func (*ProofsWriterMock) ProofCreateCalls ¶
func (mock *ProofsWriterMock) ProofCreateCalls() []struct { Ctx context.Context Req dpp.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
- dpp.go
- envelope_creator.go
- envelope_service.go
- fee_quote_fetcher.go
- fee_quote_reader.go
- invoice_reader_writer.go
- mocks.go
- owner_store.go
- payment_verifier.go
- peerchannels_notify_service.go
- peerchannels_service.go
- peerchannels_store.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