Versions in this module Expand all Collapse all v0 v0.1.0 Mar 14, 2026 Changes in this version + var ErrNoUserOpenID = errors.New("feishu: user_open_id not configured, cannot send urgent message") + var ErrNotInitialized = errors.New("feishu: client not initialized") + func Init(cfg Config) + func SendRichText(title string, content [][]PostElem) error + func SendText(text string) error + func SendUrgentText(text string) error + type BaseReq struct + MsgType MsgType + Sign string + Timestamp string + type Bot struct + func NewBot(cfg Config) *Bot + func (b *Bot) SendRichText(title string, content [][]PostElem) error + func (b *Bot) SendText(text string) error + func (b *Bot) SendUrgentText(text string) error + type Client struct + func NewClient(webhook, appID, appSecret string) *Client + func (c *Client) SendMessage(ctx context.Context, receiveIDType, receiveID, msgType, content string) (string, error) + func (c *Client) SendWebhook(req interface{}) error + func (c *Client) UrgentPhone(ctx context.Context, messageID string, userIDs []string) error + type Config struct + AppID string + AppSecret string + UserOpenID string + Webhook string + type MsgType string + const MsgTypeInteractive + const MsgTypePost + const MsgTypeText + type PostBody struct + EnUS *PostContent + ZhCN *PostContent + type PostContent struct + Content [][]PostElem + Title string + type PostContentWrapper struct + Post PostBody + type PostElem struct + Href string + Tag string + Text string + UserId string + UserName string + func NewAElem(text, href string) PostElem + func NewAtElem(userId string) PostElem + func NewTextElem(text string) PostElem + type PostReq struct + Content PostContentWrapper + type TextContent struct + Text string + type TextReq struct + Content TextContent