mocks

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: Apache-2.0 Imports: 18 Imported by: 6

Documentation

Overview

Code generated by counterfeiter. DO NOT EDIT.

Code generated by counterfeiter. DO NOT EDIT.

Code generated by counterfeiter. DO NOT EDIT.

Code generated by counterfeiter. DO NOT EDIT.

Code generated by counterfeiter. DO NOT EDIT.

Code generated by counterfeiter. DO NOT EDIT.

Code generated by counterfeiter. DO NOT EDIT.

Code generated by counterfeiter. DO NOT EDIT.

Code generated by counterfeiter. DO NOT EDIT.

Code generated by counterfeiter. DO NOT EDIT.

Index

Constants

View Source
const (

	// DefaultNS is default namespace used in mocks.
	DefaultNS = "did:sidetree"

	// MaxBatchFileSize is maximum batch files size in bytes.
	MaxBatchFileSize = 20000

	// MaxOperationByteSize is maximum operation size in bytes.
	MaxOperationByteSize = 2000

	// MaxDeltaByteSize is maximum delta size in bytes.
	MaxDeltaByteSize = 1000

	// CurrentVersion is the current protocol version.
	CurrentVersion = "1.0"
)

Variables

This section is empty.

Functions

func GetDefaultProtocolParameters added in v0.1.5

func GetDefaultProtocolParameters() protocol.Protocol

GetDefaultProtocolParameters returns mock protocol parameters.

Types

type DocumentComposer added in v0.1.5

type DocumentComposer struct {
	ApplyPatchesStub func(document.Document, []patch.Patch) (document.Document, error)
	// contains filtered or unexported fields
}

func (*DocumentComposer) ApplyPatches added in v0.1.5

func (fake *DocumentComposer) ApplyPatches(arg1 document.Document, arg2 []patch.Patch) (document.Document, error)

func (*DocumentComposer) ApplyPatchesArgsForCall added in v0.1.5

func (fake *DocumentComposer) ApplyPatchesArgsForCall(i int) (document.Document, []patch.Patch)

func (*DocumentComposer) ApplyPatchesCallCount added in v0.1.5

func (fake *DocumentComposer) ApplyPatchesCallCount() int

func (*DocumentComposer) ApplyPatchesCalls added in v0.1.5

func (fake *DocumentComposer) ApplyPatchesCalls(stub func(document.Document, []patch.Patch) (document.Document, error))

func (*DocumentComposer) ApplyPatchesReturns added in v0.1.5

func (fake *DocumentComposer) ApplyPatchesReturns(result1 document.Document, result2 error)

func (*DocumentComposer) ApplyPatchesReturnsOnCall added in v0.1.5

func (fake *DocumentComposer) ApplyPatchesReturnsOnCall(i int, result1 document.Document, result2 error)

func (*DocumentComposer) Invocations added in v0.1.5

func (fake *DocumentComposer) Invocations() map[string][][]interface{}

type DocumentTransformer added in v0.1.5

type DocumentTransformer struct {
	TransformDocumentStub func(*protocol.ResolutionModel, protocol.TransformationInfo) (*document.ResolutionResult, error)
	// contains filtered or unexported fields
}

func (*DocumentTransformer) Invocations added in v0.1.5

func (fake *DocumentTransformer) Invocations() map[string][][]interface{}

func (*DocumentTransformer) TransformDocument added in v0.1.5

func (*DocumentTransformer) TransformDocumentArgsForCall added in v0.1.5

func (fake *DocumentTransformer) TransformDocumentArgsForCall(i int) (*protocol.ResolutionModel, protocol.TransformationInfo)

func (*DocumentTransformer) TransformDocumentCallCount added in v0.1.5

func (fake *DocumentTransformer) TransformDocumentCallCount() int

func (*DocumentTransformer) TransformDocumentCalls added in v0.1.5

func (*DocumentTransformer) TransformDocumentReturns added in v0.1.5

func (fake *DocumentTransformer) TransformDocumentReturns(result1 *document.ResolutionResult, result2 error)

func (*DocumentTransformer) TransformDocumentReturnsOnCall added in v0.1.5

func (fake *DocumentTransformer) TransformDocumentReturnsOnCall(i int, result1 *document.ResolutionResult, result2 error)

type DocumentValidator added in v0.1.5

type DocumentValidator struct {
	IsValidOriginalDocumentStub func([]byte) error

	IsValidPayloadStub func([]byte) error
	// contains filtered or unexported fields
}

func (*DocumentValidator) Invocations added in v0.1.5

func (fake *DocumentValidator) Invocations() map[string][][]interface{}

func (*DocumentValidator) IsValidOriginalDocument added in v0.1.5

func (fake *DocumentValidator) IsValidOriginalDocument(arg1 []byte) error

func (*DocumentValidator) IsValidOriginalDocumentArgsForCall added in v0.1.5

func (fake *DocumentValidator) IsValidOriginalDocumentArgsForCall(i int) []byte

