Documentation
¶
Index ¶
- type BaseChannel
- type Channel
- type DiscordChannel
- type FeishuChannel
- type MaixCamChannel
- type MaixCamMessage
- type Manager
- func (m *Manager) GetChannel(name string) (Channel, bool)
- func (m *Manager) GetEnabledChannels() []string
- func (m *Manager) GetStatus() map[string]interface{}
- func (m *Manager) RegisterChannel(name string, channel Channel)
- func (m *Manager) SendToChannel(ctx context.Context, channelName, chatID, content string) error
- func (m *Manager) StartAll(ctx context.Context) error
- func (m *Manager) StopAll(ctx context.Context) error
- func (m *Manager) UnregisterChannel(name string)
- type TelegramChannel
- type WhatsAppChannel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseChannel ¶
type BaseChannel struct {
// contains filtered or unexported fields
}
func NewBaseChannel ¶
func NewBaseChannel(name string, config interface{}, bus *bus.MessageBus, allowList []string) *BaseChannel
func (*BaseChannel) HandleMessage ¶
func (c *BaseChannel) HandleMessage(senderID, chatID, content string, media []string, metadata map[string]string)
func (*BaseChannel) IsAllowed ¶
func (c *BaseChannel) IsAllowed(senderID string) bool
func (*BaseChannel) IsRunning ¶
func (c *BaseChannel) IsRunning() bool
func (*BaseChannel) Name ¶
func (c *BaseChannel) Name() string
type DiscordChannel ¶
type DiscordChannel struct {
*BaseChannel
// contains filtered or unexported fields
}
func NewDiscordChannel ¶
func NewDiscordChannel(cfg config.DiscordConfig, bus *bus.MessageBus) (*DiscordChannel, error)
func (*DiscordChannel) Send ¶
func (c *DiscordChannel) Send(ctx context.Context, msg bus.OutboundMessage) error
type FeishuChannel ¶
type FeishuChannel struct {
*BaseChannel
// contains filtered or unexported fields
}
func NewFeishuChannel ¶
func NewFeishuChannel(cfg config.FeishuConfig, bus *bus.MessageBus) (*FeishuChannel, error)
func (*FeishuChannel) Send ¶
func (c *FeishuChannel) Send(ctx context.Context, msg bus.OutboundMessage) error
type MaixCamChannel ¶
type MaixCamChannel struct {
*BaseChannel
// contains filtered or unexported fields
}
func NewMaixCamChannel ¶
func NewMaixCamChannel(cfg config.MaixCamConfig, bus *bus.MessageBus) (*MaixCamChannel, error)
func (*MaixCamChannel) Send ¶
func (c *MaixCamChannel) Send(ctx context.Context, msg bus.OutboundMessage) error
type MaixCamMessage ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) GetEnabledChannels ¶
func (*Manager) RegisterChannel ¶
func (*Manager) SendToChannel ¶
func (*Manager) UnregisterChannel ¶
type TelegramChannel ¶
type TelegramChannel struct {
*BaseChannel
// contains filtered or unexported fields
}
func NewTelegramChannel ¶
func NewTelegramChannel(cfg config.TelegramConfig, bus *bus.MessageBus) (*TelegramChannel, error)
func (*TelegramChannel) Send ¶
func (c *TelegramChannel) Send(ctx context.Context, msg bus.OutboundMessage) error
func (*TelegramChannel) SetTranscriber ¶
func (c *TelegramChannel) SetTranscriber(transcriber *voice.GroqTranscriber)
type WhatsAppChannel ¶
type WhatsAppChannel struct {
*BaseChannel
// contains filtered or unexported fields
}
func NewWhatsAppChannel ¶
func NewWhatsAppChannel(cfg config.WhatsAppConfig, bus *bus.MessageBus) (*WhatsAppChannel, error)
func (*WhatsAppChannel) Send ¶
func (c *WhatsAppChannel) Send(ctx context.Context, msg bus.OutboundMessage) error
Click to show internal directories.
Click to hide internal directories.