Documentation ¶
Index ¶
- func AppIDToMsgMapByMsgID(c event.Context, msgID int) (map[int]model.Bind, error)
- func AttachIDsInWaitingUpload(c event.Context, ids []int) ([]int, error)
- func AttachmentToCbkAttachs(attachs []*model.Attachment, waitingIDs []int) []callback.AttachmentNew
- func CollectForwardExtAttachIDs(exts []ForwardExt) []int
- func CollectMessageNewForwardsLocalIDs(fwds []Forward) []string
- func Exec(c event.Context, e Message) error
- func ForwardExtToCbkForwards(exts []ForwardExt, attachWaitingIDs []int) []callback.ForwardNew
- func NewMsgResponseToBinds(responses []callback.MessageNewResponse) []*model.Bind
- type Attachment
- type Forward
- type ForwardExt
- type Message
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppIDToMsgMapByMsgID ¶
func AttachmentToCbkAttachs ¶
func AttachmentToCbkAttachs(attachs []*model.Attachment, waitingIDs []int) []callback.AttachmentNew
func CollectForwardExtAttachIDs ¶
func CollectForwardExtAttachIDs(exts []ForwardExt) []int
func ForwardExtToCbkForwards ¶
func ForwardExtToCbkForwards(exts []ForwardExt, attachWaitingIDs []int) []callback.ForwardNew
func NewMsgResponseToBinds ¶
func NewMsgResponseToBinds(responses []callback.MessageNewResponse) []*model.Bind
Types ¶
type Attachment ¶
type Attachment struct { LocalID string `json:"local_id,omitempty"` HasSpoiler bool `json:"has_spoiler,omitempty"` Type int `json:"type,omitempty"` // Общедоступная ссылка для загрузки файла. // Если ссылка не передана и по такому FileID не найдено файлов, то клиент должен будет загрузить файлы на специальный эндпоинт Url string `json:"url,omitempty"` }
type Forward ¶
type Forward struct { LocalID string `json:"local_id,omitempty"` Username string `json:"username,omitempty"` Text string `json:"text,omitempty"` CreateDate string `json:"create_date,omitempty"` Attachments []*Attachment `json:"attachments,omitempty"` }
type ForwardExt ¶
type ForwardExt struct { ID int LocalID string Username string Text string CreateDate string Attachments []*model.Attachment }
func SaveMessage ¶
func SaveMessage(c event.Context, e Message) (model.MessageExt, []ForwardExt, error)
type Message ¶
type Message struct { AppID int `json:"app_id,omitempty"` LocalID string `json:"local_id,omitempty"` IsSilent bool `json:"is_silent,omitempty"` ReplyLocalID string `json:"reply_local_id,omitempty"` Username string `json:"username,omitempty"` Text string `json:"text,omitempty"` Forwards []Forward `json:"forwards,omitempty"` Attachments []Attachment `json:"attachments,omitempty"` }
Click to show internal directories.
Click to hide internal directories.