feat: add DB queries for ai_gateway_coderd_keys (#25564)

Adds Insert, List and Delete queries for `ai_gateway_coderd_keys `
table.
This commit is contained in:
Paweł Banaszewski
2026-06-02 13:25:44 +02:00
committed by GitHub
parent 7195be87b1
commit 32aee9ea4c
8 changed files with 415 additions and 0 deletions
+45
View File
@@ -603,6 +603,21 @@ func (mr *MockStoreMockRecorder) CustomRoles(ctx, arg any) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CustomRoles", reflect.TypeOf((*MockStore)(nil).CustomRoles), ctx, arg)
}
// DeleteAIGatewayKey mocks base method.
func (m *MockStore) DeleteAIGatewayKey(ctx context.Context, id uuid.UUID) (database.DeleteAIGatewayKeyRow, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DeleteAIGatewayKey", ctx, id)
ret0, _ := ret[0].(database.DeleteAIGatewayKeyRow)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// DeleteAIGatewayKey indicates an expected call of DeleteAIGatewayKey.
func (mr *MockStoreMockRecorder) DeleteAIGatewayKey(ctx, id any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteAIGatewayKey", reflect.TypeOf((*MockStore)(nil).DeleteAIGatewayKey), ctx, id)
}
// DeleteAIProviderByID mocks base method.
func (m *MockStore) DeleteAIProviderByID(ctx context.Context, id uuid.UUID) error {
m.ctrl.T.Helper()
@@ -6989,6 +7004,21 @@ func (mr *MockStoreMockRecorder) InsertAIBridgeUserPrompt(ctx, arg any) *gomock.
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InsertAIBridgeUserPrompt", reflect.TypeOf((*MockStore)(nil).InsertAIBridgeUserPrompt), ctx, arg)
}
// InsertAIGatewayKey mocks base method.
func (m *MockStore) InsertAIGatewayKey(ctx context.Context, arg database.InsertAIGatewayKeyParams) (database.InsertAIGatewayKeyRow, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "InsertAIGatewayKey", ctx, arg)
ret0, _ := ret[0].(database.InsertAIGatewayKeyRow)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// InsertAIGatewayKey indicates an expected call of InsertAIGatewayKey.
func (mr *MockStoreMockRecorder) InsertAIGatewayKey(ctx, arg any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InsertAIGatewayKey", reflect.TypeOf((*MockStore)(nil).InsertAIGatewayKey), ctx, arg)
}
// InsertAIProvider mocks base method.
func (m *MockStore) InsertAIProvider(ctx context.Context, arg database.InsertAIProviderParams) (database.AIProvider, error) {
m.ctrl.T.Helper()
@@ -8279,6 +8309,21 @@ func (mr *MockStoreMockRecorder) ListAIBridgeUserPromptsByInterceptionIDs(ctx, i
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAIBridgeUserPromptsByInterceptionIDs", reflect.TypeOf((*MockStore)(nil).ListAIBridgeUserPromptsByInterceptionIDs), ctx, interceptionIds)
}
// ListAIGatewayKeys mocks base method.
func (m *MockStore) ListAIGatewayKeys(ctx context.Context) ([]database.ListAIGatewayKeysRow, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ListAIGatewayKeys", ctx)
ret0, _ := ret[0].([]database.ListAIGatewayKeysRow)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ListAIGatewayKeys indicates an expected call of ListAIGatewayKeys.
func (mr *MockStoreMockRecorder) ListAIGatewayKeys(ctx any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAIGatewayKeys", reflect.TypeOf((*MockStore)(nil).ListAIGatewayKeys), ctx)
}
// ListAuthorizedAIBridgeClients mocks base method.
func (m *MockStore) ListAuthorizedAIBridgeClients(ctx context.Context, arg database.ListAIBridgeClientsParams, prepared rbac.PreparedAuthorized) ([]string, error) {
m.ctrl.T.Helper()