Documentation ¶
Index ¶
Constants ¶
View Source
const (
DefaultExtension = "json"
)
Variables ¶
This section is empty.
Functions ¶
func ExampleDataRaw ¶
func ExampleDataRaw() []byte
Types ¶
type Attachment ¶
type Attachment struct { Title string `json:"title,omitempty"` Pretext string `json:"pretext,omitempty"` Text string `json:"text,omitempty"` MrkdwnIn []string `json:"mrkdwn_in,omitempty"` Fields []Field `json:"fields,omitempty"` }
func NewAttachment ¶
func NewAttachment() Attachment
func (*Attachment) AddField ¶
func (attach *Attachment) AddField(field Field)
type ExampleData ¶
type ExampleData struct {
Data map[string]ExampleSource `json:"data,omitempty"`
}
func NewExampleData ¶
func NewExampleData() (ExampleData, error)
func (*ExampleData) BuildFilename ¶
func (data *ExampleData) BuildFilename(handlerKey string, eventSlug string) string
func (*ExampleData) ExampleMessageBytes ¶
func (data *ExampleData) ExampleMessageBytes(handlerKey string, eventSlug string) ([]byte, error)
type ExampleSource ¶
type Message ¶
type Message struct { Activity string `json:"activity,omitempty"` IconEmoji string `json:"icon_emoji,omitempty"` IconURL string `json:"icon_url,omitempty"` Title string `json:"title,omitempty"` Text string `json:"text,omitempty"` Attachments []Attachment `json:"attachments,omitempty"` }
func NewMessage ¶
func NewMessage() Message
func (*Message) AddAttachment ¶
func (msg *Message) AddAttachment(att Attachment)
Click to show internal directories.
Click to hide internal directories.