Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DingTalkConfig ¶ added in v0.9.0
type DingTalkHook ¶ added in v0.9.0
type DingTalkHook struct {
// contains filtered or unexported fields
}
func NewDingTalkHook ¶ added in v0.9.0
func NewDingTalkHook(name string, config DingTalkConfig, logger *slog.Logger) *DingTalkHook
func (*DingTalkHook) Close ¶ added in v0.9.0
func (h *DingTalkHook) Close() error
func (*DingTalkHook) Events ¶ added in v0.9.0
func (h *DingTalkHook) Events() []EventType
func (*DingTalkHook) Handle ¶ added in v0.9.0
func (h *DingTalkHook) Handle(ctx context.Context, event *Event) error
func (*DingTalkHook) Name ¶ added in v0.9.0
func (h *DingTalkHook) Name() string
type EventType ¶
type EventType string
const ( EventSessionStart EventType = "session.start" EventSessionEnd EventType = "session.end" EventSessionError EventType = "session.error" EventToolUse EventType = "tool.use" EventToolResult EventType = "tool.result" EventDangerBlocked EventType = "danger.blocked" EventStreamStart EventType = "stream.start" EventStreamEnd EventType = "stream.end" EventTurnStart EventType = "turn.start" EventTurnEnd EventType = "turn.end" )
type FeishuConfig ¶ added in v0.9.0
type FeishuHook ¶ added in v0.9.0
type FeishuHook struct {
// contains filtered or unexported fields
}
func NewFeishuHook ¶ added in v0.9.0
func NewFeishuHook(name string, config FeishuConfig, logger *slog.Logger) *FeishuHook
func (*FeishuHook) Close ¶ added in v0.9.0
func (h *FeishuHook) Close() error
func (*FeishuHook) Events ¶ added in v0.9.0
func (h *FeishuHook) Events() []EventType
func (*FeishuHook) Handle ¶ added in v0.9.0
func (h *FeishuHook) Handle(ctx context.Context, event *Event) error
func (*FeishuHook) Name ¶ added in v0.9.0
func (h *FeishuHook) Name() string
type HookConfig ¶
type HookRegistration ¶
type HookRegistration struct {
Hook Hook
Config HookConfig
}
type LoggingHook ¶
type LoggingHook struct {
// contains filtered or unexported fields
}
func NewLoggingHook ¶
func NewLoggingHook(name string, logger *slog.Logger, events []EventType) *LoggingHook
func (*LoggingHook) Events ¶
func (h *LoggingHook) Events() []EventType
func (*LoggingHook) Name ¶
func (h *LoggingHook) Name() string
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func (*Manager) Register ¶
func (m *Manager) Register(hook Hook, config HookConfig)
func (*Manager) RegisteredHooks ¶
func (*Manager) Unregister ¶
type SlackConfig ¶ added in v0.9.0
type SlackHook ¶ added in v0.9.0
type SlackHook struct {
// contains filtered or unexported fields
}
func NewSlackHook ¶ added in v0.9.0
func NewSlackHook(name string, config SlackConfig, logger *slog.Logger) *SlackHook
type WebhookConfig ¶
type WebhookHook ¶
type WebhookHook struct {
// contains filtered or unexported fields
}
func NewWebhookHook ¶
func NewWebhookHook(name string, config WebhookConfig, logger *slog.Logger) *WebhookHook
func (*WebhookHook) Close ¶
func (h *WebhookHook) Close() error
func (*WebhookHook) Events ¶
func (h *WebhookHook) Events() []EventType
func (*WebhookHook) Name ¶
func (h *WebhookHook) Name() string
Click to show internal directories.
Click to hide internal directories.