Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FieldType ¶ added in v1.10.0
type FieldType string
const ( // FieldInput 单行文本 FieldInput FieldType = "input" // FieldTextarea 多行文本 FieldTextarea FieldType = "textarea" // FieldNumber 数字 FieldNumber FieldType = "number" // FieldDate 日期 FieldDate FieldType = "date" // FieldSelect 下拉选择 FieldSelect FieldType = "select" // FieldMultiSelect 多项选择 FieldMultiSelect FieldType = "multi_select" )
type InputField ¶ added in v1.10.0
type InputField struct {
Name string `json:"name"` // 表单字段显示名
Key string `json:"key"` // 表单字段键名(对应 Order Data Key)
Type FieldType `json:"type"` // 字段类型:input, textarea, date, number...
Required bool `json:"required"` // 是否必填
Options []InputOption `json:"options"` // 选项列表(用于 select 等)
Props map[string]string `json:"props"` // 额外组件属性(如 placeholder)
}
type InputOption ¶ added in v1.10.0
type Notification ¶
type NotificationResponse ¶ added in v1.10.0
type NotificationResponse struct {
// 通知平台生成的通知ID
NotificationId int64 `json:"notification_Id"`
// 发送状态
Status string `json:"status"`
// 失败时的错误代码
ErrorCode string `json:"error_code"`
// 错误详情
ErrorMsg string `json:"error_msg"`
}
func NewErrorResponse ¶ added in v1.10.0
func NewErrorResponse(errorCode, errorMsg string) NotificationResponse
NewErrorResponse 创建错误响应
func NewErrorResponseWithID ¶ added in v1.10.0
func NewErrorResponseWithID(notificationId int64, status, errorCode, errorMsg string) NotificationResponse
NewErrorResponseWithID 创建带通知ID的错误响应
func NewSuccessResponse ¶ added in v1.10.0
func NewSuccessResponse(notificationId int64, status string) NotificationResponse
NewSuccessResponse 创建成功响应
type StrategyInfo ¶
Click to show internal directories.
Click to hide internal directories.