mocks

package
v0.0.0-...-5eebb81 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlgorithmMock

type AlgorithmMock struct {
	mock.Mock
}

AlgorithmMock is an autogenerated mock type for the Algorithm type

func NewAlgorithmMock

func NewAlgorithmMock(t mockConstructorTestingTNewAlgorithmMock) *AlgorithmMock

NewAlgorithmMock creates a new instance of AlgorithmMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*AlgorithmMock) EXPECT

func (_m *AlgorithmMock) EXPECT() *AlgorithmMock_Expecter

func (*AlgorithmMock) Export

func (_m *AlgorithmMock) Export(exporter otp.Exporter)

Export provides a mock function with given fields: exporter

func (*AlgorithmMock) Generate

func (_m *AlgorithmMock) Generate(reference int64) string

Generate provides a mock function with given fields: reference

func (*AlgorithmMock) Validate

func (_m *AlgorithmMock) Validate(value string, reference int64, opts ...otp.ValidationOption) (int64, error)

Validate provides a mock function with given fields: value, reference, opts

type AlgorithmMock_Expecter

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

func (*AlgorithmMock_Expecter) Export

func (_e *AlgorithmMock_Expecter) Export(exporter interface{}) *AlgorithmMock_Export_Call

Export is a helper method to define mock.On call

  • exporter otp.Exporter

func (*AlgorithmMock_Expecter) Generate

func (_e *AlgorithmMock_Expecter) Generate(reference interface{}) *AlgorithmMock_Generate_Call

Generate is a helper method to define mock.On call

  • reference int64

func (*AlgorithmMock_Expecter) Validate

func (_e *AlgorithmMock_Expecter) Validate(value interface{}, reference interface{}, opts ...interface{}) *AlgorithmMock_Validate_Call

Validate is a helper method to define mock.On call

  • value string
  • reference int64
  • opts ...otp.ValidationOption

type AlgorithmMock_Export_Call

type AlgorithmMock_Export_Call struct {
	*mock.Call
}

AlgorithmMock_Export_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Export'

func (*AlgorithmMock_Export_Call) Return

func (*AlgorithmMock_Export_Call) Run

func (_c *AlgorithmMock_Export_Call) Run(run func(exporter otp.Exporter)) *AlgorithmMock_Export_Call

func (*AlgorithmMock_Export_Call) RunAndReturn

func (_c *AlgorithmMock_Export_Call) RunAndReturn(run func(otp.Exporter)) *AlgorithmMock_Export_Call

type AlgorithmMock_Generate_Call

type AlgorithmMock_Generate_Call struct {
	*mock.Call
}

AlgorithmMock_Generate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Generate'

func (*AlgorithmMock_Generate_Call) Return

func (*AlgorithmMock_Generate_Call) Run

func (_c *AlgorithmMock_Generate_Call) Run(run func(reference int64)) *AlgorithmMock_Generate_Call

func (*AlgorithmMock_Generate_Call) RunAndReturn

type AlgorithmMock_Validate_Call

type AlgorithmMock_Validate_Call struct {
	*mock.Call
}

AlgorithmMock_Validate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Validate'

func (*AlgorithmMock_Validate_Call) Return

func (*AlgorithmMock_Validate_Call) Run

func (_c *AlgorithmMock_Validate_Call) Run(run func(value string, reference int64, opts ...otp.ValidationOption)) *AlgorithmMock_Validate_Call

func (*AlgorithmMock_Validate_Call) RunAndReturn

type ExporterMock

type ExporterMock struct {
	mock.Mock
}

ExporterMock is an autogenerated mock type for the Exporter type

func NewExporterMock

func NewExporterMock(t mockConstructorTestingTNewExporterMock) *ExporterMock

NewExporterMock creates a new instance of ExporterMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*ExporterMock) EXPECT

func (_m *ExporterMock) EXPECT() *ExporterMock_Expecter

func (*ExporterMock) SetAlgorithm

func (_m *ExporterMock) SetAlgorithm(algorithm string)

SetAlgorithm provides a mock function with given fields: algorithm

func (*ExporterMock) SetDigits

func (_m *ExporterMock) SetDigits(digits otp.Digits)

SetDigits provides a mock function with given fields: digits

func (*ExporterMock) SetHashAlgorithm

func (_m *ExporterMock) SetHashAlgorithm(algorithm otp.HashAlgorithm)

SetHashAlgorithm provides a mock function with given fields: algorithm

func (*ExporterMock) SetKey

func (_m *ExporterMock) SetKey(key []byte)

SetKey provides a mock function with given fields: key

func (*ExporterMock) SetPeriod

