// Code generated by MockGen. DO NOT EDIT.
// Source: ../../cache/cache_with_err.go

// Package mock_cache is a generated GoMock package.
package mock_cache

import (
	context "context"
	reflect "reflect"
	time "time"

	gomock "github.com/golang/mock/gomock"
)

// MockErrCacher is a mock of ErrCacher interface.
type MockErrCacher[K any] struct {
	ctrl     *gomock.Controller
	recorder *MockErrCacherMockRecorder[K]
}

// MockErrCacherMockRecorder is the mock recorder for MockErrCacher.
type MockErrCacherMockRecorder[K any] struct {
	mock *MockErrCacher[K]
}

// NewMockErrCacher creates a new mock instance.
func NewMockErrCacher[K any](ctrl *gomock.Controller) *MockErrCacher[K] {
	mock := &MockErrCacher[K]{ctrl: ctrl}
	mock.recorder = &MockErrCacherMockRecorder[K]{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockErrCacher[K]) EXPECT() *MockErrCacherMockRecorder[K] {
	return m.recorder
}

// CacheError mocks base method.
func (m *MockErrCacher[K]) CacheError(ctx context.Context, key K, err error, errTtl time.Duration) {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "CacheError", ctx, key, err, errTtl)
}

// CacheError indicates an expected call of CacheError.
func (mr *MockErrCacherMockRecorder[K]) CacheError(ctx, key, err, errTtl interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CacheError", reflect.TypeOf((*MockErrCacher[K])(nil).CacheError), ctx, key, err, errTtl)
}

// GetError mocks base method.
func (m *MockErrCacher[K]) GetError(ctx context.Context, key K) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetError", ctx, key)
	ret0, _ := ret[0].(error)
	return ret0
}

// GetError indicates an expected call of GetError.
func (mr *MockErrCacherMockRecorder[K]) GetError(ctx, key interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetError", reflect.TypeOf((*MockErrCacher[K])(nil).GetError), ctx, key)
}
