Documentation
¶
Index ¶
- func ChatQuery(dao *daos.Dao) *dbx.SelectQuery
- func CommentQuery(dao *daos.Dao) *dbx.SelectQuery
- func CorrectTagValue(rawValue string) (string, error)
- func ExtractTagsFromPost(post Post) ([]string, error)
- func FormHistoryTextWithMarkup(markup []HistoryMessageTextEntity) string
- func FormWebhookTextMarkup(srcText string, entities telebot.Entities) (string, error)
- func PostQuery(dao *daos.Dao) *dbx.SelectQuery
- func PostTagQuery(dao *daos.Dao) *dbx.SelectQuery
- func TagQuery(dao *daos.Dao) *dbx.SelectQuery
- func TgVerificationTokenQuery(dao *daos.Dao) *dbx.SelectQuery
- func UserQuery(dao *daos.Dao) *dbx.SelectQuery
- func WriteJsonMessage(message *telebot.Message) error
- type Chat
- type Comment
- type History
- type HistoryMessage
- type HistoryMessageTextEntity
- type MarkupByPosition
- type Post
- type PostTag
- type Tag
- type TgVerificationToken
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommentQuery ¶
func CommentQuery(dao *daos.Dao) *dbx.SelectQuery
func CorrectTagValue ¶
func ExtractTagsFromPost ¶
func FormHistoryTextWithMarkup ¶
func FormHistoryTextWithMarkup(markup []HistoryMessageTextEntity) string
func FormWebhookTextMarkup ¶
func PostTagQuery ¶
func PostTagQuery(dao *daos.Dao) *dbx.SelectQuery
func TgVerificationTokenQuery ¶
func TgVerificationTokenQuery(dao *daos.Dao) *dbx.SelectQuery
func WriteJsonMessage ¶
func WriteJsonMessage(message *telebot.Message) error
Types ¶
type Chat ¶
type Chat struct { models.BaseModel UserId string `json:"userId" db:"user_id"` LinkedChatId string `json:"linkedChatId" db:"linked_chat_id"` TgUsername string `json:"tgUsername" db:"tg_username"` TgChatId int64 `json:"tgChatId" db:"tg_chat_id"` TgType string `json:"tgType" db:"tg_type"` // "private" | "group" | "supergroup" | "channel" | "privatechannel" TgLinkedChatId int64 `json:"tgLinkedChatId" db:"tg_linked_chat_id"` }
type Comment ¶
type Comment struct { models.BaseModel ChatId string `json:"chatId" db:"chat_id"` PostId string `json:"postId" db:"post_id"` IsTgHistoryMessage bool `json:"isTgHistoryMessage" db:"is_tg_history_message"` Text string `json:"text" db:"text"` TgMessageId int `json:"tgMessageId" db:"tg_comment_id"` TgMessageRaw types.JsonMap `json:"tgMessageRaw" db:"tg_message_raw"` TgReplyToMessageId int `json:"tgReplyToMessageId" db:"tg_reply_to_message_id"` }
type History ¶
type History struct { Id int64 `json:"id"` Name string `json:"name"` Type string `json:"type"` // "public_channel" | "public_supergroup" Messages []HistoryMessage `json:"messages"` }
func (*History) GetChatTgId ¶
type HistoryMessage ¶
type HistoryMessage struct { Id int `json:"id"` Type string `json:"type"` // service | message Date string `json:"date"` DateUnix string `json:"date_unixtime"` Edited string `json:"edited"` EditedUnix string `json:"edited_unixtime"` From string `json:"from"` FromId string `json:"from_id"` TextEntities []HistoryMessageTextEntity `json:"text_entities"` File *string `json:"file"` Photo *string `json:"photo"` ReplyToMessageId int `json:"reply_to_message_id"` ForwardedFrom *string `json:"forwarded_from"` }
type HistoryMessageTextEntity ¶
type HistoryMessageTextEntity struct { Type telebot.EntityType `json:"type"` Text string `json:"text"` }
type MarkupByPosition ¶
type Post ¶
type Post struct { models.BaseModel ChatId string `json:"chatId" db:"chat_id"` IsTgMessage bool `json:"isTgMessage" db:"is_tg_message"` IsTgHistoryMessage bool `json:"isTgHistoryMessage" db:"is_tg_history_message"` Text string `json:"text" db:"text"` TgMessageId int `json:"tgMessageId" db:"tg_post_id"` TgGroupMessageId int `json:"tgGroupMessageId" db:"tg_group_message_id"` TgMessageRaw types.JsonMap `json:"tgMessageRaw" db:"tg_message_raw"` }
type PostTag ¶
type TgVerificationToken ¶
type TgVerificationToken struct { models.BaseModel UserId string `json:"userId" db:"user_id"` Value string `json:"value" db:"value"` Verified bool `json:"verified" db:"verified"` }
func (*TgVerificationToken) TableName ¶
func (m *TgVerificationToken) TableName() string
Click to show internal directories.
Click to hide internal directories.