mocks

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

type Session struct {
	mock.Mock
}

Session is an autogenerated mock type for the Session type

func NewSession

func NewSession(t mockConstructorTestingTNewSession) *Session

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

func (*Session) Cancel

func (_m *Session) Cancel()

Cancel provides a mock function with given fields:

func (*Session) Commit

func (_m *Session) Commit() error

Commit provides a mock function with given fields:

func (*Session) EXPECT

func (_m *Session) EXPECT() *Session_Expecter

func (*Session) GetLastReservedIP

func (_m *Session) GetLastReservedIP(poolKey string) net.IP

GetLastReservedIP provides a mock function with given fields: poolKey

func (*Session) GetReservationByID

func (_m *Session) GetReservationByID(poolKey string, id string, ifName string) *types.Reservation

GetReservationByID provides a mock function with given fields: poolKey, id, ifName

func (*Session) ListPools

func (_m *Session) ListPools() []string

ListPools provides a mock function with given fields:

func (*Session) ListReservations

func (_m *Session) ListReservations(poolKey string) []types.Reservation

ListReservations provides a mock function with given fields: poolKey

func (*Session) ReleaseReservationByID

func (_m *Session) ReleaseReservationByID(poolKey string, id string, ifName string)

ReleaseReservationByID provides a mock function with given fields: poolKey, id, ifName

func (*Session) RemovePool

func (_m *Session) RemovePool(poolKey string)

RemovePool provides a mock function with given fields: poolKey

func (*Session) Reserve

func (_m *Session) Reserve(poolKey string, id string, ifName string, meta types.ReservationMetadata, address net.IP) error

Reserve provides a mock function with given fields: poolKey, id, ifName, meta, address

func (*Session) SetLastReservedIP

func (_m *Session) SetLastReservedIP(poolKey string, ip net.IP)

SetLastReservedIP provides a mock function with given fields: poolKey, ip

type Session_Cancel_Call

type Session_Cancel_Call struct {
	*mock.Call
}

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

func (*Session_Cancel_Call) Return

func (*Session_Cancel_Call) Run

func (_c *Session_Cancel_Call) Run(run func()) *Session_Cancel_Call

func (*Session_Cancel_Call) RunAndReturn

func (_c *Session_Cancel_Call) RunAndReturn(run func()) *Session_Cancel_Call

type Session_Commit_Call

type Session_Commit_Call struct {
	*mock.Call
}

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

func (*Session_Commit_Call) Return

func (*Session_Commit_Call) Run

func (_c *Session_Commit_Call) Run(run func()) *Session_Commit_Call

func (*Session_Commit_Call) RunAndReturn

func (_c *Session_Commit_Call) RunAndReturn(run func() error) *Session_Commit_Call

type Session_Expecter

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

func (*Session_Expecter) Cancel

func (_e *Session_Expecter) Cancel() *Session_Cancel_Call

Cancel is a helper method to define mock.On call

func (*Session_Expecter) Commit

func (_e *Session_Expecter) Commit() *Session_Commit_Call

Commit is a helper method to define mock.On call

func (*Session_Expecter) GetLastReservedIP

func (_e *Session_Expecter) GetLastReservedIP(poolKey interface{}) *Session_GetLastReservedIP_Call

GetLastReservedIP is a helper method to define mock.On call

  • poolKey string

func (*Session_Expecter) GetReservationByID

func (_e *Session_Expecter) GetReservationByID(poolKey interface{}, id interface{}, ifName interface{}) *Session_GetReservationByID_Call

GetReservationByID is a helper method to define mock.On call

  • poolKey string
  • id string
  • ifName string

func (*Session_Expecter) ListPools

func (_e *Session_Expecter) ListPools() *Session_ListPools_Call

ListPools is a helper method to define mock.On call

func (*Session_Expecter) ListReservations

func (_e *Session_Expecter) ListReservations(poolKey interface{}) *Session_ListReservations_Call

ListReservations is a helper method to define mock.On call

  • poolKey string

func (*Session_Expecter) ReleaseReservationByID

func (_e *Session_Expecter) ReleaseReservationByID(poolKey interface{}, id interface{}, ifName interface{}) *Session_ReleaseReservationByID_Call

ReleaseReservationByID is a helper method to define mock.On call

  • poolKey string
  • id string
  • ifName string

func (*Session_Expecter) RemovePool

func (_e *Session_Expecter) RemovePool(poolKey interface{}) *Session_RemovePool_Call

RemovePool is a helper method to define mock.On call

  • poolKey string

func (*Session_Expecter) Reserve

