mocks

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HandlingMiddlewareMock

type HandlingMiddlewareMock struct {
	WrapMock mHandlingMiddlewareMockWrap
	// contains filtered or unexported fields
}

HandlingMiddlewareMock implements processor.HandlingMiddleware

func NewHandlingMiddlewareMock

func NewHandlingMiddlewareMock(t minimock.Tester) *HandlingMiddlewareMock

NewHandlingMiddlewareMock returns a mock for processor.HandlingMiddleware

func (*HandlingMiddlewareMock) MinimockFinish

func (m *HandlingMiddlewareMock) MinimockFinish()

MinimockFinish checks that all mocked methods have been called the expected number of times

func (*HandlingMiddlewareMock) MinimockWait

func (m *HandlingMiddlewareMock) MinimockWait(timeout mm_time.Duration)

MinimockWait waits for all mocked methods to be called the expected number of times

func (*HandlingMiddlewareMock) MinimockWrapDone

func (m *HandlingMiddlewareMock) MinimockWrapDone() bool

MinimockWrapDone returns true if the count of the Wrap invocations corresponds the number of defined expectations

func (*HandlingMiddlewareMock) MinimockWrapInspect

func (m *HandlingMiddlewareMock) MinimockWrapInspect()

MinimockWrapInspect logs each unmet expectation

func (*HandlingMiddlewareMock) Wrap

Wrap implements processor.HandlingMiddleware

func (*HandlingMiddlewareMock) WrapAfterCounter

func (mmWrap *HandlingMiddlewareMock) WrapAfterCounter() uint64

WrapAfterCounter returns a count of finished HandlingMiddlewareMock.Wrap invocations

func (*HandlingMiddlewareMock) WrapBeforeCounter

func (mmWrap *HandlingMiddlewareMock) WrapBeforeCounter() uint64

WrapBeforeCounter returns a count of HandlingMiddlewareMock.Wrap invocations

type HandlingMiddlewareMockWrapExpectation

type HandlingMiddlewareMockWrapExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

HandlingMiddlewareMockWrapExpectation specifies expectation struct of the HandlingMiddleware.Wrap

func (*HandlingMiddlewareMockWrapExpectation) Then

Then sets up HandlingMiddleware.Wrap return parameters for the expectation previously defined by the When method

type HandlingMiddlewareMockWrapParams

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

HandlingMiddlewareMockWrapParams contains parameters of the HandlingMiddleware.Wrap

type HandlingMiddlewareMockWrapResults

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

HandlingMiddlewareMockWrapResults contains results of the HandlingMiddleware.Wrap

type ListnerMock added in v0.0.3

type ListnerMock struct {
	ListenAndServeMock mListnerMockListenAndServe

	ListenAndServeTLSMock mListnerMockListenAndServeTLS

	ShutdownMock mListnerMockShutdown
	// contains filtered or unexported fields
}

ListnerMock implements server.Listner

func NewListnerMock added in v0.0.3

func NewListnerMock(t minimock.Tester) *ListnerMock

NewListnerMock returns a mock for server.Listner

func (*ListnerMock) ListenAndServe added in v0.0.3

func (mmListenAndServe *ListnerMock) ListenAndServe() (err error)

ListenAndServe implements server.Listner

func (*ListnerMock) ListenAndServeAfterCounter added in v0.0.3

func (mmListenAndServe *ListnerMock) ListenAndServeAfterCounter() uint64

ListenAndServeAfterCounter returns a count of finished ListnerMock.ListenAndServe invocations

func (*ListnerMock) ListenAndServeBeforeCounter added in v0.0.3

func (mmListenAndServe *ListnerMock) ListenAndServeBeforeCounter() uint64

ListenAndServeBeforeCounter returns a count of ListnerMock.ListenAndServe invocations

func (*ListnerMock) ListenAndServeTLS added in v0.0.3

func (mmListenAndServeTLS *ListnerMock) ListenAndServeTLS(certFile string, keyFile string) (err error)

ListenAndServeTLS implements server.Listner

func (*ListnerMock) ListenAndServeTLSAfterCounter added in v0.0.3

func (mmListenAndServeTLS *ListnerMock) ListenAndServeTLSAfterCounter() uint64

ListenAndServeTLSAfterCounter returns a count of finished ListnerMock.ListenAndServeTLS invocations

func (*ListnerMock) ListenAndServeTLSBeforeCounter added in v0.0.3

func (mmListenAndServeTLS *ListnerMock) ListenAndServeTLSBeforeCounter() uint64

ListenAndServeTLSBeforeCounter returns a count of ListnerMock.ListenAndServeTLS invocations

func (*ListnerMock) MinimockFinish added in v0.0.3

func (m *ListnerMock) MinimockFinish()

MinimockFinish checks that all mocked methods have been called the expected number of times