func (*DocumentValidator) IsValidOriginalDocumentCallCount added in v0.1.5

func (fake *DocumentValidator) IsValidOriginalDocumentCallCount() int

func (*DocumentValidator) IsValidOriginalDocumentCalls added in v0.1.5

func (fake *DocumentValidator) IsValidOriginalDocumentCalls(stub func([]byte) error)

func (*DocumentValidator) IsValidOriginalDocumentReturns added in v0.1.5

func (fake *DocumentValidator) IsValidOriginalDocumentReturns(result1 error)

func (*DocumentValidator) IsValidOriginalDocumentReturnsOnCall added in v0.1.5

func (fake *DocumentValidator) IsValidOriginalDocumentReturnsOnCall(i int, result1 error)

func (*DocumentValidator) IsValidPayload added in v0.1.5

func (fake *DocumentValidator) IsValidPayload(arg1 []byte) error

func (*DocumentValidator) IsValidPayloadArgsForCall added in v0.1.5

func (fake *DocumentValidator) IsValidPayloadArgsForCall(i int) []byte

func (*DocumentValidator) IsValidPayloadCallCount added in v0.1.5

func (fake *DocumentValidator) IsValidPayloadCallCount() int

func (*DocumentValidator) IsValidPayloadCalls added in v0.1.5

func (fake *DocumentValidator) IsValidPayloadCalls(stub func([]byte) error)

func (*DocumentValidator) IsValidPayloadReturns added in v0.1.5

func (fake *DocumentValidator) IsValidPayloadReturns(result1 error)

func (*DocumentValidator) IsValidPayloadReturnsOnCall added in v0.1.5

func (fake *DocumentValidator) IsValidPayloadReturnsOnCall(i int, result1 error)

type MetricsProvider added in v1.0.0

type MetricsProvider struct{}

MetricsProvider implements a mock metrics provider.

func (*MetricsProvider) AddOperationToBatchTime added in v1.0.0

func (m *MetricsProvider) AddOperationToBatchTime(value time.Duration)

AddOperationToBatchTime records the time to add operation to batch.

func (*MetricsProvider) AddUnpublishedOperationTime added in v1.0.0

func (m *MetricsProvider) AddUnpublishedOperationTime(value time.Duration)

AddUnpublishedOperationTime records the time to add unpublished operation.

func (*MetricsProvider) CASWriteSize added in v1.0.0

func (m *MetricsProvider) CASWriteSize(dataType string, size int)

CASWriteSize records the size of the data written to CAS.

func (*MetricsProvider) DecorateOperationTime added in v1.0.0

func (m *MetricsProvider) DecorateOperationTime(value time.Duration)

DecorateOperationTime records the time to decorate operation.

func (*MetricsProvider) GetCreateOperationResultTime added in v1.0.0

func (m *MetricsProvider) GetCreateOperationResultTime(value time.Duration)

GetCreateOperationResultTime records the time to create operation result response.

func (*MetricsProvider) GetProtocolVersionTime added in v1.0.0

func (m *MetricsProvider) GetProtocolVersionTime(value time.Duration)

GetProtocolVersionTime records the time to get protocol version.

func (*MetricsProvider) HTTPCreateUpdateTime added in v1.0.0

func (m *MetricsProvider) HTTPCreateUpdateTime(value time.Duration)

HTTPCreateUpdateTime records the time rest call for create or update.

func (*MetricsProvider) HTTPResolveTime added in v1.0.0

func (m *MetricsProvider) HTTPResolveTime(value time.Duration)

HTTPResolveTime records the time rest call for resolve.

func (*MetricsProvider) ParseOperationTime added in v1.0.0

func (m *MetricsProvider) ParseOperationTime(value time.Duration)

ParseOperationTime records the time to parse operations.

func (*MetricsProvider) ProcessOperation added in v1.0.0

func (m *MetricsProvider) ProcessOperation(value time.Duration)

ProcessOperation records the overall time to process operation.

func (*MetricsProvider) ValidateOperationTime added in v1.0.0

func (m *MetricsProvider) ValidateOperationTime(value time.Duration)

ValidateOperationTime records the time to validate operation.

type MockAnchorWriter added in v0.6.0

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

MockAnchorWriter mocks anchor writer for testing purposes.

func NewMockAnchorWriter added in v0.6.0

func NewMockAnchorWriter(err error) *MockAnchorWriter

NewMockAnchorWriter creates mock anchor writer.

func (*MockAnchorWriter) GetAnchors added in v0.6.0

func (m *MockAnchorWriter) GetAnchors() []string

GetAnchors returns anchors.

func (*MockAnchorWriter) Read added in v0.6.0

func (m *MockAnchorWriter) Read(sinceTransactionNumber int) (bool, *txn.SidetreeTxn)

Read reads transactions since transaction number.

func (*MockAnchorWriter) WriteAnchor added in v0.6.0

func (m *MockAnchorWriter) WriteAnchor(anchor string, _ []*protocol.AnchorDocument, _ []*operation.Reference, _ uint64) error

