mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
a246b79a4f
- 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
29 lines
853 B
Go
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"`
|
|
}
|