Documentation ¶
Index ¶
- type Message
- type MessageRef
- func (msg MessageRef) GetChannel() string
- func (msg MessageRef) GetThread() string
- func (msg MessageRef) GetTime() time.Time
- func (msg MessageRef) GetTimestamp() string
- func (msg MessageRef) GetUniqueKey() string
- func (msg MessageRef) GetUser() string
- func (msg MessageRef) IsInternalMessage() bool
- func (msg MessageRef) WithText(text string) Message
- type Ref
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct { MessageRef Text string `json:"text,omitempty"` }
Message is a wrapper which holds all important fields from slack.MessageEvent
func FromSlackEvent ¶
func FromSlackEvent(event *slack.MessageEvent) Message
func (*Message) GetMessageRef ¶
GetMessageRef create a msg.ItemRef, an unique identifier to a message
type MessageRef ¶
type MessageRef struct { Channel string `json:"channel,omitempty"` User string `json:"user,omitempty"` Timestamp string `json:"ts,omitempty"` Thread string `json:"thread_ts,omitempty"` InternalMessage bool }
MessageRef is holds meta information for an message, like author, creation date or channel
func (MessageRef) GetChannel ¶
func (msg MessageRef) GetChannel() string
func (MessageRef) GetThread ¶
func (msg MessageRef) GetThread() string
func (MessageRef) GetTime ¶
func (msg MessageRef) GetTime() time.Time
func (MessageRef) GetTimestamp ¶
func (msg MessageRef) GetTimestamp() string
func (MessageRef) GetUniqueKey ¶
func (msg MessageRef) GetUniqueKey() string
func (MessageRef) GetUser ¶
func (msg MessageRef) GetUser() string
func (MessageRef) IsInternalMessage ¶
func (msg MessageRef) IsInternalMessage() bool
func (MessageRef) WithText ¶
func (msg MessageRef) WithText(text string) Message
attach a text to a message
Click to show internal directories.
Click to hide internal directories.