WriteAnchor writes the anchor string as a transaction to anchoring system.

type MockCasClient

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

MockCasClient mocks CAS for testing purposes.

func NewMockCasClient

func NewMockCasClient(err error) *MockCasClient

NewMockCasClient creates mock client.

func (*MockCasClient) GetError

func (m *MockCasClient) GetError() error

GetError returns the injected error.

func (*MockCasClient) Read

func (m *MockCasClient) Read(address string) ([]byte, error)

Read reads the content of the given address in CAS. returns the content of the given address.

func (*MockCasClient) SetError

func (m *MockCasClient) SetError(err error)

SetError injects an error into the mock client.

func (*MockCasClient) Write

func (m *MockCasClient) Write(content []byte) (string, error)

Write writes the given content to CAS. returns the SHA256 hash in base64url encoding which represents the address of the content.

type MockDocumentHandler

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

MockDocumentHandler mocks the document handler.

func NewMockDocumentHandler

func NewMockDocumentHandler() *MockDocumentHandler

NewMockDocumentHandler returns a new mock document handler.

func (*MockDocumentHandler) Namespace

func (m *MockDocumentHandler) Namespace() string

Namespace returns the namespace.

func (*MockDocumentHandler) ProcessOperation

func (m *MockDocumentHandler) ProcessOperation(operationBuffer []byte, _ uint64) (*document.ResolutionResult, error)

ProcessOperation mocks process operation.

func (*MockDocumentHandler) Protocol

func (m *MockDocumentHandler) Protocol() protocol.Client

Protocol returns the Protocol.

func (*MockDocumentHandler) ResolveDocument

func (m *MockDocumentHandler) ResolveDocument(didOrDocument string, opts ...document.ResolutionOption) (*document.ResolutionResult, error)

ResolveDocument mocks resolve document.

func (*MockDocumentHandler) WithError

func (m *MockDocumentHandler) WithError(err error) *MockDocumentHandler

WithError injects an error into the mock handler.

func (*MockDocumentHandler) WithNamespace

func (m *MockDocumentHandler) WithNamespace(ns string) *MockDocumentHandler

WithNamespace sets the namespace.

func (*MockDocumentHandler) WithProtocolClient

func (m *MockDocumentHandler) WithProtocolClient(client protocol.Client) *MockDocumentHandler

WithProtocolClient sets the protocol client.

type MockDocumentTransformer added in v0.1.5

type MockDocumentTransformer struct {
	Err error
}

MockDocumentTransformer is responsible for validating operations, original document and transforming to external document.

func NewDocumentTransformer added in v0.1.5

func NewDocumentTransformer() *MockDocumentTransformer

NewDocumentTransformer creates a new mock document transformer.

func (*MockDocumentTransformer) TransformDocument added in v0.1.5

TransformDocument mocks transformation from internal to external document.

type MockDocumentValidator added in v0.1.4

type MockDocumentValidator struct {
	IsValidPayloadErr          error
	IsValidOriginalDocumentErr error
}

MockDocumentValidator is responsible for validating operations, original document and transforming to external document.

func New added in v0.1.4

func New() *MockDocumentValidator

New creates a new mock document validator.

func (*MockDocumentValidator) IsValidOriginalDocument added in v0.1.4

func (m *MockDocumentValidator) IsValidOriginalDocument(payload []byte) error

IsValidOriginalDocument mocks check that the given payload is a valid Sidetree specific document that can be accepted by the Sidetree create operation.

func (*MockDocumentValidator) IsValidPayload added in v0.1.4

func (m *MockDocumentValidator) IsValidPayload(payload []byte) error

IsValidPayload mocks check that the given payload is a valid Sidetree specific payload that can be accepted by the Sidetree update operations.

type MockOperationStore

type MockOperationStore struct {
	Err      error
	Validate bool
	// contains filtered or unexported fields
}

MockOperationStore mocks store for testing purposes.

func NewMockOperationStore

func NewMockOperationStore(err error) *MockOperationStore

NewMockOperationStore creates mock operations store.

func (*MockOperationStore) Get

func (m *MockOperationStore) Get(uniqueSuffix string) ([]*operation.AnchoredOperation, error)

Get mocks retrieving operations from the store.

func (*MockOperationStore) Put

Put mocks storing operation.

type MockProtocolClient

type MockProtocolClient struct {
	Protocol       protocol.Protocol // current version (separated for easier testing)
	CurrentVersion *ProtocolVersion
	Versions       []*ProtocolVersion
	Err            error
	CasClient      *MockCasClient
}

MockProtocolClient mocks protocol for testing purposes.

func NewMockProtocolClient

func NewMockProtocolClient() *MockProtocolClient

NewMockProtocolClient creates mock protocol client.

func (*MockProtocolClient) Current

func (m *MockProtocolClient) Current() (protocol.Version, error)

Current mocks getting last protocol version.

