You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/06/24 11:19:39 UTC
[GitHub] [incubator-apisix-dashboard] gxthrj opened a new pull request #280: add upstream api
gxthrj opened a new pull request #280:
URL: https://github.com/apache/incubator-apisix-dashboard/pull/280
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-apisix-dashboard] membphis commented on pull request #280: add upstream api
Posted by GitBox <gi...@apache.org>.
membphis commented on pull request #280:
URL: https://github.com/apache/incubator-apisix-dashboard/pull/280#issuecomment-648764614
is there no test cases? or we can add them later
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-apisix-dashboard] gxthrj commented on pull request #280: add upstream api
Posted by GitBox <gi...@apache.org>.
gxthrj commented on pull request #280:
URL: https://github.com/apache/incubator-apisix-dashboard/pull/280#issuecomment-648793369
> is there no test cases? or we can add them later
I will add some later
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-apisix-dashboard] moonming commented on a change in pull request #280: add upstream api
Posted by GitBox <gi...@apache.org>.
moonming commented on a change in pull request #280:
URL: https://github.com/apache/incubator-apisix-dashboard/pull/280#discussion_r445292690
##########
File path: api/route/upstream.go
##########
@@ -0,0 +1,205 @@
+package route
+
+import (
+ "encoding/json"
+ "fmt"
+ "github.com/apisix/manager-api/conf"
+ "github.com/apisix/manager-api/errno"
+ "github.com/apisix/manager-api/service"
+ "github.com/gin-gonic/gin"
+ "github.com/satori/go.uuid"
+ "net/http"
+ "strconv"
+)
+
+func AppendUpstream(r *gin.Engine) *gin.Engine {
+ r.POST("/apisix/admin/upstreams", createUpstream)
+ r.GET("/apisix/admin/upstreams/:uid", findUpstream)
+ r.GET("/apisix/admin/upstreams", listUpstream)
+ r.PUT("/apisix/admin/upstreams/:uid", updateUpstream)
+ r.DELETE("/apisix/admin/upstreams/:uid", deleteUpstream)
+ return r
+}
+
+func createUpstream(c *gin.Context) {
+ u4 := uuid.NewV4()
+ uid := u4.String()
+ // todo 参数校验
Review comment:
English only please
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-apisix-dashboard] membphis commented on pull request #280: add upstream api
Posted by GitBox <gi...@apache.org>.
membphis commented on pull request #280:
URL: https://github.com/apache/incubator-apisix-dashboard/pull/280#issuecomment-648825791
we'd better create an issue about this.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-apisix-dashboard] juzhiyuan merged pull request #280: add upstream api
Posted by GitBox <gi...@apache.org>.
juzhiyuan merged pull request #280:
URL: https://github.com/apache/incubator-apisix-dashboard/pull/280
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org