支持ds重置(当前限geo)

This commit is contained in:
algotao
2026-01-19 14:54:18 +08:00
parent 369023b81d
commit 5cf860acfb
9 changed files with 583 additions and 350 deletions

View File

@@ -6,6 +6,7 @@ const (
writePath = "/saas/write"
readPath = "/saas/read"
columnWritePath = "/saas/column_write"
resetDSPath = "/saas/resetds"
taskCreatePath = "/saas/task/create"
taskListPath = "/saas/task/list"
taskInfoPath = "/saas/task/info"
@@ -45,6 +46,7 @@ type ApiUrls struct {
WritePath string
ReadPath string
ColumnWritePath string
ResetDSPath string
TaskCreatePath string
TaskListPath string
TaskInfoPath string
@@ -100,6 +102,11 @@ func InitAPIUrl(c *ApiUrls) *ApiUrls {
} else {
r.ColumnWritePath = columnWritePath
}
if c.ResetDSPath != "" {
r.ResetDSPath = c.ResetDSPath
} else {
r.ResetDSPath = resetDSPath
}
if c.TaskCreatePath != "" {
r.TaskCreatePath = c.TaskCreatePath
} else {

View File

@@ -53,6 +53,11 @@ func (c *SaasClient) ColumnWrite(saasReq *saasapi.SaasReq) (saasRes *saasapi.Saa
return c.post(postUrl, saasReq)
}
func (c *SaasClient) ResetDS(saasReq *saasapi.SaasReq) (saasRes *saasapi.SaasRes, err error) {
postUrl := c.makeUrl(c.ApiUrls.BaseUrl, c.ApiUrls.ResetDSPath)
return c.post(postUrl, saasReq)
}
func (c *SaasClient) TaskCreate(saasReq *saasapi.SaasReq) (saasRes *saasapi.SaasRes, err error) {
postUrl := c.makeUrl(c.ApiUrls.BaseUrl, c.ApiUrls.TaskCreatePath)
return c.post(postUrl, saasReq)