func (*MockProtocolClient) Get added in v0.1.4

func (m *MockProtocolClient) Get(transactionTime uint64) (protocol.Version, error)

Get mocks getting protocol version based on anchoring(transaction) time.

type MockProtocolClientProvider added in v0.1.4

type MockProtocolClientProvider struct {
	ProtocolClients map[string]protocol.Client
}

MockProtocolClientProvider implements mock protocol client provider.

func NewMockProtocolClientProvider added in v0.1.4

func NewMockProtocolClientProvider() *MockProtocolClientProvider

NewMockProtocolClientProvider creates new mock protocol client provider.

func (*MockProtocolClientProvider) ForNamespace added in v0.1.4

func (m *MockProtocolClientProvider) ForNamespace(namespace string) (protocol.Client, error)

ForNamespace will return protocol client for that namespace.

func (*MockProtocolClientProvider) WithProtocolClient added in v0.1.5

WithProtocolClient sets the protocol client.

type Operation added in v0.1.5

type Operation struct {
	// Operation defines operation type
	Operation operation.Type `json:"type,omitempty"`

	// SuffixData object
	SuffixData *model.SuffixDataModel `json:"suffixData,omitempty"`

	// Delta object
	Delta *model.DeltaModel `json:"delta,omitempty"`

	// DidSuffix is the suffix of the DID
	DidSuffix string `json:"didSuffix"`
}

Operation is used for parsing operation request.

type OperationApplier added in v0.1.5

type OperationApplier struct {
	ApplyStub func(*operation.AnchoredOperation, *protocol.ResolutionModel) (*protocol.ResolutionModel, error)
	// contains filtered or unexported fields
}

func (*OperationApplier) Apply added in v0.1.5

func (*OperationApplier) ApplyArgsForCall added in v0.1.5

func (*OperationApplier) ApplyCallCount added in v0.1.5

func (fake *OperationApplier) ApplyCallCount() int

func (*OperationApplier) ApplyCalls added in v0.1.5

func (*OperationApplier) ApplyReturns added in v0.1.5

func (fake *OperationApplier) ApplyReturns(result1 *protocol.ResolutionModel, result2 error)

func (*OperationApplier) ApplyReturnsOnCall added in v0.1.5

func (fake *OperationApplier) ApplyReturnsOnCall(i int, result1 *protocol.ResolutionModel, result2 error)

func (*OperationApplier) Invocations added in v0.1.5

func (fake *OperationApplier) Invocations() map[string][][]interface{}

type OperationHandler added in v0.1.5

type OperationHandler struct {
	PrepareTxnFilesStub func([]*operation.QueuedOperation) (*protocol.AnchoringInfo, error)
	// contains filtered or unexported fields
}

func (*OperationHandler) Invocations added in v0.1.5

func (fake *OperationHandler) Invocations() map[string][][]interface{}

func (*OperationHandler) PrepareTxnFiles added in v0.1.5

func (fake *OperationHandler) PrepareTxnFiles(arg1 []*operation.QueuedOperation) (*protocol.AnchoringInfo, error)

func (*OperationHandler) PrepareTxnFilesArgsForCall added in v0.1.5

func (fake *OperationHandler) PrepareTxnFilesArgsForCall(i int) []*operation.QueuedOperation

func (*OperationHandler) PrepareTxnFilesCallCount added in v0.1.5

func (fake *OperationHandler) PrepareTxnFilesCallCount() int

func (*OperationHandler) PrepareTxnFilesCalls added in v0.1.5

func (fake *OperationHandler) PrepareTxnFilesCalls(stub func([]*operation.QueuedOperation) (*protocol.AnchoringInfo, error))

func (*OperationHandler) PrepareTxnFilesReturns added in v0.1.5

func (fake *OperationHandler) PrepareTxnFilesReturns(result1 *protocol.AnchoringInfo, result2 error)

func (*OperationHandler) PrepareTxnFilesReturnsOnCall added in v0.1.5

func (fake *OperationHandler) PrepareTxnFilesReturnsOnCall(i int, result1 *protocol.AnchoringInfo, result2 error)

type OperationParser added in v0.1.5

type OperationParser struct {
	GetCommitmentStub func([]byte) (string, error)

	GetRevealValueStub func([]byte) (string, error)

	ParseStub func(string, []byte) (*operation.Operation, error)

	ParseDIDStub func(string, string) (string, []byte, error)
	// contains filtered or unexported fields
}

func (*OperationParser) GetCommitment added in v0.1.5

func (fake *OperationParser) GetCommitment(arg1 []byte) (string, error)

func (*OperationParser) GetCommitmentArgsForCall added in v0.1.5

func (fake *OperationParser) GetCommitmentArgsForCall(i int) []byte

func (*OperationParser) GetCommitmentCallCount added in v0.1.5

func (fake *OperationParser) GetCommitmentCallCount() int

func (*OperationParser) GetCommitmentCalls added in v0.1.5

func (fake *OperationParser) GetCommitmentCalls(stub func([]byte) (string, error))

