优化结构
This commit is contained in:
@@ -2,7 +2,6 @@ package dto
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
integrationbiz "kra/internal/biz/integration"
|
||||
)
|
||||
|
||||
type IntegrationConfigRequest struct {
|
||||
@@ -11,12 +10,28 @@ type IntegrationConfigRequest struct {
|
||||
}
|
||||
|
||||
type IntegrationConfigResponse struct {
|
||||
Kind string `json:"kind"`
|
||||
Provider string `json:"provider"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description,omitempty"`
|
||||
Enabled bool `json:"enabled"`
|
||||
Configured bool `json:"configured"`
|
||||
Config json.RawMessage `json:"config"`
|
||||
Fields []integrationbiz.IntegrationConfigField `json:"fields"`
|
||||
Kind string `json:"kind"`
|
||||
Provider string `json:"provider"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description,omitempty"`
|
||||
Enabled bool `json:"enabled"`
|
||||
Configured bool `json:"configured"`
|
||||
Config json.RawMessage `json:"config"`
|
||||
Fields []IntegrationConfigField `json:"fields"`
|
||||
}
|
||||
|
||||
type IntegrationConfigField struct {
|
||||
Key string `json:"key"`
|
||||
Label string `json:"label"`
|
||||
Type string `json:"type"`
|
||||
Required bool `json:"required"`
|
||||
Secret bool `json:"secret"`
|
||||
Placeholder string `json:"placeholder,omitempty"`
|
||||
Description string `json:"description,omitempty"`
|
||||
Options []IntegrationConfigOption `json:"options,omitempty"`
|
||||
}
|
||||
|
||||
type IntegrationConfigOption struct {
|
||||
Label string `json:"label"`
|
||||
Value any `json:"value"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user