Versions in this module Expand all Collapse all v0 v0.3.4 Apr 21, 2026 v0.3.3 Apr 20, 2026 v0.3.2 Apr 19, 2026 v0.3.1 Apr 18, 2026 v0.2.2 Apr 17, 2026 v0.2.1 Apr 17, 2026 v0.1.1 Apr 16, 2026 Changes in this version + const DefaultBaseURL + const ItemTypeFile + const ItemTypeImage + const ItemTypeText + const ItemTypeVideo + const ItemTypeVoice + func FetchQRCode(baseURL string) (qrContent, sessionKey string, err error) + func IsSessionExpired(err error) bool + func IsSessionNotReady(err error) bool + func SendText(baseURL, token, toUserID, text, contextToken string) error + type Client struct + func NewClient() *Client + func (c *Client) Disable() error + func (c *Client) Enable() error + func (c *Client) ID() string + func (c *Client) Login() (*channel.LoginSession, error) + func (c *Client) Logout() error + func (c *Client) SendText(text string) error + func (c *Client) SetOnMessage(fn func(from, text string)) + func (c *Client) State() channel.State + type Credentials struct + BaseURL string + SavedAt string + SyncBuf string + Token string + UserID string + type GetUpdatesResponse struct + ErrCode int + ErrMsg string + GetUpdatesBuf string + Msgs []Message + Ret int + func GetUpdates(ctx context.Context, baseURL, token, syncBuf string) (*GetUpdatesResponse, error) + type Item struct + TextItem *TextItem + Type int + type LoginResult struct + BaseURL string + Connected bool + Message string + Token string + UserID string + func PollLoginUntilDone(baseURL, sessionKey string, timeout time.Duration) *LoginResult + type Message struct + ClientID string + ContextToken string + CreateTimeMs int64 + FromUserID string + ItemList []Item + MessageID int + MessageState int + MessageType int + Seq int + ToUserID string + func (m Message) TextBody() string + type TextItem struct + Text string