wxwork

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: MIT Imports: 10 Imported by: 0

README

weworkapi_cplusplus

official lib of wework api https://work.weixin.qq.com/api/doc

注意事项

  • 1.回调sdk json版本

  • 2.wxbizjsonmsgcrypt.go文件中声明并实现了WXBizJsonMsgCrypt类,提供用户接入企业微信的三个接口。sample.go文件提供了如何使用这三个接口的示例。

  • 3.WXBizJsonMsgCrypt类封装了VerifyURL, DecryptMsg, EncryptMsg三个接口,分别用于开发者验证回调url,收到用户回复消息的解密以及开发者回复消息的加密过程。使用方法可以参考sample.go文件。

  • 4.加解密协议请参考企业微信官方文档。

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTicket

func GetTicket(accessToken string) string

func GetTicketV2

func GetTicketV2(accessToken string) string

func VerifyURL

func VerifyURL(r *http.Request, app WxApp) string

Types

type MsgContent

type MsgContent struct {
	ToUsername   string `xml:"ToUserName"`
	FromUsername string `xml:"FromUserName"`
	CreateTime   uint32 `xml:"CreateTime"`
	MsgType      string `xml:"MsgType"`
	Content      string `xml:"Content"`
	Msgid        string `xml:"MsgId"`
	AgentId      string `xml:"AgentID"`
	Event        string `xml:"Event"`
	EventKey     string `xml:"EventKey"`
}

func CallbackHandler

func CallbackHandler(r *http.Request, app WxApp) (MsgContent, string)

func MsgHandler

func MsgHandler(r *http.Request, app WxApp) (MsgContent, string)

type WxApp

type WxApp struct {
	Corpid         string
	AgentId        string
	Secret         string
	Token          string
	EncodingAESKey string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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