Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Adapter ¶
type Adapter interface {
SendWebhook(url string, ccMsg Message, formattedMsg any, opts map[string]any) (*fasthttp.Request, *fasthttp.Response, error)
SendMessage(ccMsg Message, formattedMsg any, opts map[string]any) (*fasthttp.Request, *fasthttp.Response, error)
WebhookUID(ctx *fasthttp.RequestCtx) (string, error)
}
type Attachment ¶
type Attachment struct {
AuthorIcon string `json:"author_icon,omitempty"`
AuthorLink string `json:"author_link,omitempty"`
AuthorName string `json:"author_name,omitempty"`
Color string `json:"color,omitempty"`
Fallback string `json:"fallback,omitempty"`
Fields []Field `json:"fields,omitempty"`
MarkdownIn []string `json:"mrkdwn_in,omitempty"`
Pretext string `json:"pretext,omitempty"`
Text string `json:"text,omitempty"`
ThumbnailURL string `json:"thumbnail_url,omitempty"`
Title string `json:"title,omitempty"`
}
func NewAttachment ¶
func NewAttachment() Attachment
func (*Attachment) AddField ¶
func (attach *Attachment) AddField(field Field)
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.