|
|
- package userrpc
-
- const DES_KEY = "usersrpc"
-
- type Req struct {
- SiteId string
- Dbname string
- }
-
- type BindThirdReq struct {
- Req
- Userid string
- Type string
- Openid string
- Unionid string
- }
-
- type Res struct {
- Errcode string
- Errmsg string
- }
-
- func rpc_server_conn(url ...string) (*UserServiceClient, error) {
-
- var user_rpc_url string = "127.0.0.1:7976"
- if len(url) > 0 && url[0] != "" {
- user_rpc_url = url[0]
- }
-
- conn, _, err := DialUserService("tcp", user_rpc_url)
- if err != nil {
- return map[string]string{}, err
- }
-
- return conn, nil
- }
|