微信接口的RPC包
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

29 lines
497 B

package weixinrpc
const DES_KEY = "wxserrpc"
type WxApiRes struct {
Errcode string
Errmsg string
}
type AccessTokenRes struct {
AccessToken string
ExpiresIn string
WxApiRes
}
func rpc_server_conn(url ...string) (*WeixinRpcServiceClient, error) {
var wx_rpc_url string = "127.0.0.1:7969"
if len(url) > 0 && url[0] != "" {
wx_rpc_url = url[0]
}
conn, _, err := DialWeixinRpcService("tcp", wx_rpc_url)
if err != nil {
return nil, err
}
defer conn.Close()
return conn, nil
}