Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EscapeString ¶
EscapeString escapes special characters. `&` => "&" `<` => "<" `>` => ">"
Types ¶
type Attachment ¶
type Attachment struct { AuthorIcon string `json:"author_icon,omitempty"` AuthorLink string `json:"author_link,omitempty"` AuthorName string `json:"author_name,omitempty"` Fallback string `json:"fallback,omitempty"` Color string `json:"color,omitempty"` Pretext string `json:"pretext,omitempty"` Title string `json:"title,omitempty"` TitleLink string `json:"title_link,omitempty"` Text string `json:"text,omitempty"` ImageURL string `json:"image_url,omitempty"` ThumbURL string `json:"thumb_url,omitempty"` Fields []*Field `json:"fields,omitempty"` }
Attachment slack attachment
type Field ¶
type Field struct { Title string `json:"title,omitempty"` Value string `json:"value,omitempty"` Short string `json:"short,omitempty"` }
Field slack field
type Message ¶
type Message struct { IconEmoji string `json:"icon_emoji,omitempty"` Text string `json:"text,omitempty"` Attachments []*Attachment `json:"attachments,omitempty"` Markdown bool `json:"mrkdwn"` }
Message slack message
func (*Message) AddAttachment ¶
func (sm *Message) AddAttachment(sa *Attachment)
AddAttachment add a attachment
Click to show internal directories.
Click to hide internal directories.