refactor: IDL structure modification (#475)
This commit is contained in:
parent
b25bf6728a
commit
e7d25319ff
|
|
@ -23,12 +23,13 @@ import (
|
|||
"fmt"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/application/plugin"
|
||||
"github.com/coze-dev/coze-studio/backend/application/singleagent"
|
||||
"github.com/coze-dev/coze-studio/backend/application/upload"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/plugin/conf"
|
||||
|
||||
"github.com/cloudwego/hertz/pkg/app"
|
||||
"github.com/cloudwego/hertz/pkg/protocol/consts"
|
||||
|
||||
bot_open_api "github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/bot_open_api"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/bot_open_api"
|
||||
)
|
||||
|
||||
// OauthAuthorizationCode .
|
||||
|
|
@ -63,3 +64,43 @@ func OauthAuthorizationCode(ctx context.Context, c *app.RequestContext) {
|
|||
|
||||
return
|
||||
}
|
||||
|
||||
// UploadFileOpen .
|
||||
// @router /v1/files/upload [POST]
|
||||
func UploadFileOpen(ctx context.Context, c *app.RequestContext) {
|
||||
var err error
|
||||
var req bot_open_api.UploadFileOpenRequest
|
||||
err = c.BindAndValidate(&req)
|
||||
if err != nil {
|
||||
c.String(consts.StatusBadRequest, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
resp := new(bot_open_api.UploadFileOpenResponse)
|
||||
resp, err = upload.SVC.UploadFileOpen(ctx, &req)
|
||||
if err != nil {
|
||||
internalServerErrorResponse(ctx, c, err)
|
||||
return
|
||||
}
|
||||
c.JSON(consts.StatusOK, resp)
|
||||
}
|
||||
|
||||
// GetBotOnlineInfo .
|
||||
// @router /v1/bot/get_online_info [GET]
|
||||
func GetBotOnlineInfo(ctx context.Context, c *app.RequestContext) {
|
||||
var err error
|
||||
var req bot_open_api.GetBotOnlineInfoReq
|
||||
err = c.BindAndValidate(&req)
|
||||
if err != nil {
|
||||
c.String(consts.StatusBadRequest, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := singleagent.SingleAgentSVC.GetAgentOnlineInfo(ctx, &req)
|
||||
|
||||
if err != nil {
|
||||
internalServerErrorResponse(ctx, c, err)
|
||||
return
|
||||
}
|
||||
c.JSON(consts.StatusOK, resp)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,9 +23,8 @@ import (
|
|||
|
||||
"github.com/cloudwego/hertz/pkg/app"
|
||||
"github.com/cloudwego/hertz/pkg/protocol/consts"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/knowledge/document"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/table"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/database/table"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/knowledge"
|
||||
"github.com/coze-dev/coze-studio/backend/application/memory"
|
||||
"github.com/coze-dev/coze-studio/backend/application/singleagent"
|
||||
)
|
||||
|
|
@ -341,7 +340,7 @@ func GetDatabaseTableSchema(ctx context.Context, c *app.RequestContext) {
|
|||
return
|
||||
}
|
||||
|
||||
var resp *document.GetTableSchemaInfoResponse
|
||||
var resp *knowledge.GetTableSchemaInfoResponse
|
||||
resp, err = memory.DatabaseApplicationSVC.GetDatabaseTableSchema(ctx, &req)
|
||||
if err != nil {
|
||||
internalServerErrorResponse(ctx, c, err)
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ import (
|
|||
"github.com/cloudwego/hertz/pkg/app"
|
||||
"github.com/cloudwego/hertz/pkg/protocol/consts"
|
||||
|
||||
developer_api "github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/developer_api"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/developer_api"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
"github.com/coze-dev/coze-studio/backend/application/modelmgr"
|
||||
"github.com/coze-dev/coze-studio/backend/application/singleagent"
|
||||
|
|
|
|||
|
|
@ -24,12 +24,11 @@ import (
|
|||
|
||||
"github.com/cloudwego/hertz/pkg/app"
|
||||
"github.com/cloudwego/hertz/pkg/protocol/consts"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/intelligence"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/intelligence/common"
|
||||
project "github.com/coze-dev/coze-studio/backend/api/model/project"
|
||||
publish "github.com/coze-dev/coze-studio/backend/api/model/publish"
|
||||
task "github.com/coze-dev/coze-studio/backend/api/model/task"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/intelligence"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/common"
|
||||
project "github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/project"
|
||||
publish "github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/publish"
|
||||
task "github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/task"
|
||||
appApplication "github.com/coze-dev/coze-studio/backend/application/app"
|
||||
"github.com/coze-dev/coze-studio/backend/application/search"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -24,8 +24,10 @@ import (
|
|||
"github.com/cloudwego/hertz/pkg/app"
|
||||
"github.com/cloudwego/hertz/pkg/protocol/consts"
|
||||
|
||||
dataset "github.com/coze-dev/coze-studio/backend/api/model/flow/dataengine/dataset"
|
||||
dataset "github.com/coze-dev/coze-studio/backend/api/model/data/knowledge"
|
||||
"github.com/coze-dev/coze-studio/backend/application/knowledge"
|
||||
application "github.com/coze-dev/coze-studio/backend/application/knowledge"
|
||||
"github.com/coze-dev/coze-studio/backend/application/memory"
|
||||
"github.com/coze-dev/coze-studio/backend/application/upload"
|
||||
)
|
||||
|
||||
|
|
@ -526,3 +528,48 @@ func ExtractPhotoCaption(ctx context.Context, c *app.RequestContext) {
|
|||
}
|
||||
c.JSON(consts.StatusOK, resp)
|
||||
}
|
||||
|
||||
// GetDocumentTableInfo .
|
||||
// @router /api/memory/doc_table_info [GET]
|
||||
func GetDocumentTableInfo(ctx context.Context, c *app.RequestContext) {
|
||||
var err error
|
||||
var req dataset.GetDocumentTableInfoRequest
|
||||
err = c.BindAndValidate(&req)
|
||||
if err != nil {
|
||||
c.String(consts.StatusBadRequest, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
resp := new(dataset.GetDocumentTableInfoResponse)
|
||||
resp, err = knowledge.KnowledgeSVC.GetDocumentTableInfo(ctx, &req)
|
||||
if err != nil {
|
||||
internalServerErrorResponse(ctx, c, err)
|
||||
return
|
||||
}
|
||||
c.JSON(consts.StatusOK, resp)
|
||||
}
|
||||
|
||||
// GetModeConfig .
|
||||
// @router /api/memory/table_mode_config [GET]
|
||||
func GetModeConfig(ctx context.Context, c *app.RequestContext) {
|
||||
var err error
|
||||
var req dataset.GetModeConfigRequest
|
||||
err = c.BindAndValidate(&req)
|
||||
if err != nil {
|
||||
c.String(consts.StatusBadRequest, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
if req.BotID == 0 {
|
||||
invalidParamRequestResponse(c, "bot_id is zero")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := memory.DatabaseApplicationSVC.GetModeConfig(ctx, &req)
|
||||
if err != nil {
|
||||
internalServerErrorResponse(ctx, c, err)
|
||||
return
|
||||
}
|
||||
|
||||
c.JSON(consts.StatusOK, resp)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,12 +24,9 @@ import (
|
|||
"github.com/cloudwego/hertz/pkg/app"
|
||||
"github.com/cloudwego/hertz/pkg/protocol/consts"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/knowledge/document"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/kvmemory"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/project_memory"
|
||||
table "github.com/coze-dev/coze-studio/backend/api/model/table"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/variable/kvmemory"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/variable/project_memory"
|
||||
appApplication "github.com/coze-dev/coze-studio/backend/application/app"
|
||||
"github.com/coze-dev/coze-studio/backend/application/knowledge"
|
||||
"github.com/coze-dev/coze-studio/backend/application/memory"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/lang/conv"
|
||||
)
|
||||
|
|
@ -230,48 +227,3 @@ func GetPlayGroundMemory(ctx context.Context, c *app.RequestContext) {
|
|||
|
||||
c.JSON(consts.StatusOK, resp)
|
||||
}
|
||||
|
||||
// GetDocumentTableInfo .
|
||||
// @router /api/memory/doc_table_info [GET]
|
||||
func GetDocumentTableInfo(ctx context.Context, c *app.RequestContext) {
|
||||
var err error
|
||||
var req document.GetDocumentTableInfoRequest
|
||||
err = c.BindAndValidate(&req)
|
||||
if err != nil {
|
||||
c.String(consts.StatusBadRequest, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
resp := new(document.GetDocumentTableInfoResponse)
|
||||
resp, err = knowledge.KnowledgeSVC.GetDocumentTableInfo(ctx, &req)
|
||||
if err != nil {
|
||||
internalServerErrorResponse(ctx, c, err)
|
||||
return
|
||||
}
|
||||
c.JSON(consts.StatusOK, resp)
|
||||
}
|
||||
|
||||
// GetModeConfig .
|
||||
// @router /api/memory/table_mode_config [GET]
|
||||
func GetModeConfig(ctx context.Context, c *app.RequestContext) {
|
||||
var err error
|
||||
var req table.GetModeConfigRequest
|
||||
err = c.BindAndValidate(&req)
|
||||
if err != nil {
|
||||
c.String(consts.StatusBadRequest, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
if req.BotID == 0 {
|
||||
invalidParamRequestResponse(c, "bot_id is zero")
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := memory.DatabaseApplicationSVC.GetModeConfig(ctx, &req)
|
||||
if err != nil {
|
||||
internalServerErrorResponse(ctx, c, err)
|
||||
return
|
||||
}
|
||||
|
||||
c.JSON(consts.StatusOK, resp)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,8 +23,7 @@ import (
|
|||
|
||||
"github.com/cloudwego/hertz/pkg/app"
|
||||
"github.com/cloudwego/hertz/pkg/protocol/consts"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/playground"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/playground"
|
||||
appApplication "github.com/coze-dev/coze-studio/backend/application/app"
|
||||
"github.com/coze-dev/coze-studio/backend/application/prompt"
|
||||
"github.com/coze-dev/coze-studio/backend/application/shortcutcmd"
|
||||
|
|
@ -371,43 +370,3 @@ func GetFileUrls(ctx context.Context, c *app.RequestContext) {
|
|||
|
||||
c.JSON(consts.StatusOK, resp)
|
||||
}
|
||||
|
||||
// UploadFileOpen .
|
||||
// @router /v1/files/upload [POST]
|
||||
func UploadFileOpen(ctx context.Context, c *app.RequestContext) {
|
||||
var err error
|
||||
var req playground.UploadFileOpenRequest
|
||||
err = c.BindAndValidate(&req)
|
||||
if err != nil {
|
||||
c.String(consts.StatusBadRequest, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
resp := new(playground.UploadFileOpenResponse)
|
||||
resp, err = upload.SVC.UploadFileOpen(ctx, &req)
|
||||
if err != nil {
|
||||
internalServerErrorResponse(ctx, c, err)
|
||||
return
|
||||
}
|
||||
c.JSON(consts.StatusOK, resp)
|
||||
}
|
||||
|
||||
// GetBotOnlineInfo .
|
||||
// @router /v1/bot/get_online_info [GET]
|
||||
func GetBotOnlineInfo(ctx context.Context, c *app.RequestContext) {
|
||||
var err error
|
||||
var req playground.GetBotOnlineInfoReq
|
||||
err = c.BindAndValidate(&req)
|
||||
if err != nil {
|
||||
c.String(consts.StatusBadRequest, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
resp, err := singleagent.SingleAgentSVC.GetAgentOnlineInfo(ctx, &req)
|
||||
|
||||
if err != nil {
|
||||
internalServerErrorResponse(ctx, c, err)
|
||||
return
|
||||
}
|
||||
c.JSON(consts.StatusOK, resp)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@ import (
|
|||
"github.com/cloudwego/hertz/pkg/app"
|
||||
"github.com/cloudwego/hertz/pkg/protocol/consts"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/plugin_develop"
|
||||
common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/plugin_develop"
|
||||
common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common"
|
||||
"github.com/coze-dev/coze-studio/backend/application/plugin"
|
||||
appworkflow "github.com/coze-dev/coze-studio/backend/application/workflow"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -22,18 +22,18 @@ import (
|
|||
"context"
|
||||
"strconv"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/workflow"
|
||||
product_public_api "github.com/coze-dev/coze-studio/backend/api/model/marketplace/product_public_api"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/workflow"
|
||||
appworkflow "github.com/coze-dev/coze-studio/backend/application/workflow"
|
||||
|
||||
"github.com/cloudwego/hertz/pkg/app"
|
||||
"github.com/cloudwego/hertz/pkg/protocol/consts"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/developer_api"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/developer_api"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/flow/marketplace/product_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/flow/marketplace/product_public_api"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/bot_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/playground"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/bot_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/marketplace/product_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/playground"
|
||||
appApplication "github.com/coze-dev/coze-studio/backend/application/app"
|
||||
"github.com/coze-dev/coze-studio/backend/application/modelmgr"
|
||||
"github.com/coze-dev/coze-studio/backend/application/plugin"
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import (
|
|||
"github.com/cloudwego/hertz/pkg/protocol/consts"
|
||||
"github.com/cloudwego/hertz/pkg/protocol/sse"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/workflow"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/workflow"
|
||||
appworkflow "github.com/coze-dev/coze-studio/backend/application/workflow"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/lang/ptr"
|
||||
|
|
|
|||
|
|
@ -50,9 +50,9 @@ import (
|
|||
modelknowledge "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge"
|
||||
plugin2 "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/plugin"
|
||||
pluginmodel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/plugin"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/playground"
|
||||
pluginAPI "github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/plugin_develop"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/workflow"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/playground"
|
||||
pluginAPI "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/workflow"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
appknowledge "github.com/coze-dev/coze-studio/backend/application/knowledge"
|
||||
appmemory "github.com/coze-dev/coze-studio/backend/application/memory"
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -8,8 +8,8 @@ import (
|
|||
"database/sql/driver"
|
||||
"fmt"
|
||||
"github.com/apache/thrift/lib/go/thrift"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/bot_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/playground"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/bot_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/playground"
|
||||
)
|
||||
|
||||
type VisibilityType int64
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
// Code generated by thriftgo (0.4.1). DO NOT EDIT.
|
||||
|
||||
package task_struct
|
||||
package common
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
|
@ -1,3 +1,19 @@
|
|||
/*
|
||||
* Copyright 2025 coze-dev Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by thriftgo (0.4.1). DO NOT EDIT.
|
||||
|
||||
package intelligence
|
||||
|
|
@ -6,9 +22,9 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
"github.com/apache/thrift/lib/go/thrift"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/project"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/publish"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/task"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/project"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/publish"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/task"
|
||||
)
|
||||
|
||||
type IntelligenceService interface {
|
||||
|
|
@ -5,8 +5,8 @@ package project
|
|||
import (
|
||||
"fmt"
|
||||
"github.com/apache/thrift/lib/go/thrift"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/base"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/intelligence/common"
|
||||
)
|
||||
|
||||
type DraftProjectCreateRequest struct {
|
||||
|
|
@ -7,8 +7,8 @@ import (
|
|||
"database/sql/driver"
|
||||
"fmt"
|
||||
"github.com/apache/thrift/lib/go/thrift"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/base"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/intelligence/common"
|
||||
)
|
||||
|
||||
type ConnectorClassification int64
|
||||
|
|
@ -7,8 +7,8 @@ import (
|
|||
"database/sql/driver"
|
||||
"fmt"
|
||||
"github.com/apache/thrift/lib/go/thrift"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/base"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/intelligence/common"
|
||||
)
|
||||
|
||||
type OrderBy int64
|
||||
|
|
@ -5,8 +5,8 @@ package task
|
|||
import (
|
||||
"fmt"
|
||||
"github.com/apache/thrift/lib/go/thrift"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/base"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/task_struct"
|
||||
)
|
||||
|
||||
type DraftProjectInnerTaskListRequest struct {
|
||||
|
|
@ -513,7 +513,7 @@ func (p *DraftProjectInnerTaskListResponse) String() string {
|
|||
}
|
||||
|
||||
type DraftProjectInnerTaskListData struct {
|
||||
TaskList []*task_struct.ProjectInnerTaskInfo `thrift:"task_list,1" form:"task_list" json:"task_list" query:"task_list"`
|
||||
TaskList []*common.ProjectInnerTaskInfo `thrift:"task_list,1" form:"task_list" json:"task_list" query:"task_list"`
|
||||
}
|
||||
|
||||
func NewDraftProjectInnerTaskListData() *DraftProjectInnerTaskListData {
|
||||
|
|
@ -523,7 +523,7 @@ func NewDraftProjectInnerTaskListData() *DraftProjectInnerTaskListData {
|
|||
func (p *DraftProjectInnerTaskListData) InitDefault() {
|
||||
}
|
||||
|
||||
func (p *DraftProjectInnerTaskListData) GetTaskList() (v []*task_struct.ProjectInnerTaskInfo) {
|
||||
func (p *DraftProjectInnerTaskListData) GetTaskList() (v []*common.ProjectInnerTaskInfo) {
|
||||
return p.TaskList
|
||||
}
|
||||
|
||||
|
|
@ -591,8 +591,8 @@ func (p *DraftProjectInnerTaskListData) ReadField1(iprot thrift.TProtocol) error
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_field := make([]*task_struct.ProjectInnerTaskInfo, 0, size)
|
||||
values := make([]task_struct.ProjectInnerTaskInfo, size)
|
||||
_field := make([]*common.ProjectInnerTaskInfo, 0, size)
|
||||
values := make([]common.ProjectInnerTaskInfo, size)
|
||||
for i := 0; i < size; i++ {
|
||||
_elem := &values[i]
|
||||
_elem.InitDefault()
|
||||
|
|
@ -1,765 +0,0 @@
|
|||
// Code generated by thriftgo (0.4.1). DO NOT EDIT.
|
||||
|
||||
package common
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"database/sql/driver"
|
||||
"fmt"
|
||||
"github.com/apache/thrift/lib/go/thrift"
|
||||
)
|
||||
|
||||
type ColumnType int64
|
||||
|
||||
const (
|
||||
ColumnType_Unknown ColumnType = 0
|
||||
// Text
|
||||
ColumnType_Text ColumnType = 1
|
||||
// number
|
||||
ColumnType_Number ColumnType = 2
|
||||
// time
|
||||
ColumnType_Date ColumnType = 3
|
||||
// float
|
||||
ColumnType_Float ColumnType = 4
|
||||
// bool
|
||||
ColumnType_Boolean ColumnType = 5
|
||||
// picture
|
||||
ColumnType_Image ColumnType = 6
|
||||
)
|
||||
|
||||
func (p ColumnType) String() string {
|
||||
switch p {
|
||||
case ColumnType_Unknown:
|
||||
return "Unknown"
|
||||
case ColumnType_Text:
|
||||
return "Text"
|
||||
case ColumnType_Number:
|
||||
return "Number"
|
||||
case ColumnType_Date:
|
||||
return "Date"
|
||||
case ColumnType_Float:
|
||||
return "Float"
|
||||
case ColumnType_Boolean:
|
||||
return "Boolean"
|
||||
case ColumnType_Image:
|
||||
return "Image"
|
||||
}
|
||||
return "<UNSET>"
|
||||
}
|
||||
|
||||
func ColumnTypeFromString(s string) (ColumnType, error) {
|
||||
switch s {
|
||||
case "Unknown":
|
||||
return ColumnType_Unknown, nil
|
||||
case "Text":
|
||||
return ColumnType_Text, nil
|
||||
case "Number":
|
||||
return ColumnType_Number, nil
|
||||
case "Date":
|
||||
return ColumnType_Date, nil
|
||||
case "Float":
|
||||
return ColumnType_Float, nil
|
||||
case "Boolean":
|
||||
return ColumnType_Boolean, nil
|
||||
case "Image":
|
||||
return ColumnType_Image, nil
|
||||
}
|
||||
return ColumnType(0), fmt.Errorf("not a valid ColumnType string")
|
||||
}
|
||||
|
||||
func ColumnTypePtr(v ColumnType) *ColumnType { return &v }
|
||||
func (p *ColumnType) Scan(value interface{}) (err error) {
|
||||
var result sql.NullInt64
|
||||
err = result.Scan(value)
|
||||
*p = ColumnType(result.Int64)
|
||||
return
|
||||
}
|
||||
|
||||
func (p *ColumnType) Value() (driver.Value, error) {
|
||||
if p == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return int64(*p), nil
|
||||
}
|
||||
|
||||
type DocTableSheet struct {
|
||||
// Number of sheet
|
||||
ID int64 `thrift:"id,1" form:"id" json:"id" query:"id"`
|
||||
// Sheet name
|
||||
SheetName string `thrift:"sheet_name,2" form:"sheet_name" json:"sheet_name" query:"sheet_name"`
|
||||
// total number of rows
|
||||
TotalRow int64 `thrift:"total_row,3" form:"total_row" json:"total_row" query:"total_row"`
|
||||
}
|
||||
|
||||
func NewDocTableSheet() *DocTableSheet {
|
||||
return &DocTableSheet{}
|
||||
}
|
||||
|
||||
func (p *DocTableSheet) InitDefault() {
|
||||
}
|
||||
|
||||
func (p *DocTableSheet) GetID() (v int64) {
|
||||
return p.ID
|
||||
}
|
||||
|
||||
func (p *DocTableSheet) GetSheetName() (v string) {
|
||||
return p.SheetName
|
||||
}
|
||||
|
||||
func (p *DocTableSheet) GetTotalRow() (v int64) {
|
||||
return p.TotalRow
|
||||
}
|
||||
|
||||
var fieldIDToName_DocTableSheet = map[int16]string{
|
||||
1: "id",
|
||||
2: "sheet_name",
|
||||
3: "total_row",
|
||||
}
|
||||
|
||||
func (p *DocTableSheet) Read(iprot thrift.TProtocol) (err error) {
|
||||
var fieldTypeId thrift.TType
|
||||
var fieldId int16
|
||||
|
||||
if _, err = iprot.ReadStructBegin(); err != nil {
|
||||
goto ReadStructBeginError
|
||||
}
|
||||
|
||||
for {
|
||||
_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
|
||||
if err != nil {
|
||||
goto ReadFieldBeginError
|
||||
}
|
||||
if fieldTypeId == thrift.STOP {
|
||||
break
|
||||
}
|
||||
|
||||
switch fieldId {
|
||||
case 1:
|
||||
if fieldTypeId == thrift.I64 {
|
||||
if err = p.ReadField1(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 2:
|
||||
if fieldTypeId == thrift.STRING {
|
||||
if err = p.ReadField2(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 3:
|
||||
if fieldTypeId == thrift.I64 {
|
||||
if err = p.ReadField3(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
default:
|
||||
if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadFieldEnd(); err != nil {
|
||||
goto ReadFieldEndError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadStructEnd(); err != nil {
|
||||
goto ReadStructEndError
|
||||
}
|
||||
|
||||
return nil
|
||||
ReadStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
|
||||
ReadFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
|
||||
ReadFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_DocTableSheet[fieldId]), err)
|
||||
SkipFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
||||
|
||||
ReadFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err)
|
||||
ReadStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *DocTableSheet) ReadField1(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field int64
|
||||
if v, err := iprot.ReadI64(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = v
|
||||
}
|
||||
p.ID = _field
|
||||
return nil
|
||||
}
|
||||
func (p *DocTableSheet) ReadField2(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field string
|
||||
if v, err := iprot.ReadString(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = v
|
||||
}
|
||||
p.SheetName = _field
|
||||
return nil
|
||||
}
|
||||
func (p *DocTableSheet) ReadField3(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field int64
|
||||
if v, err := iprot.ReadI64(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = v
|
||||
}
|
||||
p.TotalRow = _field
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *DocTableSheet) Write(oprot thrift.TProtocol) (err error) {
|
||||
var fieldId int16
|
||||
if err = oprot.WriteStructBegin("DocTableSheet"); err != nil {
|
||||
goto WriteStructBeginError
|
||||
}
|
||||
if p != nil {
|
||||
if err = p.writeField1(oprot); err != nil {
|
||||
fieldId = 1
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField2(oprot); err != nil {
|
||||
fieldId = 2
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField3(oprot); err != nil {
|
||||
fieldId = 3
|
||||
goto WriteFieldError
|
||||
}
|
||||
}
|
||||
if err = oprot.WriteFieldStop(); err != nil {
|
||||
goto WriteFieldStopError
|
||||
}
|
||||
if err = oprot.WriteStructEnd(); err != nil {
|
||||
goto WriteStructEndError
|
||||
}
|
||||
return nil
|
||||
WriteStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
||||
WriteFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
|
||||
WriteFieldStopError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
|
||||
WriteStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *DocTableSheet) writeField1(oprot thrift.TProtocol) (err error) {
|
||||
if err = oprot.WriteFieldBegin("id", thrift.I64, 1); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteI64(p.ID); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err)
|
||||
}
|
||||
func (p *DocTableSheet) writeField2(oprot thrift.TProtocol) (err error) {
|
||||
if err = oprot.WriteFieldBegin("sheet_name", thrift.STRING, 2); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteString(p.SheetName); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 2 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 2 end error: ", p), err)
|
||||
}
|
||||
func (p *DocTableSheet) writeField3(oprot thrift.TProtocol) (err error) {
|
||||
if err = oprot.WriteFieldBegin("total_row", thrift.I64, 3); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteI64(p.TotalRow); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *DocTableSheet) String() string {
|
||||
if p == nil {
|
||||
return "<nil>"
|
||||
}
|
||||
return fmt.Sprintf("DocTableSheet(%+v)", *p)
|
||||
|
||||
}
|
||||
|
||||
// Table column information
|
||||
type DocTableColumn struct {
|
||||
// Column ID
|
||||
ID int64 `thrift:"id,1" form:"id" json:"id,string"`
|
||||
// column_name
|
||||
ColumnName string `thrift:"column_name,2" form:"column_name" json:"column_name" query:"column_name"`
|
||||
// Is it a semantically matched column?
|
||||
IsSemantic bool `thrift:"is_semantic,3" form:"is_semantic" json:"is_semantic" query:"is_semantic"`
|
||||
// List the serial number originally in excel
|
||||
Sequence int64 `thrift:"sequence,4" form:"sequence" json:"sequence,string"`
|
||||
// column type
|
||||
ColumnType *ColumnType `thrift:"column_type,5,optional" form:"column_type" json:"column_type,omitempty" query:"column_type"`
|
||||
ContainsEmptyValue *bool `thrift:"contains_empty_value,6,optional" form:"contains_empty_value" json:"contains_empty_value,omitempty" query:"contains_empty_value"`
|
||||
// describe
|
||||
Desc *string `thrift:"desc,7,optional" form:"desc" json:"desc,omitempty" query:"desc"`
|
||||
}
|
||||
|
||||
func NewDocTableColumn() *DocTableColumn {
|
||||
return &DocTableColumn{}
|
||||
}
|
||||
|
||||
func (p *DocTableColumn) InitDefault() {
|
||||
}
|
||||
|
||||
func (p *DocTableColumn) GetID() (v int64) {
|
||||
return p.ID
|
||||
}
|
||||
|
||||
func (p *DocTableColumn) GetColumnName() (v string) {
|
||||
return p.ColumnName
|
||||
}
|
||||
|
||||
func (p *DocTableColumn) GetIsSemantic() (v bool) {
|
||||
return p.IsSemantic
|
||||
}
|
||||
|
||||
func (p *DocTableColumn) GetSequence() (v int64) {
|
||||
return p.Sequence
|
||||
}
|
||||
|
||||
var DocTableColumn_ColumnType_DEFAULT ColumnType
|
||||
|
||||
func (p *DocTableColumn) GetColumnType() (v ColumnType) {
|
||||
if !p.IsSetColumnType() {
|
||||
return DocTableColumn_ColumnType_DEFAULT
|
||||
}
|
||||
return *p.ColumnType
|
||||
}
|
||||
|
||||
var DocTableColumn_ContainsEmptyValue_DEFAULT bool
|
||||
|
||||
func (p *DocTableColumn) GetContainsEmptyValue() (v bool) {
|
||||
if !p.IsSetContainsEmptyValue() {
|
||||
return DocTableColumn_ContainsEmptyValue_DEFAULT
|
||||
}
|
||||
return *p.ContainsEmptyValue
|
||||
}
|
||||
|
||||
var DocTableColumn_Desc_DEFAULT string
|
||||
|
||||
func (p *DocTableColumn) GetDesc() (v string) {
|
||||
if !p.IsSetDesc() {
|
||||
return DocTableColumn_Desc_DEFAULT
|
||||
}
|
||||
return *p.Desc
|
||||
}
|
||||
|
||||
var fieldIDToName_DocTableColumn = map[int16]string{
|
||||
1: "id",
|
||||
2: "column_name",
|
||||
3: "is_semantic",
|
||||
4: "sequence",
|
||||
5: "column_type",
|
||||
6: "contains_empty_value",
|
||||
7: "desc",
|
||||
}
|
||||
|
||||
func (p *DocTableColumn) IsSetColumnType() bool {
|
||||
return p.ColumnType != nil
|
||||
}
|
||||
|
||||
func (p *DocTableColumn) IsSetContainsEmptyValue() bool {
|
||||
return p.ContainsEmptyValue != nil
|
||||
}
|
||||
|
||||
func (p *DocTableColumn) IsSetDesc() bool {
|
||||
return p.Desc != nil
|
||||
}
|
||||
|
||||
func (p *DocTableColumn) Read(iprot thrift.TProtocol) (err error) {
|
||||
var fieldTypeId thrift.TType
|
||||
var fieldId int16
|
||||
|
||||
if _, err = iprot.ReadStructBegin(); err != nil {
|
||||
goto ReadStructBeginError
|
||||
}
|
||||
|
||||
for {
|
||||
_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
|
||||
if err != nil {
|
||||
goto ReadFieldBeginError
|
||||
}
|
||||
if fieldTypeId == thrift.STOP {
|
||||
break
|
||||
}
|
||||
|
||||
switch fieldId {
|
||||
case 1:
|
||||
if fieldTypeId == thrift.I64 {
|
||||
if err = p.ReadField1(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 2:
|
||||
if fieldTypeId == thrift.STRING {
|
||||
if err = p.ReadField2(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 3:
|
||||
if fieldTypeId == thrift.BOOL {
|
||||
if err = p.ReadField3(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 4:
|
||||
if fieldTypeId == thrift.I64 {
|
||||
if err = p.ReadField4(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 5:
|
||||
if fieldTypeId == thrift.I32 {
|
||||
if err = p.ReadField5(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 6:
|
||||
if fieldTypeId == thrift.BOOL {
|
||||
if err = p.ReadField6(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 7:
|
||||
if fieldTypeId == thrift.STRING {
|
||||
if err = p.ReadField7(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
default:
|
||||
if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadFieldEnd(); err != nil {
|
||||
goto ReadFieldEndError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadStructEnd(); err != nil {
|
||||
goto ReadStructEndError
|
||||
}
|
||||
|
||||
return nil
|
||||
ReadStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
|
||||
ReadFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
|
||||
ReadFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_DocTableColumn[fieldId]), err)
|
||||
SkipFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
||||
|
||||
ReadFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err)
|
||||
ReadStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *DocTableColumn) ReadField1(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field int64
|
||||
if v, err := iprot.ReadI64(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = v
|
||||
}
|
||||
p.ID = _field
|
||||
return nil
|
||||
}
|
||||
func (p *DocTableColumn) ReadField2(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field string
|
||||
if v, err := iprot.ReadString(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = v
|
||||
}
|
||||
p.ColumnName = _field
|
||||
return nil
|
||||
}
|
||||
func (p *DocTableColumn) ReadField3(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field bool
|
||||
if v, err := iprot.ReadBool(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = v
|
||||
}
|
||||
p.IsSemantic = _field
|
||||
return nil
|
||||
}
|
||||
func (p *DocTableColumn) ReadField4(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field int64
|
||||
if v, err := iprot.ReadI64(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = v
|
||||
}
|
||||
p.Sequence = _field
|
||||
return nil
|
||||
}
|
||||
func (p *DocTableColumn) ReadField5(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field *ColumnType
|
||||
if v, err := iprot.ReadI32(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
tmp := ColumnType(v)
|
||||
_field = &tmp
|
||||
}
|
||||
p.ColumnType = _field
|
||||
return nil
|
||||
}
|
||||
func (p *DocTableColumn) ReadField6(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field *bool
|
||||
if v, err := iprot.ReadBool(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = &v
|
||||
}
|
||||
p.ContainsEmptyValue = _field
|
||||
return nil
|
||||
}
|
||||
func (p *DocTableColumn) ReadField7(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field *string
|
||||
if v, err := iprot.ReadString(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = &v
|
||||
}
|
||||
p.Desc = _field
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *DocTableColumn) Write(oprot thrift.TProtocol) (err error) {
|
||||
var fieldId int16
|
||||
if err = oprot.WriteStructBegin("DocTableColumn"); err != nil {
|
||||
goto WriteStructBeginError
|
||||
}
|
||||
if p != nil {
|
||||
if err = p.writeField1(oprot); err != nil {
|
||||
fieldId = 1
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField2(oprot); err != nil {
|
||||
fieldId = 2
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField3(oprot); err != nil {
|
||||
fieldId = 3
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField4(oprot); err != nil {
|
||||
fieldId = 4
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField5(oprot); err != nil {
|
||||
fieldId = 5
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField6(oprot); err != nil {
|
||||
fieldId = 6
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField7(oprot); err != nil {
|
||||
fieldId = 7
|
||||
goto WriteFieldError
|
||||
}
|
||||
}
|
||||
if err = oprot.WriteFieldStop(); err != nil {
|
||||
goto WriteFieldStopError
|
||||
}
|
||||
if err = oprot.WriteStructEnd(); err != nil {
|
||||
goto WriteStructEndError
|
||||
}
|
||||
return nil
|
||||
WriteStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
||||
WriteFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
|
||||
WriteFieldStopError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
|
||||
WriteStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *DocTableColumn) writeField1(oprot thrift.TProtocol) (err error) {
|
||||
if err = oprot.WriteFieldBegin("id", thrift.I64, 1); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteI64(p.ID); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err)
|
||||
}
|
||||
func (p *DocTableColumn) writeField2(oprot thrift.TProtocol) (err error) {
|
||||
if err = oprot.WriteFieldBegin("column_name", thrift.STRING, 2); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteString(p.ColumnName); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 2 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 2 end error: ", p), err)
|
||||
}
|
||||
func (p *DocTableColumn) writeField3(oprot thrift.TProtocol) (err error) {
|
||||
if err = oprot.WriteFieldBegin("is_semantic", thrift.BOOL, 3); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteBool(p.IsSemantic); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
|
||||
}
|
||||
func (p *DocTableColumn) writeField4(oprot thrift.TProtocol) (err error) {
|
||||
if err = oprot.WriteFieldBegin("sequence", thrift.I64, 4); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteI64(p.Sequence); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 4 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
|
||||
}
|
||||
func (p *DocTableColumn) writeField5(oprot thrift.TProtocol) (err error) {
|
||||
if p.IsSetColumnType() {
|
||||
if err = oprot.WriteFieldBegin("column_type", thrift.I32, 5); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteI32(int32(*p.ColumnType)); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 5 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
|
||||
}
|
||||
func (p *DocTableColumn) writeField6(oprot thrift.TProtocol) (err error) {
|
||||
if p.IsSetContainsEmptyValue() {
|
||||
if err = oprot.WriteFieldBegin("contains_empty_value", thrift.BOOL, 6); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteBool(*p.ContainsEmptyValue); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 6 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 6 end error: ", p), err)
|
||||
}
|
||||
func (p *DocTableColumn) writeField7(oprot thrift.TProtocol) (err error) {
|
||||
if p.IsSetDesc() {
|
||||
if err = oprot.WriteFieldBegin("desc", thrift.STRING, 7); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteString(*p.Desc); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 7 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 7 end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *DocTableColumn) String() string {
|
||||
if p == nil {
|
||||
return "<nil>"
|
||||
}
|
||||
return fmt.Sprintf("DocTableColumn(%+v)", *p)
|
||||
|
||||
}
|
||||
|
|
@ -1,26 +1,42 @@
|
|||
/*
|
||||
* Copyright 2025 coze-dev Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by thriftgo (0.4.1). DO NOT EDIT.
|
||||
|
||||
package coze
|
||||
|
||||
import (
|
||||
"github.com/apache/thrift/lib/go/thrift"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/bot_open_api"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/developer_api"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/intelligence"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/conversation/agentrun"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/conversation/conversation"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/conversation/message"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/database"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/database"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/knowledge"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/variable"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/file/upload"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/flow/dataengine/dataset"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/flow/marketplace/product_public_api"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/intelligence"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/bot_open_api"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/developer_api"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/memory"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/playground"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/plugin_develop"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/workflow"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/marketplace/product_public_api"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/passport"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/permission/openapiauth"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/playground"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/plugin_develop"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/resource"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/workflow"
|
||||
)
|
||||
|
||||
type IntelligenceService interface {
|
||||
|
|
@ -154,28 +170,28 @@ func NewOpenAPIAuthServiceClient(c thrift.TClient) *OpenAPIAuthServiceClient {
|
|||
}
|
||||
|
||||
type MemoryService interface {
|
||||
memory.MemoryService
|
||||
variable.MemoryService
|
||||
}
|
||||
|
||||
type MemoryServiceClient struct {
|
||||
*memory.MemoryServiceClient
|
||||
*variable.MemoryServiceClient
|
||||
}
|
||||
|
||||
func NewMemoryServiceClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *MemoryServiceClient {
|
||||
return &MemoryServiceClient{
|
||||
MemoryServiceClient: memory.NewMemoryServiceClientFactory(t, f),
|
||||
MemoryServiceClient: variable.NewMemoryServiceClientFactory(t, f),
|
||||
}
|
||||
}
|
||||
|
||||
func NewMemoryServiceClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *MemoryServiceClient {
|
||||
return &MemoryServiceClient{
|
||||
MemoryServiceClient: memory.NewMemoryServiceClientProtocol(t, iprot, oprot),
|
||||
MemoryServiceClient: variable.NewMemoryServiceClientProtocol(t, iprot, oprot),
|
||||
}
|
||||
}
|
||||
|
||||
func NewMemoryServiceClient(c thrift.TClient) *MemoryServiceClient {
|
||||
return &MemoryServiceClient{
|
||||
MemoryServiceClient: memory.NewMemoryServiceClient(c),
|
||||
MemoryServiceClient: variable.NewMemoryServiceClient(c),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -388,28 +404,28 @@ func NewWorkflowServiceClient(c thrift.TClient) *WorkflowServiceClient {
|
|||
}
|
||||
|
||||
type KnowledgeService interface {
|
||||
dataset.DatasetService
|
||||
knowledge.DatasetService
|
||||
}
|
||||
|
||||
type KnowledgeServiceClient struct {
|
||||
*dataset.DatasetServiceClient
|
||||
*knowledge.DatasetServiceClient
|
||||
}
|
||||
|
||||
func NewKnowledgeServiceClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *KnowledgeServiceClient {
|
||||
return &KnowledgeServiceClient{
|
||||
DatasetServiceClient: dataset.NewDatasetServiceClientFactory(t, f),
|
||||
DatasetServiceClient: knowledge.NewDatasetServiceClientFactory(t, f),
|
||||
}
|
||||
}
|
||||
|
||||
func NewKnowledgeServiceClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *KnowledgeServiceClient {
|
||||
return &KnowledgeServiceClient{
|
||||
DatasetServiceClient: dataset.NewDatasetServiceClientProtocol(t, iprot, oprot),
|
||||
DatasetServiceClient: knowledge.NewDatasetServiceClientProtocol(t, iprot, oprot),
|
||||
}
|
||||
}
|
||||
|
||||
func NewKnowledgeServiceClient(c thrift.TClient) *KnowledgeServiceClient {
|
||||
return &KnowledgeServiceClient{
|
||||
DatasetServiceClient: dataset.NewDatasetServiceClient(c),
|
||||
DatasetServiceClient: knowledge.NewDatasetServiceClient(c),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -511,11 +527,11 @@ func NewOpenAPIAuthServiceProcessor(handler OpenAPIAuthService) *OpenAPIAuthServ
|
|||
}
|
||||
|
||||
type MemoryServiceProcessor struct {
|
||||
*memory.MemoryServiceProcessor
|
||||
*variable.MemoryServiceProcessor
|
||||
}
|
||||
|
||||
func NewMemoryServiceProcessor(handler MemoryService) *MemoryServiceProcessor {
|
||||
self := &MemoryServiceProcessor{memory.NewMemoryServiceProcessor(handler)}
|
||||
self := &MemoryServiceProcessor{variable.NewMemoryServiceProcessor(handler)}
|
||||
return self
|
||||
}
|
||||
|
||||
|
|
@ -592,11 +608,11 @@ func NewWorkflowServiceProcessor(handler WorkflowService) *WorkflowServiceProces
|
|||
}
|
||||
|
||||
type KnowledgeServiceProcessor struct {
|
||||
*dataset.DatasetServiceProcessor
|
||||
*knowledge.DatasetServiceProcessor
|
||||
}
|
||||
|
||||
func NewKnowledgeServiceProcessor(handler KnowledgeService) *KnowledgeServiceProcessor {
|
||||
self := &KnowledgeServiceProcessor{dataset.NewDatasetServiceProcessor(handler)}
|
||||
self := &KnowledgeServiceProcessor{knowledge.NewDatasetServiceProcessor(handler)}
|
||||
return self
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
package connector
|
||||
|
||||
import "github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/developer_api"
|
||||
import "github.com/coze-dev/coze-studio/backend/api/model/app/developer_api"
|
||||
|
||||
type Connector struct {
|
||||
ID int64 `json:"id"`
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@
|
|||
package database
|
||||
|
||||
import (
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/bot_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/table"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/bot_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/database/table"
|
||||
)
|
||||
|
||||
type ExecuteSQLRequest struct {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import (
|
|||
|
||||
"github.com/getkin/kin-openapi/openapi3"
|
||||
|
||||
common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop_common"
|
||||
common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common"
|
||||
)
|
||||
|
||||
var httpParamLocations = map[common.ParameterLocation]HTTPParamLocation{
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ package plugin
|
|||
import (
|
||||
"github.com/getkin/kin-openapi/openapi3"
|
||||
|
||||
api "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop_common"
|
||||
api "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common"
|
||||
)
|
||||
|
||||
type VersionPlugin struct {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import (
|
|||
"os"
|
||||
"strings"
|
||||
|
||||
api "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop_common"
|
||||
api "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/plugin/encrypt"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/errorx"
|
||||
"github.com/coze-dev/coze-studio/backend/types/errno"
|
||||
|
|
|
|||
|
|
@ -22,14 +22,12 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/getkin/kin-openapi/openapi3"
|
||||
gonanoid "github.com/matoous/go-nanoid"
|
||||
|
||||
productAPI "github.com/coze-dev/coze-studio/backend/api/model/flow/marketplace/product_public_api"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/plugin_develop_common"
|
||||
common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop_common"
|
||||
productAPI "github.com/coze-dev/coze-studio/backend/api/model/marketplace/product_public_api"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/lang/ptr"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/lang/slices"
|
||||
"github.com/getkin/kin-openapi/openapi3"
|
||||
gonanoid "github.com/matoous/go-nanoid"
|
||||
)
|
||||
|
||||
type ToolInfo struct {
|
||||
|
|
@ -40,7 +38,7 @@ type ToolInfo struct {
|
|||
Version *string
|
||||
|
||||
ActivatedStatus *ActivatedStatus
|
||||
DebugStatus *plugin_develop_common.APIDebugStatus
|
||||
DebugStatus *common.APIDebugStatus
|
||||
|
||||
Method *string
|
||||
SubURL *string
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@ import (
|
|||
"github.com/cloudwego/eino/schema"
|
||||
"gorm.io/gorm"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/bot_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/agentrun"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/plugin"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/bot_common"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/crossworkflow"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
package variables
|
||||
|
||||
import (
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/project_memory"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/variable/project_memory"
|
||||
)
|
||||
|
||||
type UserVariableMeta struct {
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
"github.com/apache/thrift/lib/go/thrift"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/knowledge/document"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/table"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/database/table"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/knowledge"
|
||||
)
|
||||
|
||||
type DatabaseService interface {
|
||||
|
|
@ -41,7 +41,7 @@ type DatabaseService interface {
|
|||
|
||||
UpdateDatabaseBotSwitch(ctx context.Context, req *table.UpdateDatabaseBotSwitchRequest) (r *table.UpdateDatabaseBotSwitchResponse, err error)
|
||||
|
||||
GetDatabaseTableSchema(ctx context.Context, req *table.GetTableSchemaRequest) (r *document.GetTableSchemaInfoResponse, err error)
|
||||
GetDatabaseTableSchema(ctx context.Context, req *table.GetTableSchemaRequest) (r *knowledge.GetTableSchemaInfoResponse, err error)
|
||||
|
||||
ValidateDatabaseTableSchema(ctx context.Context, req *table.ValidateTableSchemaRequest) (r *table.ValidateTableSchemaResponse, err error)
|
||||
|
||||
|
|
@ -211,7 +211,7 @@ func (p *DatabaseServiceClient) UpdateDatabaseBotSwitch(ctx context.Context, req
|
|||
}
|
||||
return _result.GetSuccess(), nil
|
||||
}
|
||||
func (p *DatabaseServiceClient) GetDatabaseTableSchema(ctx context.Context, req *table.GetTableSchemaRequest) (r *document.GetTableSchemaInfoResponse, err error) {
|
||||
func (p *DatabaseServiceClient) GetDatabaseTableSchema(ctx context.Context, req *table.GetTableSchemaRequest) (r *knowledge.GetTableSchemaInfoResponse, err error) {
|
||||
var _args DatabaseServiceGetDatabaseTableSchemaArgs
|
||||
_args.Req = req
|
||||
var _result DatabaseServiceGetDatabaseTableSchemaResult
|
||||
|
|
@ -1046,7 +1046,7 @@ func (p *databaseServiceProcessorGetDatabaseTableSchema) Process(ctx context.Con
|
|||
iprot.ReadMessageEnd()
|
||||
var err2 error
|
||||
result := DatabaseServiceGetDatabaseTableSchemaResult{}
|
||||
var retval *document.GetTableSchemaInfoResponse
|
||||
var retval *knowledge.GetTableSchemaInfoResponse
|
||||
if retval, err2 = p.handler.GetDatabaseTableSchema(ctx, args.Req); err2 != nil {
|
||||
x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing GetDatabaseTableSchema: "+err2.Error())
|
||||
oprot.WriteMessageBegin("GetDatabaseTableSchema", thrift.EXCEPTION, seqId)
|
||||
|
|
@ -5745,7 +5745,7 @@ func (p *DatabaseServiceGetDatabaseTableSchemaArgs) String() string {
|
|||
}
|
||||
|
||||
type DatabaseServiceGetDatabaseTableSchemaResult struct {
|
||||
Success *document.GetTableSchemaInfoResponse `thrift:"success,0,optional"`
|
||||
Success *knowledge.GetTableSchemaInfoResponse `thrift:"success,0,optional"`
|
||||
}
|
||||
|
||||
func NewDatabaseServiceGetDatabaseTableSchemaResult() *DatabaseServiceGetDatabaseTableSchemaResult {
|
||||
|
|
@ -5755,9 +5755,9 @@ func NewDatabaseServiceGetDatabaseTableSchemaResult() *DatabaseServiceGetDatabas
|
|||
func (p *DatabaseServiceGetDatabaseTableSchemaResult) InitDefault() {
|
||||
}
|
||||
|
||||
var DatabaseServiceGetDatabaseTableSchemaResult_Success_DEFAULT *document.GetTableSchemaInfoResponse
|
||||
var DatabaseServiceGetDatabaseTableSchemaResult_Success_DEFAULT *knowledge.GetTableSchemaInfoResponse
|
||||
|
||||
func (p *DatabaseServiceGetDatabaseTableSchemaResult) GetSuccess() (v *document.GetTableSchemaInfoResponse) {
|
||||
func (p *DatabaseServiceGetDatabaseTableSchemaResult) GetSuccess() (v *knowledge.GetTableSchemaInfoResponse) {
|
||||
if !p.IsSetSuccess() {
|
||||
return DatabaseServiceGetDatabaseTableSchemaResult_Success_DEFAULT
|
||||
}
|
||||
|
|
@ -5828,7 +5828,7 @@ ReadStructEndError:
|
|||
}
|
||||
|
||||
func (p *DatabaseServiceGetDatabaseTableSchemaResult) ReadField0(iprot thrift.TProtocol) error {
|
||||
_field := document.NewGetTableSchemaInfoResponse()
|
||||
_field := knowledge.NewGetTableSchemaInfoResponse()
|
||||
if err := _field.Read(iprot); err != nil {
|
||||
return err
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,6 +1,6 @@
|
|||
// Code generated by thriftgo (0.4.1). DO NOT EDIT.
|
||||
|
||||
package dataset
|
||||
package knowledge
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
|
|
@ -503,6 +503,79 @@ func (p *ReviewStatus) Value() (driver.Value, error) {
|
|||
return int64(*p), nil
|
||||
}
|
||||
|
||||
type ColumnType int64
|
||||
|
||||
const (
|
||||
ColumnType_Unknown ColumnType = 0
|
||||
// Text
|
||||
ColumnType_Text ColumnType = 1
|
||||
// number
|
||||
ColumnType_Number ColumnType = 2
|
||||
// time
|
||||
ColumnType_Date ColumnType = 3
|
||||
// float
|
||||
ColumnType_Float ColumnType = 4
|
||||
// bool
|
||||
ColumnType_Boolean ColumnType = 5
|
||||
// picture
|
||||
ColumnType_Image ColumnType = 6
|
||||
)
|
||||
|
||||
func (p ColumnType) String() string {
|
||||
switch p {
|
||||
case ColumnType_Unknown:
|
||||
return "Unknown"
|
||||
case ColumnType_Text:
|
||||
return "Text"
|
||||
case ColumnType_Number:
|
||||
return "Number"
|
||||
case ColumnType_Date:
|
||||
return "Date"
|
||||
case ColumnType_Float:
|
||||
return "Float"
|
||||
case ColumnType_Boolean:
|
||||
return "Boolean"
|
||||
case ColumnType_Image:
|
||||
return "Image"
|
||||
}
|
||||
return "<UNSET>"
|
||||
}
|
||||
|
||||
func ColumnTypeFromString(s string) (ColumnType, error) {
|
||||
switch s {
|
||||
case "Unknown":
|
||||
return ColumnType_Unknown, nil
|
||||
case "Text":
|
||||
return ColumnType_Text, nil
|
||||
case "Number":
|
||||
return ColumnType_Number, nil
|
||||
case "Date":
|
||||
return ColumnType_Date, nil
|
||||
case "Float":
|
||||
return ColumnType_Float, nil
|
||||
case "Boolean":
|
||||
return ColumnType_Boolean, nil
|
||||
case "Image":
|
||||
return ColumnType_Image, nil
|
||||
}
|
||||
return ColumnType(0), fmt.Errorf("not a valid ColumnType string")
|
||||
}
|
||||
|
||||
func ColumnTypePtr(v ColumnType) *ColumnType { return &v }
|
||||
func (p *ColumnType) Scan(value interface{}) (err error) {
|
||||
var result sql.NullInt64
|
||||
err = result.Scan(value)
|
||||
*p = ColumnType(result.Int64)
|
||||
return
|
||||
}
|
||||
|
||||
func (p *ColumnType) Value() (driver.Value, error) {
|
||||
if p == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return int64(*p), nil
|
||||
}
|
||||
|
||||
type ChunkStrategy struct {
|
||||
// A separator, such as a period
|
||||
Separator string `thrift:"separator,1" form:"separator" json:"separator" query:"separator"`
|
||||
|
|
@ -2011,3 +2084,453 @@ func (p *SinkStrategy) String() string {
|
|||
return fmt.Sprintf("SinkStrategy(%+v)", *p)
|
||||
|
||||
}
|
||||
|
||||
// Table column information
|
||||
type DocTableColumn struct {
|
||||
// Column ID
|
||||
ID int64 `thrift:"id,1" form:"id" json:"id,string"`
|
||||
// column_name
|
||||
ColumnName string `thrift:"column_name,2" form:"column_name" json:"column_name" query:"column_name"`
|
||||
// Is it a semantically matched column?
|
||||
IsSemantic bool `thrift:"is_semantic,3" form:"is_semantic" json:"is_semantic" query:"is_semantic"`
|
||||
// List the serial number originally in excel
|
||||
Sequence int64 `thrift:"sequence,4" form:"sequence" json:"sequence,string"`
|
||||
// column type
|
||||
ColumnType *ColumnType `thrift:"column_type,5,optional" form:"column_type" json:"column_type,omitempty" query:"column_type"`
|
||||
ContainsEmptyValue *bool `thrift:"contains_empty_value,6,optional" form:"contains_empty_value" json:"contains_empty_value,omitempty" query:"contains_empty_value"`
|
||||
// describe
|
||||
Desc *string `thrift:"desc,7,optional" form:"desc" json:"desc,omitempty" query:"desc"`
|
||||
}
|
||||
|
||||
func NewDocTableColumn() *DocTableColumn {
|
||||
return &DocTableColumn{}
|
||||
}
|
||||
|
||||
func (p *DocTableColumn) InitDefault() {
|
||||
}
|
||||
|
||||
func (p *DocTableColumn) GetID() (v int64) {
|
||||
return p.ID
|
||||
}
|
||||
|
||||
func (p *DocTableColumn) GetColumnName() (v string) {
|
||||
return p.ColumnName
|
||||
}
|
||||
|
||||
func (p *DocTableColumn) GetIsSemantic() (v bool) {
|
||||
return p.IsSemantic
|
||||
}
|
||||
|
||||
func (p *DocTableColumn) GetSequence() (v int64) {
|
||||
return p.Sequence
|
||||
}
|
||||
|
||||
var DocTableColumn_ColumnType_DEFAULT ColumnType
|
||||
|
||||
func (p *DocTableColumn) GetColumnType() (v ColumnType) {
|
||||
if !p.IsSetColumnType() {
|
||||
return DocTableColumn_ColumnType_DEFAULT
|
||||
}
|
||||
return *p.ColumnType
|
||||
}
|
||||
|
||||
var DocTableColumn_ContainsEmptyValue_DEFAULT bool
|
||||
|
||||
func (p *DocTableColumn) GetContainsEmptyValue() (v bool) {
|
||||
if !p.IsSetContainsEmptyValue() {
|
||||
return DocTableColumn_ContainsEmptyValue_DEFAULT
|
||||
}
|
||||
return *p.ContainsEmptyValue
|
||||
}
|
||||
|
||||
var DocTableColumn_Desc_DEFAULT string
|
||||
|
||||
func (p *DocTableColumn) GetDesc() (v string) {
|
||||
if !p.IsSetDesc() {
|
||||
return DocTableColumn_Desc_DEFAULT
|
||||
}
|
||||
return *p.Desc
|
||||
}
|
||||
|
||||
var fieldIDToName_DocTableColumn = map[int16]string{
|
||||
1: "id",
|
||||
2: "column_name",
|
||||
3: "is_semantic",
|
||||
4: "sequence",
|
||||
5: "column_type",
|
||||
6: "contains_empty_value",
|
||||
7: "desc",
|
||||
}
|
||||
|
||||
func (p *DocTableColumn) IsSetColumnType() bool {
|
||||
return p.ColumnType != nil
|
||||
}
|
||||
|
||||
func (p *DocTableColumn) IsSetContainsEmptyValue() bool {
|
||||
return p.ContainsEmptyValue != nil
|
||||
}
|
||||
|
||||
func (p *DocTableColumn) IsSetDesc() bool {
|
||||
return p.Desc != nil
|
||||
}
|
||||
|
||||
func (p *DocTableColumn) Read(iprot thrift.TProtocol) (err error) {
|
||||
var fieldTypeId thrift.TType
|
||||
var fieldId int16
|
||||
|
||||
if _, err = iprot.ReadStructBegin(); err != nil {
|
||||
goto ReadStructBeginError
|
||||
}
|
||||
|
||||
for {
|
||||
_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
|
||||
if err != nil {
|
||||
goto ReadFieldBeginError
|
||||
}
|
||||
if fieldTypeId == thrift.STOP {
|
||||
break
|
||||
}
|
||||
|
||||
switch fieldId {
|
||||
case 1:
|
||||
if fieldTypeId == thrift.I64 {
|
||||
if err = p.ReadField1(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 2:
|
||||
if fieldTypeId == thrift.STRING {
|
||||
if err = p.ReadField2(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 3:
|
||||
if fieldTypeId == thrift.BOOL {
|
||||
if err = p.ReadField3(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 4:
|
||||
if fieldTypeId == thrift.I64 {
|
||||
if err = p.ReadField4(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 5:
|
||||
if fieldTypeId == thrift.I32 {
|
||||
if err = p.ReadField5(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 6:
|
||||
if fieldTypeId == thrift.BOOL {
|
||||
if err = p.ReadField6(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 7:
|
||||
if fieldTypeId == thrift.STRING {
|
||||
if err = p.ReadField7(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
default:
|
||||
if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadFieldEnd(); err != nil {
|
||||
goto ReadFieldEndError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadStructEnd(); err != nil {
|
||||
goto ReadStructEndError
|
||||
}
|
||||
|
||||
return nil
|
||||
ReadStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
|
||||
ReadFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
|
||||
ReadFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_DocTableColumn[fieldId]), err)
|
||||
SkipFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
||||
|
||||
ReadFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err)
|
||||
ReadStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *DocTableColumn) ReadField1(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field int64
|
||||
if v, err := iprot.ReadI64(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = v
|
||||
}
|
||||
p.ID = _field
|
||||
return nil
|
||||
}
|
||||
func (p *DocTableColumn) ReadField2(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field string
|
||||
if v, err := iprot.ReadString(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = v
|
||||
}
|
||||
p.ColumnName = _field
|
||||
return nil
|
||||
}
|
||||
func (p *DocTableColumn) ReadField3(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field bool
|
||||
if v, err := iprot.ReadBool(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = v
|
||||
}
|
||||
p.IsSemantic = _field
|
||||
return nil
|
||||
}
|
||||
func (p *DocTableColumn) ReadField4(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field int64
|
||||
if v, err := iprot.ReadI64(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = v
|
||||
}
|
||||
p.Sequence = _field
|
||||
return nil
|
||||
}
|
||||
func (p *DocTableColumn) ReadField5(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field *ColumnType
|
||||
if v, err := iprot.ReadI32(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
tmp := ColumnType(v)
|
||||
_field = &tmp
|
||||
}
|
||||
p.ColumnType = _field
|
||||
return nil
|
||||
}
|
||||
func (p *DocTableColumn) ReadField6(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field *bool
|
||||
if v, err := iprot.ReadBool(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = &v
|
||||
}
|
||||
p.ContainsEmptyValue = _field
|
||||
return nil
|
||||
}
|
||||
func (p *DocTableColumn) ReadField7(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field *string
|
||||
if v, err := iprot.ReadString(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = &v
|
||||
}
|
||||
p.Desc = _field
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *DocTableColumn) Write(oprot thrift.TProtocol) (err error) {
|
||||
var fieldId int16
|
||||
if err = oprot.WriteStructBegin("DocTableColumn"); err != nil {
|
||||
goto WriteStructBeginError
|
||||
}
|
||||
if p != nil {
|
||||
if err = p.writeField1(oprot); err != nil {
|
||||
fieldId = 1
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField2(oprot); err != nil {
|
||||
fieldId = 2
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField3(oprot); err != nil {
|
||||
fieldId = 3
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField4(oprot); err != nil {
|
||||
fieldId = 4
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField5(oprot); err != nil {
|
||||
fieldId = 5
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField6(oprot); err != nil {
|
||||
fieldId = 6
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField7(oprot); err != nil {
|
||||
fieldId = 7
|
||||
goto WriteFieldError
|
||||
}
|
||||
}
|
||||
if err = oprot.WriteFieldStop(); err != nil {
|
||||
goto WriteFieldStopError
|
||||
}
|
||||
if err = oprot.WriteStructEnd(); err != nil {
|
||||
goto WriteStructEndError
|
||||
}
|
||||
return nil
|
||||
WriteStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
||||
WriteFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
|
||||
WriteFieldStopError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
|
||||
WriteStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *DocTableColumn) writeField1(oprot thrift.TProtocol) (err error) {
|
||||
if err = oprot.WriteFieldBegin("id", thrift.I64, 1); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteI64(p.ID); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err)
|
||||
}
|
||||
func (p *DocTableColumn) writeField2(oprot thrift.TProtocol) (err error) {
|
||||
if err = oprot.WriteFieldBegin("column_name", thrift.STRING, 2); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteString(p.ColumnName); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 2 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 2 end error: ", p), err)
|
||||
}
|
||||
func (p *DocTableColumn) writeField3(oprot thrift.TProtocol) (err error) {
|
||||
if err = oprot.WriteFieldBegin("is_semantic", thrift.BOOL, 3); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteBool(p.IsSemantic); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
|
||||
}
|
||||
func (p *DocTableColumn) writeField4(oprot thrift.TProtocol) (err error) {
|
||||
if err = oprot.WriteFieldBegin("sequence", thrift.I64, 4); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteI64(p.Sequence); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 4 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
|
||||
}
|
||||
func (p *DocTableColumn) writeField5(oprot thrift.TProtocol) (err error) {
|
||||
if p.IsSetColumnType() {
|
||||
if err = oprot.WriteFieldBegin("column_type", thrift.I32, 5); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteI32(int32(*p.ColumnType)); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 5 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
|
||||
}
|
||||
func (p *DocTableColumn) writeField6(oprot thrift.TProtocol) (err error) {
|
||||
if p.IsSetContainsEmptyValue() {
|
||||
if err = oprot.WriteFieldBegin("contains_empty_value", thrift.BOOL, 6); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteBool(*p.ContainsEmptyValue); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 6 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 6 end error: ", p), err)
|
||||
}
|
||||
func (p *DocTableColumn) writeField7(oprot thrift.TProtocol) (err error) {
|
||||
if p.IsSetDesc() {
|
||||
if err = oprot.WriteFieldBegin("desc", thrift.STRING, 7); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteString(*p.Desc); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 7 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 7 end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *DocTableColumn) String() string {
|
||||
if p == nil {
|
||||
return "<nil>"
|
||||
}
|
||||
return fmt.Sprintf("DocTableColumn(%+v)", *p)
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,6 +1,6 @@
|
|||
// Code generated by thriftgo (0.4.1). DO NOT EDIT.
|
||||
|
||||
package dataset
|
||||
package knowledge
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
|
|
@ -5958,3 +5958,825 @@ func (p *GetIconResponse) String() string {
|
|||
return fmt.Sprintf("GetIconResponse(%+v)", *p)
|
||||
|
||||
}
|
||||
|
||||
type GetModeConfigRequest struct {
|
||||
// bot id
|
||||
BotID int64 `thrift:"bot_id,1,required" form:"bot_id,required" json:"bot_id,required" query:"bot_id,required"`
|
||||
// line of business id
|
||||
ConnectorID *int64 `thrift:"connector_id,2,optional" form:"connector_id" json:"connector_id,omitempty" query:"connector_id"`
|
||||
// line of business user id
|
||||
ConnectorUID *string `thrift:"connector_uid,3,optional" form:"connector_uid" json:"connector_uid,omitempty" query:"connector_uid"`
|
||||
Base *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
|
||||
}
|
||||
|
||||
func NewGetModeConfigRequest() *GetModeConfigRequest {
|
||||
return &GetModeConfigRequest{}
|
||||
}
|
||||
|
||||
func (p *GetModeConfigRequest) InitDefault() {
|
||||
}
|
||||
|
||||
func (p *GetModeConfigRequest) GetBotID() (v int64) {
|
||||
return p.BotID
|
||||
}
|
||||
|
||||
var GetModeConfigRequest_ConnectorID_DEFAULT int64
|
||||
|
||||
func (p *GetModeConfigRequest) GetConnectorID() (v int64) {
|
||||
if !p.IsSetConnectorID() {
|
||||
return GetModeConfigRequest_ConnectorID_DEFAULT
|
||||
}
|
||||
return *p.ConnectorID
|
||||
}
|
||||
|
||||
var GetModeConfigRequest_ConnectorUID_DEFAULT string
|
||||
|
||||
func (p *GetModeConfigRequest) GetConnectorUID() (v string) {
|
||||
if !p.IsSetConnectorUID() {
|
||||
return GetModeConfigRequest_ConnectorUID_DEFAULT
|
||||
}
|
||||
return *p.ConnectorUID
|
||||
}
|
||||
|
||||
var GetModeConfigRequest_Base_DEFAULT *base.Base
|
||||
|
||||
func (p *GetModeConfigRequest) GetBase() (v *base.Base) {
|
||||
if !p.IsSetBase() {
|
||||
return GetModeConfigRequest_Base_DEFAULT
|
||||
}
|
||||
return p.Base
|
||||
}
|
||||
|
||||
var fieldIDToName_GetModeConfigRequest = map[int16]string{
|
||||
1: "bot_id",
|
||||
2: "connector_id",
|
||||
3: "connector_uid",
|
||||
255: "Base",
|
||||
}
|
||||
|
||||
func (p *GetModeConfigRequest) IsSetConnectorID() bool {
|
||||
return p.ConnectorID != nil
|
||||
}
|
||||
|
||||
func (p *GetModeConfigRequest) IsSetConnectorUID() bool {
|
||||
return p.ConnectorUID != nil
|
||||
}
|
||||
|
||||
func (p *GetModeConfigRequest) IsSetBase() bool {
|
||||
return p.Base != nil
|
||||
}
|
||||
|
||||
func (p *GetModeConfigRequest) Read(iprot thrift.TProtocol) (err error) {
|
||||
var fieldTypeId thrift.TType
|
||||
var fieldId int16
|
||||
var issetBotID bool = false
|
||||
|
||||
if _, err = iprot.ReadStructBegin(); err != nil {
|
||||
goto ReadStructBeginError
|
||||
}
|
||||
|
||||
for {
|
||||
_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
|
||||
if err != nil {
|
||||
goto ReadFieldBeginError
|
||||
}
|
||||
if fieldTypeId == thrift.STOP {
|
||||
break
|
||||
}
|
||||
|
||||
switch fieldId {
|
||||
case 1:
|
||||
if fieldTypeId == thrift.I64 {
|
||||
if err = p.ReadField1(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
issetBotID = true
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 2:
|
||||
if fieldTypeId == thrift.I64 {
|
||||
if err = p.ReadField2(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 3:
|
||||
if fieldTypeId == thrift.STRING {
|
||||
if err = p.ReadField3(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 255:
|
||||
if fieldTypeId == thrift.STRUCT {
|
||||
if err = p.ReadField255(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
default:
|
||||
if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadFieldEnd(); err != nil {
|
||||
goto ReadFieldEndError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadStructEnd(); err != nil {
|
||||
goto ReadStructEndError
|
||||
}
|
||||
|
||||
if !issetBotID {
|
||||
fieldId = 1
|
||||
goto RequiredFieldNotSetError
|
||||
}
|
||||
return nil
|
||||
ReadStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
|
||||
ReadFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
|
||||
ReadFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_GetModeConfigRequest[fieldId]), err)
|
||||
SkipFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
||||
|
||||
ReadFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err)
|
||||
ReadStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
||||
RequiredFieldNotSetError:
|
||||
return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("required field %s is not set", fieldIDToName_GetModeConfigRequest[fieldId]))
|
||||
}
|
||||
|
||||
func (p *GetModeConfigRequest) ReadField1(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field int64
|
||||
if v, err := iprot.ReadI64(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = v
|
||||
}
|
||||
p.BotID = _field
|
||||
return nil
|
||||
}
|
||||
func (p *GetModeConfigRequest) ReadField2(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field *int64
|
||||
if v, err := iprot.ReadI64(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = &v
|
||||
}
|
||||
p.ConnectorID = _field
|
||||
return nil
|
||||
}
|
||||
func (p *GetModeConfigRequest) ReadField3(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field *string
|
||||
if v, err := iprot.ReadString(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = &v
|
||||
}
|
||||
p.ConnectorUID = _field
|
||||
return nil
|
||||
}
|
||||
func (p *GetModeConfigRequest) ReadField255(iprot thrift.TProtocol) error {
|
||||
_field := base.NewBase()
|
||||
if err := _field.Read(iprot); err != nil {
|
||||
return err
|
||||
}
|
||||
p.Base = _field
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *GetModeConfigRequest) Write(oprot thrift.TProtocol) (err error) {
|
||||
var fieldId int16
|
||||
if err = oprot.WriteStructBegin("GetModeConfigRequest"); err != nil {
|
||||
goto WriteStructBeginError
|
||||
}
|
||||
if p != nil {
|
||||
if err = p.writeField1(oprot); err != nil {
|
||||
fieldId = 1
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField2(oprot); err != nil {
|
||||
fieldId = 2
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField3(oprot); err != nil {
|
||||
fieldId = 3
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField255(oprot); err != nil {
|
||||
fieldId = 255
|
||||
goto WriteFieldError
|
||||
}
|
||||
}
|
||||
if err = oprot.WriteFieldStop(); err != nil {
|
||||
goto WriteFieldStopError
|
||||
}
|
||||
if err = oprot.WriteStructEnd(); err != nil {
|
||||
goto WriteStructEndError
|
||||
}
|
||||
return nil
|
||||
WriteStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
||||
WriteFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
|
||||
WriteFieldStopError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
|
||||
WriteStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *GetModeConfigRequest) writeField1(oprot thrift.TProtocol) (err error) {
|
||||
if err = oprot.WriteFieldBegin("bot_id", thrift.I64, 1); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteI64(p.BotID); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err)
|
||||
}
|
||||
func (p *GetModeConfigRequest) writeField2(oprot thrift.TProtocol) (err error) {
|
||||
if p.IsSetConnectorID() {
|
||||
if err = oprot.WriteFieldBegin("connector_id", thrift.I64, 2); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteI64(*p.ConnectorID); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 2 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 2 end error: ", p), err)
|
||||
}
|
||||
func (p *GetModeConfigRequest) writeField3(oprot thrift.TProtocol) (err error) {
|
||||
if p.IsSetConnectorUID() {
|
||||
if err = oprot.WriteFieldBegin("connector_uid", thrift.STRING, 3); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteString(*p.ConnectorUID); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
|
||||
}
|
||||
func (p *GetModeConfigRequest) writeField255(oprot thrift.TProtocol) (err error) {
|
||||
if p.IsSetBase() {
|
||||
if err = oprot.WriteFieldBegin("Base", thrift.STRUCT, 255); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := p.Base.Write(oprot); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 255 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *GetModeConfigRequest) String() string {
|
||||
if p == nil {
|
||||
return "<nil>"
|
||||
}
|
||||
return fmt.Sprintf("GetModeConfigRequest(%+v)", *p)
|
||||
|
||||
}
|
||||
|
||||
type GetModeConfigResponse struct {
|
||||
Code int32 `thrift:"code,1" form:"code" json:"code" query:"code"`
|
||||
Msg string `thrift:"msg,2" form:"msg" json:"msg" query:"msg"`
|
||||
Mode string `thrift:"mode,3" form:"mode" json:"mode" query:"mode"`
|
||||
BotID int64 `thrift:"bot_id,4" form:"bot_id" json:"bot_id" query:"bot_id"`
|
||||
MaxTableNum int64 `thrift:"max_table_num,5" form:"max_table_num" json:"max_table_num" query:"max_table_num"`
|
||||
MaxColumnNum int64 `thrift:"max_column_num,6" form:"max_column_num" json:"max_column_num" query:"max_column_num"`
|
||||
MaxCapacityKb int64 `thrift:"max_capacity_kb,7" form:"max_capacity_kb" json:"max_capacity_kb" query:"max_capacity_kb"`
|
||||
MaxRowNum int64 `thrift:"max_row_num,8" form:"max_row_num" json:"max_row_num" query:"max_row_num"`
|
||||
BaseResp *base.BaseResp `thrift:"BaseResp,255,optional" form:"BaseResp" json:"BaseResp,omitempty" query:"BaseResp"`
|
||||
}
|
||||
|
||||
func NewGetModeConfigResponse() *GetModeConfigResponse {
|
||||
return &GetModeConfigResponse{}
|
||||
}
|
||||
|
||||
func (p *GetModeConfigResponse) InitDefault() {
|
||||
}
|
||||
|
||||
func (p *GetModeConfigResponse) GetCode() (v int32) {
|
||||
return p.Code
|
||||
}
|
||||
|
||||
func (p *GetModeConfigResponse) GetMsg() (v string) {
|
||||
return p.Msg
|
||||
}
|
||||
|
||||
func (p *GetModeConfigResponse) GetMode() (v string) {
|
||||
return p.Mode
|
||||
}
|
||||
|
||||
func (p *GetModeConfigResponse) GetBotID() (v int64) {
|
||||
return p.BotID
|
||||
}
|
||||
|
||||
func (p *GetModeConfigResponse) GetMaxTableNum() (v int64) {
|
||||
return p.MaxTableNum
|
||||
}
|
||||
|
||||
func (p *GetModeConfigResponse) GetMaxColumnNum() (v int64) {
|
||||
return p.MaxColumnNum
|
||||
}
|
||||
|
||||
func (p *GetModeConfigResponse) GetMaxCapacityKb() (v int64) {
|
||||
return p.MaxCapacityKb
|
||||
}
|
||||
|
||||
func (p *GetModeConfigResponse) GetMaxRowNum() (v int64) {
|
||||
return p.MaxRowNum
|
||||
}
|
||||
|
||||
var GetModeConfigResponse_BaseResp_DEFAULT *base.BaseResp
|
||||
|
||||
func (p *GetModeConfigResponse) GetBaseResp() (v *base.BaseResp) {
|
||||
if !p.IsSetBaseResp() {
|
||||
return GetModeConfigResponse_BaseResp_DEFAULT
|
||||
}
|
||||
return p.BaseResp
|
||||
}
|
||||
|
||||
var fieldIDToName_GetModeConfigResponse = map[int16]string{
|
||||
1: "code",
|
||||
2: "msg",
|
||||
3: "mode",
|
||||
4: "bot_id",
|
||||
5: "max_table_num",
|
||||
6: "max_column_num",
|
||||
7: "max_capacity_kb",
|
||||
8: "max_row_num",
|
||||
255: "BaseResp",
|
||||
}
|
||||
|
||||
func (p *GetModeConfigResponse) IsSetBaseResp() bool {
|
||||
return p.BaseResp != nil
|
||||
}
|
||||
|
||||
func (p *GetModeConfigResponse) Read(iprot thrift.TProtocol) (err error) {
|
||||
var fieldTypeId thrift.TType
|
||||
var fieldId int16
|
||||
|
||||
if _, err = iprot.ReadStructBegin(); err != nil {
|
||||
goto ReadStructBeginError
|
||||
}
|
||||
|
||||
for {
|
||||
_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
|
||||
if err != nil {
|
||||
goto ReadFieldBeginError
|
||||
}
|
||||
if fieldTypeId == thrift.STOP {
|
||||
break
|
||||
}
|
||||
|
||||
switch fieldId {
|
||||
case 1:
|
||||
if fieldTypeId == thrift.I32 {
|
||||
if err = p.ReadField1(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 2:
|
||||
if fieldTypeId == thrift.STRING {
|
||||
if err = p.ReadField2(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 3:
|
||||
if fieldTypeId == thrift.STRING {
|
||||
if err = p.ReadField3(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 4:
|
||||
if fieldTypeId == thrift.I64 {
|
||||
if err = p.ReadField4(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 5:
|
||||
if fieldTypeId == thrift.I64 {
|
||||
if err = p.ReadField5(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 6:
|
||||
if fieldTypeId == thrift.I64 {
|
||||
if err = p.ReadField6(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 7:
|
||||
if fieldTypeId == thrift.I64 {
|
||||
if err = p.ReadField7(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 8:
|
||||
if fieldTypeId == thrift.I64 {
|
||||
if err = p.ReadField8(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 255:
|
||||
if fieldTypeId == thrift.STRUCT {
|
||||
if err = p.ReadField255(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
default:
|
||||
if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadFieldEnd(); err != nil {
|
||||
goto ReadFieldEndError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadStructEnd(); err != nil {
|
||||
goto ReadStructEndError
|
||||
}
|
||||
|
||||
return nil
|
||||
ReadStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
|
||||
ReadFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
|
||||
ReadFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_GetModeConfigResponse[fieldId]), err)
|
||||
SkipFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
||||
|
||||
ReadFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err)
|
||||
ReadStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *GetModeConfigResponse) ReadField1(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field int32
|
||||
if v, err := iprot.ReadI32(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = v
|
||||
}
|
||||
p.Code = _field
|
||||
return nil
|
||||
}
|
||||
func (p *GetModeConfigResponse) ReadField2(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field string
|
||||
if v, err := iprot.ReadString(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = v
|
||||
}
|
||||
p.Msg = _field
|
||||
return nil
|
||||
}
|
||||
func (p *GetModeConfigResponse) ReadField3(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field string
|
||||
if v, err := iprot.ReadString(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = v
|
||||
}
|
||||
p.Mode = _field
|
||||
return nil
|
||||
}
|
||||
func (p *GetModeConfigResponse) ReadField4(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field int64
|
||||
if v, err := iprot.ReadI64(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = v
|
||||
}
|
||||
p.BotID = _field
|
||||
return nil
|
||||
}
|
||||
func (p *GetModeConfigResponse) ReadField5(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field int64
|
||||
if v, err := iprot.ReadI64(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = v
|
||||
}
|
||||
p.MaxTableNum = _field
|
||||
return nil
|
||||
}
|
||||
func (p *GetModeConfigResponse) ReadField6(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field int64
|
||||
if v, err := iprot.ReadI64(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = v
|
||||
}
|
||||
p.MaxColumnNum = _field
|
||||
return nil
|
||||
}
|
||||
func (p *GetModeConfigResponse) ReadField7(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field int64
|
||||
if v, err := iprot.ReadI64(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = v
|
||||
}
|
||||
p.MaxCapacityKb = _field
|
||||
return nil
|
||||
}
|
||||
func (p *GetModeConfigResponse) ReadField8(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field int64
|
||||
if v, err := iprot.ReadI64(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = v
|
||||
}
|
||||
p.MaxRowNum = _field
|
||||
return nil
|
||||
}
|
||||
func (p *GetModeConfigResponse) ReadField255(iprot thrift.TProtocol) error {
|
||||
_field := base.NewBaseResp()
|
||||
if err := _field.Read(iprot); err != nil {
|
||||
return err
|
||||
}
|
||||
p.BaseResp = _field
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *GetModeConfigResponse) Write(oprot thrift.TProtocol) (err error) {
|
||||
var fieldId int16
|
||||
if err = oprot.WriteStructBegin("GetModeConfigResponse"); err != nil {
|
||||
goto WriteStructBeginError
|
||||
}
|
||||
if p != nil {
|
||||
if err = p.writeField1(oprot); err != nil {
|
||||
fieldId = 1
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField2(oprot); err != nil {
|
||||
fieldId = 2
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField3(oprot); err != nil {
|
||||
fieldId = 3
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField4(oprot); err != nil {
|
||||
fieldId = 4
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField5(oprot); err != nil {
|
||||
fieldId = 5
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField6(oprot); err != nil {
|
||||
fieldId = 6
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField7(oprot); err != nil {
|
||||
fieldId = 7
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField8(oprot); err != nil {
|
||||
fieldId = 8
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField255(oprot); err != nil {
|
||||
fieldId = 255
|
||||
goto WriteFieldError
|
||||
}
|
||||
}
|
||||
if err = oprot.WriteFieldStop(); err != nil {
|
||||
goto WriteFieldStopError
|
||||
}
|
||||
if err = oprot.WriteStructEnd(); err != nil {
|
||||
goto WriteStructEndError
|
||||
}
|
||||
return nil
|
||||
WriteStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
||||
WriteFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
|
||||
WriteFieldStopError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
|
||||
WriteStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *GetModeConfigResponse) writeField1(oprot thrift.TProtocol) (err error) {
|
||||
if err = oprot.WriteFieldBegin("code", thrift.I32, 1); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteI32(p.Code); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err)
|
||||
}
|
||||
func (p *GetModeConfigResponse) writeField2(oprot thrift.TProtocol) (err error) {
|
||||
if err = oprot.WriteFieldBegin("msg", thrift.STRING, 2); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteString(p.Msg); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 2 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 2 end error: ", p), err)
|
||||
}
|
||||
func (p *GetModeConfigResponse) writeField3(oprot thrift.TProtocol) (err error) {
|
||||
if err = oprot.WriteFieldBegin("mode", thrift.STRING, 3); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteString(p.Mode); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
|
||||
}
|
||||
func (p *GetModeConfigResponse) writeField4(oprot thrift.TProtocol) (err error) {
|
||||
if err = oprot.WriteFieldBegin("bot_id", thrift.I64, 4); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteI64(p.BotID); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 4 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
|
||||
}
|
||||
func (p *GetModeConfigResponse) writeField5(oprot thrift.TProtocol) (err error) {
|
||||
if err = oprot.WriteFieldBegin("max_table_num", thrift.I64, 5); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteI64(p.MaxTableNum); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 5 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
|
||||
}
|
||||
func (p *GetModeConfigResponse) writeField6(oprot thrift.TProtocol) (err error) {
|
||||
if err = oprot.WriteFieldBegin("max_column_num", thrift.I64, 6); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteI64(p.MaxColumnNum); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 6 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 6 end error: ", p), err)
|
||||
}
|
||||
func (p *GetModeConfigResponse) writeField7(oprot thrift.TProtocol) (err error) {
|
||||
if err = oprot.WriteFieldBegin("max_capacity_kb", thrift.I64, 7); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteI64(p.MaxCapacityKb); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 7 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 7 end error: ", p), err)
|
||||
}
|
||||
func (p *GetModeConfigResponse) writeField8(oprot thrift.TProtocol) (err error) {
|
||||
if err = oprot.WriteFieldBegin("max_row_num", thrift.I64, 8); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteI64(p.MaxRowNum); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 8 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 8 end error: ", p), err)
|
||||
}
|
||||
func (p *GetModeConfigResponse) writeField255(oprot thrift.TProtocol) (err error) {
|
||||
if p.IsSetBaseResp() {
|
||||
if err = oprot.WriteFieldBegin("BaseResp", thrift.STRUCT, 255); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := p.BaseResp.Write(oprot); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 255 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *GetModeConfigResponse) String() string {
|
||||
if p == nil {
|
||||
return "<nil>"
|
||||
}
|
||||
return fmt.Sprintf("GetModeConfigResponse(%+v)", *p)
|
||||
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
// Code generated by thriftgo (0.4.1). DO NOT EDIT.
|
||||
|
||||
package dataset
|
||||
package knowledge
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
|
@ -21,6 +21,8 @@ type DatasetService interface {
|
|||
DeleteDataset(ctx context.Context, req *DeleteDatasetRequest) (r *DeleteDatasetResponse, err error)
|
||||
|
||||
UpdateDataset(ctx context.Context, req *UpdateDatasetRequest) (r *UpdateDatasetResponse, err error)
|
||||
|
||||
GetModeConfig(ctx context.Context, req *GetModeConfigRequest) (r *GetModeConfigResponse, err error)
|
||||
// Document related
|
||||
CreateDocument(ctx context.Context, req *CreateDocumentRequest) (r *CreateDocumentResponse, err error)
|
||||
|
||||
|
|
@ -45,6 +47,8 @@ type DatasetService interface {
|
|||
GetTableSchema(ctx context.Context, req *GetTableSchemaRequest) (r *GetTableSchemaResponse, err error)
|
||||
|
||||
ValidateTableSchema(ctx context.Context, req *ValidateTableSchemaRequest) (r *ValidateTableSchemaResponse, err error)
|
||||
|
||||
GetDocumentTableInfo(ctx context.Context, req *GetDocumentTableInfoRequest) (r *GetDocumentTableInfoResponse, err error)
|
||||
// Slice related
|
||||
DeleteSlice(ctx context.Context, req *DeleteSliceRequest) (r *DeleteSliceResponse, err error)
|
||||
|
||||
|
|
@ -141,6 +145,15 @@ func (p *DatasetServiceClient) UpdateDataset(ctx context.Context, req *UpdateDat
|
|||
}
|
||||
return _result.GetSuccess(), nil
|
||||
}
|
||||
func (p *DatasetServiceClient) GetModeConfig(ctx context.Context, req *GetModeConfigRequest) (r *GetModeConfigResponse, err error) {
|
||||
var _args DatasetServiceGetModeConfigArgs
|
||||
_args.Req = req
|
||||
var _result DatasetServiceGetModeConfigResult
|
||||
if err = p.Client_().Call(ctx, "GetModeConfig", &_args, &_result); err != nil {
|
||||
return
|
||||
}
|
||||
return _result.GetSuccess(), nil
|
||||
}
|
||||
func (p *DatasetServiceClient) CreateDocument(ctx context.Context, req *CreateDocumentRequest) (r *CreateDocumentResponse, err error) {
|
||||
var _args DatasetServiceCreateDocumentArgs
|
||||
_args.Req = req
|
||||
|
|
@ -249,6 +262,15 @@ func (p *DatasetServiceClient) ValidateTableSchema(ctx context.Context, req *Val
|
|||
}
|
||||
return _result.GetSuccess(), nil
|
||||
}
|
||||
func (p *DatasetServiceClient) GetDocumentTableInfo(ctx context.Context, req *GetDocumentTableInfoRequest) (r *GetDocumentTableInfoResponse, err error) {
|
||||
var _args DatasetServiceGetDocumentTableInfoArgs
|
||||
_args.Req = req
|
||||
var _result DatasetServiceGetDocumentTableInfoResult
|
||||
if err = p.Client_().Call(ctx, "GetDocumentTableInfo", &_args, &_result); err != nil {
|
||||
return
|
||||
}
|
||||
return _result.GetSuccess(), nil
|
||||
}
|
||||
func (p *DatasetServiceClient) DeleteSlice(ctx context.Context, req *DeleteSliceRequest) (r *DeleteSliceResponse, err error) {
|
||||
var _args DatasetServiceDeleteSliceArgs
|
||||
_args.Req = req
|
||||
|
|
@ -339,6 +361,7 @@ func NewDatasetServiceProcessor(handler DatasetService) *DatasetServiceProcessor
|
|||
self.AddToProcessorMap("ListDataset", &datasetServiceProcessorListDataset{handler: handler})
|
||||
self.AddToProcessorMap("DeleteDataset", &datasetServiceProcessorDeleteDataset{handler: handler})
|
||||
self.AddToProcessorMap("UpdateDataset", &datasetServiceProcessorUpdateDataset{handler: handler})
|
||||
self.AddToProcessorMap("GetModeConfig", &datasetServiceProcessorGetModeConfig{handler: handler})
|
||||
self.AddToProcessorMap("CreateDocument", &datasetServiceProcessorCreateDocument{handler: handler})
|
||||
self.AddToProcessorMap("ListDocument", &datasetServiceProcessorListDocument{handler: handler})
|
||||
self.AddToProcessorMap("DeleteDocument", &datasetServiceProcessorDeleteDocument{handler: handler})
|
||||
|
|
@ -351,6 +374,7 @@ func NewDatasetServiceProcessor(handler DatasetService) *DatasetServiceProcessor
|
|||
self.AddToProcessorMap("ExtractPhotoCaption", &datasetServiceProcessorExtractPhotoCaption{handler: handler})
|
||||
self.AddToProcessorMap("GetTableSchema", &datasetServiceProcessorGetTableSchema{handler: handler})
|
||||
self.AddToProcessorMap("ValidateTableSchema", &datasetServiceProcessorValidateTableSchema{handler: handler})
|
||||
self.AddToProcessorMap("GetDocumentTableInfo", &datasetServiceProcessorGetDocumentTableInfo{handler: handler})
|
||||
self.AddToProcessorMap("DeleteSlice", &datasetServiceProcessorDeleteSlice{handler: handler})
|
||||
self.AddToProcessorMap("CreateSlice", &datasetServiceProcessorCreateSlice{handler: handler})
|
||||
self.AddToProcessorMap("UpdateSlice", &datasetServiceProcessorUpdateSlice{handler: handler})
|
||||
|
|
@ -666,6 +690,54 @@ func (p *datasetServiceProcessorUpdateDataset) Process(ctx context.Context, seqI
|
|||
return true, err
|
||||
}
|
||||
|
||||
type datasetServiceProcessorGetModeConfig struct {
|
||||
handler DatasetService
|
||||
}
|
||||
|
||||
func (p *datasetServiceProcessorGetModeConfig) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
|
||||
args := DatasetServiceGetModeConfigArgs{}
|
||||
if err = args.Read(iprot); err != nil {
|
||||
iprot.ReadMessageEnd()
|
||||
x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
|
||||
oprot.WriteMessageBegin("GetModeConfig", thrift.EXCEPTION, seqId)
|
||||
x.Write(oprot)
|
||||
oprot.WriteMessageEnd()
|
||||
oprot.Flush(ctx)
|
||||
return false, err
|
||||
}
|
||||
|
||||
iprot.ReadMessageEnd()
|
||||
var err2 error
|
||||
result := DatasetServiceGetModeConfigResult{}
|
||||
var retval *GetModeConfigResponse
|
||||
if retval, err2 = p.handler.GetModeConfig(ctx, args.Req); err2 != nil {
|
||||
x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing GetModeConfig: "+err2.Error())
|
||||
oprot.WriteMessageBegin("GetModeConfig", thrift.EXCEPTION, seqId)
|
||||
x.Write(oprot)
|
||||
oprot.WriteMessageEnd()
|
||||
oprot.Flush(ctx)
|
||||
return true, err2
|
||||
} else {
|
||||
result.Success = retval
|
||||
}
|
||||
if err2 = oprot.WriteMessageBegin("GetModeConfig", thrift.REPLY, seqId); err2 != nil {
|
||||
err = err2
|
||||
}
|
||||
if err2 = result.Write(oprot); err == nil && err2 != nil {
|
||||
err = err2
|
||||
}
|
||||
if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
|
||||
err = err2
|
||||
}
|
||||
if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
|
||||
err = err2
|
||||
}
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
return true, err
|
||||
}
|
||||
|
||||
type datasetServiceProcessorCreateDocument struct {
|
||||
handler DatasetService
|
||||
}
|
||||
|
|
@ -1242,6 +1314,54 @@ func (p *datasetServiceProcessorValidateTableSchema) Process(ctx context.Context
|
|||
return true, err
|
||||
}
|
||||
|
||||
type datasetServiceProcessorGetDocumentTableInfo struct {
|
||||
handler DatasetService
|
||||
}
|
||||
|
||||
func (p *datasetServiceProcessorGetDocumentTableInfo) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
|
||||
args := DatasetServiceGetDocumentTableInfoArgs{}
|
||||
if err = args.Read(iprot); err != nil {
|
||||
iprot.ReadMessageEnd()
|
||||
x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
|
||||
oprot.WriteMessageBegin("GetDocumentTableInfo", thrift.EXCEPTION, seqId)
|
||||
x.Write(oprot)
|
||||
oprot.WriteMessageEnd()
|
||||
oprot.Flush(ctx)
|
||||
return false, err
|
||||
}
|
||||
|
||||
iprot.ReadMessageEnd()
|
||||
var err2 error
|
||||
result := DatasetServiceGetDocumentTableInfoResult{}
|
||||
var retval *GetDocumentTableInfoResponse
|
||||
if retval, err2 = p.handler.GetDocumentTableInfo(ctx, args.Req); err2 != nil {
|
||||
x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing GetDocumentTableInfo: "+err2.Error())
|
||||
oprot.WriteMessageBegin("GetDocumentTableInfo", thrift.EXCEPTION, seqId)
|
||||
x.Write(oprot)
|
||||
oprot.WriteMessageEnd()
|
||||
oprot.Flush(ctx)
|
||||
return true, err2
|
||||
} else {
|
||||
result.Success = retval
|
||||
}
|
||||
if err2 = oprot.WriteMessageBegin("GetDocumentTableInfo", thrift.REPLY, seqId); err2 != nil {
|
||||
err = err2
|
||||
}
|
||||
if err2 = result.Write(oprot); err == nil && err2 != nil {
|
||||
err = err2
|
||||
}
|
||||
if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
|
||||
err = err2
|
||||
}
|
||||
if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
|
||||
err = err2
|
||||
}
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
return true, err
|
||||
}
|
||||
|
||||
type datasetServiceProcessorDeleteSlice struct {
|
||||
handler DatasetService
|
||||
}
|
||||
|
|
@ -3330,6 +3450,298 @@ func (p *DatasetServiceUpdateDatasetResult) String() string {
|
|||
|
||||
}
|
||||
|
||||
type DatasetServiceGetModeConfigArgs struct {
|
||||
Req *GetModeConfigRequest `thrift:"req,1"`
|
||||
}
|
||||
|
||||
func NewDatasetServiceGetModeConfigArgs() *DatasetServiceGetModeConfigArgs {
|
||||
return &DatasetServiceGetModeConfigArgs{}
|
||||
}
|
||||
|
||||
func (p *DatasetServiceGetModeConfigArgs) InitDefault() {
|
||||
}
|
||||
|
||||
var DatasetServiceGetModeConfigArgs_Req_DEFAULT *GetModeConfigRequest
|
||||
|
||||
func (p *DatasetServiceGetModeConfigArgs) GetReq() (v *GetModeConfigRequest) {
|
||||
if !p.IsSetReq() {
|
||||
return DatasetServiceGetModeConfigArgs_Req_DEFAULT
|
||||
}
|
||||
return p.Req
|
||||
}
|
||||
|
||||
var fieldIDToName_DatasetServiceGetModeConfigArgs = map[int16]string{
|
||||
1: "req",
|
||||
}
|
||||
|
||||
func (p *DatasetServiceGetModeConfigArgs) IsSetReq() bool {
|
||||
return p.Req != nil
|
||||
}
|
||||
|
||||
func (p *DatasetServiceGetModeConfigArgs) Read(iprot thrift.TProtocol) (err error) {
|
||||
var fieldTypeId thrift.TType
|
||||
var fieldId int16
|
||||
|
||||
if _, err = iprot.ReadStructBegin(); err != nil {
|
||||
goto ReadStructBeginError
|
||||
}
|
||||
|
||||
for {
|
||||
_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
|
||||
if err != nil {
|
||||
goto ReadFieldBeginError
|
||||
}
|
||||
if fieldTypeId == thrift.STOP {
|
||||
break
|
||||
}
|
||||
|
||||
switch fieldId {
|
||||
case 1:
|
||||
if fieldTypeId == thrift.STRUCT {
|
||||
if err = p.ReadField1(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
default:
|
||||
if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadFieldEnd(); err != nil {
|
||||
goto ReadFieldEndError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadStructEnd(); err != nil {
|
||||
goto ReadStructEndError
|
||||
}
|
||||
|
||||
return nil
|
||||
ReadStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
|
||||
ReadFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
|
||||
ReadFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_DatasetServiceGetModeConfigArgs[fieldId]), err)
|
||||
SkipFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
||||
|
||||
ReadFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err)
|
||||
ReadStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *DatasetServiceGetModeConfigArgs) ReadField1(iprot thrift.TProtocol) error {
|
||||
_field := NewGetModeConfigRequest()
|
||||
if err := _field.Read(iprot); err != nil {
|
||||
return err
|
||||
}
|
||||
p.Req = _field
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *DatasetServiceGetModeConfigArgs) Write(oprot thrift.TProtocol) (err error) {
|
||||
var fieldId int16
|
||||
if err = oprot.WriteStructBegin("GetModeConfig_args"); err != nil {
|
||||
goto WriteStructBeginError
|
||||
}
|
||||
if p != nil {
|
||||
if err = p.writeField1(oprot); err != nil {
|
||||
fieldId = 1
|
||||
goto WriteFieldError
|
||||
}
|
||||
}
|
||||
if err = oprot.WriteFieldStop(); err != nil {
|
||||
goto WriteFieldStopError
|
||||
}
|
||||
if err = oprot.WriteStructEnd(); err != nil {
|
||||
goto WriteStructEndError
|
||||
}
|
||||
return nil
|
||||
WriteStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
||||
WriteFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
|
||||
WriteFieldStopError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
|
||||
WriteStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *DatasetServiceGetModeConfigArgs) writeField1(oprot thrift.TProtocol) (err error) {
|
||||
if err = oprot.WriteFieldBegin("req", thrift.STRUCT, 1); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := p.Req.Write(oprot); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *DatasetServiceGetModeConfigArgs) String() string {
|
||||
if p == nil {
|
||||
return "<nil>"
|
||||
}
|
||||
return fmt.Sprintf("DatasetServiceGetModeConfigArgs(%+v)", *p)
|
||||
|
||||
}
|
||||
|
||||
type DatasetServiceGetModeConfigResult struct {
|
||||
Success *GetModeConfigResponse `thrift:"success,0,optional"`
|
||||
}
|
||||
|
||||
func NewDatasetServiceGetModeConfigResult() *DatasetServiceGetModeConfigResult {
|
||||
return &DatasetServiceGetModeConfigResult{}
|
||||
}
|
||||
|
||||
func (p *DatasetServiceGetModeConfigResult) InitDefault() {
|
||||
}
|
||||
|
||||
var DatasetServiceGetModeConfigResult_Success_DEFAULT *GetModeConfigResponse
|
||||
|
||||
func (p *DatasetServiceGetModeConfigResult) GetSuccess() (v *GetModeConfigResponse) {
|
||||
if !p.IsSetSuccess() {
|
||||
return DatasetServiceGetModeConfigResult_Success_DEFAULT
|
||||
}
|
||||
return p.Success
|
||||
}
|
||||
|
||||
var fieldIDToName_DatasetServiceGetModeConfigResult = map[int16]string{
|
||||
0: "success",
|
||||
}
|
||||
|
||||
func (p *DatasetServiceGetModeConfigResult) IsSetSuccess() bool {
|
||||
return p.Success != nil
|
||||
}
|
||||
|
||||
func (p *DatasetServiceGetModeConfigResult) Read(iprot thrift.TProtocol) (err error) {
|
||||
var fieldTypeId thrift.TType
|
||||
var fieldId int16
|
||||
|
||||
if _, err = iprot.ReadStructBegin(); err != nil {
|
||||
goto ReadStructBeginError
|
||||
}
|
||||
|
||||
for {
|
||||
_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
|
||||
if err != nil {
|
||||
goto ReadFieldBeginError
|
||||
}
|
||||
if fieldTypeId == thrift.STOP {
|
||||
break
|
||||
}
|
||||
|
||||
switch fieldId {
|
||||
case 0:
|
||||
if fieldTypeId == thrift.STRUCT {
|
||||
if err = p.ReadField0(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
default:
|
||||
if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadFieldEnd(); err != nil {
|
||||
goto ReadFieldEndError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadStructEnd(); err != nil {
|
||||
goto ReadStructEndError
|
||||
}
|
||||
|
||||
return nil
|
||||
ReadStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
|
||||
ReadFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
|
||||
ReadFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_DatasetServiceGetModeConfigResult[fieldId]), err)
|
||||
SkipFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
||||
|
||||
ReadFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err)
|
||||
ReadStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *DatasetServiceGetModeConfigResult) ReadField0(iprot thrift.TProtocol) error {
|
||||
_field := NewGetModeConfigResponse()
|
||||
if err := _field.Read(iprot); err != nil {
|
||||
return err
|
||||
}
|
||||
p.Success = _field
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *DatasetServiceGetModeConfigResult) Write(oprot thrift.TProtocol) (err error) {
|
||||
var fieldId int16
|
||||
if err = oprot.WriteStructBegin("GetModeConfig_result"); err != nil {
|
||||
goto WriteStructBeginError
|
||||
}
|
||||
if p != nil {
|
||||
if err = p.writeField0(oprot); err != nil {
|
||||
fieldId = 0
|
||||
goto WriteFieldError
|
||||
}
|
||||
}
|
||||
if err = oprot.WriteFieldStop(); err != nil {
|
||||
goto WriteFieldStopError
|
||||
}
|
||||
if err = oprot.WriteStructEnd(); err != nil {
|
||||
goto WriteStructEndError
|
||||
}
|
||||
return nil
|
||||
WriteStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
||||
WriteFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
|
||||
WriteFieldStopError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
|
||||
WriteStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *DatasetServiceGetModeConfigResult) writeField0(oprot thrift.TProtocol) (err error) {
|
||||
if p.IsSetSuccess() {
|
||||
if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := p.Success.Write(oprot); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *DatasetServiceGetModeConfigResult) String() string {
|
||||
if p == nil {
|
||||
return "<nil>"
|
||||
}
|
||||
return fmt.Sprintf("DatasetServiceGetModeConfigResult(%+v)", *p)
|
||||
|
||||
}
|
||||
|
||||
type DatasetServiceCreateDocumentArgs struct {
|
||||
Req *CreateDocumentRequest `thrift:"req,1"`
|
||||
}
|
||||
|
|
@ -6834,6 +7246,298 @@ func (p *DatasetServiceValidateTableSchemaResult) String() string {
|
|||
|
||||
}
|
||||
|
||||
type DatasetServiceGetDocumentTableInfoArgs struct {
|
||||
Req *GetDocumentTableInfoRequest `thrift:"req,1"`
|
||||
}
|
||||
|
||||
func NewDatasetServiceGetDocumentTableInfoArgs() *DatasetServiceGetDocumentTableInfoArgs {
|
||||
return &DatasetServiceGetDocumentTableInfoArgs{}
|
||||
}
|
||||
|
||||
func (p *DatasetServiceGetDocumentTableInfoArgs) InitDefault() {
|
||||
}
|
||||
|
||||
var DatasetServiceGetDocumentTableInfoArgs_Req_DEFAULT *GetDocumentTableInfoRequest
|
||||
|
||||
func (p *DatasetServiceGetDocumentTableInfoArgs) GetReq() (v *GetDocumentTableInfoRequest) {
|
||||
if !p.IsSetReq() {
|
||||
return DatasetServiceGetDocumentTableInfoArgs_Req_DEFAULT
|
||||
}
|
||||
return p.Req
|
||||
}
|
||||
|
||||
var fieldIDToName_DatasetServiceGetDocumentTableInfoArgs = map[int16]string{
|
||||
1: "req",
|
||||
}
|
||||
|
||||
func (p *DatasetServiceGetDocumentTableInfoArgs) IsSetReq() bool {
|
||||
return p.Req != nil
|
||||
}
|
||||
|
||||
func (p *DatasetServiceGetDocumentTableInfoArgs) Read(iprot thrift.TProtocol) (err error) {
|
||||
var fieldTypeId thrift.TType
|
||||
var fieldId int16
|
||||
|
||||
if _, err = iprot.ReadStructBegin(); err != nil {
|
||||
goto ReadStructBeginError
|
||||
}
|
||||
|
||||
for {
|
||||
_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
|
||||
if err != nil {
|
||||
goto ReadFieldBeginError
|
||||
}
|
||||
if fieldTypeId == thrift.STOP {
|
||||
break
|
||||
}
|
||||
|
||||
switch fieldId {
|
||||
case 1:
|
||||
if fieldTypeId == thrift.STRUCT {
|
||||
if err = p.ReadField1(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
default:
|
||||
if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadFieldEnd(); err != nil {
|
||||
goto ReadFieldEndError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadStructEnd(); err != nil {
|
||||
goto ReadStructEndError
|
||||
}
|
||||
|
||||
return nil
|
||||
ReadStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
|
||||
ReadFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
|
||||
ReadFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_DatasetServiceGetDocumentTableInfoArgs[fieldId]), err)
|
||||
SkipFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
||||
|
||||
ReadFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err)
|
||||
ReadStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *DatasetServiceGetDocumentTableInfoArgs) ReadField1(iprot thrift.TProtocol) error {
|
||||
_field := NewGetDocumentTableInfoRequest()
|
||||
if err := _field.Read(iprot); err != nil {
|
||||
return err
|
||||
}
|
||||
p.Req = _field
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *DatasetServiceGetDocumentTableInfoArgs) Write(oprot thrift.TProtocol) (err error) {
|
||||
var fieldId int16
|
||||
if err = oprot.WriteStructBegin("GetDocumentTableInfo_args"); err != nil {
|
||||
goto WriteStructBeginError
|
||||
}
|
||||
if p != nil {
|
||||
if err = p.writeField1(oprot); err != nil {
|
||||
fieldId = 1
|
||||
goto WriteFieldError
|
||||
}
|
||||
}
|
||||
if err = oprot.WriteFieldStop(); err != nil {
|
||||
goto WriteFieldStopError
|
||||
}
|
||||
if err = oprot.WriteStructEnd(); err != nil {
|
||||
goto WriteStructEndError
|
||||
}
|
||||
return nil
|
||||
WriteStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
||||
WriteFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
|
||||
WriteFieldStopError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
|
||||
WriteStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *DatasetServiceGetDocumentTableInfoArgs) writeField1(oprot thrift.TProtocol) (err error) {
|
||||
if err = oprot.WriteFieldBegin("req", thrift.STRUCT, 1); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := p.Req.Write(oprot); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *DatasetServiceGetDocumentTableInfoArgs) String() string {
|
||||
if p == nil {
|
||||
return "<nil>"
|
||||
}
|
||||
return fmt.Sprintf("DatasetServiceGetDocumentTableInfoArgs(%+v)", *p)
|
||||
|
||||
}
|
||||
|
||||
type DatasetServiceGetDocumentTableInfoResult struct {
|
||||
Success *GetDocumentTableInfoResponse `thrift:"success,0,optional"`
|
||||
}
|
||||
|
||||
func NewDatasetServiceGetDocumentTableInfoResult() *DatasetServiceGetDocumentTableInfoResult {
|
||||
return &DatasetServiceGetDocumentTableInfoResult{}
|
||||
}
|
||||
|
||||
func (p *DatasetServiceGetDocumentTableInfoResult) InitDefault() {
|
||||
}
|
||||
|
||||
var DatasetServiceGetDocumentTableInfoResult_Success_DEFAULT *GetDocumentTableInfoResponse
|
||||
|
||||
func (p *DatasetServiceGetDocumentTableInfoResult) GetSuccess() (v *GetDocumentTableInfoResponse) {
|
||||
if !p.IsSetSuccess() {
|
||||
return DatasetServiceGetDocumentTableInfoResult_Success_DEFAULT
|
||||
}
|
||||
return p.Success
|
||||
}
|
||||
|
||||
var fieldIDToName_DatasetServiceGetDocumentTableInfoResult = map[int16]string{
|
||||
0: "success",
|
||||
}
|
||||
|
||||
func (p *DatasetServiceGetDocumentTableInfoResult) IsSetSuccess() bool {
|
||||
return p.Success != nil
|
||||
}
|
||||
|
||||
func (p *DatasetServiceGetDocumentTableInfoResult) Read(iprot thrift.TProtocol) (err error) {
|
||||
var fieldTypeId thrift.TType
|
||||
var fieldId int16
|
||||
|
||||
if _, err = iprot.ReadStructBegin(); err != nil {
|
||||
goto ReadStructBeginError
|
||||
}
|
||||
|
||||
for {
|
||||
_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
|
||||
if err != nil {
|
||||
goto ReadFieldBeginError
|
||||
}
|
||||
if fieldTypeId == thrift.STOP {
|
||||
break
|
||||
}
|
||||
|
||||
switch fieldId {
|
||||
case 0:
|
||||
if fieldTypeId == thrift.STRUCT {
|
||||
if err = p.ReadField0(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
default:
|
||||
if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadFieldEnd(); err != nil {
|
||||
goto ReadFieldEndError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadStructEnd(); err != nil {
|
||||
goto ReadStructEndError
|
||||
}
|
||||
|
||||
return nil
|
||||
ReadStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
|
||||
ReadFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
|
||||
ReadFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_DatasetServiceGetDocumentTableInfoResult[fieldId]), err)
|
||||
SkipFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
||||
|
||||
ReadFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err)
|
||||
ReadStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *DatasetServiceGetDocumentTableInfoResult) ReadField0(iprot thrift.TProtocol) error {
|
||||
_field := NewGetDocumentTableInfoResponse()
|
||||
if err := _field.Read(iprot); err != nil {
|
||||
return err
|
||||
}
|
||||
p.Success = _field
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *DatasetServiceGetDocumentTableInfoResult) Write(oprot thrift.TProtocol) (err error) {
|
||||
var fieldId int16
|
||||
if err = oprot.WriteStructBegin("GetDocumentTableInfo_result"); err != nil {
|
||||
goto WriteStructBeginError
|
||||
}
|
||||
if p != nil {
|
||||
if err = p.writeField0(oprot); err != nil {
|
||||
fieldId = 0
|
||||
goto WriteFieldError
|
||||
}
|
||||
}
|
||||
if err = oprot.WriteFieldStop(); err != nil {
|
||||
goto WriteFieldStopError
|
||||
}
|
||||
if err = oprot.WriteStructEnd(); err != nil {
|
||||
goto WriteStructEndError
|
||||
}
|
||||
return nil
|
||||
WriteStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
||||
WriteFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
|
||||
WriteFieldStopError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
|
||||
WriteStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *DatasetServiceGetDocumentTableInfoResult) writeField0(oprot thrift.TProtocol) (err error) {
|
||||
if p.IsSetSuccess() {
|
||||
if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := p.Success.Write(oprot); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *DatasetServiceGetDocumentTableInfoResult) String() string {
|
||||
if p == nil {
|
||||
return "<nil>"
|
||||
}
|
||||
return fmt.Sprintf("DatasetServiceGetDocumentTableInfoResult(%+v)", *p)
|
||||
|
||||
}
|
||||
|
||||
type DatasetServiceDeleteSliceArgs struct {
|
||||
Req *DeleteSliceRequest `thrift:"req,1"`
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
// Code generated by thriftgo (0.4.1). DO NOT EDIT.
|
||||
|
||||
package dataset
|
||||
package knowledge
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
// Code generated by thriftgo (0.4.1). DO NOT EDIT.
|
||||
|
||||
package dataset
|
||||
package knowledge
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
|
|
@ -6,8 +6,8 @@ import (
|
|||
"fmt"
|
||||
"github.com/apache/thrift/lib/go/thrift"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/base"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/project_memory"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/table"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/database/table"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/variable/project_memory"
|
||||
)
|
||||
|
||||
type KVItem struct {
|
||||
|
|
@ -1,15 +1,13 @@
|
|||
// Code generated by thriftgo (0.4.1). DO NOT EDIT.
|
||||
|
||||
package memory
|
||||
package variable
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/apache/thrift/lib/go/thrift"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/knowledge/document"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/kvmemory"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/project_memory"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/table"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/variable/kvmemory"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/variable/project_memory"
|
||||
)
|
||||
|
||||
type MemoryService interface {
|
||||
|
|
@ -27,10 +25,6 @@ type MemoryService interface {
|
|||
GetSysVariableConf(ctx context.Context, req *kvmemory.GetSysVariableConfRequest) (r *kvmemory.GetSysVariableConfResponse, err error)
|
||||
|
||||
SetKvMemory(ctx context.Context, req *kvmemory.SetKvMemoryReq) (r *kvmemory.SetKvMemoryResp, err error)
|
||||
// ---
|
||||
GetModeConfig(ctx context.Context, req *table.GetModeConfigRequest) (r *table.GetModeConfigResponse, err error)
|
||||
|
||||
GetDocumentTableInfo(ctx context.Context, req *document.GetDocumentTableInfoRequest) (r *document.GetDocumentTableInfoResponse, err error)
|
||||
}
|
||||
|
||||
type MemoryServiceClient struct {
|
||||
|
|
@ -122,24 +116,6 @@ func (p *MemoryServiceClient) SetKvMemory(ctx context.Context, req *kvmemory.Set
|
|||
}
|
||||
return _result.GetSuccess(), nil
|
||||
}
|
||||
func (p *MemoryServiceClient) GetModeConfig(ctx context.Context, req *table.GetModeConfigRequest) (r *table.GetModeConfigResponse, err error) {
|
||||
var _args MemoryServiceGetModeConfigArgs
|
||||
_args.Req = req
|
||||
var _result MemoryServiceGetModeConfigResult
|
||||
if err = p.Client_().Call(ctx, "GetModeConfig", &_args, &_result); err != nil {
|
||||
return
|
||||
}
|
||||
return _result.GetSuccess(), nil
|
||||
}
|
||||
func (p *MemoryServiceClient) GetDocumentTableInfo(ctx context.Context, req *document.GetDocumentTableInfoRequest) (r *document.GetDocumentTableInfoResponse, err error) {
|
||||
var _args MemoryServiceGetDocumentTableInfoArgs
|
||||
_args.Req = req
|
||||
var _result MemoryServiceGetDocumentTableInfoResult
|
||||
if err = p.Client_().Call(ctx, "GetDocumentTableInfo", &_args, &_result); err != nil {
|
||||
return
|
||||
}
|
||||
return _result.GetSuccess(), nil
|
||||
}
|
||||
|
||||
type MemoryServiceProcessor struct {
|
||||
processorMap map[string]thrift.TProcessorFunction
|
||||
|
|
@ -168,8 +144,6 @@ func NewMemoryServiceProcessor(handler MemoryService) *MemoryServiceProcessor {
|
|||
self.AddToProcessorMap("GetPlayGroundMemory", &memoryServiceProcessorGetPlayGroundMemory{handler: handler})
|
||||
self.AddToProcessorMap("GetSysVariableConf", &memoryServiceProcessorGetSysVariableConf{handler: handler})
|
||||
self.AddToProcessorMap("SetKvMemory", &memoryServiceProcessorSetKvMemory{handler: handler})
|
||||
self.AddToProcessorMap("GetModeConfig", &memoryServiceProcessorGetModeConfig{handler: handler})
|
||||
self.AddToProcessorMap("GetDocumentTableInfo", &memoryServiceProcessorGetDocumentTableInfo{handler: handler})
|
||||
return self
|
||||
}
|
||||
func (p *MemoryServiceProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
|
||||
|
|
@ -526,102 +500,6 @@ func (p *memoryServiceProcessorSetKvMemory) Process(ctx context.Context, seqId i
|
|||
return true, err
|
||||
}
|
||||
|
||||
type memoryServiceProcessorGetModeConfig struct {
|
||||
handler MemoryService
|
||||
}
|
||||
|
||||
func (p *memoryServiceProcessorGetModeConfig) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
|
||||
args := MemoryServiceGetModeConfigArgs{}
|
||||
if err = args.Read(iprot); err != nil {
|
||||
iprot.ReadMessageEnd()
|
||||
x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
|
||||
oprot.WriteMessageBegin("GetModeConfig", thrift.EXCEPTION, seqId)
|
||||
x.Write(oprot)
|
||||
oprot.WriteMessageEnd()
|
||||
oprot.Flush(ctx)
|
||||
return false, err
|
||||
}
|
||||
|
||||
iprot.ReadMessageEnd()
|
||||
var err2 error
|
||||
result := MemoryServiceGetModeConfigResult{}
|
||||
var retval *table.GetModeConfigResponse
|
||||
if retval, err2 = p.handler.GetModeConfig(ctx, args.Req); err2 != nil {
|
||||
x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing GetModeConfig: "+err2.Error())
|
||||
oprot.WriteMessageBegin("GetModeConfig", thrift.EXCEPTION, seqId)
|
||||
x.Write(oprot)
|
||||
oprot.WriteMessageEnd()
|
||||
oprot.Flush(ctx)
|
||||
return true, err2
|
||||
} else {
|
||||
result.Success = retval
|
||||
}
|
||||
if err2 = oprot.WriteMessageBegin("GetModeConfig", thrift.REPLY, seqId); err2 != nil {
|
||||
err = err2
|
||||
}
|
||||
if err2 = result.Write(oprot); err == nil && err2 != nil {
|
||||
err = err2
|
||||
}
|
||||
if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
|
||||
err = err2
|
||||
}
|
||||
if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
|
||||
err = err2
|
||||
}
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
return true, err
|
||||
}
|
||||
|
||||
type memoryServiceProcessorGetDocumentTableInfo struct {
|
||||
handler MemoryService
|
||||
}
|
||||
|
||||
func (p *memoryServiceProcessorGetDocumentTableInfo) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
|
||||
args := MemoryServiceGetDocumentTableInfoArgs{}
|
||||
if err = args.Read(iprot); err != nil {
|
||||
iprot.ReadMessageEnd()
|
||||
x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
|
||||
oprot.WriteMessageBegin("GetDocumentTableInfo", thrift.EXCEPTION, seqId)
|
||||
x.Write(oprot)
|
||||
oprot.WriteMessageEnd()
|
||||
oprot.Flush(ctx)
|
||||
return false, err
|
||||
}
|
||||
|
||||
iprot.ReadMessageEnd()
|
||||
var err2 error
|
||||
result := MemoryServiceGetDocumentTableInfoResult{}
|
||||
var retval *document.GetDocumentTableInfoResponse
|
||||
if retval, err2 = p.handler.GetDocumentTableInfo(ctx, args.Req); err2 != nil {
|
||||
x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing GetDocumentTableInfo: "+err2.Error())
|
||||
oprot.WriteMessageBegin("GetDocumentTableInfo", thrift.EXCEPTION, seqId)
|
||||
x.Write(oprot)
|
||||
oprot.WriteMessageEnd()
|
||||
oprot.Flush(ctx)
|
||||
return true, err2
|
||||
} else {
|
||||
result.Success = retval
|
||||
}
|
||||
if err2 = oprot.WriteMessageBegin("GetDocumentTableInfo", thrift.REPLY, seqId); err2 != nil {
|
||||
err = err2
|
||||
}
|
||||
if err2 = result.Write(oprot); err == nil && err2 != nil {
|
||||
err = err2
|
||||
}
|
||||
if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
|
||||
err = err2
|
||||
}
|
||||
if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
|
||||
err = err2
|
||||
}
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
return true, err
|
||||
}
|
||||
|
||||
type MemoryServiceGetProjectVariableListArgs struct {
|
||||
Req *project_memory.GetProjectVariableListReq `thrift:"req,1"`
|
||||
}
|
||||
|
|
@ -2665,587 +2543,3 @@ func (p *MemoryServiceSetKvMemoryResult) String() string {
|
|||
return fmt.Sprintf("MemoryServiceSetKvMemoryResult(%+v)", *p)
|
||||
|
||||
}
|
||||
|
||||
type MemoryServiceGetModeConfigArgs struct {
|
||||
Req *table.GetModeConfigRequest `thrift:"req,1"`
|
||||
}
|
||||
|
||||
func NewMemoryServiceGetModeConfigArgs() *MemoryServiceGetModeConfigArgs {
|
||||
return &MemoryServiceGetModeConfigArgs{}
|
||||
}
|
||||
|
||||
func (p *MemoryServiceGetModeConfigArgs) InitDefault() {
|
||||
}
|
||||
|
||||
var MemoryServiceGetModeConfigArgs_Req_DEFAULT *table.GetModeConfigRequest
|
||||
|
||||
func (p *MemoryServiceGetModeConfigArgs) GetReq() (v *table.GetModeConfigRequest) {
|
||||
if !p.IsSetReq() {
|
||||
return MemoryServiceGetModeConfigArgs_Req_DEFAULT
|
||||
}
|
||||
return p.Req
|
||||
}
|
||||
|
||||
var fieldIDToName_MemoryServiceGetModeConfigArgs = map[int16]string{
|
||||
1: "req",
|
||||
}
|
||||
|
||||
func (p *MemoryServiceGetModeConfigArgs) IsSetReq() bool {
|
||||
return p.Req != nil
|
||||
}
|
||||
|
||||
func (p *MemoryServiceGetModeConfigArgs) Read(iprot thrift.TProtocol) (err error) {
|
||||
var fieldTypeId thrift.TType
|
||||
var fieldId int16
|
||||
|
||||
if _, err = iprot.ReadStructBegin(); err != nil {
|
||||
goto ReadStructBeginError
|
||||
}
|
||||
|
||||
for {
|
||||
_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
|
||||
if err != nil {
|
||||
goto ReadFieldBeginError
|
||||
}
|
||||
if fieldTypeId == thrift.STOP {
|
||||
break
|
||||
}
|
||||
|
||||
switch fieldId {
|
||||
case 1:
|
||||
if fieldTypeId == thrift.STRUCT {
|
||||
if err = p.ReadField1(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
default:
|
||||
if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadFieldEnd(); err != nil {
|
||||
goto ReadFieldEndError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadStructEnd(); err != nil {
|
||||
goto ReadStructEndError
|
||||
}
|
||||
|
||||
return nil
|
||||
ReadStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
|
||||
ReadFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
|
||||
ReadFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_MemoryServiceGetModeConfigArgs[fieldId]), err)
|
||||
SkipFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
||||
|
||||
ReadFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err)
|
||||
ReadStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *MemoryServiceGetModeConfigArgs) ReadField1(iprot thrift.TProtocol) error {
|
||||
_field := table.NewGetModeConfigRequest()
|
||||
if err := _field.Read(iprot); err != nil {
|
||||
return err
|
||||
}
|
||||
p.Req = _field
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *MemoryServiceGetModeConfigArgs) Write(oprot thrift.TProtocol) (err error) {
|
||||
var fieldId int16
|
||||
if err = oprot.WriteStructBegin("GetModeConfig_args"); err != nil {
|
||||
goto WriteStructBeginError
|
||||
}
|
||||
if p != nil {
|
||||
if err = p.writeField1(oprot); err != nil {
|
||||
fieldId = 1
|
||||
goto WriteFieldError
|
||||
}
|
||||
}
|
||||
if err = oprot.WriteFieldStop(); err != nil {
|
||||
goto WriteFieldStopError
|
||||
}
|
||||
if err = oprot.WriteStructEnd(); err != nil {
|
||||
goto WriteStructEndError
|
||||
}
|
||||
return nil
|
||||
WriteStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
||||
WriteFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
|
||||
WriteFieldStopError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
|
||||
WriteStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *MemoryServiceGetModeConfigArgs) writeField1(oprot thrift.TProtocol) (err error) {
|
||||
if err = oprot.WriteFieldBegin("req", thrift.STRUCT, 1); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := p.Req.Write(oprot); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *MemoryServiceGetModeConfigArgs) String() string {
|
||||
if p == nil {
|
||||
return "<nil>"
|
||||
}
|
||||
return fmt.Sprintf("MemoryServiceGetModeConfigArgs(%+v)", *p)
|
||||
|
||||
}
|
||||
|
||||
type MemoryServiceGetModeConfigResult struct {
|
||||
Success *table.GetModeConfigResponse `thrift:"success,0,optional"`
|
||||
}
|
||||
|
||||
func NewMemoryServiceGetModeConfigResult() *MemoryServiceGetModeConfigResult {
|
||||
return &MemoryServiceGetModeConfigResult{}
|
||||
}
|
||||
|
||||
func (p *MemoryServiceGetModeConfigResult) InitDefault() {
|
||||
}
|
||||
|
||||
var MemoryServiceGetModeConfigResult_Success_DEFAULT *table.GetModeConfigResponse
|
||||
|
||||
func (p *MemoryServiceGetModeConfigResult) GetSuccess() (v *table.GetModeConfigResponse) {
|
||||
if !p.IsSetSuccess() {
|
||||
return MemoryServiceGetModeConfigResult_Success_DEFAULT
|
||||
}
|
||||
return p.Success
|
||||
}
|
||||
|
||||
var fieldIDToName_MemoryServiceGetModeConfigResult = map[int16]string{
|
||||
0: "success",
|
||||
}
|
||||
|
||||
func (p *MemoryServiceGetModeConfigResult) IsSetSuccess() bool {
|
||||
return p.Success != nil
|
||||
}
|
||||
|
||||
func (p *MemoryServiceGetModeConfigResult) Read(iprot thrift.TProtocol) (err error) {
|
||||
var fieldTypeId thrift.TType
|
||||
var fieldId int16
|
||||
|
||||
if _, err = iprot.ReadStructBegin(); err != nil {
|
||||
goto ReadStructBeginError
|
||||
}
|
||||
|
||||
for {
|
||||
_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
|
||||
if err != nil {
|
||||
goto ReadFieldBeginError
|
||||
}
|
||||
if fieldTypeId == thrift.STOP {
|
||||
break
|
||||
}
|
||||
|
||||
switch fieldId {
|
||||
case 0:
|
||||
if fieldTypeId == thrift.STRUCT {
|
||||
if err = p.ReadField0(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
default:
|
||||
if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadFieldEnd(); err != nil {
|
||||
goto ReadFieldEndError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadStructEnd(); err != nil {
|
||||
goto ReadStructEndError
|
||||
}
|
||||
|
||||
return nil
|
||||
ReadStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
|
||||
ReadFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
|
||||
ReadFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_MemoryServiceGetModeConfigResult[fieldId]), err)
|
||||
SkipFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
||||
|
||||
ReadFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err)
|
||||
ReadStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *MemoryServiceGetModeConfigResult) ReadField0(iprot thrift.TProtocol) error {
|
||||
_field := table.NewGetModeConfigResponse()
|
||||
if err := _field.Read(iprot); err != nil {
|
||||
return err
|
||||
}
|
||||
p.Success = _field
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *MemoryServiceGetModeConfigResult) Write(oprot thrift.TProtocol) (err error) {
|
||||
var fieldId int16
|
||||
if err = oprot.WriteStructBegin("GetModeConfig_result"); err != nil {
|
||||
goto WriteStructBeginError
|
||||
}
|
||||
if p != nil {
|
||||
if err = p.writeField0(oprot); err != nil {
|
||||
fieldId = 0
|
||||
goto WriteFieldError
|
||||
}
|
||||
}
|
||||
if err = oprot.WriteFieldStop(); err != nil {
|
||||
goto WriteFieldStopError
|
||||
}
|
||||
if err = oprot.WriteStructEnd(); err != nil {
|
||||
goto WriteStructEndError
|
||||
}
|
||||
return nil
|
||||
WriteStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
||||
WriteFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
|
||||
WriteFieldStopError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
|
||||
WriteStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *MemoryServiceGetModeConfigResult) writeField0(oprot thrift.TProtocol) (err error) {
|
||||
if p.IsSetSuccess() {
|
||||
if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := p.Success.Write(oprot); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *MemoryServiceGetModeConfigResult) String() string {
|
||||
if p == nil {
|
||||
return "<nil>"
|
||||
}
|
||||
return fmt.Sprintf("MemoryServiceGetModeConfigResult(%+v)", *p)
|
||||
|
||||
}
|
||||
|
||||
type MemoryServiceGetDocumentTableInfoArgs struct {
|
||||
Req *document.GetDocumentTableInfoRequest `thrift:"req,1"`
|
||||
}
|
||||
|
||||
func NewMemoryServiceGetDocumentTableInfoArgs() *MemoryServiceGetDocumentTableInfoArgs {
|
||||
return &MemoryServiceGetDocumentTableInfoArgs{}
|
||||
}
|
||||
|
||||
func (p *MemoryServiceGetDocumentTableInfoArgs) InitDefault() {
|
||||
}
|
||||
|
||||
var MemoryServiceGetDocumentTableInfoArgs_Req_DEFAULT *document.GetDocumentTableInfoRequest
|
||||
|
||||
func (p *MemoryServiceGetDocumentTableInfoArgs) GetReq() (v *document.GetDocumentTableInfoRequest) {
|
||||
if !p.IsSetReq() {
|
||||
return MemoryServiceGetDocumentTableInfoArgs_Req_DEFAULT
|
||||
}
|
||||
return p.Req
|
||||
}
|
||||
|
||||
var fieldIDToName_MemoryServiceGetDocumentTableInfoArgs = map[int16]string{
|
||||
1: "req",
|
||||
}
|
||||
|
||||
func (p *MemoryServiceGetDocumentTableInfoArgs) IsSetReq() bool {
|
||||
return p.Req != nil
|
||||
}
|
||||
|
||||
func (p *MemoryServiceGetDocumentTableInfoArgs) Read(iprot thrift.TProtocol) (err error) {
|
||||
var fieldTypeId thrift.TType
|
||||
var fieldId int16
|
||||
|
||||
if _, err = iprot.ReadStructBegin(); err != nil {
|
||||
goto ReadStructBeginError
|
||||
}
|
||||
|
||||
for {
|
||||
_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
|
||||
if err != nil {
|
||||
goto ReadFieldBeginError
|
||||
}
|
||||
if fieldTypeId == thrift.STOP {
|
||||
break
|
||||
}
|
||||
|
||||
switch fieldId {
|
||||
case 1:
|
||||
if fieldTypeId == thrift.STRUCT {
|
||||
if err = p.ReadField1(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
default:
|
||||
if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadFieldEnd(); err != nil {
|
||||
goto ReadFieldEndError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadStructEnd(); err != nil {
|
||||
goto ReadStructEndError
|
||||
}
|
||||
|
||||
return nil
|
||||
ReadStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
|
||||
ReadFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
|
||||
ReadFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_MemoryServiceGetDocumentTableInfoArgs[fieldId]), err)
|
||||
SkipFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
||||
|
||||
ReadFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err)
|
||||
ReadStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *MemoryServiceGetDocumentTableInfoArgs) ReadField1(iprot thrift.TProtocol) error {
|
||||
_field := document.NewGetDocumentTableInfoRequest()
|
||||
if err := _field.Read(iprot); err != nil {
|
||||
return err
|
||||
}
|
||||
p.Req = _field
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *MemoryServiceGetDocumentTableInfoArgs) Write(oprot thrift.TProtocol) (err error) {
|
||||
var fieldId int16
|
||||
if err = oprot.WriteStructBegin("GetDocumentTableInfo_args"); err != nil {
|
||||
goto WriteStructBeginError
|
||||
}
|
||||
if p != nil {
|
||||
if err = p.writeField1(oprot); err != nil {
|
||||
fieldId = 1
|
||||
goto WriteFieldError
|
||||
}
|
||||
}
|
||||
if err = oprot.WriteFieldStop(); err != nil {
|
||||
goto WriteFieldStopError
|
||||
}
|
||||
if err = oprot.WriteStructEnd(); err != nil {
|
||||
goto WriteStructEndError
|
||||
}
|
||||
return nil
|
||||
WriteStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
||||
WriteFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
|
||||
WriteFieldStopError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
|
||||
WriteStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *MemoryServiceGetDocumentTableInfoArgs) writeField1(oprot thrift.TProtocol) (err error) {
|
||||
if err = oprot.WriteFieldBegin("req", thrift.STRUCT, 1); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := p.Req.Write(oprot); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *MemoryServiceGetDocumentTableInfoArgs) String() string {
|
||||
if p == nil {
|
||||
return "<nil>"
|
||||
}
|
||||
return fmt.Sprintf("MemoryServiceGetDocumentTableInfoArgs(%+v)", *p)
|
||||
|
||||
}
|
||||
|
||||
type MemoryServiceGetDocumentTableInfoResult struct {
|
||||
Success *document.GetDocumentTableInfoResponse `thrift:"success,0,optional"`
|
||||
}
|
||||
|
||||
func NewMemoryServiceGetDocumentTableInfoResult() *MemoryServiceGetDocumentTableInfoResult {
|
||||
return &MemoryServiceGetDocumentTableInfoResult{}
|
||||
}
|
||||
|
||||
func (p *MemoryServiceGetDocumentTableInfoResult) InitDefault() {
|
||||
}
|
||||
|
||||
var MemoryServiceGetDocumentTableInfoResult_Success_DEFAULT *document.GetDocumentTableInfoResponse
|
||||
|
||||
func (p *MemoryServiceGetDocumentTableInfoResult) GetSuccess() (v *document.GetDocumentTableInfoResponse) {
|
||||
if !p.IsSetSuccess() {
|
||||
return MemoryServiceGetDocumentTableInfoResult_Success_DEFAULT
|
||||
}
|
||||
return p.Success
|
||||
}
|
||||
|
||||
var fieldIDToName_MemoryServiceGetDocumentTableInfoResult = map[int16]string{
|
||||
0: "success",
|
||||
}
|
||||
|
||||
func (p *MemoryServiceGetDocumentTableInfoResult) IsSetSuccess() bool {
|
||||
return p.Success != nil
|
||||
}
|
||||
|
||||
func (p *MemoryServiceGetDocumentTableInfoResult) Read(iprot thrift.TProtocol) (err error) {
|
||||
var fieldTypeId thrift.TType
|
||||
var fieldId int16
|
||||
|
||||
if _, err = iprot.ReadStructBegin(); err != nil {
|
||||
goto ReadStructBeginError
|
||||
}
|
||||
|
||||
for {
|
||||
_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
|
||||
if err != nil {
|
||||
goto ReadFieldBeginError
|
||||
}
|
||||
if fieldTypeId == thrift.STOP {
|
||||
break
|
||||
}
|
||||
|
||||
switch fieldId {
|
||||
case 0:
|
||||
if fieldTypeId == thrift.STRUCT {
|
||||
if err = p.ReadField0(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
default:
|
||||
if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadFieldEnd(); err != nil {
|
||||
goto ReadFieldEndError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadStructEnd(); err != nil {
|
||||
goto ReadStructEndError
|
||||
}
|
||||
|
||||
return nil
|
||||
ReadStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
|
||||
ReadFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
|
||||
ReadFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_MemoryServiceGetDocumentTableInfoResult[fieldId]), err)
|
||||
SkipFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
||||
|
||||
ReadFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err)
|
||||
ReadStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *MemoryServiceGetDocumentTableInfoResult) ReadField0(iprot thrift.TProtocol) error {
|
||||
_field := document.NewGetDocumentTableInfoResponse()
|
||||
if err := _field.Read(iprot); err != nil {
|
||||
return err
|
||||
}
|
||||
p.Success = _field
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *MemoryServiceGetDocumentTableInfoResult) Write(oprot thrift.TProtocol) (err error) {
|
||||
var fieldId int16
|
||||
if err = oprot.WriteStructBegin("GetDocumentTableInfo_result"); err != nil {
|
||||
goto WriteStructBeginError
|
||||
}
|
||||
if p != nil {
|
||||
if err = p.writeField0(oprot); err != nil {
|
||||
fieldId = 0
|
||||
goto WriteFieldError
|
||||
}
|
||||
}
|
||||
if err = oprot.WriteFieldStop(); err != nil {
|
||||
goto WriteFieldStopError
|
||||
}
|
||||
if err = oprot.WriteStructEnd(); err != nil {
|
||||
goto WriteStructEndError
|
||||
}
|
||||
return nil
|
||||
WriteStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
||||
WriteFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
|
||||
WriteFieldStopError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
|
||||
WriteStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *MemoryServiceGetDocumentTableInfoResult) writeField0(oprot thrift.TProtocol) (err error) {
|
||||
if p.IsSetSuccess() {
|
||||
if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := p.Success.Write(oprot); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *MemoryServiceGetDocumentTableInfoResult) String() string {
|
||||
if p == nil {
|
||||
return "<nil>"
|
||||
}
|
||||
return fmt.Sprintf("MemoryServiceGetDocumentTableInfoResult(%+v)", *p)
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -1,810 +0,0 @@
|
|||
// Code generated by thriftgo (0.4.1). DO NOT EDIT.
|
||||
|
||||
package testcase
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/apache/thrift/lib/go/thrift"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/flow/devops/debugger/domain/infra"
|
||||
)
|
||||
|
||||
type CaseDataBase struct {
|
||||
// Do not fill in when adding, fill in when updating
|
||||
CaseID *int64 `thrift:"caseID,1,optional" json:"caseID,string" form:"caseID" query:"caseID"`
|
||||
Name *string `thrift:"name,2,optional" form:"name" json:"name,omitempty" query:"name"`
|
||||
Description *string `thrift:"description,3,optional" form:"description" json:"description,omitempty" query:"description"`
|
||||
// Input information in JSON format
|
||||
Input *string `thrift:"input,4,optional" form:"input" json:"input,omitempty" query:"input"`
|
||||
IsDefault *bool `thrift:"isDefault,5,optional" form:"isDefault" json:"isDefault,omitempty" query:"isDefault"`
|
||||
}
|
||||
|
||||
func NewCaseDataBase() *CaseDataBase {
|
||||
return &CaseDataBase{}
|
||||
}
|
||||
|
||||
func (p *CaseDataBase) InitDefault() {
|
||||
}
|
||||
|
||||
var CaseDataBase_CaseID_DEFAULT int64
|
||||
|
||||
func (p *CaseDataBase) GetCaseID() (v int64) {
|
||||
if !p.IsSetCaseID() {
|
||||
return CaseDataBase_CaseID_DEFAULT
|
||||
}
|
||||
return *p.CaseID
|
||||
}
|
||||
|
||||
var CaseDataBase_Name_DEFAULT string
|
||||
|
||||
func (p *CaseDataBase) GetName() (v string) {
|
||||
if !p.IsSetName() {
|
||||
return CaseDataBase_Name_DEFAULT
|
||||
}
|
||||
return *p.Name
|
||||
}
|
||||
|
||||
var CaseDataBase_Description_DEFAULT string
|
||||
|
||||
func (p *CaseDataBase) GetDescription() (v string) {
|
||||
if !p.IsSetDescription() {
|
||||
return CaseDataBase_Description_DEFAULT
|
||||
}
|
||||
return *p.Description
|
||||
}
|
||||
|
||||
var CaseDataBase_Input_DEFAULT string
|
||||
|
||||
func (p *CaseDataBase) GetInput() (v string) {
|
||||
if !p.IsSetInput() {
|
||||
return CaseDataBase_Input_DEFAULT
|
||||
}
|
||||
return *p.Input
|
||||
}
|
||||
|
||||
var CaseDataBase_IsDefault_DEFAULT bool
|
||||
|
||||
func (p *CaseDataBase) GetIsDefault() (v bool) {
|
||||
if !p.IsSetIsDefault() {
|
||||
return CaseDataBase_IsDefault_DEFAULT
|
||||
}
|
||||
return *p.IsDefault
|
||||
}
|
||||
|
||||
var fieldIDToName_CaseDataBase = map[int16]string{
|
||||
1: "caseID",
|
||||
2: "name",
|
||||
3: "description",
|
||||
4: "input",
|
||||
5: "isDefault",
|
||||
}
|
||||
|
||||
func (p *CaseDataBase) IsSetCaseID() bool {
|
||||
return p.CaseID != nil
|
||||
}
|
||||
|
||||
func (p *CaseDataBase) IsSetName() bool {
|
||||
return p.Name != nil
|
||||
}
|
||||
|
||||
func (p *CaseDataBase) IsSetDescription() bool {
|
||||
return p.Description != nil
|
||||
}
|
||||
|
||||
func (p *CaseDataBase) IsSetInput() bool {
|
||||
return p.Input != nil
|
||||
}
|
||||
|
||||
func (p *CaseDataBase) IsSetIsDefault() bool {
|
||||
return p.IsDefault != nil
|
||||
}
|
||||
|
||||
func (p *CaseDataBase) Read(iprot thrift.TProtocol) (err error) {
|
||||
var fieldTypeId thrift.TType
|
||||
var fieldId int16
|
||||
|
||||
if _, err = iprot.ReadStructBegin(); err != nil {
|
||||
goto ReadStructBeginError
|
||||
}
|
||||
|
||||
for {
|
||||
_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
|
||||
if err != nil {
|
||||
goto ReadFieldBeginError
|
||||
}
|
||||
if fieldTypeId == thrift.STOP {
|
||||
break
|
||||
}
|
||||
|
||||
switch fieldId {
|
||||
case 1:
|
||||
if fieldTypeId == thrift.I64 {
|
||||
if err = p.ReadField1(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 2:
|
||||
if fieldTypeId == thrift.STRING {
|
||||
if err = p.ReadField2(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 3:
|
||||
if fieldTypeId == thrift.STRING {
|
||||
if err = p.ReadField3(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 4:
|
||||
if fieldTypeId == thrift.STRING {
|
||||
if err = p.ReadField4(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 5:
|
||||
if fieldTypeId == thrift.BOOL {
|
||||
if err = p.ReadField5(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
default:
|
||||
if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadFieldEnd(); err != nil {
|
||||
goto ReadFieldEndError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadStructEnd(); err != nil {
|
||||
goto ReadStructEndError
|
||||
}
|
||||
|
||||
return nil
|
||||
ReadStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
|
||||
ReadFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
|
||||
ReadFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_CaseDataBase[fieldId]), err)
|
||||
SkipFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
||||
|
||||
ReadFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err)
|
||||
ReadStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *CaseDataBase) ReadField1(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field *int64
|
||||
if v, err := iprot.ReadI64(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = &v
|
||||
}
|
||||
p.CaseID = _field
|
||||
return nil
|
||||
}
|
||||
func (p *CaseDataBase) ReadField2(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field *string
|
||||
if v, err := iprot.ReadString(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = &v
|
||||
}
|
||||
p.Name = _field
|
||||
return nil
|
||||
}
|
||||
func (p *CaseDataBase) ReadField3(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field *string
|
||||
if v, err := iprot.ReadString(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = &v
|
||||
}
|
||||
p.Description = _field
|
||||
return nil
|
||||
}
|
||||
func (p *CaseDataBase) ReadField4(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field *string
|
||||
if v, err := iprot.ReadString(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = &v
|
||||
}
|
||||
p.Input = _field
|
||||
return nil
|
||||
}
|
||||
func (p *CaseDataBase) ReadField5(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field *bool
|
||||
if v, err := iprot.ReadBool(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = &v
|
||||
}
|
||||
p.IsDefault = _field
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *CaseDataBase) Write(oprot thrift.TProtocol) (err error) {
|
||||
var fieldId int16
|
||||
if err = oprot.WriteStructBegin("CaseDataBase"); err != nil {
|
||||
goto WriteStructBeginError
|
||||
}
|
||||
if p != nil {
|
||||
if err = p.writeField1(oprot); err != nil {
|
||||
fieldId = 1
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField2(oprot); err != nil {
|
||||
fieldId = 2
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField3(oprot); err != nil {
|
||||
fieldId = 3
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField4(oprot); err != nil {
|
||||
fieldId = 4
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField5(oprot); err != nil {
|
||||
fieldId = 5
|
||||
goto WriteFieldError
|
||||
}
|
||||
}
|
||||
if err = oprot.WriteFieldStop(); err != nil {
|
||||
goto WriteFieldStopError
|
||||
}
|
||||
if err = oprot.WriteStructEnd(); err != nil {
|
||||
goto WriteStructEndError
|
||||
}
|
||||
return nil
|
||||
WriteStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
||||
WriteFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
|
||||
WriteFieldStopError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
|
||||
WriteStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *CaseDataBase) writeField1(oprot thrift.TProtocol) (err error) {
|
||||
if p.IsSetCaseID() {
|
||||
if err = oprot.WriteFieldBegin("caseID", thrift.I64, 1); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteI64(*p.CaseID); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err)
|
||||
}
|
||||
func (p *CaseDataBase) writeField2(oprot thrift.TProtocol) (err error) {
|
||||
if p.IsSetName() {
|
||||
if err = oprot.WriteFieldBegin("name", thrift.STRING, 2); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteString(*p.Name); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 2 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 2 end error: ", p), err)
|
||||
}
|
||||
func (p *CaseDataBase) writeField3(oprot thrift.TProtocol) (err error) {
|
||||
if p.IsSetDescription() {
|
||||
if err = oprot.WriteFieldBegin("description", thrift.STRING, 3); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteString(*p.Description); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
|
||||
}
|
||||
func (p *CaseDataBase) writeField4(oprot thrift.TProtocol) (err error) {
|
||||
if p.IsSetInput() {
|
||||
if err = oprot.WriteFieldBegin("input", thrift.STRING, 4); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteString(*p.Input); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 4 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
|
||||
}
|
||||
func (p *CaseDataBase) writeField5(oprot thrift.TProtocol) (err error) {
|
||||
if p.IsSetIsDefault() {
|
||||
if err = oprot.WriteFieldBegin("isDefault", thrift.BOOL, 5); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteBool(*p.IsDefault); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 5 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *CaseDataBase) String() string {
|
||||
if p == nil {
|
||||
return "<nil>"
|
||||
}
|
||||
return fmt.Sprintf("CaseDataBase(%+v)", *p)
|
||||
|
||||
}
|
||||
|
||||
type CaseDataDetail struct {
|
||||
CaseBase *CaseDataBase `thrift:"caseBase,1,optional" form:"caseBase" json:"caseBase,omitempty" query:"caseBase"`
|
||||
CreatorID *string `thrift:"creatorID,2,optional" form:"creatorID" json:"creatorID,omitempty" query:"creatorID"`
|
||||
CreateTimeInSec *int64 `thrift:"createTimeInSec,3,optional" form:"createTimeInSec" json:"createTimeInSec,omitempty" query:"createTimeInSec"`
|
||||
UpdateTimeInSec *int64 `thrift:"updateTimeInSec,4,optional" form:"updateTimeInSec" json:"updateTimeInSec,omitempty" query:"updateTimeInSec"`
|
||||
// Schema incompatibility
|
||||
SchemaIncompatible *bool `thrift:"schemaIncompatible,5,optional" form:"schemaIncompatible" json:"schemaIncompatible,omitempty" query:"schemaIncompatible"`
|
||||
Updater *infra.Creator `thrift:"updater,6,optional" form:"updater" json:"updater,omitempty" query:"updater"`
|
||||
}
|
||||
|
||||
func NewCaseDataDetail() *CaseDataDetail {
|
||||
return &CaseDataDetail{}
|
||||
}
|
||||
|
||||
func (p *CaseDataDetail) InitDefault() {
|
||||
}
|
||||
|
||||
var CaseDataDetail_CaseBase_DEFAULT *CaseDataBase
|
||||
|
||||
func (p *CaseDataDetail) GetCaseBase() (v *CaseDataBase) {
|
||||
if !p.IsSetCaseBase() {
|
||||
return CaseDataDetail_CaseBase_DEFAULT
|
||||
}
|
||||
return p.CaseBase
|
||||
}
|
||||
|
||||
var CaseDataDetail_CreatorID_DEFAULT string
|
||||
|
||||
func (p *CaseDataDetail) GetCreatorID() (v string) {
|
||||
if !p.IsSetCreatorID() {
|
||||
return CaseDataDetail_CreatorID_DEFAULT
|
||||
}
|
||||
return *p.CreatorID
|
||||
}
|
||||
|
||||
var CaseDataDetail_CreateTimeInSec_DEFAULT int64
|
||||
|
||||
func (p *CaseDataDetail) GetCreateTimeInSec() (v int64) {
|
||||
if !p.IsSetCreateTimeInSec() {
|
||||
return CaseDataDetail_CreateTimeInSec_DEFAULT
|
||||
}
|
||||
return *p.CreateTimeInSec
|
||||
}
|
||||
|
||||
var CaseDataDetail_UpdateTimeInSec_DEFAULT int64
|
||||
|
||||
func (p *CaseDataDetail) GetUpdateTimeInSec() (v int64) {
|
||||
if !p.IsSetUpdateTimeInSec() {
|
||||
return CaseDataDetail_UpdateTimeInSec_DEFAULT
|
||||
}
|
||||
return *p.UpdateTimeInSec
|
||||
}
|
||||
|
||||
var CaseDataDetail_SchemaIncompatible_DEFAULT bool
|
||||
|
||||
func (p *CaseDataDetail) GetSchemaIncompatible() (v bool) {
|
||||
if !p.IsSetSchemaIncompatible() {
|
||||
return CaseDataDetail_SchemaIncompatible_DEFAULT
|
||||
}
|
||||
return *p.SchemaIncompatible
|
||||
}
|
||||
|
||||
var CaseDataDetail_Updater_DEFAULT *infra.Creator
|
||||
|
||||
func (p *CaseDataDetail) GetUpdater() (v *infra.Creator) {
|
||||
if !p.IsSetUpdater() {
|
||||
return CaseDataDetail_Updater_DEFAULT
|
||||
}
|
||||
return p.Updater
|
||||
}
|
||||
|
||||
var fieldIDToName_CaseDataDetail = map[int16]string{
|
||||
1: "caseBase",
|
||||
2: "creatorID",
|
||||
3: "createTimeInSec",
|
||||
4: "updateTimeInSec",
|
||||
5: "schemaIncompatible",
|
||||
6: "updater",
|
||||
}
|
||||
|
||||
func (p *CaseDataDetail) IsSetCaseBase() bool {
|
||||
return p.CaseBase != nil
|
||||
}
|
||||
|
||||
func (p *CaseDataDetail) IsSetCreatorID() bool {
|
||||
return p.CreatorID != nil
|
||||
}
|
||||
|
||||
func (p *CaseDataDetail) IsSetCreateTimeInSec() bool {
|
||||
return p.CreateTimeInSec != nil
|
||||
}
|
||||
|
||||
func (p *CaseDataDetail) IsSetUpdateTimeInSec() bool {
|
||||
return p.UpdateTimeInSec != nil
|
||||
}
|
||||
|
||||
func (p *CaseDataDetail) IsSetSchemaIncompatible() bool {
|
||||
return p.SchemaIncompatible != nil
|
||||
}
|
||||
|
||||
func (p *CaseDataDetail) IsSetUpdater() bool {
|
||||
return p.Updater != nil
|
||||
}
|
||||
|
||||
func (p *CaseDataDetail) Read(iprot thrift.TProtocol) (err error) {
|
||||
var fieldTypeId thrift.TType
|
||||
var fieldId int16
|
||||
|
||||
if _, err = iprot.ReadStructBegin(); err != nil {
|
||||
goto ReadStructBeginError
|
||||
}
|
||||
|
||||
for {
|
||||
_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
|
||||
if err != nil {
|
||||
goto ReadFieldBeginError
|
||||
}
|
||||
if fieldTypeId == thrift.STOP {
|
||||
break
|
||||
}
|
||||
|
||||
switch fieldId {
|
||||
case 1:
|
||||
if fieldTypeId == thrift.STRUCT {
|
||||
if err = p.ReadField1(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 2:
|
||||
if fieldTypeId == thrift.STRING {
|
||||
if err = p.ReadField2(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 3:
|
||||
if fieldTypeId == thrift.I64 {
|
||||
if err = p.ReadField3(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 4:
|
||||
if fieldTypeId == thrift.I64 {
|
||||
if err = p.ReadField4(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 5:
|
||||
if fieldTypeId == thrift.BOOL {
|
||||
if err = p.ReadField5(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 6:
|
||||
if fieldTypeId == thrift.STRUCT {
|
||||
if err = p.ReadField6(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
default:
|
||||
if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadFieldEnd(); err != nil {
|
||||
goto ReadFieldEndError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadStructEnd(); err != nil {
|
||||
goto ReadStructEndError
|
||||
}
|
||||
|
||||
return nil
|
||||
ReadStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
|
||||
ReadFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
|
||||
ReadFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_CaseDataDetail[fieldId]), err)
|
||||
SkipFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
||||
|
||||
ReadFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err)
|
||||
ReadStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *CaseDataDetail) ReadField1(iprot thrift.TProtocol) error {
|
||||
_field := NewCaseDataBase()
|
||||
if err := _field.Read(iprot); err != nil {
|
||||
return err
|
||||
}
|
||||
p.CaseBase = _field
|
||||
return nil
|
||||
}
|
||||
func (p *CaseDataDetail) ReadField2(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field *string
|
||||
if v, err := iprot.ReadString(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = &v
|
||||
}
|
||||
p.CreatorID = _field
|
||||
return nil
|
||||
}
|
||||
func (p *CaseDataDetail) ReadField3(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field *int64
|
||||
if v, err := iprot.ReadI64(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = &v
|
||||
}
|
||||
p.CreateTimeInSec = _field
|
||||
return nil
|
||||
}
|
||||
func (p *CaseDataDetail) ReadField4(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field *int64
|
||||
if v, err := iprot.ReadI64(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = &v
|
||||
}
|
||||
p.UpdateTimeInSec = _field
|
||||
return nil
|
||||
}
|
||||
func (p *CaseDataDetail) ReadField5(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field *bool
|
||||
if v, err := iprot.ReadBool(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = &v
|
||||
}
|
||||
p.SchemaIncompatible = _field
|
||||
return nil
|
||||
}
|
||||
func (p *CaseDataDetail) ReadField6(iprot thrift.TProtocol) error {
|
||||
_field := infra.NewCreator()
|
||||
if err := _field.Read(iprot); err != nil {
|
||||
return err
|
||||
}
|
||||
p.Updater = _field
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *CaseDataDetail) Write(oprot thrift.TProtocol) (err error) {
|
||||
var fieldId int16
|
||||
if err = oprot.WriteStructBegin("CaseDataDetail"); err != nil {
|
||||
goto WriteStructBeginError
|
||||
}
|
||||
if p != nil {
|
||||
if err = p.writeField1(oprot); err != nil {
|
||||
fieldId = 1
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField2(oprot); err != nil {
|
||||
fieldId = 2
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField3(oprot); err != nil {
|
||||
fieldId = 3
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField4(oprot); err != nil {
|
||||
fieldId = 4
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField5(oprot); err != nil {
|
||||
fieldId = 5
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField6(oprot); err != nil {
|
||||
fieldId = 6
|
||||
goto WriteFieldError
|
||||
}
|
||||
}
|
||||
if err = oprot.WriteFieldStop(); err != nil {
|
||||
goto WriteFieldStopError
|
||||
}
|
||||
if err = oprot.WriteStructEnd(); err != nil {
|
||||
goto WriteStructEndError
|
||||
}
|
||||
return nil
|
||||
WriteStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
||||
WriteFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
|
||||
WriteFieldStopError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
|
||||
WriteStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *CaseDataDetail) writeField1(oprot thrift.TProtocol) (err error) {
|
||||
if p.IsSetCaseBase() {
|
||||
if err = oprot.WriteFieldBegin("caseBase", thrift.STRUCT, 1); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := p.CaseBase.Write(oprot); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err)
|
||||
}
|
||||
func (p *CaseDataDetail) writeField2(oprot thrift.TProtocol) (err error) {
|
||||
if p.IsSetCreatorID() {
|
||||
if err = oprot.WriteFieldBegin("creatorID", thrift.STRING, 2); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteString(*p.CreatorID); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 2 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 2 end error: ", p), err)
|
||||
}
|
||||
func (p *CaseDataDetail) writeField3(oprot thrift.TProtocol) (err error) {
|
||||
if p.IsSetCreateTimeInSec() {
|
||||
if err = oprot.WriteFieldBegin("createTimeInSec", thrift.I64, 3); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteI64(*p.CreateTimeInSec); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 3 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 3 end error: ", p), err)
|
||||
}
|
||||
func (p *CaseDataDetail) writeField4(oprot thrift.TProtocol) (err error) {
|
||||
if p.IsSetUpdateTimeInSec() {
|
||||
if err = oprot.WriteFieldBegin("updateTimeInSec", thrift.I64, 4); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteI64(*p.UpdateTimeInSec); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 4 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 4 end error: ", p), err)
|
||||
}
|
||||
func (p *CaseDataDetail) writeField5(oprot thrift.TProtocol) (err error) {
|
||||
if p.IsSetSchemaIncompatible() {
|
||||
if err = oprot.WriteFieldBegin("schemaIncompatible", thrift.BOOL, 5); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteBool(*p.SchemaIncompatible); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 5 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
|
||||
}
|
||||
func (p *CaseDataDetail) writeField6(oprot thrift.TProtocol) (err error) {
|
||||
if p.IsSetUpdater() {
|
||||
if err = oprot.WriteFieldBegin("updater", thrift.STRUCT, 6); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := p.Updater.Write(oprot); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 6 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 6 end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *CaseDataDetail) String() string {
|
||||
if p == nil {
|
||||
return "<nil>"
|
||||
}
|
||||
return fmt.Sprintf("CaseDataDetail(%+v)", *p)
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -7,7 +7,7 @@ import (
|
|||
"database/sql/driver"
|
||||
"fmt"
|
||||
"github.com/apache/thrift/lib/go/thrift"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/flow/marketplace/marketplace_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/marketplace/marketplace_common"
|
||||
)
|
||||
|
||||
type ProductEntityType int64
|
||||
|
|
@ -9,8 +9,8 @@ import (
|
|||
"fmt"
|
||||
"github.com/apache/thrift/lib/go/thrift"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/base"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/flow/marketplace/marketplace_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/flow/marketplace/product_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/marketplace/marketplace_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/marketplace/product_common"
|
||||
)
|
||||
|
||||
type PluginAuthMode int64
|
||||
|
|
@ -1,768 +0,0 @@
|
|||
// Code generated by thriftgo (0.4.1). DO NOT EDIT.
|
||||
|
||||
package bot_open_api
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/apache/thrift/lib/go/thrift"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/base"
|
||||
)
|
||||
|
||||
type OauthAuthorizationCodeReq struct {
|
||||
Code string `thrift:"code,1" json:"code" query:"code"`
|
||||
State string `thrift:"state,2" json:"state" query:"state"`
|
||||
}
|
||||
|
||||
func NewOauthAuthorizationCodeReq() *OauthAuthorizationCodeReq {
|
||||
return &OauthAuthorizationCodeReq{}
|
||||
}
|
||||
|
||||
func (p *OauthAuthorizationCodeReq) InitDefault() {
|
||||
}
|
||||
|
||||
func (p *OauthAuthorizationCodeReq) GetCode() (v string) {
|
||||
return p.Code
|
||||
}
|
||||
|
||||
func (p *OauthAuthorizationCodeReq) GetState() (v string) {
|
||||
return p.State
|
||||
}
|
||||
|
||||
var fieldIDToName_OauthAuthorizationCodeReq = map[int16]string{
|
||||
1: "code",
|
||||
2: "state",
|
||||
}
|
||||
|
||||
func (p *OauthAuthorizationCodeReq) Read(iprot thrift.TProtocol) (err error) {
|
||||
var fieldTypeId thrift.TType
|
||||
var fieldId int16
|
||||
|
||||
if _, err = iprot.ReadStructBegin(); err != nil {
|
||||
goto ReadStructBeginError
|
||||
}
|
||||
|
||||
for {
|
||||
_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
|
||||
if err != nil {
|
||||
goto ReadFieldBeginError
|
||||
}
|
||||
if fieldTypeId == thrift.STOP {
|
||||
break
|
||||
}
|
||||
|
||||
switch fieldId {
|
||||
case 1:
|
||||
if fieldTypeId == thrift.STRING {
|
||||
if err = p.ReadField1(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 2:
|
||||
if fieldTypeId == thrift.STRING {
|
||||
if err = p.ReadField2(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
default:
|
||||
if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadFieldEnd(); err != nil {
|
||||
goto ReadFieldEndError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadStructEnd(); err != nil {
|
||||
goto ReadStructEndError
|
||||
}
|
||||
|
||||
return nil
|
||||
ReadStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
|
||||
ReadFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
|
||||
ReadFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_OauthAuthorizationCodeReq[fieldId]), err)
|
||||
SkipFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
||||
|
||||
ReadFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err)
|
||||
ReadStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *OauthAuthorizationCodeReq) ReadField1(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field string
|
||||
if v, err := iprot.ReadString(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = v
|
||||
}
|
||||
p.Code = _field
|
||||
return nil
|
||||
}
|
||||
func (p *OauthAuthorizationCodeReq) ReadField2(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field string
|
||||
if v, err := iprot.ReadString(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = v
|
||||
}
|
||||
p.State = _field
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *OauthAuthorizationCodeReq) Write(oprot thrift.TProtocol) (err error) {
|
||||
var fieldId int16
|
||||
if err = oprot.WriteStructBegin("OauthAuthorizationCodeReq"); err != nil {
|
||||
goto WriteStructBeginError
|
||||
}
|
||||
if p != nil {
|
||||
if err = p.writeField1(oprot); err != nil {
|
||||
fieldId = 1
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField2(oprot); err != nil {
|
||||
fieldId = 2
|
||||
goto WriteFieldError
|
||||
}
|
||||
}
|
||||
if err = oprot.WriteFieldStop(); err != nil {
|
||||
goto WriteFieldStopError
|
||||
}
|
||||
if err = oprot.WriteStructEnd(); err != nil {
|
||||
goto WriteStructEndError
|
||||
}
|
||||
return nil
|
||||
WriteStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
||||
WriteFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
|
||||
WriteFieldStopError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
|
||||
WriteStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *OauthAuthorizationCodeReq) writeField1(oprot thrift.TProtocol) (err error) {
|
||||
if err = oprot.WriteFieldBegin("code", thrift.STRING, 1); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteString(p.Code); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err)
|
||||
}
|
||||
func (p *OauthAuthorizationCodeReq) writeField2(oprot thrift.TProtocol) (err error) {
|
||||
if err = oprot.WriteFieldBegin("state", thrift.STRING, 2); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteString(p.State); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 2 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 2 end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *OauthAuthorizationCodeReq) String() string {
|
||||
if p == nil {
|
||||
return "<nil>"
|
||||
}
|
||||
return fmt.Sprintf("OauthAuthorizationCodeReq(%+v)", *p)
|
||||
|
||||
}
|
||||
|
||||
type OauthAuthorizationCodeResp struct {
|
||||
BaseResp *base.BaseResp `thrift:"BaseResp,255,required" form:"BaseResp,required" json:"BaseResp,required" query:"BaseResp,required"`
|
||||
}
|
||||
|
||||
func NewOauthAuthorizationCodeResp() *OauthAuthorizationCodeResp {
|
||||
return &OauthAuthorizationCodeResp{}
|
||||
}
|
||||
|
||||
func (p *OauthAuthorizationCodeResp) InitDefault() {
|
||||
}
|
||||
|
||||
var OauthAuthorizationCodeResp_BaseResp_DEFAULT *base.BaseResp
|
||||
|
||||
func (p *OauthAuthorizationCodeResp) GetBaseResp() (v *base.BaseResp) {
|
||||
if !p.IsSetBaseResp() {
|
||||
return OauthAuthorizationCodeResp_BaseResp_DEFAULT
|
||||
}
|
||||
return p.BaseResp
|
||||
}
|
||||
|
||||
var fieldIDToName_OauthAuthorizationCodeResp = map[int16]string{
|
||||
255: "BaseResp",
|
||||
}
|
||||
|
||||
func (p *OauthAuthorizationCodeResp) IsSetBaseResp() bool {
|
||||
return p.BaseResp != nil
|
||||
}
|
||||
|
||||
func (p *OauthAuthorizationCodeResp) Read(iprot thrift.TProtocol) (err error) {
|
||||
var fieldTypeId thrift.TType
|
||||
var fieldId int16
|
||||
var issetBaseResp bool = false
|
||||
|
||||
if _, err = iprot.ReadStructBegin(); err != nil {
|
||||
goto ReadStructBeginError
|
||||
}
|
||||
|
||||
for {
|
||||
_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
|
||||
if err != nil {
|
||||
goto ReadFieldBeginError
|
||||
}
|
||||
if fieldTypeId == thrift.STOP {
|
||||
break
|
||||
}
|
||||
|
||||
switch fieldId {
|
||||
case 255:
|
||||
if fieldTypeId == thrift.STRUCT {
|
||||
if err = p.ReadField255(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
issetBaseResp = true
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
default:
|
||||
if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadFieldEnd(); err != nil {
|
||||
goto ReadFieldEndError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadStructEnd(); err != nil {
|
||||
goto ReadStructEndError
|
||||
}
|
||||
|
||||
if !issetBaseResp {
|
||||
fieldId = 255
|
||||
goto RequiredFieldNotSetError
|
||||
}
|
||||
return nil
|
||||
ReadStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
|
||||
ReadFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
|
||||
ReadFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_OauthAuthorizationCodeResp[fieldId]), err)
|
||||
SkipFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
||||
|
||||
ReadFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err)
|
||||
ReadStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
||||
RequiredFieldNotSetError:
|
||||
return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("required field %s is not set", fieldIDToName_OauthAuthorizationCodeResp[fieldId]))
|
||||
}
|
||||
|
||||
func (p *OauthAuthorizationCodeResp) ReadField255(iprot thrift.TProtocol) error {
|
||||
_field := base.NewBaseResp()
|
||||
if err := _field.Read(iprot); err != nil {
|
||||
return err
|
||||
}
|
||||
p.BaseResp = _field
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *OauthAuthorizationCodeResp) Write(oprot thrift.TProtocol) (err error) {
|
||||
var fieldId int16
|
||||
if err = oprot.WriteStructBegin("OauthAuthorizationCodeResp"); err != nil {
|
||||
goto WriteStructBeginError
|
||||
}
|
||||
if p != nil {
|
||||
if err = p.writeField255(oprot); err != nil {
|
||||
fieldId = 255
|
||||
goto WriteFieldError
|
||||
}
|
||||
}
|
||||
if err = oprot.WriteFieldStop(); err != nil {
|
||||
goto WriteFieldStopError
|
||||
}
|
||||
if err = oprot.WriteStructEnd(); err != nil {
|
||||
goto WriteStructEndError
|
||||
}
|
||||
return nil
|
||||
WriteStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
||||
WriteFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
|
||||
WriteFieldStopError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
|
||||
WriteStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *OauthAuthorizationCodeResp) writeField255(oprot thrift.TProtocol) (err error) {
|
||||
if err = oprot.WriteFieldBegin("BaseResp", thrift.STRUCT, 255); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := p.BaseResp.Write(oprot); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 255 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 255 end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *OauthAuthorizationCodeResp) String() string {
|
||||
if p == nil {
|
||||
return "<nil>"
|
||||
}
|
||||
return fmt.Sprintf("OauthAuthorizationCodeResp(%+v)", *p)
|
||||
|
||||
}
|
||||
|
||||
type BotOpenApiService interface {
|
||||
OauthAuthorizationCode(ctx context.Context, request *OauthAuthorizationCodeReq) (r *OauthAuthorizationCodeResp, err error)
|
||||
}
|
||||
|
||||
type BotOpenApiServiceClient struct {
|
||||
c thrift.TClient
|
||||
}
|
||||
|
||||
func NewBotOpenApiServiceClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *BotOpenApiServiceClient {
|
||||
return &BotOpenApiServiceClient{
|
||||
c: thrift.NewTStandardClient(f.GetProtocol(t), f.GetProtocol(t)),
|
||||
}
|
||||
}
|
||||
|
||||
func NewBotOpenApiServiceClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *BotOpenApiServiceClient {
|
||||
return &BotOpenApiServiceClient{
|
||||
c: thrift.NewTStandardClient(iprot, oprot),
|
||||
}
|
||||
}
|
||||
|
||||
func NewBotOpenApiServiceClient(c thrift.TClient) *BotOpenApiServiceClient {
|
||||
return &BotOpenApiServiceClient{
|
||||
c: c,
|
||||
}
|
||||
}
|
||||
|
||||
func (p *BotOpenApiServiceClient) Client_() thrift.TClient {
|
||||
return p.c
|
||||
}
|
||||
|
||||
func (p *BotOpenApiServiceClient) OauthAuthorizationCode(ctx context.Context, request *OauthAuthorizationCodeReq) (r *OauthAuthorizationCodeResp, err error) {
|
||||
var _args BotOpenApiServiceOauthAuthorizationCodeArgs
|
||||
_args.Request = request
|
||||
var _result BotOpenApiServiceOauthAuthorizationCodeResult
|
||||
if err = p.Client_().Call(ctx, "OauthAuthorizationCode", &_args, &_result); err != nil {
|
||||
return
|
||||
}
|
||||
return _result.GetSuccess(), nil
|
||||
}
|
||||
|
||||
type BotOpenApiServiceProcessor struct {
|
||||
processorMap map[string]thrift.TProcessorFunction
|
||||
handler BotOpenApiService
|
||||
}
|
||||
|
||||
func (p *BotOpenApiServiceProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction) {
|
||||
p.processorMap[key] = processor
|
||||
}
|
||||
|
||||
func (p *BotOpenApiServiceProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool) {
|
||||
processor, ok = p.processorMap[key]
|
||||
return processor, ok
|
||||
}
|
||||
|
||||
func (p *BotOpenApiServiceProcessor) ProcessorMap() map[string]thrift.TProcessorFunction {
|
||||
return p.processorMap
|
||||
}
|
||||
|
||||
func NewBotOpenApiServiceProcessor(handler BotOpenApiService) *BotOpenApiServiceProcessor {
|
||||
self := &BotOpenApiServiceProcessor{handler: handler, processorMap: make(map[string]thrift.TProcessorFunction)}
|
||||
self.AddToProcessorMap("OauthAuthorizationCode", &botOpenApiServiceProcessorOauthAuthorizationCode{handler: handler})
|
||||
return self
|
||||
}
|
||||
func (p *BotOpenApiServiceProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
|
||||
name, _, seqId, err := iprot.ReadMessageBegin()
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
if processor, ok := p.GetProcessorFunction(name); ok {
|
||||
return processor.Process(ctx, seqId, iprot, oprot)
|
||||
}
|
||||
iprot.Skip(thrift.STRUCT)
|
||||
iprot.ReadMessageEnd()
|
||||
x := thrift.NewTApplicationException(thrift.UNKNOWN_METHOD, "Unknown function "+name)
|
||||
oprot.WriteMessageBegin(name, thrift.EXCEPTION, seqId)
|
||||
x.Write(oprot)
|
||||
oprot.WriteMessageEnd()
|
||||
oprot.Flush(ctx)
|
||||
return false, x
|
||||
}
|
||||
|
||||
type botOpenApiServiceProcessorOauthAuthorizationCode struct {
|
||||
handler BotOpenApiService
|
||||
}
|
||||
|
||||
func (p *botOpenApiServiceProcessorOauthAuthorizationCode) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
|
||||
args := BotOpenApiServiceOauthAuthorizationCodeArgs{}
|
||||
if err = args.Read(iprot); err != nil {
|
||||
iprot.ReadMessageEnd()
|
||||
x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
|
||||
oprot.WriteMessageBegin("OauthAuthorizationCode", thrift.EXCEPTION, seqId)
|
||||
x.Write(oprot)
|
||||
oprot.WriteMessageEnd()
|
||||
oprot.Flush(ctx)
|
||||
return false, err
|
||||
}
|
||||
|
||||
iprot.ReadMessageEnd()
|
||||
var err2 error
|
||||
result := BotOpenApiServiceOauthAuthorizationCodeResult{}
|
||||
var retval *OauthAuthorizationCodeResp
|
||||
if retval, err2 = p.handler.OauthAuthorizationCode(ctx, args.Request); err2 != nil {
|
||||
x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing OauthAuthorizationCode: "+err2.Error())
|
||||
oprot.WriteMessageBegin("OauthAuthorizationCode", thrift.EXCEPTION, seqId)
|
||||
x.Write(oprot)
|
||||
oprot.WriteMessageEnd()
|
||||
oprot.Flush(ctx)
|
||||
return true, err2
|
||||
} else {
|
||||
result.Success = retval
|
||||
}
|
||||
if err2 = oprot.WriteMessageBegin("OauthAuthorizationCode", thrift.REPLY, seqId); err2 != nil {
|
||||
err = err2
|
||||
}
|
||||
if err2 = result.Write(oprot); err == nil && err2 != nil {
|
||||
err = err2
|
||||
}
|
||||
if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
|
||||
err = err2
|
||||
}
|
||||
if err2 = oprot.Flush(ctx); err == nil && err2 != nil {
|
||||
err = err2
|
||||
}
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
return true, err
|
||||
}
|
||||
|
||||
type BotOpenApiServiceOauthAuthorizationCodeArgs struct {
|
||||
Request *OauthAuthorizationCodeReq `thrift:"request,1"`
|
||||
}
|
||||
|
||||
func NewBotOpenApiServiceOauthAuthorizationCodeArgs() *BotOpenApiServiceOauthAuthorizationCodeArgs {
|
||||
return &BotOpenApiServiceOauthAuthorizationCodeArgs{}
|
||||
}
|
||||
|
||||
func (p *BotOpenApiServiceOauthAuthorizationCodeArgs) InitDefault() {
|
||||
}
|
||||
|
||||
var BotOpenApiServiceOauthAuthorizationCodeArgs_Request_DEFAULT *OauthAuthorizationCodeReq
|
||||
|
||||
func (p *BotOpenApiServiceOauthAuthorizationCodeArgs) GetRequest() (v *OauthAuthorizationCodeReq) {
|
||||
if !p.IsSetRequest() {
|
||||
return BotOpenApiServiceOauthAuthorizationCodeArgs_Request_DEFAULT
|
||||
}
|
||||
return p.Request
|
||||
}
|
||||
|
||||
var fieldIDToName_BotOpenApiServiceOauthAuthorizationCodeArgs = map[int16]string{
|
||||
1: "request",
|
||||
}
|
||||
|
||||
func (p *BotOpenApiServiceOauthAuthorizationCodeArgs) IsSetRequest() bool {
|
||||
return p.Request != nil
|
||||
}
|
||||
|
||||
func (p *BotOpenApiServiceOauthAuthorizationCodeArgs) Read(iprot thrift.TProtocol) (err error) {
|
||||
var fieldTypeId thrift.TType
|
||||
var fieldId int16
|
||||
|
||||
if _, err = iprot.ReadStructBegin(); err != nil {
|
||||
goto ReadStructBeginError
|
||||
}
|
||||
|
||||
for {
|
||||
_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
|
||||
if err != nil {
|
||||
goto ReadFieldBeginError
|
||||
}
|
||||
if fieldTypeId == thrift.STOP {
|
||||
break
|
||||
}
|
||||
|
||||
switch fieldId {
|
||||
case 1:
|
||||
if fieldTypeId == thrift.STRUCT {
|
||||
if err = p.ReadField1(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
default:
|
||||
if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadFieldEnd(); err != nil {
|
||||
goto ReadFieldEndError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadStructEnd(); err != nil {
|
||||
goto ReadStructEndError
|
||||
}
|
||||
|
||||
return nil
|
||||
ReadStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
|
||||
ReadFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
|
||||
ReadFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_BotOpenApiServiceOauthAuthorizationCodeArgs[fieldId]), err)
|
||||
SkipFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
||||
|
||||
ReadFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err)
|
||||
ReadStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *BotOpenApiServiceOauthAuthorizationCodeArgs) ReadField1(iprot thrift.TProtocol) error {
|
||||
_field := NewOauthAuthorizationCodeReq()
|
||||
if err := _field.Read(iprot); err != nil {
|
||||
return err
|
||||
}
|
||||
p.Request = _field
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *BotOpenApiServiceOauthAuthorizationCodeArgs) Write(oprot thrift.TProtocol) (err error) {
|
||||
var fieldId int16
|
||||
if err = oprot.WriteStructBegin("OauthAuthorizationCode_args"); err != nil {
|
||||
goto WriteStructBeginError
|
||||
}
|
||||
if p != nil {
|
||||
if err = p.writeField1(oprot); err != nil {
|
||||
fieldId = 1
|
||||
goto WriteFieldError
|
||||
}
|
||||
}
|
||||
if err = oprot.WriteFieldStop(); err != nil {
|
||||
goto WriteFieldStopError
|
||||
}
|
||||
if err = oprot.WriteStructEnd(); err != nil {
|
||||
goto WriteStructEndError
|
||||
}
|
||||
return nil
|
||||
WriteStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
||||
WriteFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
|
||||
WriteFieldStopError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
|
||||
WriteStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *BotOpenApiServiceOauthAuthorizationCodeArgs) writeField1(oprot thrift.TProtocol) (err error) {
|
||||
if err = oprot.WriteFieldBegin("request", thrift.STRUCT, 1); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := p.Request.Write(oprot); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *BotOpenApiServiceOauthAuthorizationCodeArgs) String() string {
|
||||
if p == nil {
|
||||
return "<nil>"
|
||||
}
|
||||
return fmt.Sprintf("BotOpenApiServiceOauthAuthorizationCodeArgs(%+v)", *p)
|
||||
|
||||
}
|
||||
|
||||
type BotOpenApiServiceOauthAuthorizationCodeResult struct {
|
||||
Success *OauthAuthorizationCodeResp `thrift:"success,0,optional"`
|
||||
}
|
||||
|
||||
func NewBotOpenApiServiceOauthAuthorizationCodeResult() *BotOpenApiServiceOauthAuthorizationCodeResult {
|
||||
return &BotOpenApiServiceOauthAuthorizationCodeResult{}
|
||||
}
|
||||
|
||||
func (p *BotOpenApiServiceOauthAuthorizationCodeResult) InitDefault() {
|
||||
}
|
||||
|
||||
var BotOpenApiServiceOauthAuthorizationCodeResult_Success_DEFAULT *OauthAuthorizationCodeResp
|
||||
|
||||
func (p *BotOpenApiServiceOauthAuthorizationCodeResult) GetSuccess() (v *OauthAuthorizationCodeResp) {
|
||||
if !p.IsSetSuccess() {
|
||||
return BotOpenApiServiceOauthAuthorizationCodeResult_Success_DEFAULT
|
||||
}
|
||||
return p.Success
|
||||
}
|
||||
|
||||
var fieldIDToName_BotOpenApiServiceOauthAuthorizationCodeResult = map[int16]string{
|
||||
0: "success",
|
||||
}
|
||||
|
||||
func (p *BotOpenApiServiceOauthAuthorizationCodeResult) IsSetSuccess() bool {
|
||||
return p.Success != nil
|
||||
}
|
||||
|
||||
func (p *BotOpenApiServiceOauthAuthorizationCodeResult) Read(iprot thrift.TProtocol) (err error) {
|
||||
var fieldTypeId thrift.TType
|
||||
var fieldId int16
|
||||
|
||||
if _, err = iprot.ReadStructBegin(); err != nil {
|
||||
goto ReadStructBeginError
|
||||
}
|
||||
|
||||
for {
|
||||
_, fieldTypeId, fieldId, err = iprot.ReadFieldBegin()
|
||||
if err != nil {
|
||||
goto ReadFieldBeginError
|
||||
}
|
||||
if fieldTypeId == thrift.STOP {
|
||||
break
|
||||
}
|
||||
|
||||
switch fieldId {
|
||||
case 0:
|
||||
if fieldTypeId == thrift.STRUCT {
|
||||
if err = p.ReadField0(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
default:
|
||||
if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadFieldEnd(); err != nil {
|
||||
goto ReadFieldEndError
|
||||
}
|
||||
}
|
||||
if err = iprot.ReadStructEnd(); err != nil {
|
||||
goto ReadStructEndError
|
||||
}
|
||||
|
||||
return nil
|
||||
ReadStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err)
|
||||
ReadFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err)
|
||||
ReadFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_BotOpenApiServiceOauthAuthorizationCodeResult[fieldId]), err)
|
||||
SkipFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err)
|
||||
|
||||
ReadFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err)
|
||||
ReadStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *BotOpenApiServiceOauthAuthorizationCodeResult) ReadField0(iprot thrift.TProtocol) error {
|
||||
_field := NewOauthAuthorizationCodeResp()
|
||||
if err := _field.Read(iprot); err != nil {
|
||||
return err
|
||||
}
|
||||
p.Success = _field
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *BotOpenApiServiceOauthAuthorizationCodeResult) Write(oprot thrift.TProtocol) (err error) {
|
||||
var fieldId int16
|
||||
if err = oprot.WriteStructBegin("OauthAuthorizationCode_result"); err != nil {
|
||||
goto WriteStructBeginError
|
||||
}
|
||||
if p != nil {
|
||||
if err = p.writeField0(oprot); err != nil {
|
||||
fieldId = 0
|
||||
goto WriteFieldError
|
||||
}
|
||||
}
|
||||
if err = oprot.WriteFieldStop(); err != nil {
|
||||
goto WriteFieldStopError
|
||||
}
|
||||
if err = oprot.WriteStructEnd(); err != nil {
|
||||
goto WriteStructEndError
|
||||
}
|
||||
return nil
|
||||
WriteStructBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
|
||||
WriteFieldError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err)
|
||||
WriteFieldStopError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err)
|
||||
WriteStructEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *BotOpenApiServiceOauthAuthorizationCodeResult) writeField0(oprot thrift.TProtocol) (err error) {
|
||||
if p.IsSetSuccess() {
|
||||
if err = oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := p.Success.Write(oprot); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *BotOpenApiServiceOauthAuthorizationCodeResult) String() string {
|
||||
if p == nil {
|
||||
return "<nil>"
|
||||
}
|
||||
return fmt.Sprintf("BotOpenApiServiceOauthAuthorizationCodeResult(%+v)", *p)
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,6 +1,6 @@
|
|||
// Code generated by thriftgo (0.4.1). DO NOT EDIT.
|
||||
|
||||
package plugin_develop_common
|
||||
package common
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -26,21 +26,21 @@ import (
|
|||
|
||||
"github.com/google/uuid"
|
||||
|
||||
intelligenceAPI "github.com/coze-dev/coze-studio/backend/api/model/app/intelligence"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/common"
|
||||
taskStruct "github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/common"
|
||||
projectAPI "github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/project"
|
||||
publishAPI "github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/publish"
|
||||
taskAPI "github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/task"
|
||||
connectorModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/connector"
|
||||
knowledgeModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge"
|
||||
pluginModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/plugin"
|
||||
intelligenceAPI "github.com/coze-dev/coze-studio/backend/api/model/intelligence"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/intelligence/common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/playground"
|
||||
workflowAPI "github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/workflow"
|
||||
projectAPI "github.com/coze-dev/coze-studio/backend/api/model/project"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/project_memory"
|
||||
publishAPI "github.com/coze-dev/coze-studio/backend/api/model/publish"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/database/table"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/variable/project_memory"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/playground"
|
||||
resourceAPI "github.com/coze-dev/coze-studio/backend/api/model/resource"
|
||||
resourceCommon "github.com/coze-dev/coze-studio/backend/api/model/resource/common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/table"
|
||||
taskAPI "github.com/coze-dev/coze-studio/backend/api/model/task"
|
||||
taskStruct "github.com/coze-dev/coze-studio/backend/api/model/task_struct"
|
||||
workflowAPI "github.com/coze-dev/coze-studio/backend/api/model/workflow"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
"github.com/coze-dev/coze-studio/backend/application/knowledge"
|
||||
"github.com/coze-dev/coze-studio/backend/application/memory"
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ import (
|
|||
"github.com/coze-dev/coze-studio/backend/domain/plugin/entity"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/plugin"
|
||||
common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop_common"
|
||||
common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/errorx"
|
||||
"github.com/coze-dev/coze-studio/backend/types/errno"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -25,10 +25,10 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
modelCommon "github.com/coze-dev/coze-studio/backend/api/model/common"
|
||||
knowledgeModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge"
|
||||
model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/flow/dataengine/dataset"
|
||||
dataset "github.com/coze-dev/coze-studio/backend/api/model/data/knowledge"
|
||||
modelCommon "github.com/coze-dev/coze-studio/backend/api/model/data/knowledge"
|
||||
"github.com/coze-dev/coze-studio/backend/application/upload"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/knowledge/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/knowledge/service"
|
||||
|
|
|
|||
|
|
@ -26,10 +26,10 @@ import (
|
|||
|
||||
"github.com/bytedance/sonic"
|
||||
|
||||
modelCommon "github.com/coze-dev/coze-studio/backend/api/model/common"
|
||||
model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/flow/dataengine/dataset"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/knowledge/document"
|
||||
dataset "github.com/coze-dev/coze-studio/backend/api/model/data/knowledge"
|
||||
document "github.com/coze-dev/coze-studio/backend/api/model/data/knowledge"
|
||||
modelCommon "github.com/coze-dev/coze-studio/backend/api/model/data/knowledge"
|
||||
resource "github.com/coze-dev/coze-studio/backend/api/model/resource/common"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
"github.com/coze-dev/coze-studio/backend/application/search"
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import (
|
|||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/base"
|
||||
model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/table"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/database/table"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/memory/database/entity"
|
||||
database "github.com/coze-dev/coze-studio/backend/domain/memory/database/service"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/lang/ptr"
|
||||
|
|
|
|||
|
|
@ -22,9 +22,10 @@ import (
|
|||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/base"
|
||||
model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/knowledge/document"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/database/table"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/knowledge"
|
||||
document "github.com/coze-dev/coze-studio/backend/api/model/data/knowledge"
|
||||
resCommon "github.com/coze-dev/coze-studio/backend/api/model/resource/common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/table"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
"github.com/coze-dev/coze-studio/backend/application/search"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/crossuser"
|
||||
|
|
@ -48,8 +49,8 @@ type DatabaseApplicationService struct {
|
|||
|
||||
var DatabaseApplicationSVC = DatabaseApplicationService{}
|
||||
|
||||
func (d *DatabaseApplicationService) GetModeConfig(ctx context.Context, req *table.GetModeConfigRequest) (*table.GetModeConfigResponse, error) {
|
||||
return &table.GetModeConfigResponse{
|
||||
func (d *DatabaseApplicationService) GetModeConfig(ctx context.Context, req *knowledge.GetModeConfigRequest) (*knowledge.GetModeConfigResponse, error) {
|
||||
return &knowledge.GetModeConfigResponse{
|
||||
Code: 0,
|
||||
Msg: "success",
|
||||
BotID: req.BotID,
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ import (
|
|||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/base"
|
||||
model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/variables"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/kvmemory"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/project_memory"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/variable/kvmemory"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/variable/project_memory"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/memory/variables/entity"
|
||||
variables "github.com/coze-dev/coze-studio/backend/domain/memory/variables/service"
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ package modelmgr
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/developer_api"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/developer_api"
|
||||
"github.com/coze-dev/coze-studio/backend/infra/contract/modelmgr"
|
||||
"github.com/coze-dev/coze-studio/backend/infra/impl/storage"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/i18n"
|
||||
|
|
|
|||
|
|
@ -33,13 +33,13 @@ import (
|
|||
gonanoid "github.com/matoous/go-nanoid"
|
||||
"gopkg.in/yaml.v3"
|
||||
|
||||
botOpenAPI "github.com/coze-dev/coze-studio/backend/api/model/app/bot_open_api"
|
||||
model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/plugin"
|
||||
searchModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/search"
|
||||
productCommon "github.com/coze-dev/coze-studio/backend/api/model/flow/marketplace/product_common"
|
||||
productAPI "github.com/coze-dev/coze-studio/backend/api/model/flow/marketplace/product_public_api"
|
||||
botOpenAPI "github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/bot_open_api"
|
||||
pluginAPI "github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/plugin_develop"
|
||||
common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop_common"
|
||||
productCommon "github.com/coze-dev/coze-studio/backend/api/model/marketplace/product_common"
|
||||
productAPI "github.com/coze-dev/coze-studio/backend/api/model/marketplace/product_public_api"
|
||||
pluginAPI "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop"
|
||||
common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common"
|
||||
resCommon "github.com/coze-dev/coze-studio/backend/api/model/resource/common"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/pluginutil"
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ package prompt
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/playground"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/playground"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/resource/common"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
"github.com/coze-dev/coze-studio/backend/application/search"
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ import (
|
|||
"fmt"
|
||||
"strconv"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/intelligence"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/intelligence/common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/intelligence"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/common"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/app/entity"
|
||||
appService "github.com/coze-dev/coze-studio/backend/domain/app/service"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/lang/conv"
|
||||
|
|
|
|||
|
|
@ -22,12 +22,12 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/intelligence"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/common"
|
||||
search2 "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/search"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/flow/marketplace/marketplace_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/flow/marketplace/product_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/flow/marketplace/product_public_api"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/intelligence"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/intelligence/common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/marketplace/marketplace_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/marketplace/product_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/marketplace/product_public_api"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
searchEntity "github.com/coze-dev/coze-studio/backend/domain/search/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/errorx"
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ import (
|
|||
"fmt"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/database/table"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/resource/common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/table"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/knowledge/service"
|
||||
dbservice "github.com/coze-dev/coze-studio/backend/domain/memory/database/service"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo"
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import (
|
|||
"context"
|
||||
"strconv"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/playground"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/playground"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/shortcutcmd/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/shortcutcmd/service"
|
||||
|
|
|
|||
|
|
@ -20,10 +20,10 @@ import (
|
|||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/bot_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/developer_api"
|
||||
intelligence "github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/singleagent"
|
||||
intelligence "github.com/coze-dev/coze-studio/backend/api/model/intelligence/common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/bot_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/developer_api"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity"
|
||||
searchEntity "github.com/coze-dev/coze-studio/backend/domain/search/entity"
|
||||
|
|
|
|||
|
|
@ -19,9 +19,9 @@ package singleagent
|
|||
import (
|
||||
"context"
|
||||
|
||||
intelligence "github.com/coze-dev/coze-studio/backend/api/model/intelligence/common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/developer_api"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/project_memory"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/developer_api"
|
||||
intelligence "github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/variable/project_memory"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/crossplugin"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity"
|
||||
|
|
|
|||
|
|
@ -22,12 +22,13 @@ import (
|
|||
|
||||
"github.com/getkin/kin-openapi/openapi3"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/bot_common"
|
||||
knowledgeModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/plugin"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/bot_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/playground"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/workflow"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/plugin_develop_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/playground"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common"
|
||||
plugin_develop_common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/workflow"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity"
|
||||
knowledge "github.com/coze-dev/coze-studio/backend/domain/knowledge/service"
|
||||
pluginEntity "github.com/coze-dev/coze-studio/backend/domain/plugin/entity"
|
||||
|
|
@ -318,7 +319,7 @@ func (s *SingleAgentApplicationService) pluginInfoDo2Vo(ctx context.Context, plu
|
|||
Description: ptr.Of(e.GetDesc()),
|
||||
PluginType: (*int64)(&e.PluginType),
|
||||
IconURL: &iconURL,
|
||||
PluginStatus: (*int64)(ptr.Of(plugin_develop_common.PluginStatus_PUBLISHED)),
|
||||
PluginStatus: (*int64)(ptr.Of(common.PluginStatus_PUBLISHED)),
|
||||
IsOfficial: func() *bool {
|
||||
if e.SpaceID == 0 {
|
||||
return ptr.Of(true)
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@ import (
|
|||
"context"
|
||||
"strings"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/bot_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/developer_api"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/playground"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/bot_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/developer_api"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/playground"
|
||||
)
|
||||
|
||||
func (s *SingleAgentApplicationService) GetUploadAuthToken(ctx context.Context, req *developer_api.GetUploadAuthTokenRequest) (*developer_api.GetUploadAuthTokenResponse, error) {
|
||||
|
|
|
|||
|
|
@ -23,10 +23,10 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/developer_api"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/intelligence/common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/developer_api"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/playground"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/playground"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity"
|
||||
search "github.com/coze-dev/coze-studio/backend/domain/search/entity"
|
||||
|
|
|
|||
|
|
@ -29,13 +29,14 @@ import (
|
|||
"github.com/bytedance/sonic"
|
||||
"github.com/getkin/kin-openapi/openapi3"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/bot_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/bot_open_api"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/developer_api"
|
||||
intelligence "github.com/coze-dev/coze-studio/backend/api/model/app/intelligence/common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/plugin"
|
||||
intelligence "github.com/coze-dev/coze-studio/backend/api/model/intelligence/common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/bot_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/developer_api"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/playground"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/table"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/database/table"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/playground"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/crossdatabase"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity"
|
||||
|
|
@ -636,7 +637,7 @@ func (s *SingleAgentApplicationService) ReportUserBehavior(ctx context.Context,
|
|||
return &playground.ReportUserBehaviorResponse{}, nil
|
||||
}
|
||||
|
||||
func (s *SingleAgentApplicationService) GetAgentOnlineInfo(ctx context.Context, req *playground.GetBotOnlineInfoReq) (*bot_common.OpenAPIBotInfo, error) {
|
||||
func (s *SingleAgentApplicationService) GetAgentOnlineInfo(ctx context.Context, req *bot_open_api.GetBotOnlineInfoReq) (*bot_common.OpenAPIBotInfo, error) {
|
||||
|
||||
uid := ctxutil.MustGetUIDFromApiAuthCtx(ctx)
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ package template
|
|||
import (
|
||||
"context"
|
||||
|
||||
productAPI "github.com/coze-dev/coze-studio/backend/api/model/flow/marketplace/product_public_api"
|
||||
productAPI "github.com/coze-dev/coze-studio/backend/api/model/marketplace/product_public_api"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/template/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/template/repository"
|
||||
"github.com/coze-dev/coze-studio/backend/infra/contract/storage"
|
||||
|
|
|
|||
|
|
@ -43,10 +43,11 @@ import (
|
|||
|
||||
"github.com/google/uuid"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/bot_open_api"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/developer_api"
|
||||
dataset "github.com/coze-dev/coze-studio/backend/api/model/data/knowledge"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/file/upload"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/flow/dataengine/dataset"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/developer_api"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/playground"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/playground"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/upload/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/infra/contract/cache"
|
||||
|
|
@ -356,7 +357,7 @@ func (u *UploadService) GetShortcutIcons(ctx context.Context) ([]*playground.Fil
|
|||
return fileList, nil
|
||||
}
|
||||
|
||||
func parseMultipartFormData(ctx context.Context, req *playground.UploadFileOpenRequest) (*multipart.Form, error) {
|
||||
func parseMultipartFormData(ctx context.Context, req *bot_open_api.UploadFileOpenRequest) (*multipart.Form, error) {
|
||||
_, params, err := mime.ParseMediaType(req.ContentType)
|
||||
if err != nil {
|
||||
return nil, errorx.New(errno.ErrUploadInvalidContentTypeCode, errorx.KV("content-type", req.ContentType))
|
||||
|
|
@ -382,9 +383,9 @@ func genObjName(name string, id string) string {
|
|||
)
|
||||
}
|
||||
|
||||
func (u *UploadService) UploadFileOpen(ctx context.Context, req *playground.UploadFileOpenRequest) (*playground.UploadFileOpenResponse, error) {
|
||||
resp := playground.UploadFileOpenResponse{}
|
||||
resp.File = new(playground.File)
|
||||
func (u *UploadService) UploadFileOpen(ctx context.Context, req *bot_open_api.UploadFileOpenRequest) (*bot_open_api.UploadFileOpenResponse, error) {
|
||||
resp := bot_open_api.UploadFileOpenResponse{}
|
||||
resp.File = new(bot_open_api.File)
|
||||
uid := ctxutil.MustGetUIDFromApiAuthCtx(ctx)
|
||||
if uid == 0 {
|
||||
return nil, errorx.New(errno.ErrKnowledgePermissionCode, errorx.KV("msg", "session required"))
|
||||
|
|
|
|||
|
|
@ -24,9 +24,9 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/developer_api"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/playground"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/developer_api"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/passport"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/playground"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/user/entity"
|
||||
user "github.com/coze-dev/coze-studio/backend/domain/user/service"
|
||||
|
|
|
|||
|
|
@ -29,14 +29,14 @@ import (
|
|||
|
||||
"github.com/cloudwego/eino/schema"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/bot_common"
|
||||
model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge"
|
||||
pluginmodel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/plugin"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/bot_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/playground"
|
||||
pluginAPI "github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/plugin_develop"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/workflow"
|
||||
common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/table"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/database/table"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/playground"
|
||||
pluginAPI "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop"
|
||||
common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/workflow"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
appknowledge "github.com/coze-dev/coze-studio/backend/application/knowledge"
|
||||
appmemory "github.com/coze-dev/coze-studio/backend/application/memory"
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import (
|
|||
"context"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/variables"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/kvmemory"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/variable/kvmemory"
|
||||
)
|
||||
|
||||
type Variables interface {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,8 @@ import (
|
|||
"context"
|
||||
|
||||
model "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/variables"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/kvmemory"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/variable/kvmemory"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/crossvariables"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/memory/variables/entity"
|
||||
variables "github.com/coze-dev/coze-studio/backend/domain/memory/variables/service"
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import (
|
|||
"github.com/spf13/cast"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/table"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/database/table"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/ctxutil"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/memory/database/service"
|
||||
nodedatabase "github.com/coze-dev/coze-studio/backend/domain/workflow/crossdomain/database"
|
||||
|
|
|
|||
|
|
@ -29,8 +29,8 @@ import (
|
|||
"github.com/cloudwego/eino/schema"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/plugin"
|
||||
workflow3 "github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/workflow"
|
||||
common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop_common"
|
||||
common "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop/common"
|
||||
workflow3 "github.com/coze-dev/coze-studio/backend/api/model/workflow"
|
||||
"github.com/coze-dev/coze-studio/backend/application/base/pluginutil"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/plugin/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/plugin/service"
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ import (
|
|||
"github.com/cloudwego/eino/compose"
|
||||
|
||||
variablesModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/variables"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/kvmemory"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/project_memory"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/variable/kvmemory"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/variable/project_memory"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/memory/variables/entity"
|
||||
variables "github.com/coze-dev/coze-studio/backend/domain/memory/variables/service"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/workflow/crossdomain/variable"
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
package entity
|
||||
|
||||
import "github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/developer_api"
|
||||
import "github.com/coze-dev/coze-studio/backend/api/model/app/developer_api"
|
||||
|
||||
type AgentDraftDisplayInfo struct {
|
||||
AgentID int64
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
package entity
|
||||
|
||||
import (
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/developer_api"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/developer_api"
|
||||
"github.com/coze-dev/coze-studio/backend/types/consts"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import (
|
|||
"github.com/cloudwego/eino-ext/components/model/deepseek"
|
||||
"github.com/cloudwego/eino-ext/libs/acl/openai"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/bot_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/bot_common"
|
||||
"github.com/coze-dev/coze-studio/backend/infra/contract/chatmodel"
|
||||
"github.com/coze-dev/coze-studio/backend/infra/contract/modelmgr"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/errorx"
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ import (
|
|||
|
||||
"github.com/cloudwego/eino/schema"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/bot_common"
|
||||
knowledgeModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/knowledge"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/bot_common"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/crossknowledge"
|
||||
knowledgeEntity "github.com/coze-dev/coze-studio/backend/domain/knowledge/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/knowledge/service"
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import (
|
|||
"github.com/cloudwego/eino/compose"
|
||||
"github.com/cloudwego/eino/schema"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/bot_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/bot_common"
|
||||
"github.com/coze-dev/coze-studio/backend/infra/contract/chatmodel"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/lang/ptr"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -30,9 +30,9 @@ import (
|
|||
"github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/lang/ptr"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/bot_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/bot_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/table"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/database/table"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/crossdatabase"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/memory/database/service"
|
||||
"github.com/coze-dev/coze-studio/backend/infra/impl/sqlparser"
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import (
|
|||
"github.com/cloudwego/eino/schema"
|
||||
"github.com/getkin/kin-openapi/openapi3"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/bot_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/bot_common"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/crossknowledge"
|
||||
knowledgeEntity "github.com/coze-dev/coze-studio/backend/domain/knowledge/entity"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@ import (
|
|||
"github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/lang/ptr"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/bot_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/plugin"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/bot_common"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/crossplugin"
|
||||
pluginEntity "github.com/coze-dev/coze-studio/backend/domain/plugin/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/plugin/service"
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ import (
|
|||
"github.com/cloudwego/eino/components/tool/utils"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/variables"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/kvmemory"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/project_memory"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/variable/kvmemory"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/data/variable/project_memory"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/crossvariables"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/lang/conv"
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ package agentflow
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/bot_common"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/bot_common"
|
||||
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/crossworkflow"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/workflow"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo"
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/ocean/cloud/developer_api"
|
||||
"github.com/coze-dev/coze-studio/backend/api/model/app/developer_api"
|
||||
"github.com/coze-dev/coze-studio/backend/domain/agent/singleagent/entity"
|
||||
"github.com/coze-dev/coze-studio/backend/infra/contract/cache"
|
||||
"github.com/coze-dev/coze-studio/backend/pkg/errorx"
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue