Files
Memoh/internal/channel/schema.go
BBQ a246b79a4f refactor: restructure channel gateway and chat module architecture
- Refactor channel adapters (feishu, telegram, local) with enhanced descriptor and config
- Restructure channel manager, service, types, and outbound messaging
- Simplify chat module by removing normalize.go and chat.go, consolidating into resolver and types
- Update router channel handlers and tests
- Sync swagger documentation
2026-02-06 23:47:12 +08:00

29 lines
853 B
Go

package channel
// FieldType enumerates the supported configuration field types.
type FieldType string
const (
FieldString FieldType = "string"
FieldSecret FieldType = "secret"
FieldBool FieldType = "bool"
FieldNumber FieldType = "number"
FieldEnum FieldType = "enum"
)
// FieldSchema describes a single configuration field.
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 describes the structure of a channel or user-binding configuration.
type ConfigSchema struct {
Version int `json:"version"`
Fields map[string]FieldSchema `json:"fields"`
}