func (_m *ExporterMock) SetPeriod(period time.Duration)

SetPeriod provides a mock function with given fields: period

func (*ExporterMock) SetT0

func (_m *ExporterMock) SetT0(t0 int64)

SetT0 provides a mock function with given fields: t0

type ExporterMock_Expecter

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

func (*ExporterMock_Expecter) SetAlgorithm

func (_e *ExporterMock_Expecter) SetAlgorithm(algorithm interface{}) *ExporterMock_SetAlgorithm_Call

SetAlgorithm is a helper method to define mock.On call

  • algorithm string

func (*ExporterMock_Expecter) SetDigits

func (_e *ExporterMock_Expecter) SetDigits(digits interface{}) *ExporterMock_SetDigits_Call

SetDigits is a helper method to define mock.On call

  • digits otp.Digits

func (*ExporterMock_Expecter) SetHashAlgorithm

func (_e *ExporterMock_Expecter) SetHashAlgorithm(algorithm interface{}) *ExporterMock_SetHashAlgorithm_Call

SetHashAlgorithm is a helper method to define mock.On call

  • algorithm otp.HashAlgorithm

func (*ExporterMock_Expecter) SetKey

func (_e *ExporterMock_Expecter) SetKey(key interface{}) *ExporterMock_SetKey_Call

SetKey is a helper method to define mock.On call

  • key []byte

func (*ExporterMock_Expecter) SetPeriod

func (_e *ExporterMock_Expecter) SetPeriod(period interface{}) *ExporterMock_SetPeriod_Call

SetPeriod is a helper method to define mock.On call

  • period time.Duration

func (*ExporterMock_Expecter) SetT0

func (_e *ExporterMock_Expecter) SetT0(t0 interface{}) *ExporterMock_SetT0_Call

SetT0 is a helper method to define mock.On call

  • t0 int64

type ExporterMock_SetAlgorithm_Call

type ExporterMock_SetAlgorithm_Call struct {
	*mock.Call
}

ExporterMock_SetAlgorithm_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetAlgorithm'

func (*ExporterMock_SetAlgorithm_Call) Return

func (*ExporterMock_SetAlgorithm_Call) Run

func (*ExporterMock_SetAlgorithm_Call) RunAndReturn

type ExporterMock_SetDigits_Call

type ExporterMock_SetDigits_Call struct {
	*mock.Call
}

ExporterMock_SetDigits_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetDigits'

func (*ExporterMock_SetDigits_Call) Return

func (*ExporterMock_SetDigits_Call) Run

func (*ExporterMock_SetDigits_Call) RunAndReturn

type ExporterMock_SetHashAlgorithm_Call

type ExporterMock_SetHashAlgorithm_Call struct {
	*mock.Call
}

ExporterMock_SetHashAlgorithm_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHashAlgorithm'

func (*ExporterMock_SetHashAlgorithm_Call) Return

func (*ExporterMock_SetHashAlgorithm_Call) Run

func (*ExporterMock_SetHashAlgorithm_Call) RunAndReturn

type ExporterMock_SetKey_Call

type ExporterMock_SetKey_Call struct {
	*mock.Call
}

ExporterMock_SetKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetKey'

func (*ExporterMock_SetKey_Call) Return

func (*ExporterMock_SetKey_Call) Run

func (_c *ExporterMock_SetKey_Call) Run(run func(key []byte)) *ExporterMock_SetKey_Call

func (*ExporterMock_SetKey_Call) RunAndReturn

func (_c *ExporterMock_SetKey_Call) RunAndReturn(run func([]byte)) *ExporterMock_SetKey_Call

type ExporterMock_SetPeriod_Call

type ExporterMock_SetPeriod_Call struct {
	*mock.Call
}

ExporterMock_SetPeriod_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPeriod'

func (*ExporterMock_SetPeriod_Call) Return

func (*ExporterMock_SetPeriod_Call) Run

func (*ExporterMock_SetPeriod_Call) RunAndReturn

type ExporterMock_SetT0_Call

type ExporterMock_SetT0_Call struct {
	*mock.Call
}

ExporterMock_SetT0_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetT0'

func (*ExporterMock_SetT0_Call) Return

func (*ExporterMock_SetT0_Call) Run

func (_c *ExporterMock_SetT0_Call) Run(run func(t0 int64)) *ExporterMock_SetT0_Call

func (*ExporterMock_SetT0_Call) RunAndReturn

func (_c *ExporterMock_SetT0_Call) RunAndReturn(run func(int64)) *ExporterMock_SetT0_Call

Jump to

Keyboard shortcuts

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