func (*OperationParser) GetCommitmentReturns added in v0.1.5

func (fake *OperationParser) GetCommitmentReturns(result1 string, result2 error)

func (*OperationParser) GetCommitmentReturnsOnCall added in v0.1.5

func (fake *OperationParser) GetCommitmentReturnsOnCall(i int, result1 string, result2 error)

func (*OperationParser) GetRevealValue added in v0.1.5

func (fake *OperationParser) GetRevealValue(arg1 []byte) (string, error)

func (*OperationParser) GetRevealValueArgsForCall added in v0.1.5

func (fake *OperationParser) GetRevealValueArgsForCall(i int) []byte

func (*OperationParser) GetRevealValueCallCount added in v0.1.5

func (fake *OperationParser) GetRevealValueCallCount() int

func (*OperationParser) GetRevealValueCalls added in v0.1.5

func (fake *OperationParser) GetRevealValueCalls(stub func([]byte) (string, error))

func (*OperationParser) GetRevealValueReturns added in v0.1.5

func (fake *OperationParser) GetRevealValueReturns(result1 string, result2 error)

func (*OperationParser) GetRevealValueReturnsOnCall added in v0.1.5

func (fake *OperationParser) GetRevealValueReturnsOnCall(i int, result1 string, result2 error)

func (*OperationParser) Invocations added in v0.1.5

func (fake *OperationParser) Invocations() map[string][][]interface{}

func (*OperationParser) Parse added in v0.1.5

func (fake *OperationParser) Parse(arg1 string, arg2 []byte) (*operation.Operation, error)

func (*OperationParser) ParseArgsForCall added in v0.1.5

func (fake *OperationParser) ParseArgsForCall(i int) (string, []byte)

func (*OperationParser) ParseCallCount added in v0.1.5

func (fake *OperationParser) ParseCallCount() int

func (*OperationParser) ParseCalls added in v0.1.5

func (fake *OperationParser) ParseCalls(stub func(string, []byte) (*operation.Operation, error))

func (*OperationParser) ParseDID added in v0.1.5

func (fake *OperationParser) ParseDID(arg1 string, arg2 string) (string, []byte, error)

func (*OperationParser) ParseDIDArgsForCall added in v0.1.5

func (fake *OperationParser) ParseDIDArgsForCall(i int) (string, string)

func (*OperationParser) ParseDIDCallCount added in v0.1.5

func (fake *OperationParser) ParseDIDCallCount() int

func (*OperationParser) ParseDIDCalls added in v0.1.5

func (fake *OperationParser) ParseDIDCalls(stub func(string, string) (string, []byte, error))

func (*OperationParser) ParseDIDReturns added in v0.1.5

func (fake *OperationParser) ParseDIDReturns(result1 string, result2 []byte, result3 error)

func (*OperationParser) ParseDIDReturnsOnCall added in v0.1.5

func (fake *OperationParser) ParseDIDReturnsOnCall(i int, result1 string, result2 []byte, result3 error)

func (*OperationParser) ParseReturns added in v0.1.5

func (fake *OperationParser) ParseReturns(result1 *operation.Operation, result2 error)

func (*OperationParser) ParseReturnsOnCall added in v0.1.5

func (fake *OperationParser) ParseReturnsOnCall(i int, result1 *operation.Operation, result2 error)

type OperationProvider added in v0.1.5

type OperationProvider struct {
	GetTxnOperationsStub func(*txn.SidetreeTxn) ([]*operation.AnchoredOperation, error)
	// contains filtered or unexported fields
}

func (*OperationProvider) GetTxnOperations added in v0.1.5

func (fake *OperationProvider) GetTxnOperations(arg1 *txn.SidetreeTxn) ([]*operation.AnchoredOperation, error)

func (*OperationProvider) GetTxnOperationsArgsForCall added in v0.1.5

func (fake *OperationProvider) GetTxnOperationsArgsForCall(i int) *txn.SidetreeTxn

func (*OperationProvider) GetTxnOperationsCallCount added in v0.1.5

func (fake *OperationProvider) GetTxnOperationsCallCount() int

func (*OperationProvider) GetTxnOperationsCalls added in v0.1.5

func (fake *OperationProvider) GetTxnOperationsCalls(stub func(*txn.SidetreeTxn) ([]*operation.AnchoredOperation, error))

func (*OperationProvider) GetTxnOperationsReturns added in v0.1.5

func (fake *OperationProvider) GetTxnOperationsReturns(result1 []*operation.AnchoredOperation, result2 error)

func (*OperationProvider) GetTxnOperationsReturnsOnCall added in v0.1.5

func (fake *OperationProvider) GetTxnOperationsReturnsOnCall(i int, result1 []*operation.AnchoredOperation, result2 error)

func (*OperationProvider) Invocations added in v0.1.5

func (fake *OperationProvider) Invocations() map[string][][]interface{}

type OperationQueue added in v0.1.3

