Files
Memoh/internal/channel/schema.go
T
BBQ 5a35ef34ac feat: channel gateway implementation and multi-bot refactor
- Refactor channel manager with support for Sender/Receiver interfaces and hot-swappable adapters.
- Implement identity routing and pre-authentication logic for inbound messages.
- Update database schema to support bot pre-auth keys and extended channel session metadata.
- Add Telegram and Feishu channel configuration and adapter enhancements.
- Update Swagger documentation and internal handlers for channel management.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 14:41:54 +08:00

28 lines
772 B
Go

package channel
type FieldType string
const (
FieldString FieldType = "string"
FieldSecret FieldType = "secret"
FieldBool FieldType = "bool"
FieldNumber FieldType = "number"
FieldEnum FieldType = "enum"
)
// FieldSchema 定义单个配置字段的结构化描述。
type FieldSchema struct {
Type FieldType `json:"type"`
Required bool `json:"required"`
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
Enum []string `json:"enum,omitempty"`
Example any `json:"example,omitempty"`
}
// ConfigSchema 描述通道配置或用户绑定的结构。
type ConfigSchema struct {
Version int `json:"version"`
Fields map[string]FieldSchema `json:"fields"`
}