Versions in this module Expand all Collapse all v0 v0.1.0 Mar 13, 2022 Changes in this version + var EmptyFile = TgFile + var MessageTypeDocument = MessageType + var MessageTypePhoto = MessageType + var MessageTypeTextOnly = MessageType + var TgFileTypeDocument = TgFileType + var TgFileTypePhoto = TgFileType + type Channel struct + Hashtags []string + Id string + type ChannelMessage struct + ChannelID string + ID string + func NewChannelMessage(messageID string, channelID string) (ChannelMessage, error) + type ChannelRepository interface + GetChannelsByHashtags func(ctx context.Context, hashtags []string) ([]Channel, error) + Save func(ctx context.Context, channel Channel) error + type Message struct + ChannelMessages []ChannelMessage + Hashtags []string + ID MessageID + Text string + func NewMessage(id MessageID, text string, hashtags []string) (Message, error) + func (m *Message) AddChannelMessage(channelMessage ChannelMessage) + type MessageID struct + func NewMessageIDFromInt64(value int64) (MessageID, error) + func NewMessageIDFromStr(value string) (MessageID, error) + func (m MessageID) String() string + func (m MessageID) Value() int64 + type MessageRepository interface + GetByID func(ctx context.Context, messageID string) (Message, error) + Save func(ctx context.Context, msg Message) error + type MessageType struct + func NewMessageTypeFromStr(val string) MessageType + func (mt MessageType) IsZero() bool + func (mt MessageType) Value() string + type TgFile struct + func NewTgFile(id string, tgFileType TgFileType) (TgFile, error) + func (f TgFile) ID() string + func (f TgFile) IsZero() bool + type TgFileType struct + type TgMessageSender interface + SendMessageToTgChan func(tgChanId, text, username, originMessageId string, tgFile TgFile) (ChannelMessage, error)