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-28 23:39:41 +0200
committerBaitinq <manuelpalenzuelamerino@gmail.com>2024-05-29 00:26:27 +0200
commit06465c85dbb29c8ed6b8809a34ceb44fcafe2beb (patch)
tree134880edab0a0a76be329a57f4800f587bb10aee /src/rest-api/handler/mock_db.go
parentsupabase: add api_keys table migration (diff)
downloadfs-tracer-backend-06465c85dbb29c8ed6b8809a34ceb44fcafe2beb.tar.gz
fs-tracer-backend-06465c85dbb29c8ed6b8809a34ceb44fcafe2beb.tar.bz2
fs-tracer-backend-06465c85dbb29c8ed6b8809a34ceb44fcafe2beb.zip
rest-api: handle payloads with an api_key
Diffstat (limited to 'src/rest-api/handler/mock_db.go')
-rw-r--r--src/rest-api/handler/mock_db.go23
1 files changed, 19 insertions, 4 deletions
diff --git a/src/rest-api/handler/mock_db.go b/src/rest-api/handler/mock_db.go
index 2d51a8f..542fd62 100644
--- a/src/rest-api/handler/mock_db.go
+++ b/src/rest-api/handler/mock_db.go
@@ -41,16 +41,31 @@ func (m *MockDB) EXPECT() *MockDBMockRecorder {
 }
 
 // GetLatestFileByPath mocks base method.
-func (m *MockDB) GetLatestFileByPath(ctx context.Context, path string) (*lib.File, error) {
+func (m *MockDB) GetLatestFileByPath(ctx context.Context, path, user_id string) (*lib.File, error) {
 	m.ctrl.T.Helper()
-	ret := m.ctrl.Call(m, "GetLatestFileByPath", ctx, path)
+	ret := m.ctrl.Call(m, "GetLatestFileByPath", ctx, path, user_id)
 	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 {
+func (mr *MockDBMockRecorder) GetLatestFileByPath(ctx, path, user_id any) *gomock.Call {
 	mr.mock.ctrl.T.Helper()
-	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLatestFileByPath", reflect.TypeOf((*MockDB)(nil).GetLatestFileByPath), ctx, path)
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLatestFileByPath", reflect.TypeOf((*MockDB)(nil).GetLatestFileByPath), ctx, path, user_id)
+}
+
+// GetUserIDByAPIKey mocks base method.
+func (m *MockDB) GetUserIDByAPIKey(ctx context.Context, apiKey string) (string, error) {
+	m.ctrl.T.Helper()
+	ret := m.ctrl.Call(m, "GetUserIDByAPIKey", ctx, apiKey)
+	ret0, _ := ret[0].(string)
+	ret1, _ := ret[1].(error)
+	return ret0, ret1
+}
+
+// GetUserIDByAPIKey indicates an expected call of GetUserIDByAPIKey.
+func (mr *MockDBMockRecorder) GetUserIDByAPIKey(ctx, apiKey any) *gomock.Call {
+	mr.mock.ctrl.T.Helper()
+	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserIDByAPIKey", reflect.TypeOf((*MockDB)(nil).GetUserIDByAPIKey), ctx, apiKey)
 }