支持dataspace

This commit is contained in:
algotao
2025-05-21 17:06:32 +08:00
parent e7d4aa27f1
commit b8c2a3a7d4
7 changed files with 265 additions and 342 deletions

View File

@@ -13,7 +13,6 @@ import (
type createTaskParams struct {
hashFile string
appid string
task *saasapi.Task
saasHttp *saashttp.SaasClient
}
@@ -21,9 +20,7 @@ type createTaskParams struct {
func RunTaskCreate(args ...string) error {
fs := flag.NewFlagSet("create", flag.ExitOnError)
cfgFile := paramConfig(fs)
// sourcePath := paramSourceConvertedPath(fs)
hashFile := paramInputHashFile(fs)
appid := paramAppid(fs)
if err := fs.Parse(args); err != nil {
fmt.Fprintln(os.Stderr, "command line parse error", "err", err)
@@ -43,7 +40,6 @@ func RunTaskCreate(args ...string) error {
createTaskParams := createTaskParams{
hashFile: *hashFile,
appid: *appid,
saasHttp: &saashttp.SaasClient{
Client: &http.Client{},
ApiUrls: &cfg.ApiUrls,
@@ -72,11 +68,6 @@ func doTaskCreate(createTaskParams createTaskParams) error {
},
}
if createTaskParams.appid != "" {
saasReq.UseridType = saasapi.UserIdType_OPENID
saasReq.Appid = createTaskParams.appid
}
res, err := createTaskParams.saasHttp.TaskCreate(saasReq)
if err != nil {