func (*ListnerMock) MinimockListenAndServeDone added in v0.0.3

func (m *ListnerMock) MinimockListenAndServeDone() bool

MinimockListenAndServeDone returns true if the count of the ListenAndServe invocations corresponds the number of defined expectations

func (*ListnerMock) MinimockListenAndServeInspect added in v0.0.3

func (m *ListnerMock) MinimockListenAndServeInspect()

MinimockListenAndServeInspect logs each unmet expectation

func (*ListnerMock) MinimockListenAndServeTLSDone added in v0.0.3

func (m *ListnerMock) MinimockListenAndServeTLSDone() bool

MinimockListenAndServeTLSDone returns true if the count of the ListenAndServeTLS invocations corresponds the number of defined expectations

func (*ListnerMock) MinimockListenAndServeTLSInspect added in v0.0.3

func (m *ListnerMock) MinimockListenAndServeTLSInspect()

MinimockListenAndServeTLSInspect logs each unmet expectation

func (*ListnerMock) MinimockShutdownDone added in v0.0.3

func (m *ListnerMock) MinimockShutdownDone() bool

MinimockShutdownDone returns true if the count of the Shutdown invocations corresponds the number of defined expectations

func (*ListnerMock) MinimockShutdownInspect added in v0.0.3

func (m *ListnerMock) MinimockShutdownInspect()

MinimockShutdownInspect logs each unmet expectation

func (*ListnerMock) MinimockWait added in v0.0.3

func (m *ListnerMock) MinimockWait(timeout mm_time.Duration)

MinimockWait waits for all mocked methods to be called the expected number of times

func (*ListnerMock) Shutdown added in v0.0.3

func (mmShutdown *ListnerMock) Shutdown(ctx context.Context) (err error)

Shutdown implements server.Listner

func (*ListnerMock) ShutdownAfterCounter added in v0.0.3

func (mmShutdown *ListnerMock) ShutdownAfterCounter() uint64

ShutdownAfterCounter returns a count of finished ListnerMock.Shutdown invocations

func (*ListnerMock) ShutdownBeforeCounter added in v0.0.3

func (mmShutdown *ListnerMock) ShutdownBeforeCounter() uint64

ShutdownBeforeCounter returns a count of ListnerMock.Shutdown invocations

type ListnerMockListenAndServeExpectation added in v0.0.3

type ListnerMockListenAndServeExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ListnerMockListenAndServeExpectation specifies expectation struct of the Listner.ListenAndServe

type ListnerMockListenAndServeResults added in v0.0.3

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

ListnerMockListenAndServeResults contains results of the Listner.ListenAndServe

type ListnerMockListenAndServeTLSExpectation added in v0.0.3

type ListnerMockListenAndServeTLSExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ListnerMockListenAndServeTLSExpectation specifies expectation struct of the Listner.ListenAndServeTLS

func (*ListnerMockListenAndServeTLSExpectation) Then added in v0.0.3

Then sets up Listner.ListenAndServeTLS return parameters for the expectation previously defined by the When method

type ListnerMockListenAndServeTLSParams added in v0.0.3

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

ListnerMockListenAndServeTLSParams contains parameters of the Listner.ListenAndServeTLS

type ListnerMockListenAndServeTLSResults added in v0.0.3

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

ListnerMockListenAndServeTLSResults contains results of the Listner.ListenAndServeTLS

type ListnerMockShutdownExpectation added in v0.0.3

type ListnerMockShutdownExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ListnerMockShutdownExpectation specifies expectation struct of the Listner.Shutdown

func (*ListnerMockShutdownExpectation) Then added in v0.0.3

Then sets up Listner.Shutdown return parameters for the expectation previously defined by the When method

type ListnerMockShutdownParams added in v0.0.3

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

ListnerMockShutdownParams contains parameters of the Listner.Shutdown

type ListnerMockShutdownResults added in v0.0.3

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

ListnerMockShutdownResults contains results of the Listner.Shutdown

type URLReplacerFactoryMock

type URLReplacerFactoryMock struct {
	MakeMock mURLReplacerFactoryMockMake
	// contains filtered or unexported fields
}

URLReplacerFactoryMock implements proxy.URLReplacerFactory

func NewURLReplacerFactoryMock

func NewURLReplacerFactoryMock(t minimock.Tester) *URLReplacerFactoryMock

NewURLReplacerFactoryMock returns a mock for proxy.URLReplacerFactory

func (*URLReplacerFactoryMock) Make

func (mmMake *URLReplacerFactoryMock) Make(requestURL *url.URL) (rp1 *urlreplacer.Replacer, err error)

Make implements proxy.URLReplacerFactory

func (*URLReplacerFactoryMock) MakeAfterCounter

func (mmMake *URLReplacerFactoryMock) MakeAfterCounter() uint64

