lark

package
v1.10.8 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenSign

func GenSign(secret string, timestamp int64) (string, error)

func NewLark

func NewLark(webHookUrl string, sl Secure, secret string) notify.Sender

NewLark init a Lark send conf

Types

type Content

type Content struct {
	Text string `json:"text"`
}

type Lark

type Lark struct {
	MsgType    string `json:"msg_type"`
	WebHookUrl string `json:"web_hook_url"`
	Sl         Secure `json:"sl"`
	Secret     string `json:"secret"`
}

Lark alarm conf

func (*Lark) Send

func (d *Lark) Send(tos []string, title string, content string) error

Send to notify tos is phone number

type Result

type Result struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
}

Result post resp

type Secure

type Secure uint
const (
	// CustomKey Custom keywords
	CustomKey Secure = iota + 1
	// Sign need sign up
	Sign
	// IPCdir IP addres
	IPCdir
)

type SendMsg

type SendMsg struct {
	Timestamp string  `json:"timestamp"`
	Sign      string  `json:"sign"`
	MsgType   string  `json:"msg_type"`
	Content   Content `json:"content"`
}

SendMsg post json data

Jump to

Keyboard shortcuts

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