wxe

package
v0.0.0-...-0cc84fb Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResultSuccess        = "0"
	ResultErrCodeSuccess = 0
)

微信接口响应码

View Source
const (
	CallbackError   = "error"
	CallbackSuccess = "success"
)

Variables

This section is empty.

Functions

func InitContactClient

func InitContactClient(conf WxeConfig, redisConfig *redis.RedisConf) *work.Work

InitContactClient 初始化企业微信通讯录管理客户端

func InitCustomAppClient

func InitCustomAppClient(conf WxeConfig, redisConfig *redis.RedisConf) *work.Work

InitCustomAppClient 初始化企业微信自建应用客户端

func ParseEventContent

func ParseEventContent[T any](sourceContent []byte) (*T, error)

Types

type AddExternalContactContent

type AddExternalContactContent struct {
	BaseEventContent
	State       string `xml:"State"`
	WelcomeCode string `xml:"WelcomeCode"`
}

type BaseEventContent

type BaseEventContent struct {
	ToUserName     string `xml:"ToUserName"`
	FromUserName   string `xml:"FromUserName"`
	CreateTime     int64  `xml:"CreateTime"`
	MsgType        string `xml:"MsgType"`
	Event          string `xml:"Event"`
	ChangeType     string `xml:"ChangeType"`
	UserID         string `xml:"UserID"`
	ExternalUserID string `xml:"ExternalUserID"`
}

type DelFollowUserContent

type DelFollowUserContent struct {
	BaseEventContent
}

type WxeConfig

type WxeConfig struct {
	CorpID          string
	AgentID         int
	CustomAppSecret string
	ContactSecret   string
	Token           string
	AESKey          string
	CallbackURL     string
	OAuthCallback   string
	HttpDebug       bool
	MPAppId         string
	MediaId         string
}

WxeConfig 企业微信配置

Jump to

Keyboard shortcuts

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