dingtalk

package module
v1.0.26 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogTable = "dingtalk"
)
View Source
const (
	Version = "1.0.26"
)

Variables

This section is empty.

Functions

func TraceStartSpan added in v1.0.25

func TraceStartSpan(ctx context.Context, spanName string) (context.Context, trace.Span)

TraceStartSpan 开始OpenTelemetry链路追踪状态

Types

type Client

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

Client 实例

func NewClient

func NewClient() (*Client, error)

NewClient 创建实例化

func (*Client) RobotSend

func (c *Client) RobotSend(ctx context.Context, accessToken string, notMustParams ...gorequest.Params) (*RobotSendResult, error)

RobotSend 发送消息 https://open.dingtalk.com/document/group/custom-robot-access

func (*Client) RobotSendSign

func (c *Client) RobotSendSign(ctx context.Context, accessToken string, secret string, notMustParams ...gorequest.Params) (*RobotSendResult, error)

RobotSendSign 发送消息签名版 https://open.dingtalk.com/document/group/custom-robot-access

func (*Client) RobotSendSignURL added in v1.0.25

func (c *Client) RobotSendSignURL(ctx context.Context, url string, secret string, notMustParams ...gorequest.Params) (*RobotSendResult, error)

RobotSendSignURL 发送消息签名版 https://open.dingtalk.com/document/group/custom-robot-access

func (*Client) RobotSendURL added in v1.0.25

func (c *Client) RobotSendURL(ctx context.Context, url string, notMustParams ...gorequest.Params) (*RobotSendResult, error)

RobotSendURL 发送消息 https://open.dingtalk.com/document/group/custom-robot-access

func (*Client) SetClientIP

func (c *Client) SetClientIP(clientIP string) *Client

SetClientIP 配置

func (*Client) SetLogFun

func (c *Client) SetLogFun(logFun gorequest.LogFunc)

SetLogFun 设置日志记录函数

type RobotSendResponse

type RobotSendResponse struct {
	Errcode int64  `json:"errcode"`
	Errmsg  string `json:"errmsg"`
}

type RobotSendResult

type RobotSendResult struct {
	Result RobotSendResponse  // 结果
	Body   []byte             // 内容
	Http   gorequest.Response // 请求
}

Jump to

Keyboard shortcuts

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