Documentation ¶
Index ¶
- Constants
- func IsNetFile(path string) bool
- type Article
- type CommonResponse
- type File
- type Image
- type Markdown
- type MsgReq
- type News
- type Text
- type UploadMediaResponse
- type Webhook
- func (w *Webhook) Send(msg interface{}) (response CommonResponse, err error)
- func (w *Webhook) SendFile(path string) (response CommonResponse, err error)
- func (w *Webhook) SendImage(path string) (response CommonResponse, err error)
- func (w *Webhook) SendMarkdown(text string) (response CommonResponse, err error)
- func (w *Webhook) SendNews(title, description, jumpURL, picURL string) (response CommonResponse, err error)
- func (w *Webhook) SendText(text string) (response CommonResponse, err error)
- func (w *Webhook) UploadMedia(path string) (response UploadMediaResponse, err error)
Constants ¶
View Source
const ( MsgFile = "file" MsgImage = "image" MsgMarkdown = "markdown" MsgNews = "news" MsgText = "text" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CommonResponse ¶
type UploadMediaResponse ¶
type UploadMediaResponse struct { CommonResponse Type string `json:"type"` MediaID string `json:"media_id"` CreatedAt string `json:"created_at"` }
type Webhook ¶
type Webhook struct {
WebhookKey string
}
func NewWebhook ¶
func (*Webhook) Send ¶
func (w *Webhook) Send(msg interface{}) (response CommonResponse, err error)
func (*Webhook) SendFile ¶
func (w *Webhook) SendFile(path string) (response CommonResponse, err error)
func (*Webhook) SendImage ¶
func (w *Webhook) SendImage(path string) (response CommonResponse, err error)
func (*Webhook) SendMarkdown ¶
func (w *Webhook) SendMarkdown(text string) (response CommonResponse, err error)
func (*Webhook) SendNews ¶
func (w *Webhook) SendNews(title, description, jumpURL, picURL string) (response CommonResponse, err error)
func (*Webhook) SendText ¶
func (w *Webhook) SendText(text string) (response CommonResponse, err error)
func (*Webhook) UploadMedia ¶
func (w *Webhook) UploadMedia(path string) (response UploadMediaResponse, err error)
Click to show internal directories.
Click to hide internal directories.