feat(plugin): user benefit & fix is official

This commit is contained in:
lijunwen.gigoo
2025-10-16 21:51:08 +08:00
parent c47ae0bfeb
commit b230c26dbb
8 changed files with 165 additions and 76 deletions

View File

@ -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 workflow
@ -52100,9 +52116,10 @@ type FCPluginSetting struct {
ResponseParams []*APIParameter `thrift:"response_params,5" form:"response_params" json:"response_params" query:"response_params"`
ResponseStyle *ResponseStyle `thrift:"response_style,6" form:"response_style" json:"response_style" query:"response_style"`
// This issue is temporarily not supported.
AsyncConf *AsyncConf `thrift:"async_conf,7,optional" form:"async_conf" json:"async_conf,omitempty" query:"async_conf"`
IsDraft bool `thrift:"is_draft,8" form:"is_draft" json:"is_draft" query:"is_draft"`
PluginVersion string `thrift:"plugin_version,9" form:"plugin_version" json:"plugin_version" query:"plugin_version"`
AsyncConf *AsyncConf `thrift:"async_conf,7,optional" form:"async_conf" json:"async_conf,omitempty" query:"async_conf"`
IsDraft bool `thrift:"is_draft,8" form:"is_draft" json:"is_draft" query:"is_draft"`
PluginVersion string `thrift:"plugin_version,9" form:"plugin_version" json:"plugin_version" query:"plugin_version"`
PluginFrom *bot_common.PluginFrom `thrift:"plugin_from,50,optional" form:"plugin_from" json:"plugin_from,omitempty" query:"plugin_from"`
}
func NewFCPluginSetting() *FCPluginSetting {
@ -52158,16 +52175,26 @@ func (p *FCPluginSetting) GetPluginVersion() (v string) {
return p.PluginVersion
}
var FCPluginSetting_PluginFrom_DEFAULT bot_common.PluginFrom
func (p *FCPluginSetting) GetPluginFrom() (v bot_common.PluginFrom) {
if !p.IsSetPluginFrom() {
return FCPluginSetting_PluginFrom_DEFAULT
}
return *p.PluginFrom
}
var fieldIDToName_FCPluginSetting = map[int16]string{
1: "plugin_id",
2: "api_id",
3: "api_name",
4: "request_params",
5: "response_params",
6: "response_style",
7: "async_conf",
8: "is_draft",
9: "plugin_version",
1: "plugin_id",
2: "api_id",
3: "api_name",
4: "request_params",
5: "response_params",
6: "response_style",
7: "async_conf",
8: "is_draft",
9: "plugin_version",
50: "plugin_from",
}
func (p *FCPluginSetting) IsSetResponseStyle() bool {
@ -52178,6 +52205,10 @@ func (p *FCPluginSetting) IsSetAsyncConf() bool {
return p.AsyncConf != nil
}
func (p *FCPluginSetting) IsSetPluginFrom() bool {
return p.PluginFrom != nil
}
func (p *FCPluginSetting) Read(iprot thrift.TProtocol) (err error) {
var fieldTypeId thrift.TType
var fieldId int16
@ -52268,6 +52299,14 @@ func (p *FCPluginSetting) Read(iprot thrift.TProtocol) (err error) {
} else if err = iprot.Skip(fieldTypeId); err != nil {
goto SkipFieldError
}
case 50:
if fieldTypeId == thrift.I32 {
if err = p.ReadField50(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
@ -52414,6 +52453,18 @@ func (p *FCPluginSetting) ReadField9(iprot thrift.TProtocol) error {
p.PluginVersion = _field
return nil
}
func (p *FCPluginSetting) ReadField50(iprot thrift.TProtocol) error {
var _field *bot_common.PluginFrom
if v, err := iprot.ReadI32(); err != nil {
return err
} else {
tmp := bot_common.PluginFrom(v)
_field = &tmp
}
p.PluginFrom = _field
return nil
}
func (p *FCPluginSetting) Write(oprot thrift.TProtocol) (err error) {
var fieldId int16
@ -52457,6 +52508,10 @@ func (p *FCPluginSetting) Write(oprot thrift.TProtocol) (err error) {
fieldId = 9
goto WriteFieldError
}
if err = p.writeField50(oprot); err != nil {
fieldId = 50
goto WriteFieldError
}
}
if err = oprot.WriteFieldStop(); err != nil {
goto WriteFieldStopError
@ -52637,6 +52692,24 @@ WriteFieldBeginError:
WriteFieldEndError:
return thrift.PrependError(fmt.Sprintf("%T write field 9 end error: ", p), err)
}
func (p *FCPluginSetting) writeField50(oprot thrift.TProtocol) (err error) {
if p.IsSetPluginFrom() {
if err = oprot.WriteFieldBegin("plugin_from", thrift.I32, 50); err != nil {
goto WriteFieldBeginError
}
if err := oprot.WriteI32(int32(*p.PluginFrom)); err != nil {
return err
}
if err = oprot.WriteFieldEnd(); err != nil {
goto WriteFieldEndError
}
}
return nil
WriteFieldBeginError:
return thrift.PrependError(fmt.Sprintf("%T write field 50 begin error: ", p), err)
WriteFieldEndError:
return thrift.PrependError(fmt.Sprintf("%T write field 50 end error: ", p), err)
}
func (p *FCPluginSetting) String() string {
if p == nil {