corp

package
v0.0.0-...-2636f62 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAPIDomainIP

func GetAPIDomainIP(dest *APIDomainIP) wx.Action

func GetUserInfo

func GetUserInfo(dest *UserInfo, code string) wx.Action

GetUserInfo 获取访问用户身份

func UserAuthSucc

func UserAuthSucc(userID string) wx.Action

UserAuthSucc 二次验证

Types

type APIDomainIP

type APIDomainIP struct {
	IPList []string `json:"ip_list"`
}

type AccessToken

type AccessToken struct {
	Token     string `json:"access_token"`
	ExpiresIn int64  `json:"expires_in"`
}

AccessToken 企业微信AccessToken

type Corp

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

func NewCorp

func NewCorp(corpid string) *Corp

func (*Corp) AccessToken

func (corp *Corp) AccessToken(ctx context.Context, secret string, options ...yiigo.HTTPOption) (*AccessToken, error)

func (*Corp) CorpID

func (corp *Corp) CorpID() string

func (*Corp) Do

func (corp *Corp) Do(ctx context.Context, accessToken string, action wx.Action, options ...yiigo.HTTPOption) error

Do exec action

func (*Corp) SetServerConfig

func (corp *Corp) SetServerConfig(token, encodingAESKey string)

SetServerConfig 设置服务器配置 [参考](https://open.work.weixin.qq.com/api/doc/90000/90135/90930)

type UserInfo

type UserInfo struct {
	UserID         string `json:"UserId"`
	OpenID         string `json:"OpenId"`
	DeviceID       string `json:"DeviceId"`
	ExternalUserID string `json:"external_userid"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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