feishu

package
v0.0.0-...-c01aa29 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// 开发流程与工具介绍 https://open.feishu.cn/document/home/introduction-to-custom-app-development/self-built-application-development-process?lang=zh-CN
	AppId     string `env:"FEISHU_APP_ID"`
	AppSecret string `env:"FEISHU_APP_SECRET"`

	// 事件订阅概述 https://open.feishu.cn/document/ukTMukTMukTM/uUTNz4SN1MjL1UzM?lang=zh-CN
	// Encrypt Key 配置示例与解密: https://open.feishu.cn/document/ukTMukTMukTM/uYDNxYjL2QTM24iN0EjN/event-subscription-configure-/encrypt-key-encryption-configuration-case
	EncryptKey string `env:"FEISHU_ENCRYPT_KEY"`
	// 订阅事件时, 该自动会放置于token字段中, 用于校验发送方身份
	VerificationToken string `env:"FEISHU_VERIFICATION_TOKEN"`
	// contains filtered or unexported fields
}

获取应用身份访问凭证 https://open.feishu.cn/document/ukTMukTMukTM/ukDNz4SO0MjL5QzM/g#top_anchor

func LoadClientFromEnv

func LoadClientFromEnv() (*Client, error)

func NewClient

func NewClient(appId, appSecret string) *Client

func (*Client) CreateApprovalInstance

func (c *Client) CreateApprovalInstance(ctx context.Context, req *lark.CreateApprovalInstanceReq) (*lark.CreateApprovalInstanceResp, error)

func (*Client) GetApproval

func (c *Client) GetApproval(ctx context.Context, req *lark.GetApprovalReq) (*lark.GetApprovalResp, error)

func (*Client) Notify

func (c *Client) Notify()

Jump to

Keyboard shortcuts

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