mocks

package
v2.15.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ORM

type ORM struct {
	mock.Mock
}

ORM is an autogenerated mock type for the ORM type

func NewORM

func NewORM(t interface {
	mock.TestingT
	Cleanup(func())
}) *ORM

NewORM creates a new instance of ORM. 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 (*ORM) DeleteExpired

func (_m *ORM) DeleteExpired(ctx context.Context, limit uint, utcNow time.Time) (int64, error)

DeleteExpired provides a mock function with given fields: ctx, limit, utcNow

func (*ORM) EXPECT added in v2.15.0

func (_m *ORM) EXPECT() *ORM_Expecter

func (*ORM) Get

func (_m *ORM) Get(ctx context.Context, address *big.Big, slotId uint) (*s4.Row, error)

Get provides a mock function with given fields: ctx, address, slotId

func (*ORM) GetSnapshot

func (_m *ORM) GetSnapshot(ctx context.Context, addressRange *s4.AddressRange) ([]*s4.SnapshotRow, error)

GetSnapshot provides a mock function with given fields: ctx, addressRange

func (*ORM) GetUnconfirmedRows

func (_m *ORM) GetUnconfirmedRows(ctx context.Context, limit uint) ([]*s4.Row, error)

GetUnconfirmedRows provides a mock function with given fields: ctx, limit

func (*ORM) Update

func (_m *ORM) Update(ctx context.Context, row *s4.Row) error

Update provides a mock function with given fields: ctx, row

type ORM_DeleteExpired_Call added in v2.15.0

type ORM_DeleteExpired_Call struct {
	*mock.Call
}

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

func (*ORM_DeleteExpired_Call) Return added in v2.15.0

func (*ORM_DeleteExpired_Call) Run added in v2.15.0

func (_c *ORM_DeleteExpired_Call) Run(run func(ctx context.Context, limit uint, utcNow time.Time)) *ORM_DeleteExpired_Call

func (*ORM_DeleteExpired_Call) RunAndReturn added in v2.15.0

type ORM_Expecter added in v2.15.0

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

func (*ORM_Expecter) DeleteExpired added in v2.15.0

func (_e *ORM_Expecter) DeleteExpired(ctx interface{}, limit interface{}, utcNow interface{}) *ORM_DeleteExpired_Call

DeleteExpired is a helper method to define mock.On call

  • ctx context.Context
  • limit uint
  • utcNow time.Time

func (*ORM_Expecter) Get added in v2.15.0

func (_e *ORM_Expecter) Get(ctx interface{}, address interface{}, slotId interface{}) *ORM_Get_Call

Get is a helper method to define mock.On call

  • ctx context.Context
  • address *big.Big
  • slotId uint

func (*ORM_Expecter) GetSnapshot added in v2.15.0

func (_e *ORM_Expecter) GetSnapshot(ctx interface{}, addressRange interface{}) *ORM_GetSnapshot_Call

GetSnapshot is a helper method to define mock.On call

  • ctx context.Context
  • addressRange *s4.AddressRange

func (*ORM_Expecter) GetUnconfirmedRows added in v2.15.0

func (_e *ORM_Expecter) GetUnconfirmedRows(ctx interface{}, limit interface{}) *ORM_GetUnconfirmedRows_Call

GetUnconfirmedRows is a helper method to define mock.On call

  • ctx context.Context
  • limit uint

func (*ORM_Expecter) Update added in v2.15.0

func (_e *ORM_Expecter) Update(ctx interface{}, row interface{}) *ORM_Update_Call

Update is a helper method to define mock.On call

  • ctx context.Context
  • row *s4.Row

type ORM_GetSnapshot_Call added in v2.15.0

type ORM_GetSnapshot_Call struct {
	*mock.Call
}

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

func (*ORM_GetSnapshot_Call) Return added in v2.15.0

func (*ORM_GetSnapshot_Call) Run added in v2.15.0

func (_c *ORM_GetSnapshot_Call) Run(run func(ctx context.Context, addressRange *s4.AddressRange)) *ORM_GetSnapshot_Call

func (*ORM_GetSnapshot_Call) RunAndReturn added in v2.15.0

type ORM_GetUnconfirmedRows_Call added in v2.15.0

type ORM_GetUnconfirmedRows_Call struct {
	*mock.Call
}

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

func (*ORM_GetUnconfirmedRows_Call) Return added in v2.15.0

func (*ORM_GetUnconfirmedRows_Call) Run added in v2.15.0

func (*ORM_GetUnconfirmedRows_Call) RunAndReturn added in v2.15.0

type ORM_Get_Call added in v2.15.0

type ORM_Get_Call struct {
	*mock.Call
}

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

func (*ORM_Get_Call) Return added in v2.15.0

func (_c *ORM_Get_Call) Return(_a0 *s4.Row, _a1 error) *ORM_Get_Call

func (*ORM_Get_Call) Run added in v2.15.0

func (_c *ORM_Get_Call) Run(run func(ctx context.Context, address *big.Big, slotId uint)) *ORM_Get_Call

func (*ORM_Get_Call) RunAndReturn added in v2.15.0

func (_c *ORM_Get_Call) RunAndReturn(run func(context.Context, *big.Big, uint) (*s4.Row, error)) *ORM_Get_Call

type ORM_Update_Call added in v2.15.0

type ORM_Update_Call struct {
	*mock.Call
}

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

