Documentation ¶
Index ¶
- Variables
- func NewSqlStorage(db sqlstorage.Querier) *sqlStorage
- type MockStorage
- func (_m *MockStorage) Delete(ctx context.Context, taskID uuid.UUID) error
- func (_m *MockStorage) GetByID(ctx context.Context, id uuid.UUID) (*model.Task, error)
- func (_m *MockStorage) GetLastRegisteredTask(ctx context.Context, name string) (*model.Task, error)
- func (_m *MockStorage) GetNext(ctx context.Context) (*model.Task, error)
- func (_m *MockStorage) Patch(ctx context.Context, taskID uuid.UUID, fields map[string]interface{}) error
- func (_m *MockStorage) Save(ctx context.Context, task *model.Task) error
- type Storage
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
Functions ¶
func NewSqlStorage ¶
func NewSqlStorage(db sqlstorage.Querier) *sqlStorage
Types ¶
type MockStorage ¶
MockStorage is an autogenerated mock type for the Storage type
func NewMockStorage ¶
func NewMockStorage(t interface { mock.TestingT Cleanup(func()) }) *MockStorage
NewMockStorage creates a new instance of MockStorage. 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 (*MockStorage) GetLastRegisteredTask ¶
GetLastRegisteredTask provides a mock function with given fields: ctx, name
type Storage ¶
type Storage interface { Save(ctx context.Context, task *model.Task) error GetNext(ctx context.Context) (*model.Task, error) Patch(ctx context.Context, taskID uuid.UUID, fields map[string]any) error GetLastRegisteredTask(ctx context.Context, name string) (*model.Task, error) GetByID(ctx context.Context, id uuid.UUID) (*model.Task, error) Delete(ctx context.Context, taskID uuid.UUID) error }
Click to show internal directories.
Click to hide internal directories.