other

package
v0.0.0-...-768d9e2 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CMsg

type CMsg struct {
	Msgtype S钉钉通知类型 `gorm:"-" json:"msgtype" form:"msgtype"`
	Token   string  `gorm:"-" json:"token" form:"token"`
	//Token   string `gorm:"-" json:"token,omitempty" form:"token"`
	Text DdText `gorm:"-" json:"text" form:"text"`
	DdAt DdAt   `gorm:"-" json:"at" form:"at"`
}

发送的结构体

func (*CMsg) F发送钉钉通知

func (msg *CMsg) F发送钉钉通知() (res *ReqMsg, err error)

func (*CMsg) F添加接收人

func (msg *CMsg) F添加接收人(str ...string) *CMsg

func (*CMsg) F添加接收的消息

func (msg *CMsg) F添加接收的消息(text string) *CMsg

type DdAt

type DdAt struct {
	AtMobiles []string `gorm:"-"  json:"atMobiles" form:"atMobiles"`
	AtUserIds []string `gorm:"-"  json:"atUserIds" form:"atUserIds"`
	IsAtAll   bool     `gorm:"-"  json:"isAtAll" form:"isAtAll"`
}

type DdMsg

type DdMsg struct {
	Id        int64  `gorm:"primarykey"  json:"id" form:"id"`
	Msgtype   string `gorm:"type:varchar(16);comment:'消息类型'" json:"msgtype" form:"msgtype"`
	Body      string `gorm:"type:varchar(1280);comment:'消息的内容'" json:"body" form:"body"`
	AtMobiles string `gorm:"type:varchar(256);comment:'通知的人'"  json:"atMobiles" form:"atMobiles"`
	IsAtAll   int8   `gorm:"comment:'是否通知全部'"  json:"isAtAll" form:"isAtAll"`
}

type DdText

type DdText struct {
	Content string `gorm:"-" json:"content" form:"content"`
}

type ReqMsg

type ReqMsg struct {
	Errcode int    `gorm:"-" json:"errcode" form:"errcode"` //成功是0
	Errmsg  string `gorm:"-" json:"errmsg" form:"errmsg"`   //成功是ok
}

type S钉钉通知类型

type S钉钉通知类型 string
const (
	V类型_文本 S钉钉通知类型 = "text"
)

type S钉钉链接

type S钉钉链接 struct {
	Token string
}

func F新建钉钉通知链接

func F新建钉钉通知链接(token string) *S钉钉链接

func (*S钉钉链接) F新建消息

func (a *S钉钉链接) F新建消息(是否通知全部 ...int) *CMsg

默认文本,还有默认的accesstoken

Jump to

Keyboard shortcuts

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