You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2022/01/18 03:13:14 UTC

[GitHub] [servicecomb-kie] nisainan opened a new pull request #240: add an new api for listing all projects

nisainan opened a new pull request #240:
URL: https://github.com/apache/servicecomb-kie/pull/240


   When we are building our own configuration center, we need to display all the currently configured projects, so this interface is added. But currently only supports Mongo driver, we hope to improve the implementation of etcd, thank you very much!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-kie] tianxiaoliang commented on pull request #240: add an new api for listing all projects

Posted by GitBox <gi...@apache.org>.
tianxiaoliang commented on pull request #240:
URL: https://github.com/apache/servicecomb-kie/pull/240#issuecomment-1053773943


   please resolve the conflicts


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-kie] tianxiaoliang commented on a change in pull request #240: add an new api for listing all projects

Posted by GitBox <gi...@apache.org>.
tianxiaoliang commented on a change in pull request #240:
URL: https://github.com/apache/servicecomb-kie/pull/240#discussion_r818367632



##########
File path: server/service/kv/project_svc.go
##########
@@ -0,0 +1,38 @@
+package kv

Review comment:
       add license header for this new file




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-kie] tianxiaoliang commented on a change in pull request #240: add an new api for listing all projects

Posted by GitBox <gi...@apache.org>.
tianxiaoliang commented on a change in pull request #240:
URL: https://github.com/apache/servicecomb-kie/pull/240#discussion_r819318647



##########
File path: server/datasource/etcd/project/project_dao.go
##########
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package project
+
+import (
+	"context"
+
+	"github.com/apache/servicecomb-kie/pkg/model"
+	"github.com/apache/servicecomb-kie/server/datasource"
+)
+
+//Dao operate data in etcd
+type Dao struct {
+}
+
+//Total get projects total counts by domain
+func (s *Dao) Total(ctx context.Context, domain string) (int64, error) {
+	// TODO etcd needs to be done
+	return 0, nil
+}
+
+//List get projects list by domain and name
+func (s *Dao) List(ctx context.Context, domain string, options ...datasource.FindOption) (*model.ProjectResponse, error) {
+	// TODO etcd needs to be done

Review comment:
       当选用etcd作为存储,从用户的视角来看,他会认为返回0是bug,因为他明明有很多project,为何无法list。所以这里要返回明确错误 "can not list project"




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-kie] nisainan commented on pull request #240: add an new api for listing all projects

Posted by GitBox <gi...@apache.org>.
nisainan commented on pull request #240:
URL: https://github.com/apache/servicecomb-kie/pull/240#issuecomment-1055105020


   i am sorry that this pr has some conflicts with latest main branch, now i fix it,please run  workflows again to ckeck. thanks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-kie] nisainan commented on a change in pull request #240: add an new api for listing all projects

Posted by GitBox <gi...@apache.org>.
nisainan commented on a change in pull request #240:
URL: https://github.com/apache/servicecomb-kie/pull/240#discussion_r819243906



##########
File path: server/service/kv/project_svc.go
##########
@@ -0,0 +1,38 @@
+package kv

Review comment:
       done




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org