Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnknownChannelType = eris.New("Unknown channel type") ErrCreateChannelErorr = eris.New("Error on create channel") )
View Source
var ( ErrChannelIsFull = eris.New("The channel is full") ErrInvalidMessageType = eris.New("Invalid message type") )
View Source
var ( TelegramMessageQueueCap = 1000 TelegramBotAPIURL = "https://api.telegram.org" )
View Source
var ErrTelegramInvalidTimeout = eris.New("Invalid telegram timeout")
Functions ¶
Types ¶
type MessageChannelInterface ¶
type MessageChannelInterface interface { fmt.Stringer Name() string MessageContainer() interface{} Enqueue(interface{}) error Provider() interface { HTTPClient() *http.Client } Stop() error Start() error }
func BuildChannel ¶
func BuildChannelsFromURLS ¶
func BuildChannelsFromURLS(urls []string, logger *zerolog.Logger) ([]MessageChannelInterface, error)
func NewTelegramChannel ¶
type TelegramMessage ¶
type TelegramMessage struct { Text string `json:"text" mapstructure:"text"` ParseMode *string `json:"parseMode,omitempty" mapstructure:"parse_mode,omitempty"` DisableWebPagePreview int `json:"disableWebPagePreview" mapstructure:"disable_web_page_preview"` DisableNotifications int `json:"disableNotifications" mapstructure:"disable_notifications"` ReplyToMessageID *int `json:"replyToMessageId,omitempty" mapstructure:"reply_to_message_id,omitempty"` }
func (*TelegramMessage) Map ¶
func (m *TelegramMessage) Map() (map[string]interface{}, error)
func (*TelegramMessage) String ¶
func (m *TelegramMessage) String() string
Click to show internal directories.
Click to hide internal directories.