dingtalkbot

package
v0.4.16 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notifier added in v0.4.5

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

func NewNotifier added in v0.4.5

func NewNotifier(config *NotifierConfig) (*Notifier, error)

func (*Notifier) Notify added in v0.4.5

func (n *Notifier) Notify(ctx context.Context, subject string, message string) (*notifier.NotifyResult, error)

func (*Notifier) SetLogger added in v0.4.5

func (n *Notifier) SetLogger(logger *slog.Logger)

type NotifierConfig added in v0.4.5

type NotifierConfig struct {
	// 钉钉机器人的 Webhook 地址。
	WebhookUrl string `json:"webhookUrl"`
	// 钉钉机器人的 Secret。
	Secret string `json:"secret"`
	// 自定义消息数据。
	// 选填。
	CustomPayload string `json:"customPayload,omitempty"`
}

Jump to

Keyboard shortcuts

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