Documentation
¶
Index ¶
- type Adapter
- func (a *Adapter) DeleteWebhook(ctx context.Context) error
- func (a *Adapter) Logger() *slog.Logger
- func (a *Adapter) SendMessage(ctx context.Context, sessionID string, msg *base.ChatMessage) error
- func (a *Adapter) SetLogger(logger *slog.Logger)
- func (a *Adapter) SetSender(fn func(ctx context.Context, sessionID string, msg *base.ChatMessage) error)
- func (a *Adapter) SetWebhook(ctx context.Context) error
- func (a *Adapter) Start(ctx context.Context) error
- func (a *Adapter) Stop() error
- type Config
- type MessageResponse
- type Msg
- type Update
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MessageResponse ¶
type Update ¶
type Update struct {
UpdateID int64 `json:"update_id"`
Message struct {
MessageID int64 `json:"message_id"`
From struct {
ID int64 `json:"id"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Username string `json:"username"`
} `json:"from"`
Chat struct {
ID int64 `json:"id"`
Type string `json:"type"`
Title string `json:"title,omitempty"`
} `json:"chat"`
Date int64 `json:"date"`
Text string `json:"text"`
Entities []struct {
Type string `json:"type"`
Offset int `json:"offset"`
Length int `json:"length"`
} `json:"entities,omitempty"`
} `json:"message"`
CallbackQuery *struct {
ID string `json:"id"`
From struct {
ID int64 `json:"id"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Username string `json:"username"`
} `json:"from"`
Message struct {
Chat struct {
ID int64 `json:"id"`
} `json:"chat"`
MessageID int64 `json:"message_id"`
Data string `json:"data"`
} `json:"message,omitempty"`
} `json:"callback_query,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.