Documentation ¶
Index ¶
Constants ¶
View Source
const PurposePublish = "msg_pub"
View Source
const ReqMsgPub = "msg_pub"
Variables ¶
This section is empty.
Functions ¶
func PublishBasicRequest ¶
func PublishBasicRequest(tgCtx telebot.Context) (err error)
Types ¶
type ChanFilter ¶
type ChanFilter struct {
Pattern string
}
type ChanPostHandler ¶
type ChanPostHandler struct { ClientAwk api.Client GroupId string Log *slog.Logger Writers map[string]model.Writer[*pb.CloudEvent] Channels map[string]time.Time ChansLock *sync.Mutex CfgMsgs config.MessagesConfig }
func (ChanPostHandler) Close ¶
func (cp ChanPostHandler) Close()
func (ChanPostHandler) List ¶
func (cp ChanPostHandler) List(ctx context.Context, filter ChanFilter, limit uint32, cursor string, order Order) (page []Channel, err error)
func (ChanPostHandler) Publish ¶
func (cp ChanPostHandler) Publish(tgCtx telebot.Context, chanUserName string) (err error)
type Format ¶
type Format struct { HtmlPolicy *bluemonday.Policy UriReaderEvtBase string }
func (Format) Convert ¶
func (f Format) Convert(evt *pb.CloudEvent, subId, subDescr string, mode FormatMode) (tgMsg any)
type FormatMode ¶
type FormatMode int
const ( FormatModeHtml FormatMode = iota FormatModePlain // no html markup, but keep the telegram attachments FormatModeRaw // no html and no attachments )
Click to show internal directories.
Click to hide internal directories.