dingding

package
v0.17.6 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2021 License: MIT Imports: 4 Imported by: 0

README

dingtalk

使用

创建钉钉群机器人
  1. 选择添加自定义机器人。
  2. 安全设置加签设置 Xnip2020-07-05_15-55-24.jpg
使用说明
cfg := Config{
  token:  "dddd",
  secret: "xxx",
}

s := New(&cfg)
s.Send(context.Background(), "subject", "content")

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Token  string
	Secret string
}

type Service

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

func New

func New(cfg *Config) *Service

func (*Service) Send

func (s *Service) Send(ctx context.Context, subject, content string) error

Send takes a message subject and a message content and sends them to all previously set users.

Jump to

Keyboard shortcuts

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