dingtalk

package module
v0.0.0-...-54ebfb4 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

README

README


Documentation

Index

Constants

View Source
const Endpoint string = "https://oapi.dingtalk.com/robot/send?access_token=%s"

Variables

This section is empty.

Functions

func GetIP

func GetIP() string

Types

type ActionCard

type ActionCard struct {
	Text           string `json:"text"`
	Tile           string `json:"title"`
	HideAvatar     string `json:"hideAvatar"`
	BtnOrientation string `json:"btnOrientation"`
	SingleTitle    string `json:"singleTitle"`
	SingleURL      string `json:"singleURL"`
}

整体跳转ActionCard类型

type ActionCardBtns

type ActionCardBtns struct {
	Text           string `json:"text"`
	Tile           string `json:"title"`
	HideAvatar     string `json:"hideAvatar"`
	BtnOrientation string `json:"btnOrientation"`
	Btns           []Btns `json:"btns"`
}

独立跳转ActionCard类型

type At

type At struct {
	AtMobiles []string `json:"atMobiles"`
	IsAtAll   bool     `json:"isAtAll"`
}

@人的操作

type Btns

type Btns struct {
	Title     string `json:"title"`
	ActionURL string `json:"actionURL"`
}

type Context

type Context struct {
	AccessToken string
}

type DingError

type DingError struct {
	Errmsg  string `json:"errmsg"`
	Errcode int    `json:"errcode"`
}

func NewDingError

func NewDingError(bytes []byte) *DingError

type DingTalk

type DingTalk struct {
	*Context
}

func NewDingTalk

func NewDingTalk(c *Context) *DingTalk

func (*DingTalk) GetUrl

func (d *DingTalk) GetUrl() string

func (*DingTalk) SendLog

func (d *DingTalk) SendLog(content string) error

func (*DingTalk) SendText

func (d *DingTalk) SendText(content string) error
type FeedCardLink struct {
	Links []Link `json:"links"`
}
type Link struct {
	Text       string `json:"text"`
	Title      string `json:"title"`
	PicUrl     string `json:"picUrl"`
	MessageUrl string `json:"messageUrl"`
}

link 类型详细

type MsgActionCard

type MsgActionCard struct {
	MsgType    string     `json:"msgtype"`
	ActionCard ActionCard `json:"actionCard"`
}

整体跳转ActionCard类型

type MsgActionCardBtns

type MsgActionCardBtns struct {
	MsgType    string         `json:"msgtype"`
	ActionCard ActionCardBtns `json:"actionCard"`
}

type MsgFeedCard

type MsgFeedCard struct {
	MsgType      string       `json:"msgtype"`
	FeedCardLink FeedCardLink `json:"feedCard"`
}

FeedCard类型

type MsgLink struct {
	MsgType string `json:"msgtype"`
	Link    Link   `json:"link"`
}

link类型

type MsgText

type MsgText struct {
	MsgType string `json:"msgtype"`
	Text    Text   `json:"text"`
	At      At     `json:"at"`
}

具体的消息数字题

type Text

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

文本内容主体

Directories

Path Synopsis
Package httplib is used as http.Client Usage: import "github.com/astaxie/beego/httplib" b := httplib.Post("http://beego.me/") b.Param("username","astaxie") b.Param("password","123456") b.PostFile("uploadfile1", "httplib.pdf") b.PostFile("uploadfile2", "httplib.txt") str, err := b.String() if err != nil { t.Fatal(err) } fmt.Println(str) more docs http://beego.me/docs/module/httplib.md
Package httplib is used as http.Client Usage: import "github.com/astaxie/beego/httplib" b := httplib.Post("http://beego.me/") b.Param("username","astaxie") b.Param("password","123456") b.PostFile("uploadfile1", "httplib.pdf") b.PostFile("uploadfile2", "httplib.txt") str, err := b.String() if err != nil { t.Fatal(err) } fmt.Println(str) more docs http://beego.me/docs/module/httplib.md

Jump to

Keyboard shortcuts

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