Documentation ¶
Index ¶
- func ChannelToLanguage(channel *model.Channel) config.Language
- func CitiesToFields(cities map[string][]string) []*model.SlackAttachmentField
- func NewRocketIDsPresent(message *Message, prevMsg *Message) bool
- func Render(msg *Message, lang config.Language) *model.Post
- type Bot
- func (b *Bot) AwaitMessage()
- func (b *Bot) Cleanup()
- func (b *Bot) Connect()
- func (b *Bot) Disconnect()
- func (b *Bot) FindBotChannel()
- func (b *Bot) GetPrevMsgs(message *Message) (map[district.ID]*Message, map[district.ID]bool)
- func (b *Bot) LoginAsTheBotUser()
- func (b *Bot) MakeSureServerIsRunning()
- func (b *Bot) Register()
- func (b *Bot) SubmitMessage(m *Message)
- func (b *Bot) UpdateMonitor(m *Message)
- type Message
- func (m *Message) AppendDistrict(districtID district.ID)
- func (m *Message) GetHash() string
- func (m *Message) IsExpired() bool
- func (m *Message) PatchData(n *Message) bool
- func (m *Message) PatchPosts(b *Bot)
- func (m *Message) PostForChannel(c *model.Channel) *model.Post
- func (m *Message) Prerender()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CitiesToFields ¶
func CitiesToFields(cities map[string][]string) []*model.SlackAttachmentField
func NewRocketIDsPresent ¶
Types ¶
type Bot ¶
type Bot struct { IsOnline bool Client *model.Client4 ConfigChannel *model.Channel Monitoring monitoring.Monitoring // contains filtered or unexported fields }
func (*Bot) AwaitMessage ¶
func (b *Bot) AwaitMessage()
func (*Bot) Disconnect ¶
func (b *Bot) Disconnect()
func (*Bot) FindBotChannel ¶
func (b *Bot) FindBotChannel()
func (*Bot) GetPrevMsgs ¶
func (*Bot) LoginAsTheBotUser ¶
func (b *Bot) LoginAsTheBotUser()
func (*Bot) MakeSureServerIsRunning ¶
func (b *Bot) MakeSureServerIsRunning()
func (*Bot) SubmitMessage ¶
func (*Bot) UpdateMonitor ¶
type Message ¶
type Message struct { Instructions string Category string SafetySeconds uint Cities []district.ID RocketIDs map[string]bool Rendered map[config.Language]*model.Post Expire time.Time PostMutex sync.Mutex PostIDs []string ChannelsPosted []*model.Channel Changed bool PubDate string }
func NewMessage ¶
func (*Message) AppendDistrict ¶
func (*Message) PatchPosts ¶
Click to show internal directories.
Click to hide internal directories.