feishu

package module
v1.0.17 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: MIT Imports: 9 Imported by: 0

README

Golang

📦 Golang 飞书机器人

godoc goproxy.cn goreportcard.com deps.dev

安装

go get -v -u go.dtapp.net/feishu@v1.0.16

Documentation

Index

Constants

View Source
const (
	LogTable = "feishu"
)
View Source
const (
	Version = "1.0.17"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client 实例

func NewClient

func NewClient() (*Client, error)

NewClient 创建实例化

func (*Client) ConfigApiGormFun added in v1.0.14

func (c *Client) ConfigApiGormFun(apiClientFun golog.ApiGormFun)

ConfigApiGormFun 接口日志配置

func (*Client) Post added in v1.0.14

func (c *Client) Post(ctx context.Context, _method string, notMustParams ...gorequest.Params) ([]byte, error)

func (*Client) WebhookSend

func (c *Client) WebhookSend(ctx context.Context, key string, notMustParams ...gorequest.Params) (*WebhookSendResult, error)

WebhookSend 发送消息 https://open.feishu.cn/document/ukTMukTMukTM/ucTM5YjL3ETO24yNxkjN

func (*Client) WebhookSendSign added in v1.0.16

func (c *Client) WebhookSendSign(ctx context.Context, key string, secret string, notMustParams ...gorequest.Params) (*WebhookSendResult, error)

WebhookSendSign 发送消息签名版 https://open.feishu.cn/document/ukTMukTMukTM/ucTM5YjL3ETO24yNxkjN

type WebhookSendResponse

type WebhookSendResponse struct {
	Errcode   int64  `json:"errcode"`
	Errmsg    string `json:"errmsg"`
	Type      string `json:"type"`
	MediaId   string `json:"media_id"`
	CreatedAt string `json:"created_at"`
}

type WebhookSendResult

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

Jump to

Keyboard shortcuts

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