apptp

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: May 28, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultAuthMpLoginProxyURL = "https://api.weixin.qq.com/sns/component/"
View Source
const DefaultAuthProxyURL = "https://api.weixin.qq.com/"
View Source
const DefaultProxyURL = "https://api.weixin.qq.com/"

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthConfig

type AuthConfig struct {
	WechatTpPreAuthCodeURL        string
	WechatTpQueryAuthURL          string
	WechatTpRefreshAuthURL        string
	WechatTpAuthTokenLifeSpan     gokits.Duration
	WechatTpAuthTokenTempLifeSpan gokits.Duration
	WechatTpAuthProxyURL          string
	WechatTpAuthMpLoginProxyURL   string
}

type AuthorizationInfo

type AuthorizationInfo struct {
	AuthorizerAppId        string     `json:"authorizer_appid"`
	AuthorizerAccessToken  string     `json:"authorizer_access_token"`
	ExpiresIn              int        `json:"expires_in"`
	AuthorizerRefreshToken string     `json:"authorizer_refresh_token"`
	FuncInfo               []FuncInfo `json:"func_info"`
}

type Config

type Config struct {
	WechatTpTokenURL          string
	WechatTpConfigLifeSpan    gokits.Duration
	WechatTpCryptorLifeSpan   gokits.Duration
	WechatTpTokenLifeSpan     gokits.Duration
	WechatTpTokenTempLifeSpan gokits.Duration
	WechatTpProxyURL          string
}

type FuncInfo

type FuncInfo struct {
	FuncscopeCategory FuncscopeCategory `json:"funcscope_category"`
}

type FuncscopeCategory

type FuncscopeCategory struct {
	Id int `json:"id"`
}

type QueryWechatTpAuthToken

type QueryWechatTpAuthToken struct {
	WechatTpAuthToken
	AuthorizerRefreshToken string
	Updated                string
	ExpireTime             int64
}

type QueryWechatTpToken

type QueryWechatTpToken struct {
	WechatTpToken
	Updated    string
	ExpireTime int64
}

func (*QueryWechatTpToken) GetExpireTime

func (q *QueryWechatTpToken) GetExpireTime() int64

func (*QueryWechatTpToken) GetUpdated

func (q *QueryWechatTpToken) GetUpdated() string

type RefreshResponse

type RefreshResponse struct {
	AuthorizerAccessToken  string `json:"authorizer_access_token"`
	ExpiresIn              int    `json:"expires_in"`
	AuthorizerRefreshToken string `json:"authorizer_refresh_token"`
}

type Response

type Response struct {
	ComponentAccessToken string `json:"component_access_token"`
	ExpiresIn            int    `json:"expires_in"`
}

type WechatTpAuthKey

type WechatTpAuthKey struct {
	CodeName        string
	AuthorizerAppId string
}

type WechatTpAuthToken

type WechatTpAuthToken struct {
	AppId                 string `json:"appId"`
	AuthorizerAppId       string `json:"authorizerAppId"`
	AuthorizerAccessToken string `json:"token"`
	AuthorizerJsapiTicket string `json:"ticket"`
}

type WechatTpConfig

type WechatTpConfig struct {
	AppId          string
	AppSecret      string
	Token          string
	AesKey         string
	RedirectURL    string
	AuthForwardURL string
	MsgForwardURL  string
}

type WechatTpInfoData

type WechatTpInfoData struct {
	XMLName                      xml.Name `xml:"xml" json:"-"`
	AppId                        string   `xml:"AppId"`
	CreateTime                   string   `xml:"CreateTime"`
	InfoType                     string   `xml:"InfoType"`
	ComponentVerifyTicket        string   `xml:"ComponentVerifyTicket"`
	AuthorizerAppId              string   `xml:"AuthorizerAppid"`
	AuthorizationCode            string   `xml:"AuthorizationCode"`
	AuthorizationCodeExpiredTime string   `xml:"AuthorizationCodeExpiredTime"`
	PreAuthCode                  string   `xml:"PreAuthCode"`

	// InfoType == "notify_third_fasteregister" 快速创建小程序 事件回调通知
	MpAppId    string         `xml:"appid"`     // 创建小程序appid
	MpStatus   string         `xml:"status"`    // 0
	MpAuthCode string         `xml:"auth_code"` // 第三方授权码
	MpMsg      string         `xml:"msg"`       // OK
	MpInfo     WechatTpMpInfo `xml:"info"`
}

type WechatTpMpInfo

type WechatTpMpInfo struct {
	MpName               string `xml:"name"`                 // 企业名称
	MpCode               string `xml:"code"`                 // 企业代码
	MpCodeType           string `xml:"code_type"`            // 企业代码类型
	MpLegalPersonaWechat string `xml:"legal_persona_wechat"` // 法人微信号
	MpLegalPersonaName   string `xml:"legal_persona_name"`   // 法人姓名
	MpComponentPhone     string `xml:"component_phone"`      // 第三方联系电话
}

type WechatTpMsgMap

type WechatTpMsgMap map[string]string

func (WechatTpMsgMap) MarshalXML

func (m WechatTpMsgMap) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*WechatTpMsgMap) UnmarshalXML

func (m *WechatTpMsgMap) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type WechatTpPreAuthCodeResponse

type WechatTpPreAuthCodeResponse struct {
	PreAuthCode string `json:"pre_auth_code"`
	ExpiresIn   int    `json:"expires_in"`
}

type WechatTpQueryAuthResponse

type WechatTpQueryAuthResponse struct {
	AuthorizationInfo AuthorizationInfo `json:"authorization_info"`
}

type WechatTpToken

type WechatTpToken struct {
	AppId       string `json:"appId"`
	AccessToken string `json:"token"`
}

Jump to

Keyboard shortcuts

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