func (*ORM_Update_Call) Return added in v2.15.0

func (_c *ORM_Update_Call) Return(_a0 error) *ORM_Update_Call

func (*ORM_Update_Call) Run added in v2.15.0

func (_c *ORM_Update_Call) Run(run func(ctx context.Context, row *s4.Row)) *ORM_Update_Call

func (*ORM_Update_Call) RunAndReturn added in v2.15.0

func (_c *ORM_Update_Call) RunAndReturn(run func(context.Context, *s4.Row) error) *ORM_Update_Call

type Storage

type Storage struct {
	mock.Mock
}

Storage is an autogenerated mock type for the Storage type

func NewStorage

func NewStorage(t interface {
	mock.TestingT
	Cleanup(func())
}) *Storage

NewStorage creates a new instance of Storage. 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 (*Storage) Constraints

func (_m *Storage) Constraints() s4.Constraints

Constraints provides a mock function with given fields:

func (*Storage) EXPECT added in v2.15.0

func (_m *Storage) EXPECT() *Storage_Expecter

func (*Storage) Get

func (_m *Storage) Get(ctx context.Context, key *s4.Key) (*s4.Record, *s4.Metadata, error)

Get provides a mock function with given fields: ctx, key

func (*Storage) List

func (_m *Storage) List(ctx context.Context, address common.Address) ([]*s4.SnapshotRow, error)

List provides a mock function with given fields: ctx, address

func (*Storage) Put

func (_m *Storage) Put(ctx context.Context, key *s4.Key, record *s4.Record, signature []byte) error

Put provides a mock function with given fields: ctx, key, record, signature

type Storage_Constraints_Call added in v2.15.0

type Storage_Constraints_Call struct {
	*mock.Call
}

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

func (*Storage_Constraints_Call) Return added in v2.15.0

func (*Storage_Constraints_Call) Run added in v2.15.0

func (*Storage_Constraints_Call) RunAndReturn added in v2.15.0

func (_c *Storage_Constraints_Call) RunAndReturn(run func() s4.Constraints) *Storage_Constraints_Call

type Storage_Expecter added in v2.15.0

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

func (*Storage_Expecter) Constraints added in v2.15.0

func (_e *Storage_Expecter) Constraints() *Storage_Constraints_Call

Constraints is a helper method to define mock.On call

func (*Storage_Expecter) Get added in v2.15.0

func (_e *Storage_Expecter) Get(ctx interface{}, key interface{}) *Storage_Get_Call

Get is a helper method to define mock.On call

  • ctx context.Context
  • key *s4.Key

func (*Storage_Expecter) List added in v2.15.0

func (_e *Storage_Expecter) List(ctx interface{}, address interface{}) *Storage_List_Call

List is a helper method to define mock.On call

  • ctx context.Context
  • address common.Address

func (*Storage_Expecter) Put added in v2.15.0

func (_e *Storage_Expecter) Put(ctx interface{}, key interface{}, record interface{}, signature interface{}) *Storage_Put_Call

Put is a helper method to define mock.On call

  • ctx context.Context
  • key *s4.Key
  • record *s4.Record
  • signature []byte

type Storage_Get_Call added in v2.15.0

type Storage_Get_Call struct {
	*mock.Call
}

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

func (*Storage_Get_Call) Return added in v2.15.0

func (_c *Storage_Get_Call) Return(_a0 *s4.Record, _a1 *s4.Metadata, _a2 error) *Storage_Get_Call

func (*Storage_Get_Call) Run added in v2.15.0

func (_c *Storage_Get_Call) Run(run func(ctx context.Context, key *s4.Key)) *Storage_Get_Call

func (*Storage_Get_Call) RunAndReturn added in v2.15.0

func (_c *Storage_Get_Call) RunAndReturn(run func(context.Context, *s4.Key) (*s4.Record, *s4.Metadata, error)) *Storage_Get_Call

type Storage_List_Call added in v2.15.0

type Storage_List_Call struct {
	*mock.Call
}

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

func (*Storage_List_Call) Return added in v2.15.0

func (_c *Storage_List_Call) Return(_a0 []*s4.SnapshotRow, _a1 error) *Storage_List_Call

func (*Storage_List_Call) Run added in v2.15.0

func (_c *Storage_List_Call) Run(run func(ctx context.Context, address common.Address)) *Storage_List_Call

func (*Storage_List_Call) RunAndReturn added in v2.15.0

func (_c *Storage_List_Call) RunAndReturn(run func(context.Context, common.Address) ([]*s4.SnapshotRow, error)) *Storage_List_Call

type Storage_Put_Call added in v2.15.0

type Storage_Put_Call struct {
	*mock.Call
}

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

func (*Storage_Put_Call) Return added in v2.15.0

func (_c *Storage_Put_Call) Return(_a0 error) *Storage_Put_Call

func (*Storage_Put_Call) Run added in v2.15.0

func (_c *Storage_Put_Call) Run(run func(ctx context.Context, key *s4.Key, record *s4.Record, signature []byte)) *Storage_Put_Call

func (*Storage_Put_Call) RunAndReturn added in v2.15.0

func (_c *Storage_Put_Call) RunAndReturn(run func(context.Context, *s4.Key, *s4.Record, []byte) error) *Storage_Put_Call

Jump to

Keyboard shortcuts

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