From 69311027163310528d14b847d80218dc66110421 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=85=89=E6=98=A5?= Date: Thu, 30 Dec 2021 09:32:27 +0800 Subject: [PATCH] update service wechat --- service/wechatminiprogram/cgi-bin.token.db.go | 8 ++++---- service/wechatminiprogram/cgi-bin.token.go | 18 +++++++++--------- .../wechatminiprogram/cgi-bin.token.monitor.go | 12 ++++++------ service/wechatminiprogram/cgi-bin.token.rdb.go | 2 +- service/wechatminiprogram/getcallbackip.go | 18 +++++++++--------- service/wechatminiprogram/result.go | 9 --------- service/wechatoffice/cgi-bin.token.db.go | 8 ++++---- service/wechatoffice/cgi-bin.token.go | 18 +++++++++--------- service/wechatoffice/cgi-bin.token.monitor.go | 12 ++++++------ service/wechatoffice/cgi-bin.token.rdb.go | 2 +- service/wechatoffice/getcallbackip.go | 18 +++++++++--------- service/wechatoffice/result.go | 9 --------- service/wechatunion/cgi-bin.token.db.go | 8 ++++---- service/wechatunion/cgi-bin.token.monitor.go | 12 ++++++------ service/wechatunion/cgi-bin.token.rdb.go | 2 +- service/wechatunion/cgi_bin.token.go | 18 +++++++++--------- service/wechatunion/getcallbackip.go | 18 +++++++++--------- service/wechatunion/result.go | 9 --------- 18 files changed, 87 insertions(+), 114 deletions(-) delete mode 100644 service/wechatminiprogram/result.go delete mode 100644 service/wechatoffice/result.go delete mode 100644 service/wechatunion/result.go diff --git a/service/wechatminiprogram/cgi-bin.token.db.go b/service/wechatminiprogram/cgi-bin.token.db.go index 62b81bc4..1027dc99 100644 --- a/service/wechatminiprogram/cgi-bin.token.db.go +++ b/service/wechatminiprogram/cgi-bin.token.db.go @@ -30,18 +30,18 @@ func (app *App) GetAccessTokenDb() string { return wat.AccessToken } else { token := app.AuthGetAccessToken() - if token.AuthGetAccessTokenResponse.AccessToken == "" { + if token.Result.AccessToken == "" { return "" } else { // 创建 app.Db.Create(&WechatAccessTokenDbModel{ AppID: app.AppId, AppSecret: app.AppSecret, - AccessToken: token.AuthGetAccessTokenResponse.AccessToken, - ExpiresIn: token.AuthGetAccessTokenResponse.ExpiresIn, + AccessToken: token.Result.AccessToken, + ExpiresIn: token.Result.ExpiresIn, ExpiresTime: gotime.Current().AfterSeconds(7000).Format(), }) - return token.AuthGetAccessTokenResponse.AccessToken + return token.Result.AccessToken } } } diff --git a/service/wechatminiprogram/cgi-bin.token.go b/service/wechatminiprogram/cgi-bin.token.go index 57c35f28..2bca6bc4 100644 --- a/service/wechatminiprogram/cgi-bin.token.go +++ b/service/wechatminiprogram/cgi-bin.token.go @@ -5,7 +5,6 @@ import ( "fmt" ) -// AuthGetAccessTokenResponse 返回参数 type AuthGetAccessTokenResponse struct { AccessToken string `json:"access_token"` // 获取到的凭证 ExpiresIn int `json:"expires_in"` // 凭证有效时间,单位:秒。目前是7200秒之内的值 @@ -13,19 +12,20 @@ type AuthGetAccessTokenResponse struct { Errmsg string `json:"errmsg"` // 错误信息 } -// NewAuthGetAccessTokenResult 构造函数 -func NewAuthGetAccessTokenResult(result AuthGetAccessTokenResponse, byte []byte, err error) *Result { - return &Result{ - AuthGetAccessTokenResponse: result, - Byte: byte, - Err: err, - } +type AuthGetAccessTokenResult struct { + Result AuthGetAccessTokenResponse // 结果 + Byte []byte // 内容 + Err error // 错误 +} + +func NewAuthGetAccessTokenResult(result AuthGetAccessTokenResponse, byte []byte, err error) *AuthGetAccessTokenResult { + return &AuthGetAccessTokenResult{Result: result, Byte: byte, Err: err} } // AuthGetAccessToken // 接口调用凭证 // https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/access-token/auth.getAccessToken.html -func (app *App) AuthGetAccessToken() *Result { +func (app *App) AuthGetAccessToken() *AuthGetAccessTokenResult { // request body, err := app.request(fmt.Sprintf("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s", app.AppId, app.AppSecret), map[string]interface{}{}, "GET") // 定义 diff --git a/service/wechatminiprogram/cgi-bin.token.monitor.go b/service/wechatminiprogram/cgi-bin.token.monitor.go index a7846877..0bbdb246 100644 --- a/service/wechatminiprogram/cgi-bin.token.monitor.go +++ b/service/wechatminiprogram/cgi-bin.token.monitor.go @@ -14,21 +14,21 @@ var ( func (app *App) AuthGetAccessTokenMonitor(qdType string) error { result := app.GetCallBackIp() - if len(result.GetCallBackIpResponse.IpList) <= 0 { + if len(result.Result.IpList) <= 0 { switch qdType { case qdTypeDb: if app.Db == nil { return errors.New("驱动没有初始化") } token := app.AuthGetAccessToken() - if token.AuthGetAccessTokenResponse.AccessToken == "" { + if token.Result.AccessToken == "" { return errors.New("获取AccessToken失败") } else { app.Db.Create(&WechatAccessTokenDbModel{ AppID: app.AppId, AppSecret: app.AppSecret, - AccessToken: token.AuthGetAccessTokenResponse.AccessToken, - ExpiresIn: token.AuthGetAccessTokenResponse.ExpiresIn, + AccessToken: token.Result.AccessToken, + ExpiresIn: token.Result.ExpiresIn, ExpiresTime: gotime.Current().AfterSeconds(7000).Format(), }) return nil @@ -42,10 +42,10 @@ func (app *App) AuthGetAccessTokenMonitor(qdType string) error { Rdb: app.RDb, } token := app.AuthGetAccessToken() - if token.AuthGetAccessTokenResponse.AccessToken == "" { + if token.Result.AccessToken == "" { return errors.New("获取AccessToken失败") } - redis.NewStringOperation().Set(cacheName, token.AuthGetAccessTokenResponse.AccessToken, goredis.WithExpire(7000)) + redis.NewStringOperation().Set(cacheName, token.Result.AccessToken, goredis.WithExpire(7000)) return nil default: return errors.New("驱动类型不在范围内") diff --git a/service/wechatminiprogram/cgi-bin.token.rdb.go b/service/wechatminiprogram/cgi-bin.token.rdb.go index fe86e665..f5dd710d 100644 --- a/service/wechatminiprogram/cgi-bin.token.rdb.go +++ b/service/wechatminiprogram/cgi-bin.token.rdb.go @@ -13,7 +13,7 @@ func (app *App) GetAccessTokenRDb() string { newCache := redis.NewSimpleStringCache(redis.NewStringOperation(), 7000) newCache.DBGetter = func() string { token := app.AuthGetAccessToken() - return token.AuthGetAccessTokenResponse.AccessToken + return token.Result.AccessToken } return newCache.GetCache(cacheName) } diff --git a/service/wechatminiprogram/getcallbackip.go b/service/wechatminiprogram/getcallbackip.go index 85047bee..9802257e 100644 --- a/service/wechatminiprogram/getcallbackip.go +++ b/service/wechatminiprogram/getcallbackip.go @@ -5,24 +5,24 @@ import ( "fmt" ) -// GetCallBackIpResponse 返回参数 type GetCallBackIpResponse struct { IpList []string `json:"ip_list"` } -// NewGetCallBackIpResult 构造函数 -func NewGetCallBackIpResult(result GetCallBackIpResponse, byte []byte, err error) *Result { - return &Result{ - GetCallBackIpResponse: result, - Byte: byte, - Err: err, - } +type GetCallBackIpResult struct { + Result GetCallBackIpResponse // 结果 + Byte []byte // 内容 + Err error // 错误 +} + +func NewGetCallBackIpResult(result GetCallBackIpResponse, byte []byte, err error) *GetCallBackIpResult { + return &GetCallBackIpResult{Result: result, Byte: byte, Err: err} } // GetCallBackIp 获取微信callback IP地址 // callback IP即微信调用开发者服务器所使用的出口IP。 // https://developers.weixin.qq.com/doc/offiaccount/Basic_Information/Get_the_WeChat_server_IP_address.html#2.%20%E8%8E%B7%E5%8F%96%E5%BE%AE%E4%BF%A1callback%20IP%E5%9C%B0%E5%9D%80 -func (app *App) GetCallBackIp() *Result { +func (app *App) GetCallBackIp() *GetCallBackIpResult { // 请求 body, err := app.request(fmt.Sprintf("https://api.weixin.qq.com/cgi-bin/getcallbackip?access_token=%s", app.AccessToken), map[string]interface{}{}, "GET") // 定义 diff --git a/service/wechatminiprogram/result.go b/service/wechatminiprogram/result.go deleted file mode 100644 index ef6c04df..00000000 --- a/service/wechatminiprogram/result.go +++ /dev/null @@ -1,9 +0,0 @@ -package wechatminiprogram - -// Result 接口 -type Result struct { - Byte []byte // 内容 - Err error // 错误 - AuthGetAccessTokenResponse // 接口调用凭证 - GetCallBackIpResponse // IP即微信调用开发者服务器所使用的出口IP -} diff --git a/service/wechatoffice/cgi-bin.token.db.go b/service/wechatoffice/cgi-bin.token.db.go index c31bdc28..1ee22d25 100644 --- a/service/wechatoffice/cgi-bin.token.db.go +++ b/service/wechatoffice/cgi-bin.token.db.go @@ -30,18 +30,18 @@ func (app *App) GetAccessTokenDb() string { return wat.AccessToken } else { token := app.AuthGetAccessToken() - if token.AuthGetAccessTokenResponse.AccessToken == "" { + if token.Result.AccessToken == "" { return "" } else { // 创建 app.Db.Create(&WechatAccessTokenDbModel{ AppID: app.AppId, AppSecret: app.AppSecret, - AccessToken: token.AuthGetAccessTokenResponse.AccessToken, - ExpiresIn: token.AuthGetAccessTokenResponse.ExpiresIn, + AccessToken: token.Result.AccessToken, + ExpiresIn: token.Result.ExpiresIn, ExpiresTime: gotime.Current().AfterSeconds(7000).Format(), }) - return token.AuthGetAccessTokenResponse.AccessToken + return token.Result.AccessToken } } } diff --git a/service/wechatoffice/cgi-bin.token.go b/service/wechatoffice/cgi-bin.token.go index 72c1d01b..6c7bf0a4 100644 --- a/service/wechatoffice/cgi-bin.token.go +++ b/service/wechatoffice/cgi-bin.token.go @@ -5,7 +5,6 @@ import ( "fmt" ) -// AuthGetAccessTokenResponse 返回参数 type AuthGetAccessTokenResponse struct { AccessToken string `json:"access_token"` // 获取到的凭证 ExpiresIn int `json:"expires_in"` // 凭证有效时间,单位:秒。目前是7200秒之内的值 @@ -13,19 +12,20 @@ type AuthGetAccessTokenResponse struct { Errmsg string `json:"errmsg"` // 错误信息 } -// NewAuthGetAccessTokenResult 构造函数 -func NewAuthGetAccessTokenResult(result AuthGetAccessTokenResponse, byte []byte, err error) *Result { - return &Result{ - AuthGetAccessTokenResponse: result, - Byte: byte, - Err: err, - } +type AuthGetAccessTokenResult struct { + Result AuthGetAccessTokenResponse // 结果 + Byte []byte // 内容 + Err error // 错误 +} + +func NewAuthGetAccessTokenResult(result AuthGetAccessTokenResponse, byte []byte, err error) *AuthGetAccessTokenResult { + return &AuthGetAccessTokenResult{Result: result, Byte: byte, Err: err} } // AuthGetAccessToken // 接口调用凭证 // https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/access-token/auth.getAccessToken.html -func (app *App) AuthGetAccessToken() *Result { +func (app *App) AuthGetAccessToken() *AuthGetAccessTokenResult { // request body, err := app.request(fmt.Sprintf("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s", app.AppId, app.AppSecret), map[string]interface{}{}, "GET") // 定义 diff --git a/service/wechatoffice/cgi-bin.token.monitor.go b/service/wechatoffice/cgi-bin.token.monitor.go index f309792f..475d7940 100644 --- a/service/wechatoffice/cgi-bin.token.monitor.go +++ b/service/wechatoffice/cgi-bin.token.monitor.go @@ -14,21 +14,21 @@ var ( func (app *App) AuthGetAccessTokenMonitor(qdType string) error { result := app.GetCallBackIp() - if len(result.GetCallBackIpResponse.IpList) <= 0 { + if len(result.Result.IpList) <= 0 { switch qdType { case qdTypeDb: if app.Db == nil { return errors.New("驱动没有初始化") } token := app.AuthGetAccessToken() - if token.AuthGetAccessTokenResponse.AccessToken == "" { + if token.Result.AccessToken == "" { return errors.New("获取AccessToken失败") } else { app.Db.Create(&WechatAccessTokenDbModel{ AppID: app.AppId, AppSecret: app.AppSecret, - AccessToken: token.AuthGetAccessTokenResponse.AccessToken, - ExpiresIn: token.AuthGetAccessTokenResponse.ExpiresIn, + AccessToken: token.Result.AccessToken, + ExpiresIn: token.Result.ExpiresIn, ExpiresTime: gotime.Current().AfterSeconds(7000).Format(), }) return nil @@ -42,10 +42,10 @@ func (app *App) AuthGetAccessTokenMonitor(qdType string) error { Rdb: app.RDb, } token := app.AuthGetAccessToken() - if token.AuthGetAccessTokenResponse.AccessToken == "" { + if token.Result.AccessToken == "" { return errors.New("获取AccessToken失败") } - redis.NewStringOperation().Set(cacheName, token.AuthGetAccessTokenResponse.AccessToken, goredis.WithExpire(7000)) + redis.NewStringOperation().Set(cacheName, token.Result.AccessToken, goredis.WithExpire(7000)) return nil default: return errors.New("驱动类型不在范围内") diff --git a/service/wechatoffice/cgi-bin.token.rdb.go b/service/wechatoffice/cgi-bin.token.rdb.go index 6724102d..92e032cc 100644 --- a/service/wechatoffice/cgi-bin.token.rdb.go +++ b/service/wechatoffice/cgi-bin.token.rdb.go @@ -13,7 +13,7 @@ func (app *App) GetAccessTokenRDb() string { newCache := redis.NewSimpleStringCache(redis.NewStringOperation(), 7000) newCache.DBGetter = func() string { token := app.AuthGetAccessToken() - return token.AuthGetAccessTokenResponse.AccessToken + return token.Result.AccessToken } return newCache.GetCache(cacheName) } diff --git a/service/wechatoffice/getcallbackip.go b/service/wechatoffice/getcallbackip.go index bab9661e..33cf5534 100644 --- a/service/wechatoffice/getcallbackip.go +++ b/service/wechatoffice/getcallbackip.go @@ -5,24 +5,24 @@ import ( "fmt" ) -// GetCallBackIpResponse 返回参数 type GetCallBackIpResponse struct { IpList []string `json:"ip_list"` } -// NewGetCallBackIpResult 构造函数 -func NewGetCallBackIpResult(result GetCallBackIpResponse, byte []byte, err error) *Result { - return &Result{ - GetCallBackIpResponse: result, - Byte: byte, - Err: err, - } +type GetCallBackIpResult struct { + Result GetCallBackIpResponse // 结果 + Byte []byte // 内容 + Err error // 错误 +} + +func NewGetCallBackIpResult(result GetCallBackIpResponse, byte []byte, err error) *GetCallBackIpResult { + return &GetCallBackIpResult{Result: result, Byte: byte, Err: err} } // GetCallBackIp 获取微信callback IP地址 // callback IP即微信调用开发者服务器所使用的出口IP。 // https://developers.weixin.qq.com/doc/offiaccount/Basic_Information/Get_the_WeChat_server_IP_address.html#2.%20%E8%8E%B7%E5%8F%96%E5%BE%AE%E4%BF%A1callback%20IP%E5%9C%B0%E5%9D%80 -func (app *App) GetCallBackIp() *Result { +func (app *App) GetCallBackIp() *GetCallBackIpResult { // 请求 body, err := app.request(fmt.Sprintf("https://api.weixin.qq.com/cgi-bin/getcallbackip?access_token=%s", app.AccessToken), map[string]interface{}{}, "GET") // 定义 diff --git a/service/wechatoffice/result.go b/service/wechatoffice/result.go deleted file mode 100644 index d3f63f0e..00000000 --- a/service/wechatoffice/result.go +++ /dev/null @@ -1,9 +0,0 @@ -package wechatoffice - -// Result 接口 -type Result struct { - Byte []byte // 内容 - Err error // 错误 - AuthGetAccessTokenResponse // 接口调用凭证 - GetCallBackIpResponse // IP即微信调用开发者服务器所使用的出口IP -} diff --git a/service/wechatunion/cgi-bin.token.db.go b/service/wechatunion/cgi-bin.token.db.go index c59832db..c181504b 100644 --- a/service/wechatunion/cgi-bin.token.db.go +++ b/service/wechatunion/cgi-bin.token.db.go @@ -30,18 +30,18 @@ func (app *App) GetAccessTokenDb() string { return wat.AccessToken } else { token := app.AuthGetAccessToken() - if token.AuthGetAccessTokenResponse.AccessToken == "" { + if token.Result.AccessToken == "" { return "" } else { // 创建 app.Db.Create(&WechatAccessTokenDbModel{ AppID: app.AppId, AppSecret: app.AppSecret, - AccessToken: token.AuthGetAccessTokenResponse.AccessToken, - ExpiresIn: token.AuthGetAccessTokenResponse.ExpiresIn, + AccessToken: token.Result.AccessToken, + ExpiresIn: token.Result.ExpiresIn, ExpiresTime: gotime.Current().AfterSeconds(7000).Format(), }) - return token.AuthGetAccessTokenResponse.AccessToken + return token.Result.AccessToken } } } diff --git a/service/wechatunion/cgi-bin.token.monitor.go b/service/wechatunion/cgi-bin.token.monitor.go index be802842..3bd5e665 100644 --- a/service/wechatunion/cgi-bin.token.monitor.go +++ b/service/wechatunion/cgi-bin.token.monitor.go @@ -14,21 +14,21 @@ var ( func (app *App) AuthGetAccessTokenMonitor(qdType string) error { result := app.GetCallBackIp() - if len(result.GetCallBackIpResponse.IpList) <= 0 { + if len(result.Result.IpList) <= 0 { switch qdType { case qdTypeDb: if app.Db == nil { return errors.New("驱动没有初始化") } token := app.AuthGetAccessToken() - if token.AuthGetAccessTokenResponse.AccessToken == "" { + if token.Result.AccessToken == "" { return errors.New("获取AccessToken失败") } else { app.Db.Create(&WechatAccessTokenDbModel{ AppID: app.AppId, AppSecret: app.AppSecret, - AccessToken: token.AuthGetAccessTokenResponse.AccessToken, - ExpiresIn: token.AuthGetAccessTokenResponse.ExpiresIn, + AccessToken: token.Result.AccessToken, + ExpiresIn: token.Result.ExpiresIn, ExpiresTime: gotime.Current().AfterSeconds(7000).Format(), }) return nil @@ -42,10 +42,10 @@ func (app *App) AuthGetAccessTokenMonitor(qdType string) error { Rdb: app.RDb, } token := app.AuthGetAccessToken() - if token.AuthGetAccessTokenResponse.AccessToken == "" { + if token.Result.AccessToken == "" { return errors.New("获取AccessToken失败") } - redis.NewStringOperation().Set(cacheName, token.AuthGetAccessTokenResponse.AccessToken, goredis.WithExpire(7000)) + redis.NewStringOperation().Set(cacheName, token.Result.AccessToken, goredis.WithExpire(7000)) return nil default: return errors.New("驱动类型不在范围内") diff --git a/service/wechatunion/cgi-bin.token.rdb.go b/service/wechatunion/cgi-bin.token.rdb.go index 1fbe04b1..b5317d4e 100644 --- a/service/wechatunion/cgi-bin.token.rdb.go +++ b/service/wechatunion/cgi-bin.token.rdb.go @@ -13,7 +13,7 @@ func (app *App) GetAccessTokenRDb() string { newCache := redis.NewSimpleStringCache(redis.NewStringOperation(), 7000) newCache.DBGetter = func() string { token := app.AuthGetAccessToken() - return token.AuthGetAccessTokenResponse.AccessToken + return token.Result.AccessToken } return newCache.GetCache(cacheName) } diff --git a/service/wechatunion/cgi_bin.token.go b/service/wechatunion/cgi_bin.token.go index 7a67ae69..39d81035 100644 --- a/service/wechatunion/cgi_bin.token.go +++ b/service/wechatunion/cgi_bin.token.go @@ -6,7 +6,6 @@ import ( "net/http" ) -// AuthGetAccessTokenResponse 返回参数 type AuthGetAccessTokenResponse struct { AccessToken string `json:"access_token"` // 获取到的凭证 ExpiresIn int `json:"expires_in"` // 凭证有效时间,单位:秒。目前是7200秒之内的值 @@ -14,19 +13,20 @@ type AuthGetAccessTokenResponse struct { Errmsg string `json:"errmsg"` // 错误信息 } -// NewAuthGetAccessTokenResult 构造函数 -func NewAuthGetAccessTokenResult(result AuthGetAccessTokenResponse, byte []byte, err error) *Result { - return &Result{ - AuthGetAccessTokenResponse: result, - Byte: byte, - Err: err, - } +type AuthGetAccessTokenResult struct { + Result AuthGetAccessTokenResponse // 结果 + Byte []byte // 内容 + Err error // 错误 +} + +func NewAuthGetAccessTokenResult(result AuthGetAccessTokenResponse, byte []byte, err error) *AuthGetAccessTokenResult { + return &AuthGetAccessTokenResult{Result: result, Byte: byte, Err: err} } // AuthGetAccessToken // 接口调用凭证 // https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/access-token/auth.getAccessToken.html -func (app *App) AuthGetAccessToken() *Result { +func (app *App) AuthGetAccessToken() *AuthGetAccessTokenResult { // 请求 body, err := app.request(fmt.Sprintf("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s", app.AppId, app.AppSecret), map[string]interface{}{}, http.MethodGet) // 定义 diff --git a/service/wechatunion/getcallbackip.go b/service/wechatunion/getcallbackip.go index 30595178..b2721998 100644 --- a/service/wechatunion/getcallbackip.go +++ b/service/wechatunion/getcallbackip.go @@ -5,24 +5,24 @@ import ( "fmt" ) -// GetCallBackIpResponse 返回参数 type GetCallBackIpResponse struct { IpList []string `json:"ip_list"` } -// NewGetCallBackIpResult 构造函数 -func NewGetCallBackIpResult(result GetCallBackIpResponse, byte []byte, err error) *Result { - return &Result{ - GetCallBackIpResponse: result, - Byte: byte, - Err: err, - } +type GetCallBackIpResult struct { + Result GetCallBackIpResponse // 结果 + Byte []byte // 内容 + Err error // 错误 +} + +func NewGetCallBackIpResult(result GetCallBackIpResponse, byte []byte, err error) *GetCallBackIpResult { + return &GetCallBackIpResult{Result: result, Byte: byte, Err: err} } // GetCallBackIp 获取微信callback IP地址 // callback IP即微信调用开发者服务器所使用的出口IP。 // https://developers.weixin.qq.com/doc/offiaccount/Basic_Information/Get_the_WeChat_server_IP_address.html#2.%20%E8%8E%B7%E5%8F%96%E5%BE%AE%E4%BF%A1callback%20IP%E5%9C%B0%E5%9D%80 -func (app *App) GetCallBackIp() *Result { +func (app *App) GetCallBackIp() *GetCallBackIpResult { // 请求 body, err := app.request(fmt.Sprintf("https://api.weixin.qq.com/cgi-bin/getcallbackip?access_token=%s", app.AccessToken), map[string]interface{}{}, "GET") // 定义 diff --git a/service/wechatunion/result.go b/service/wechatunion/result.go deleted file mode 100644 index 95455eae..00000000 --- a/service/wechatunion/result.go +++ /dev/null @@ -1,9 +0,0 @@ -package wechatunion - -// Result 接口 -type Result struct { - Byte []byte // 内容 - Err error // 错误 - AuthGetAccessTokenResponse // 接口调用凭证 - GetCallBackIpResponse // IP即微信调用开发者服务器所使用的出口IP -}