responder_mocks

package
v0.10.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Limiter

type Limiter struct {
	mock.Mock
}

Limiter is an autogenerated mock type for the Limiter type

func NewLimiter

func NewLimiter(t interface {
	mock.TestingT
	Cleanup(func())
}) *Limiter

NewLimiter creates a new instance of Limiter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Limiter) Allow

func (_m *Limiter) Allow(addr netip.Addr) bool

Allow provides a mock function with given fields: addr

func (*Limiter) EXPECT

func (_m *Limiter) EXPECT() *Limiter_Expecter

type Limiter_Allow_Call

type Limiter_Allow_Call struct {
	*mock.Call
}

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

func (*Limiter_Allow_Call) Return

func (_c *Limiter_Allow_Call) Return(_a0 bool) *Limiter_Allow_Call

func (*Limiter_Allow_Call) Run

func (_c *Limiter_Allow_Call) Run(run func(addr netip.Addr)) *Limiter_Allow_Call

func (*Limiter_Allow_Call) RunAndReturn

func (_c *Limiter_Allow_Call) RunAndReturn(run func(netip.Addr) bool) *Limiter_Allow_Call

type Limiter_Expecter

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

func (*Limiter_Expecter) Allow

func (_e *Limiter_Expecter) Allow(addr interface{}) *Limiter_Allow_Call

Allow is a helper method to define mock.On call

  • addr netip.Addr

Jump to

Keyboard shortcuts

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