Documentation ¶
Index ¶
- type AlgorithmMock
- type AlgorithmMock_Expecter
- func (_e *AlgorithmMock_Expecter) Export(exporter interface{}) *AlgorithmMock_Export_Call
- func (_e *AlgorithmMock_Expecter) Generate(reference interface{}) *AlgorithmMock_Generate_Call
- func (_e *AlgorithmMock_Expecter) Validate(value interface{}, reference interface{}, opts ...interface{}) *AlgorithmMock_Validate_Call
- type AlgorithmMock_Export_Call
- type AlgorithmMock_Generate_Call
- type AlgorithmMock_Validate_Call
- func (_c *AlgorithmMock_Validate_Call) Return(_a0 int64, _a1 error) *AlgorithmMock_Validate_Call
- func (_c *AlgorithmMock_Validate_Call) Run(run func(value string, reference int64, opts ...otp.ValidationOption)) *AlgorithmMock_Validate_Call
- func (_c *AlgorithmMock_Validate_Call) RunAndReturn(run func(string, int64, ...otp.ValidationOption) (int64, error)) *AlgorithmMock_Validate_Call
- type ExporterMock
- func (_m *ExporterMock) EXPECT() *ExporterMock_Expecter
- func (_m *ExporterMock) SetAlgorithm(algorithm string)
- func (_m *ExporterMock) SetDigits(digits otp.Digits)
- func (_m *ExporterMock) SetHashAlgorithm(algorithm otp.HashAlgorithm)
- func (_m *ExporterMock) SetKey(key []byte)
- func (_m *ExporterMock) SetPeriod(period time.Duration)
- func (_m *ExporterMock) SetT0(t0 int64)
- type ExporterMock_Expecter
- func (_e *ExporterMock_Expecter) SetAlgorithm(algorithm interface{}) *ExporterMock_SetAlgorithm_Call
- func (_e *ExporterMock_Expecter) SetDigits(digits interface{}) *ExporterMock_SetDigits_Call
- func (_e *ExporterMock_Expecter) SetHashAlgorithm(algorithm interface{}) *ExporterMock_SetHashAlgorithm_Call
- func (_e *ExporterMock_Expecter) SetKey(key interface{}) *ExporterMock_SetKey_Call
- func (_e *ExporterMock_Expecter) SetPeriod(period interface{}) *ExporterMock_SetPeriod_Call
- func (_e *ExporterMock_Expecter) SetT0(t0 interface{}) *ExporterMock_SetT0_Call
- type ExporterMock_SetAlgorithm_Call
- type ExporterMock_SetDigits_Call
- type ExporterMock_SetHashAlgorithm_Call
- func (_c *ExporterMock_SetHashAlgorithm_Call) Return() *ExporterMock_SetHashAlgorithm_Call
- func (_c *ExporterMock_SetHashAlgorithm_Call) Run(run func(algorithm otp.HashAlgorithm)) *ExporterMock_SetHashAlgorithm_Call
- func (_c *ExporterMock_SetHashAlgorithm_Call) RunAndReturn(run func(otp.HashAlgorithm)) *ExporterMock_SetHashAlgorithm_Call
- type ExporterMock_SetKey_Call
- type ExporterMock_SetPeriod_Call
- type ExporterMock_SetT0_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlgorithmMock ¶
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 ¶
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 (_c *AlgorithmMock_Export_Call) Return() *AlgorithmMock_Export_Call
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 ¶
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 (_c *AlgorithmMock_Generate_Call) Return(_a0 string) *AlgorithmMock_Generate_Call
func (*AlgorithmMock_Generate_Call) Run ¶
func (_c *AlgorithmMock_Generate_Call) Run(run func(reference int64)) *AlgorithmMock_Generate_Call
func (*AlgorithmMock_Generate_Call) RunAndReturn ¶
func (_c *AlgorithmMock_Generate_Call) RunAndReturn(run func(int64) string) *AlgorithmMock_Generate_Call
type AlgorithmMock_Validate_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 (_c *AlgorithmMock_Validate_Call) Return(_a0 int64, _a1 error) *AlgorithmMock_Validate_Call
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 ¶
func (_c *AlgorithmMock_Validate_Call) RunAndReturn(run func(string, int64, ...otp.ValidationOption) (int64, error)) *AlgorithmMock_Validate_Call
type ExporterMock ¶
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 ¶
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 (_c *ExporterMock_SetAlgorithm_Call) Return() *ExporterMock_SetAlgorithm_Call
func (*ExporterMock_SetAlgorithm_Call) Run ¶
func (_c *ExporterMock_SetAlgorithm_Call) Run(run func(algorithm string)) *ExporterMock_SetAlgorithm_Call
func (*ExporterMock_SetAlgorithm_Call) RunAndReturn ¶
func (_c *ExporterMock_SetAlgorithm_Call) RunAndReturn(run func(string)) *ExporterMock_SetAlgorithm_Call
type ExporterMock_SetDigits_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 (_c *ExporterMock_SetDigits_Call) Return() *ExporterMock_SetDigits_Call
func (*ExporterMock_SetDigits_Call) Run ¶
func (_c *ExporterMock_SetDigits_Call) Run(run func(digits otp.Digits)) *ExporterMock_SetDigits_Call
func (*ExporterMock_SetDigits_Call) RunAndReturn ¶
func (_c *ExporterMock_SetDigits_Call) RunAndReturn(run func(otp.Digits)) *ExporterMock_SetDigits_Call
type ExporterMock_SetHashAlgorithm_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 (_c *ExporterMock_SetHashAlgorithm_Call) Return() *ExporterMock_SetHashAlgorithm_Call
func (*ExporterMock_SetHashAlgorithm_Call) Run ¶
func (_c *ExporterMock_SetHashAlgorithm_Call) Run(run func(algorithm otp.HashAlgorithm)) *ExporterMock_SetHashAlgorithm_Call
func (*ExporterMock_SetHashAlgorithm_Call) RunAndReturn ¶
func (_c *ExporterMock_SetHashAlgorithm_Call) RunAndReturn(run func(otp.HashAlgorithm)) *ExporterMock_SetHashAlgorithm_Call
type ExporterMock_SetKey_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 (_c *ExporterMock_SetKey_Call) Return() *ExporterMock_SetKey_Call
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 ¶
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 (_c *ExporterMock_SetPeriod_Call) Return() *ExporterMock_SetPeriod_Call
func (*ExporterMock_SetPeriod_Call) Run ¶
func (_c *ExporterMock_SetPeriod_Call) Run(run func(period time.Duration)) *ExporterMock_SetPeriod_Call
func (*ExporterMock_SetPeriod_Call) RunAndReturn ¶
func (_c *ExporterMock_SetPeriod_Call) RunAndReturn(run func(time.Duration)) *ExporterMock_SetPeriod_Call
type ExporterMock_SetT0_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 (_c *ExporterMock_SetT0_Call) Return() *ExporterMock_SetT0_Call
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