-
Notifications
You must be signed in to change notification settings - Fork 188
/
datacenter.api
81 lines (74 loc) · 1.69 KB
/
datacenter.api
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
info(
title: "中台系统"// TODO: add title
desc: "中台系统"// TODO: add description
author: "jackluo"
email: "net.webjoy@gmail.com"
)
import "user.api"
import "votes.api"
import "search.api"
import "questions.api"
//获取 应用信息
type Beid {
Beid int64 `json:"beid"`
}
type Token {
Token string `json:"token"`
}
type WxTicket {
Ticket string `json:"ticket"`
}
type Application {
Sname string `json:"Sname"` //名称
Logo string `json:"logo"` // login
Isclose int64 `json:"isclose"` //是否关闭
Fullwebsite string `json:"fullwebsite"` // 全站名称
}
type SnsReq {
Beid
Ptyid int64 `json:"ptyid"` //对应平台
BackUrl string `json:"back_url"` //登陆返回的地址
}
type SnsResp {
Beid
Ptyid int64 `json:"ptyid"` //对应平台
Appid string `json:"appid"` //sns 平台的id
Title string `json:"title"` //名称
LoginUrl string `json:"login_url"` //微信登陆的地址
}
type WxShareResp {
Appid string `json:"appid"`
Timestamp int64 `json:"timestamp"`
Noncestr string `json:"noncestr"`
Signature string `json:"signature"`
}
@server(
group: common
)
service datacenter-api {
@doc(
summary: "获取站点的信息"
)
@handler appInfo
get /common/appinfo (Beid) returns (Application)
@doc(
summary: "获取站点的社交属性信息"
)
@handler snsInfo
post /common/snsinfo (SnsReq) returns (SnsResp)
//获取分享的
@handler wxTicket
post /common/wx/ticket (SnsReq) returns (WxShareResp)
}
//上传需要登陆
@server(
jwt: Auth
group: common
)
service datacenter-api {
@doc(
summary: "七牛上传凭证"
)
@handler qiuniuToken
post /common/qiuniu/token (Beid) returns (Token)
}