type OperationQueue struct {
	AddStub func(*operation.QueuedOperation, uint64) (uint, error)

	LenStub func() uint

	PeekStub func(uint) (operation.QueuedOperationsAtTime, error)

	RemoveStub func(uint) (operation.QueuedOperationsAtTime, func() uint, func(error), error)
	// contains filtered or unexported fields
}

func (*OperationQueue) Add added in v0.1.3

func (fake *OperationQueue) Add(arg1 *operation.QueuedOperation, arg2 uint64) (uint, error)

func (*OperationQueue) AddArgsForCall added in v0.1.3

func (fake *OperationQueue) AddArgsForCall(i int) (*operation.QueuedOperation, uint64)

func (*OperationQueue) AddCallCount added in v0.1.3

func (fake *OperationQueue) AddCallCount() int

func (*OperationQueue) AddCalls added in v1.0.0

func (fake *OperationQueue) AddCalls(stub func(*operation.QueuedOperation, uint64) (uint, error))

func (*OperationQueue) AddReturns added in v0.1.3

func (fake *OperationQueue) AddReturns(result1 uint, result2 error)

func (*OperationQueue) AddReturnsOnCall added in v0.1.3

func (fake *OperationQueue) AddReturnsOnCall(i int, result1 uint, result2 error)

func (*OperationQueue) Invocations added in v0.1.3

func (fake *OperationQueue) Invocations() map[string][][]interface{}

func (*OperationQueue) Len added in v0.1.3

func (fake *OperationQueue) Len() uint

func (*OperationQueue) LenCallCount added in v0.1.3

func (fake *OperationQueue) LenCallCount() int

func (*OperationQueue) LenCalls added in v1.0.0

func (fake *OperationQueue) LenCalls(stub func() uint)

func (*OperationQueue) LenReturns added in v0.1.3

func (fake *OperationQueue) LenReturns(result1 uint)

func (*OperationQueue) LenReturnsOnCall added in v0.1.3

func (fake *OperationQueue) LenReturnsOnCall(i int, result1 uint)

func (*OperationQueue) Peek added in v0.1.3

func (*OperationQueue) PeekArgsForCall added in v0.1.3

func (fake *OperationQueue) PeekArgsForCall(i int) uint

func (*OperationQueue) PeekCallCount added in v0.1.3

func (fake *OperationQueue) PeekCallCount() int

func (*OperationQueue) PeekCalls added in v1.0.0

func (fake *OperationQueue) PeekCalls(stub func(uint) (operation.QueuedOperationsAtTime, error))

func (*OperationQueue) PeekReturns added in v0.1.3

func (fake *OperationQueue) PeekReturns(result1 operation.QueuedOperationsAtTime, result2 error)

func (*OperationQueue) PeekReturnsOnCall added in v0.1.3

func (fake *OperationQueue) PeekReturnsOnCall(i int, result1 operation.QueuedOperationsAtTime, result2 error)

func (*OperationQueue) Remove added in v0.1.3

func (fake *OperationQueue) Remove(arg1 uint) (operation.QueuedOperationsAtTime, func() uint, func(error), error)

func (*OperationQueue) RemoveArgsForCall added in v0.1.3

func (fake *OperationQueue) RemoveArgsForCall(i int) uint

func (*OperationQueue) RemoveCallCount added in v0.1.3

func (fake *OperationQueue) RemoveCallCount() int

func (*OperationQueue) RemoveCalls added in v1.0.0

func (fake *OperationQueue) RemoveCalls(stub func(uint) (operation.QueuedOperationsAtTime, func() uint, func(error), error))

func (*OperationQueue) RemoveReturns added in v0.1.3

func (fake *OperationQueue) RemoveReturns(result1 operation.QueuedOperationsAtTime, result2 func() uint, result3 func(error), result4 error)

func (*OperationQueue) RemoveReturnsOnCall added in v0.1.3

func (fake *OperationQueue) RemoveReturnsOnCall(i int, result1 operation.QueuedOperationsAtTime, result2 func() uint, result3 func(error), result4 error)

type ProtocolVersion added in v0.1.5

type ProtocolVersion struct {
	DocumentComposerStub func() protocol.DocumentComposer

	DocumentTransformerStub func() protocol.DocumentTransformer

	DocumentValidatorStub func() protocol.DocumentValidator

	OperationApplierStub func() protocol.OperationApplier

	OperationHandlerStub func() protocol.OperationHandler

	OperationParserStub func() protocol.OperationParser

	OperationProviderStub func() protocol.OperationProvider

	ProtocolStub func() protocol.Protocol

	TransactionProcessorStub func() protocol.TxnProcessor

	VersionStub func() string
	// contains filtered or unexported fields
}

func GetProtocolVersion added in v0.1.5

func GetProtocolVersion(p protocol.Protocol) *ProtocolVersion

GetProtocolVersion returns mock protocol version.

func (*ProtocolVersion) DocumentComposer added in v0.1.5

