added http methods
This commit is contained in:
parent
393135b03d
commit
3d77f5c2ae
|
@ -2,9 +2,9 @@ package apis
|
|||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/model"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/service"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/model"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/service"
|
||||
"net/http"
|
||||
)
|
||||
|
|
@ -2,9 +2,9 @@ package apis
|
|||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/model"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/service"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/model"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/service"
|
||||
"net/http"
|
||||
)
|
||||
|
|
@ -2,9 +2,9 @@ package apis
|
|||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/model"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/service"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/model"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/service"
|
||||
"net/http"
|
||||
)
|
||||
|
|
@ -2,9 +2,9 @@ package apis
|
|||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/model"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/service"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/model"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/service"
|
||||
"net/http"
|
||||
)
|
||||
|
|
@ -2,9 +2,9 @@ package apis
|
|||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/model"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/service"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/model"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/service"
|
||||
"net/http"
|
||||
)
|
||||
|
|
@ -2,9 +2,9 @@ package apis
|
|||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/model"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/service"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/model"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/service"
|
||||
"net/http"
|
||||
)
|
||||
|
|
@ -2,9 +2,9 @@ package apis
|
|||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/model"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/service"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/model"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/service"
|
||||
"net/http"
|
||||
)
|
||||
|
|
@ -2,9 +2,9 @@ package apis
|
|||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/model"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/service"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/model"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/service"
|
||||
"net/http"
|
||||
)
|
||||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"crypto/tls"
|
||||
"encoding/json"
|
||||
"github.com/go-resty/resty/v2"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/model"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/model"
|
||||
"time"
|
||||
)
|
||||
|
|
@ -3,7 +3,7 @@ package router
|
|||
import (
|
||||
"fmt"
|
||||
"github.com/gin-gonic/gin"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/apis"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/apis"
|
||||
"regexp"
|
||||
"time"
|
||||
)
|
|
@ -1,8 +1,8 @@
|
|||
package service
|
||||
|
||||
import (
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/model"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/model"
|
||||
"strconv"
|
||||
)
|
||||
|
|
@ -4,8 +4,8 @@ import (
|
|||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/smartystreets/goconvey/convey"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/model"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/model"
|
||||
"testing"
|
||||
)
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package service
|
||||
|
||||
import (
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/model"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/model"
|
||||
"strconv"
|
||||
)
|
||||
|
|
@ -4,8 +4,8 @@ import (
|
|||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/smartystreets/goconvey/convey"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/model"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/model"
|
||||
"testing"
|
||||
)
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package service
|
||||
|
||||
import (
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/model"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/model"
|
||||
"strconv"
|
||||
)
|
||||
|
|
@ -4,8 +4,8 @@ import (
|
|||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/smartystreets/goconvey/convey"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/model"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/model"
|
||||
"testing"
|
||||
)
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package service
|
||||
|
||||
import (
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/model"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/model"
|
||||
"strconv"
|
||||
)
|
||||
|
|
@ -3,8 +3,8 @@ package service
|
|||
import (
|
||||
"fmt"
|
||||
"github.com/smartystreets/goconvey/convey"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/model"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/model"
|
||||
"testing"
|
||||
)
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package service
|
||||
|
||||
import (
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/model"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/model"
|
||||
)
|
||||
|
||||
func GetPlatformStat(ip, token string) (*model.PlatformStat, error) {
|
|
@ -3,7 +3,7 @@ package service
|
|||
import (
|
||||
"fmt"
|
||||
"github.com/smartystreets/goconvey/convey"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/common"
|
||||
"testing"
|
||||
)
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package service
|
||||
|
||||
import (
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/model"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/model"
|
||||
)
|
||||
|
||||
func GetResourcespecs(ip, token string, param *model.ResourceSpecParam) (*model.ResourceSpec, error) {
|
|
@ -4,8 +4,8 @@ import (
|
|||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/smartystreets/goconvey/convey"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/model"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/model"
|
||||
"testing"
|
||||
)
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package service
|
||||
|
||||
import (
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/model"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/model"
|
||||
)
|
||||
|
||||
func GetToken(ip string, param *model.TokenParam) (string, error) {
|
|
@ -2,7 +2,7 @@ package service
|
|||
|
||||
import (
|
||||
"github.com/smartystreets/goconvey/convey"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/model"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/model"
|
||||
"testing"
|
||||
)
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package service
|
||||
|
||||
import (
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/model"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/model"
|
||||
)
|
||||
|
||||
func CreateTrainJob(ip, token string, param *model.TrainJobParam) (*model.TrainJob, error) {
|
|
@ -3,8 +3,8 @@ package service
|
|||
import (
|
||||
"fmt"
|
||||
"github.com/smartystreets/goconvey/convey"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/model"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/model"
|
||||
"testing"
|
||||
)
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/internal/http/router"
|
||||
"gitlink.org.cn/JointCloud/pcm-octopus/http/router"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
Loading…
Reference in New Issue