notice

package
v0.0.0-...-98a29f8 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	CorpID     string `json:"corp_id"`
	CorpSecret string `json:"corp_secret"`
}

type DingConfig

type DingConfig struct {
	WebhookURL string
}

type Message

type Message struct {
	AgentID string `json:"agent_id"` // 接收人ID
	User    string `json:"user"`     // 接收人
	MsgType string `json:"msgtype"`  // 消息类型,这里使用text
	Text    struct {
		Content string `json:"content"` // 消息内容
	} `json:"text"`
}

type Notice

type Notice struct {
	Msg        *Message
	SendType   SendType
	WxConfig   *Config
	DingConfig *DingConfig
}

func NewNotice

func NewNotice() *Notice

func (*Notice) DingTalk

func (notice *Notice) DingTalk() (string, error)

func (*Notice) Qweixin

func (notice *Notice) Qweixin() (string, error)

func (*Notice) Send

func (notice *Notice) Send(sendType SendType) (string, error)

type SendType

type SendType int
const (
	QyWeixin SendType = iota + 1
	DingTalk
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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