func (fake *ProtocolVersion) DocumentComposer() protocol.DocumentComposer

func (*ProtocolVersion) DocumentComposerCallCount added in v0.1.5

func (fake *ProtocolVersion) DocumentComposerCallCount() int

func (*ProtocolVersion) DocumentComposerCalls added in v0.1.5

func (fake *ProtocolVersion) DocumentComposerCalls(stub func() protocol.DocumentComposer)

func (*ProtocolVersion) DocumentComposerReturns added in v0.1.5

func (fake *ProtocolVersion) DocumentComposerReturns(result1 protocol.DocumentComposer)

func (*ProtocolVersion) DocumentComposerReturnsOnCall added in v0.1.5

func (fake *ProtocolVersion) DocumentComposerReturnsOnCall(i int, result1 protocol.DocumentComposer)

func (*ProtocolVersion) DocumentTransformer added in v0.1.5

func (fake *ProtocolVersion) DocumentTransformer() protocol.DocumentTransformer

func (*ProtocolVersion) DocumentTransformerCallCount added in v0.1.5

func (fake *ProtocolVersion) DocumentTransformerCallCount() int

func (*ProtocolVersion) DocumentTransformerCalls added in v0.1.5

func (fake *ProtocolVersion) DocumentTransformerCalls(stub func() protocol.DocumentTransformer)

func (*ProtocolVersion) DocumentTransformerReturns added in v0.1.5

func (fake *ProtocolVersion) DocumentTransformerReturns(result1 protocol.DocumentTransformer)

func (*ProtocolVersion) DocumentTransformerReturnsOnCall added in v0.1.5

func (fake *ProtocolVersion) DocumentTransformerReturnsOnCall(i int, result1 protocol.DocumentTransformer)

func (*ProtocolVersion) DocumentValidator added in v0.1.5

func (fake *ProtocolVersion) DocumentValidator() protocol.DocumentValidator

func (*ProtocolVersion) DocumentValidatorCallCount added in v0.1.5

func (fake *ProtocolVersion) DocumentValidatorCallCount() int

func (*ProtocolVersion) DocumentValidatorCalls added in v0.1.5

func (fake *ProtocolVersion) DocumentValidatorCalls(stub func() protocol.DocumentValidator)

func (*ProtocolVersion) DocumentValidatorReturns added in v0.1.5

func (fake *ProtocolVersion) DocumentValidatorReturns(result1 protocol.DocumentValidator)

func (*ProtocolVersion) DocumentValidatorReturnsOnCall added in v0.1.5

func (fake *ProtocolVersion) DocumentValidatorReturnsOnCall(i int, result1 protocol.DocumentValidator)

func (*ProtocolVersion) Invocations added in v0.1.5

func (fake *ProtocolVersion) Invocations() map[string][][]interface{}

func (*ProtocolVersion) OperationApplier added in v0.1.5

func (fake *ProtocolVersion) OperationApplier() protocol.OperationApplier

func (*ProtocolVersion) OperationApplierCallCount added in v0.1.5

func (fake *ProtocolVersion) OperationApplierCallCount() int

func (*ProtocolVersion) OperationApplierCalls added in v0.1.5

func (fake *ProtocolVersion) OperationApplierCalls(stub func() protocol.OperationApplier)

func (*ProtocolVersion) OperationApplierReturns added in v0.1.5

func (fake *ProtocolVersion) OperationApplierReturns(result1 protocol.OperationApplier)

func (*ProtocolVersion) OperationApplierReturnsOnCall added in v0.1.5

func (fake *ProtocolVersion) OperationApplierReturnsOnCall(i int, result1 protocol.OperationApplier)

func (*ProtocolVersion) OperationHandler added in v0.1.5

func (fake *ProtocolVersion) OperationHandler() protocol.OperationHandler

func (*ProtocolVersion) OperationHandlerCallCount added in v0.1.5

func (fake *ProtocolVersion) OperationHandlerCallCount() int

func (*ProtocolVersion) OperationHandlerCalls added in v0.1.5

func (fake *ProtocolVersion) OperationHandlerCalls(stub func() protocol.OperationHandler)

func (*ProtocolVersion) OperationHandlerReturns added in v0.1.5

func (fake *ProtocolVersion) OperationHandlerReturns(result1 protocol.OperationHandler)

func (*ProtocolVersion) OperationHandlerReturnsOnCall added in v0.1.5

func (fake *ProtocolVersion) OperationHandlerReturnsOnCall(i int, result1 protocol.OperationHandler)

func (*ProtocolVersion) OperationParser added in v0.1.5

func (fake *ProtocolVersion) OperationParser() protocol.OperationParser

func (*ProtocolVersion) OperationParserCallCount added in v0.1.5

func (fake *ProtocolVersion) OperationParserCallCount() int

func (*ProtocolVersion) OperationParserCalls added in v0.1.5

func (fake *ProtocolVersion) OperationParserCalls(stub func() protocol.OperationParser)