MakeAfterCounter returns a count of finished URLReplacerFactoryMock.Make invocations

func (*URLReplacerFactoryMock) MakeBeforeCounter

func (mmMake *URLReplacerFactoryMock) MakeBeforeCounter() uint64

MakeBeforeCounter returns a count of URLReplacerFactoryMock.Make invocations

func (*URLReplacerFactoryMock) MinimockFinish

func (m *URLReplacerFactoryMock) MinimockFinish()

MinimockFinish checks that all mocked methods have been called the expected number of times

func (*URLReplacerFactoryMock) MinimockMakeDone

func (m *URLReplacerFactoryMock) MinimockMakeDone() bool

MinimockMakeDone returns true if the count of the Make invocations corresponds the number of defined expectations

func (*URLReplacerFactoryMock) MinimockMakeInspect

func (m *URLReplacerFactoryMock) MinimockMakeInspect()

MinimockMakeInspect logs each unmet expectation

func (*URLReplacerFactoryMock) MinimockWait

func (m *URLReplacerFactoryMock) MinimockWait(timeout mm_time.Duration)

MinimockWait waits for all mocked methods to be called the expected number of times

type URLReplacerFactoryMockMakeExpectation

type URLReplacerFactoryMockMakeExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

URLReplacerFactoryMockMakeExpectation specifies expectation struct of the URLReplacerFactory.Make

func (*URLReplacerFactoryMockMakeExpectation) Then

Then sets up URLReplacerFactory.Make return parameters for the expectation previously defined by the When method

type URLReplacerFactoryMockMakeParams

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

URLReplacerFactoryMockMakeParams contains parameters of the URLReplacerFactory.Make

type URLReplacerFactoryMockMakeResults

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

URLReplacerFactoryMockMakeResults contains results of the URLReplacerFactory.Make

type URLReplacerMock

type URLReplacerMock struct {
	ToSourceMock mURLReplacerMockToSource

	ToTargetMock mURLReplacerMockToTarget

	URLToSourceMock mURLReplacerMockURLToSource

	URLToTargetMock mURLReplacerMockURLToTarget
	// contains filtered or unexported fields
}

URLReplacerMock implements urlreplacer.URLReplacer

func NewURLReplacerMock

func NewURLReplacerMock(t minimock.Tester) *URLReplacerMock

NewURLReplacerMock returns a mock for urlreplacer.URLReplacer

func (*URLReplacerMock) MinimockFinish

func (m *URLReplacerMock) MinimockFinish()

MinimockFinish checks that all mocked methods have been called the expected number of times

func (*URLReplacerMock) MinimockToSourceDone

func (m *URLReplacerMock) MinimockToSourceDone() bool

MinimockToSourceDone returns true if the count of the ToSource invocations corresponds the number of defined expectations

func (*URLReplacerMock) MinimockToSourceInspect

func (m *URLReplacerMock) MinimockToSourceInspect()

MinimockToSourceInspect logs each unmet expectation

func (*URLReplacerMock) MinimockToTargetDone

func (m *URLReplacerMock) MinimockToTargetDone() bool

MinimockToTargetDone returns true if the count of the ToTarget invocations corresponds the number of defined expectations

func (*URLReplacerMock) MinimockToTargetInspect

func (m *URLReplacerMock) MinimockToTargetInspect()

MinimockToTargetInspect logs each unmet expectation

func (*URLReplacerMock) MinimockURLToSourceDone

func (m *URLReplacerMock) MinimockURLToSourceDone() bool

MinimockURLToSourceDone returns true if the count of the URLToSource invocations corresponds the number of defined expectations

func (*URLReplacerMock) MinimockURLToSourceInspect

func (m *URLReplacerMock) MinimockURLToSourceInspect()

MinimockURLToSourceInspect logs each unmet expectation

func (*URLReplacerMock) MinimockURLToTargetDone

func (m *URLReplacerMock) MinimockURLToTargetDone() bool

MinimockURLToTargetDone returns true if the count of the URLToTarget invocations corresponds the number of defined expectations

func (*URLReplacerMock) MinimockURLToTargetInspect

func (m *URLReplacerMock) MinimockURLToTargetInspect()

MinimockURLToTargetInspect logs each unmet expectation

func (*URLReplacerMock) MinimockWait

func (m *URLReplacerMock) MinimockWait(timeout mm_time.Duration)

MinimockWait waits for all mocked methods to be called the expected number of times

func (*URLReplacerMock) ToSource

func (mmToSource *URLReplacerMock) ToSource(rawURL string) (s1 string, err error)

ToSource implements urlreplacer.URLReplacer

func (*URLReplacerMock) ToSourceAfterCounter

func (mmToSource *URLReplacerMock) ToSourceAfterCounter() uint64

ToSourceAfterCounter returns a count of finished URLReplacerMock.ToSource invocations

