added http methods

This commit is contained in:
tzwang 2025-06-17 11:21:51 +08:00
parent 393135b03d
commit 3d77f5c2ae
40 changed files with 57 additions and 57 deletions

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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) {

View File

@ -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"
)

View File

@ -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) {

View File

@ -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"
)

View File

@ -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) {

View File

@ -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"
)

View File

@ -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) {

View File

@ -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"
)

View File

@ -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() {