func (*ProtocolVersion) OperationParserReturns added in v0.1.5

func (fake *ProtocolVersion) OperationParserReturns(result1 protocol.OperationParser)

func (*ProtocolVersion) OperationParserReturnsOnCall added in v0.1.5

func (fake *ProtocolVersion) OperationParserReturnsOnCall(i int, result1 protocol.OperationParser)

func (*ProtocolVersion) OperationProvider added in v0.1.5

func (fake *ProtocolVersion) OperationProvider() protocol.OperationProvider

func (*ProtocolVersion) OperationProviderCallCount added in v0.1.5

func (fake *ProtocolVersion) OperationProviderCallCount() int

func (*ProtocolVersion) OperationProviderCalls added in v0.1.5

func (fake *ProtocolVersion) OperationProviderCalls(stub func() protocol.OperationProvider)

func (*ProtocolVersion) OperationProviderReturns added in v0.1.5

func (fake *ProtocolVersion) OperationProviderReturns(result1 protocol.OperationProvider)

func (*ProtocolVersion) OperationProviderReturnsOnCall added in v0.1.5

func (fake *ProtocolVersion) OperationProviderReturnsOnCall(i int, result1 protocol.OperationProvider)

func (*ProtocolVersion) Protocol added in v0.1.5

func (fake *ProtocolVersion) Protocol() protocol.Protocol

func (*ProtocolVersion) ProtocolCallCount added in v0.1.5

func (fake *ProtocolVersion) ProtocolCallCount() int

func (*ProtocolVersion) ProtocolCalls added in v0.1.5

func (fake *ProtocolVersion) ProtocolCalls(stub func() protocol.Protocol)

func (*ProtocolVersion) ProtocolReturns added in v0.1.5

func (fake *ProtocolVersion) ProtocolReturns(result1 protocol.Protocol)

func (*ProtocolVersion) ProtocolReturnsOnCall added in v0.1.5

func (fake *ProtocolVersion) ProtocolReturnsOnCall(i int, result1 protocol.Protocol)

func (*ProtocolVersion) TransactionProcessor added in v0.1.5

func (fake *ProtocolVersion) TransactionProcessor() protocol.TxnProcessor

func (*ProtocolVersion) TransactionProcessorCallCount added in v0.1.5

func (fake *ProtocolVersion) TransactionProcessorCallCount() int

func (*ProtocolVersion) TransactionProcessorCalls added in v0.1.5

func (fake *ProtocolVersion) TransactionProcessorCalls(stub func() protocol.TxnProcessor)

func (*ProtocolVersion) TransactionProcessorReturns added in v0.1.5

func (fake *ProtocolVersion) TransactionProcessorReturns(result1 protocol.TxnProcessor)

func (*ProtocolVersion) TransactionProcessorReturnsOnCall added in v0.1.5

func (fake *ProtocolVersion) TransactionProcessorReturnsOnCall(i int, result1 protocol.TxnProcessor)

func (*ProtocolVersion) Version added in v0.1.5

func (fake *ProtocolVersion) Version() string

func (*ProtocolVersion) VersionCallCount added in v0.1.5

func (fake *ProtocolVersion) VersionCallCount() int

func (*ProtocolVersion) VersionCalls added in v0.1.5

func (fake *ProtocolVersion) VersionCalls(stub func() string)

func (*ProtocolVersion) VersionReturns added in v0.1.5

func (fake *ProtocolVersion) VersionReturns(result1 string)

func (*ProtocolVersion) VersionReturnsOnCall added in v0.1.5

func (fake *ProtocolVersion) VersionReturnsOnCall(i int, result1 string)

type TxnProcessor added in v0.1.5

type TxnProcessor struct {
	ProcessStub func(txn.SidetreeTxn, ...string) (int, error)
	// contains filtered or unexported fields
}

func (*TxnProcessor) Invocations added in v0.1.5

func (fake *TxnProcessor) Invocations() map[string][][]interface{}

func (*TxnProcessor) Process added in v0.1.5

func (fake *TxnProcessor) Process(arg1 txn.SidetreeTxn, arg2 ...string) (int, error)

func (*TxnProcessor) ProcessArgsForCall added in v0.1.5

func (fake *TxnProcessor) ProcessArgsForCall(i int) (txn.SidetreeTxn, []string)

func (*TxnProcessor) ProcessCallCount added in v0.1.5

func (fake *TxnProcessor) ProcessCallCount() int

func (*TxnProcessor) ProcessCalls added in v0.1.5

func (fake *TxnProcessor) ProcessCalls(stub func(txn.SidetreeTxn, ...string) (int, error))

func (*TxnProcessor) ProcessReturns added in v0.1.5

func (fake *TxnProcessor) ProcessReturns(result1 int, result2 error)

func (*TxnProcessor) ProcessReturnsOnCall added in v0.1.5

func (fake *TxnProcessor) ProcessReturnsOnCall(i int, result1 int, result2 error)

Jump to

Keyboard shortcuts

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