Files
sablier/pkg/store/storetest/mocks_store.go
Alexis Couvreur f29b13a55a refactor(storage): add store.Store interface
There is a first implementation with ValKey that will allow to use redis APIs as a backend for Sablier with Hight Availability
2025-02-02 18:13:45 -05:00

101 lines
2.9 KiB
Go

// Code generated by MockGen. DO NOT EDIT.
// Source: store.go
//
// Generated by this command:
//
// mockgen -package storetest -source=store.go -destination=storetest/mocks_store.go *
//
// Package storetest is a generated GoMock package.
package storetest
import (
context "context"
reflect "reflect"
time "time"
instance "github.com/sablierapp/sablier/app/instance"
gomock "go.uber.org/mock/gomock"
)
// MockStore is a mock of Store interface.
type MockStore struct {
ctrl *gomock.Controller
recorder *MockStoreMockRecorder
isgomock struct{}
}
// MockStoreMockRecorder is the mock recorder for MockStore.
type MockStoreMockRecorder struct {
mock *MockStore
}
// NewMockStore creates a new mock instance.
func NewMockStore(ctrl *gomock.Controller) *MockStore {
mock := &MockStore{ctrl: ctrl}
mock.recorder = &MockStoreMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockStore) EXPECT() *MockStoreMockRecorder {
return m.recorder
}
// Delete mocks base method.
func (m *MockStore) Delete(arg0 context.Context, arg1 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Delete", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// Delete indicates an expected call of Delete.
func (mr *MockStoreMockRecorder) Delete(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockStore)(nil).Delete), arg0, arg1)
}
// Get mocks base method.
func (m *MockStore) Get(arg0 context.Context, arg1 string) (instance.State, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Get", arg0, arg1)
ret0, _ := ret[0].(instance.State)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Get indicates an expected call of Get.
func (mr *MockStoreMockRecorder) Get(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockStore)(nil).Get), arg0, arg1)
}
// OnExpire mocks base method.
func (m *MockStore) OnExpire(arg0 context.Context, arg1 func(string)) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "OnExpire", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// OnExpire indicates an expected call of OnExpire.
func (mr *MockStoreMockRecorder) OnExpire(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnExpire", reflect.TypeOf((*MockStore)(nil).OnExpire), arg0, arg1)
}
// Put mocks base method.
func (m *MockStore) Put(arg0 context.Context, arg1 instance.State, arg2 time.Duration) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Put", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// Put indicates an expected call of Put.
func (mr *MockStoreMockRecorder) Put(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockStore)(nil).Put), arg0, arg1, arg2)
}