func (_e *Session_Expecter) Reserve(poolKey interface{}, id interface{}, ifName interface{}, meta interface{}, address interface{}) *Session_Reserve_Call

Reserve is a helper method to define mock.On call

  • poolKey string
  • id string
  • ifName string
  • meta types.ReservationMetadata
  • address net.IP

func (*Session_Expecter) SetLastReservedIP

func (_e *Session_Expecter) SetLastReservedIP(poolKey interface{}, ip interface{}) *Session_SetLastReservedIP_Call

SetLastReservedIP is a helper method to define mock.On call

  • poolKey string
  • ip net.IP

type Session_GetLastReservedIP_Call

type Session_GetLastReservedIP_Call struct {
	*mock.Call
}

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

func (*Session_GetLastReservedIP_Call) Return

func (*Session_GetLastReservedIP_Call) Run

func (*Session_GetLastReservedIP_Call) RunAndReturn

type Session_GetReservationByID_Call

type Session_GetReservationByID_Call struct {
	*mock.Call
}

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

func (*Session_GetReservationByID_Call) Return

func (*Session_GetReservationByID_Call) Run

func (*Session_GetReservationByID_Call) RunAndReturn

type Session_ListPools_Call

type Session_ListPools_Call struct {
	*mock.Call
}

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

func (*Session_ListPools_Call) Return

func (*Session_ListPools_Call) Run

func (_c *Session_ListPools_Call) Run(run func()) *Session_ListPools_Call

func (*Session_ListPools_Call) RunAndReturn

func (_c *Session_ListPools_Call) RunAndReturn(run func() []string) *Session_ListPools_Call

type Session_ListReservations_Call

type Session_ListReservations_Call struct {
	*mock.Call
}

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

func (*Session_ListReservations_Call) Return

func (*Session_ListReservations_Call) Run

func (*Session_ListReservations_Call) RunAndReturn

type Session_ReleaseReservationByID_Call

type Session_ReleaseReservationByID_Call struct {
	*mock.Call
}

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

func (*Session_ReleaseReservationByID_Call) Return

func (*Session_ReleaseReservationByID_Call) Run

func (*Session_ReleaseReservationByID_Call) RunAndReturn

type Session_RemovePool_Call

type Session_RemovePool_Call struct {
	*mock.Call
}

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

func (*Session_RemovePool_Call) Return

func (*Session_RemovePool_Call) Run

func (_c *Session_RemovePool_Call) Run(run func(poolKey string)) *Session_RemovePool_Call

func (*Session_RemovePool_Call) RunAndReturn

func (_c *Session_RemovePool_Call) RunAndReturn(run func(string)) *Session_RemovePool_Call

type Session_Reserve_Call

type Session_Reserve_Call struct {
	*mock.Call
}

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

func (*Session_Reserve_Call) Return

func (*Session_Reserve_Call) Run

func (_c *Session_Reserve_Call) Run(run func(poolKey string, id string, ifName string, meta types.ReservationMetadata, address net.IP)) *Session_Reserve_Call

func (*Session_Reserve_Call) RunAndReturn

type Session_SetLastReservedIP_Call

type Session_SetLastReservedIP_Call struct {
	*mock.Call
}

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

func (*Session_SetLastReservedIP_Call) Return

func (*Session_SetLastReservedIP_Call) Run

func (*Session_SetLastReservedIP_Call) RunAndReturn

type Store

type Store struct {
	mock.Mock
}

Store is an autogenerated mock type for the Store type

func NewStore

func NewStore(t mockConstructorTestingTNewStore) *Store

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

func (*Store) EXPECT

func (_m *Store) EXPECT() *Store_Expecter

func (*Store) Open

func (_m *Store) Open(ctx context.Context) (store.Session, error)

Open provides a mock function with given fields: ctx

type Store_Expecter

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

func (*Store_Expecter) Open

func (_e *Store_Expecter) Open(ctx interface{}) *Store_Open_Call

Open is a helper method to define mock.On call

  • ctx context.Context

type Store_Open_Call

type Store_Open_Call struct {
	*mock.Call
}

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

func (*Store_Open_Call) Return

func (_c *Store_Open_Call) Return(_a0 store.Session, _a1 error) *Store_Open_Call

func (*Store_Open_Call) Run

func (_c *Store_Open_Call) Run(run func(ctx context.Context)) *Store_Open_Call

func (*Store_Open_Call) RunAndReturn

func (_c *Store_Open_Call) RunAndReturn(run func(context.Context) (store.Session, error)) *Store_Open_Call

Jump to

Keyboard shortcuts

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