func (*URLReplacerMock) ToSourceBeforeCounter

func (mmToSource *URLReplacerMock) ToSourceBeforeCounter() uint64

ToSourceBeforeCounter returns a count of URLReplacerMock.ToSource invocations

func (*URLReplacerMock) ToTarget

func (mmToTarget *URLReplacerMock) ToTarget(rawURL string) (s1 string, err error)

ToTarget implements urlreplacer.URLReplacer

func (*URLReplacerMock) ToTargetAfterCounter

func (mmToTarget *URLReplacerMock) ToTargetAfterCounter() uint64

ToTargetAfterCounter returns a count of finished URLReplacerMock.ToTarget invocations

func (*URLReplacerMock) ToTargetBeforeCounter

func (mmToTarget *URLReplacerMock) ToTargetBeforeCounter() uint64

ToTargetBeforeCounter returns a count of URLReplacerMock.ToTarget invocations

func (*URLReplacerMock) URLToSource

func (mmURLToSource *URLReplacerMock) URLToSource(parsedURL *url.URL) (s1 string, err error)

URLToSource implements urlreplacer.URLReplacer

func (*URLReplacerMock) URLToSourceAfterCounter

func (mmURLToSource *URLReplacerMock) URLToSourceAfterCounter() uint64

URLToSourceAfterCounter returns a count of finished URLReplacerMock.URLToSource invocations

func (*URLReplacerMock) URLToSourceBeforeCounter

func (mmURLToSource *URLReplacerMock) URLToSourceBeforeCounter() uint64

URLToSourceBeforeCounter returns a count of URLReplacerMock.URLToSource invocations

func (*URLReplacerMock) URLToTarget

func (mmURLToTarget *URLReplacerMock) URLToTarget(parsedURL *url.URL) (s1 string, err error)

URLToTarget implements urlreplacer.URLReplacer

func (*URLReplacerMock) URLToTargetAfterCounter

func (mmURLToTarget *URLReplacerMock) URLToTargetAfterCounter() uint64

URLToTargetAfterCounter returns a count of finished URLReplacerMock.URLToTarget invocations

func (*URLReplacerMock) URLToTargetBeforeCounter

func (mmURLToTarget *URLReplacerMock) URLToTargetBeforeCounter() uint64

URLToTargetBeforeCounter returns a count of URLReplacerMock.URLToTarget invocations

type URLReplacerMockToSourceExpectation

type URLReplacerMockToSourceExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

URLReplacerMockToSourceExpectation specifies expectation struct of the URLReplacer.ToSource

func (*URLReplacerMockToSourceExpectation) Then

Then sets up URLReplacer.ToSource return parameters for the expectation previously defined by the When method

type URLReplacerMockToSourceParams

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

URLReplacerMockToSourceParams contains parameters of the URLReplacer.ToSource

type URLReplacerMockToSourceResults

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

URLReplacerMockToSourceResults contains results of the URLReplacer.ToSource

type URLReplacerMockToTargetExpectation

type URLReplacerMockToTargetExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

URLReplacerMockToTargetExpectation specifies expectation struct of the URLReplacer.ToTarget

func (*URLReplacerMockToTargetExpectation) Then

Then sets up URLReplacer.ToTarget return parameters for the expectation previously defined by the When method

type URLReplacerMockToTargetParams

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

URLReplacerMockToTargetParams contains parameters of the URLReplacer.ToTarget

type URLReplacerMockToTargetResults

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

URLReplacerMockToTargetResults contains results of the URLReplacer.ToTarget

type URLReplacerMockURLToSourceExpectation

type URLReplacerMockURLToSourceExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

URLReplacerMockURLToSourceExpectation specifies expectation struct of the URLReplacer.URLToSource

func (*URLReplacerMockURLToSourceExpectation) Then

Then sets up URLReplacer.URLToSource return parameters for the expectation previously defined by the When method

type URLReplacerMockURLToSourceParams

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

URLReplacerMockURLToSourceParams contains parameters of the URLReplacer.URLToSource

type URLReplacerMockURLToSourceResults

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

URLReplacerMockURLToSourceResults contains results of the URLReplacer.URLToSource

type URLReplacerMockURLToTargetExpectation

type URLReplacerMockURLToTargetExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

URLReplacerMockURLToTargetExpectation specifies expectation struct of the URLReplacer.URLToTarget

func (*URLReplacerMockURLToTargetExpectation) Then

Then sets up URLReplacer.URLToTarget return parameters for the expectation previously defined by the When method

type URLReplacerMockURLToTargetParams

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

URLReplacerMockURLToTargetParams contains parameters of the URLReplacer.URLToTarget

type URLReplacerMockURLToTargetResults

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

URLReplacerMockURLToTargetResults contains results of the URLReplacer.URLToTarget

Jump to

Keyboard shortcuts

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