dingtalk

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2025 License: MIT Imports: 13 Imported by: 0

README

钉钉 Webhook Robot

Feature

  • NewDingTalk(token string)
  • UseToken(token string)
  • UseSecret(secret string)
  • SendText(text string)
  • SendTextAt(text string, atMobiles []string, isAtAll bool)
  • SendLink(title, text, messageURL, picURL string)
  • SendMarkdown(title, body string)
  • SendMarkdownAt(title, body string, atMobiles []string, isAtAll bool)
  • SetDebug(debug bool)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DingTalk added in v0.2.0

type DingTalk struct {
	// contains filtered or unexported fields
}

DingTalk

func NewDingTalk added in v0.2.0

func NewDingTalk(token string) *DingTalk

NewDingTalk

func (r *DingTalk) SendLink(title, text, messageURL, picURL string) error

func (*DingTalk) SendMarkdown added in v0.2.0

func (r *DingTalk) SendMarkdown(title, body string) error

func (*DingTalk) SendMarkdownAt added in v0.2.0

func (r *DingTalk) SendMarkdownAt(title, body string, atMobiles []string, isAtAll bool) error

func (*DingTalk) SendText added in v0.2.0

func (r *DingTalk) SendText(text string) error

func (*DingTalk) SendTextAt added in v0.2.0

func (r *DingTalk) SendTextAt(text string, atMobiles []string, isAtAll bool) error

func (*DingTalk) SetDebug added in v0.2.0

func (r *DingTalk) SetDebug(debug bool) *DingTalk

func (*DingTalk) UseHost added in v0.2.0

func (r *DingTalk) UseHost(url string) notice.Noticer

Deprecated

func (*DingTalk) UseSecret added in v0.2.0

func (r *DingTalk) UseSecret(secret string) notice.Noticer

func (*DingTalk) UseToken added in v0.2.0

func (r *DingTalk) UseToken(token string) notice.Noticer

type Response

type Response struct {
	ErrCode int    `json:"errcode"`
	ErrMsg  string `json:"errmsg"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL