about summary refs log tree commit diff
path: root/src/rest-api/handler/mock_db.go
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2024-05-27 21:30:54 +0200
committerBaitinq <manuelpalenzuelamerino@gmail.com>2024-05-27 23:52:44 +0200
commit81621c4f64f4a1c29906643f53314e2f71a014ae (patch)
tree503cc56b609dcad8f8eca6e64b6b9b15b02fd4fd /src/rest-api/handler/mock_db.go
parentpayload-processor: fmt (diff)
downloadfs-tracer-backend-81621c4f64f4a1c29906643f53314e2f71a014ae.tar.gz
fs-tracer-backend-81621c4f64f4a1c29906643f53314e2f71a014ae.tar.bz2
fs-tracer-backend-81621c4f64f4a1c29906643f53314e2f71a014ae.zip
rest-api: connect to db and add /file/ GET endpoint
TODO: Only get files for your specific user
Diffstat (limited to 'src/rest-api/handler/mock_db.go')
-rw-r--r--src/rest-api/handler/mock_db.go56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/rest-api/handler/mock_db.go b/src/rest-api/handler/mock_db.go
new file mode 100644
index 0000000..2d51a8f
--- /dev/null
+++ b/src/rest-api/handler/mock_db.go
@@ -0,0 +1,56 @@
+// Code generated by MockGen. DO NOT EDIT.
+// Source: src/rest-api/handler/db.go
+//
+// Generated by this command:
+//
+//	mockgen -source src/rest-api/handler/db.go -package handler -destination=src/rest-api/handler/mock_db.go
+//
+
+// Package handler is a generated GoMock package.
+package handler
+
+import (
+	context "context"
+	reflect "reflect"
+
+	lib "github.com/Baitinq/fs-tracer-backend/lib"
+	gomock "go.uber.org/mock/gomock"
+)
+
+// MockDB is a mock of DB interface.
+type MockDB struct {
+	ctrl     *gomock.Controller
+	recorder *MockDBMockRecorder
+}
+
+// MockDBMockRecorder is the mock recorder for MockDB.
+type MockDBMockRecorder struct {
+	mock *MockDB
+}
+
+// NewMockDB creates a new mock instance.
+func NewMockDB(ctrl *gomock.Controller) *MockDB {
+	mock := &MockDB{ctrl: ctrl}
+	mock.recorder = &MockDBMockRecorder{mock}
+	return mock
+}
+
+// EXPECT returns an object that allows the caller to indicate expected use.
+func (m *MockDB) EXPECT() *MockDBMockRecorder {
+	return m.recorder
+}
+
+// GetLatestFileByPath mocks base method.
+func (m *MockDB) GetLatestFileByPath(ctx context.Context, path string) (*lib.File, error) {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "GetLatestFileByPath", ctx, path)
+	ret0, _ := ret[0].(*lib.File)
+	ret1, _ := ret[1].(error)
+	return ret0, ret1
+}
+
+// GetLatestFileByPath indicates an expected call of GetLatestFileByPath.
+func (mr *MockDBMockRecorder) GetLatestFileByPath(ctx, path any) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLatestFileByPath", reflect.TypeOf((*MockDB)(nil).GetLatestFileByPath), ctx, path)
+}