隔离包
<p>[toc]</p>
<h1>[APP]新的隔离包channel</h1>
<p><strong>channel 采用新名 "google_yahla" </strong></p>
<h1>[APP]新的接口域名与CDN</h1>
<pre><code>接口: https://api.voice.voicetalking.com
TCP: direct.voice.voicetalking.com|4460
CDN[正式]:
1 https://p1.voice.voicetalking.com
2 https://v1.voice.voicetalking.com
3 https://assets.voice.voicetalking.com
CDN[测试]: // 这可以不用动
http://公司内网IP:8081/p1.dev.winkchat
http://公司内网IP:8081/v1.dev.winkchat
// 客户端需要处理部分
1 在访问资源(所有CDN)的方法中把原来的 winkchat.innonice 替换为 voice.voicetalking 再访问.
2 代码里面搜 winkchat.innonice 替换为 voice.voicetalking.
3 检查代码里面写死的 含有 winkchat.innonice 的资源路径. 找到并反馈给 高云峰. 要增加一套新的.比如 隐私声明文件.</code></pre>
<h1>[APP]新的接口地址URI转换</h1>
<p><strong>目的: 让别人开起来我们的接口是全新的.</strong></p>
<pre><code>1 客户端需要在调用服务端Api的方法中统一进行以下处理:
a. 取出url的uri部分
b. uri部分以'/'分割出字符串数组 []string arr
c. 对arr中的每一个字符串元素进行反转
d. 最后再拼成新的uri,替换老的uri.调用服务端接口
2 新的隔离包所有的api请求Head中添加字段:
a. key: "trans_voice" , value: "yes"
b. 用于让服务端区分此次调用是需要反转的.</code></pre>
<h1>[APP]第三方平台类型重新定义</h1>
<p><strong>目的:为了方便后面版本做账号迁移;多版本账号能共享同一cue账号,不冲突.</strong></p>
<pre><code>// 由于初版不开放第三方,此调整也可以暂时不进行.(个人建议还是一起整了,很简单)
// 新的第三方平台类型定义:
const( // 隔离包的第三方使用以下类型值
ThirdPlat_Apple = 7
ThirdPlat_Apple2 = 107 // 苹果登录 隔离包
ThirdPlat_Facebook = 16
ThirdPlat_Facebook2 = 116 // old:16 Facebook 隔离包
ThirdPlat_Twitter = 17
ThirdPlat_Twitter2 = 117 // old:17 Twitter 隔离包
ThirdPlat_Google = 27
ThirdPlat_Google2 = 127 // old:27 Google 隔离包
)
</code></pre>
<h1>[APP]客户端校验迁移令牌</h1>
<p><strong>让服务校验令牌,并返回此用户上次登陆的方式.客户端给予特别处理</strong></p>
<table>
<thead>
<tr>
<th style="text-align: left;">接口名</th>
<th style="text-align: left;">备注</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">/v1/auth/verifyMoveToken</td>
<td style="text-align: left;">-</td>
</tr>
</tbody>
</table>
<pre><code class="language-go">
// 入参
move_token string // 迁移token
// 出参
{
LoginType int `json:"loginType"` // 上次用户的登陆方式 (参见上面列表) (客户端需要对为-1的情况处理)
UserPhone string `json:"uPhone"` // 当上次是 pwd 登陆时 此字段有值.(客户端要考虑用户忘记密码的情况)
}</code></pre>
<h1>[APP]客户端迁移第三方账号</h1>
<table>
<thead>
<tr>
<th style="text-align: left;">接口名</th>
<th style="text-align: left;">备注</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">/v1/auth/moveThirdPlat</td>
<td style="text-align: left;">-</td>
</tr>
</tbody>
</table>
<pre><code class="language-go">
// 入参
move_token string // 同上
// 下面这些入参 参考 /v1/auth/thirdSignIn 保持一致.
plat int
accessToken string
openId string
tokenSecret string
// 出参
/v1/auth/thirdSignIn 参考此接口的返回值
</code></pre>