/
constant.go
52 lines (43 loc) · 1.03 KB
/
constant.go
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
package wps
const (
// UA WPS UA
UA = "weboffice-httpclient"
// XFileIdField 文件 id
XFileIdField = "x-weboffice-file-id"
// XUserTokenField 校验身份的 token,值根据对接的企业而定
XUserTokenField = "x-wps-weboffice-token"
)
const (
AppIdParam = "_w_appid"
FileTypeParam = "_w_filetype"
SignatureParam = "_w_signature"
TokenTypeParam = "_w_tokentype"
AccessTokenParam = "_w_access_token"
)
// 用户操作权限
const (
PermissionRead = "read"
PermissionWrite = "write"
)
// 文件类型
const (
Excel = "s"
Word = "w"
PPT = "p"
PDF = "f"
)
var (
Excels = []string{"xls", "xlt", "et", "xlsx", "xltx", "csv", "xlsm", "xltm", "ett"}
Words = []string{"doc", "dot", "wps", "wpt", "docx", "dotx", "docm", "dotm", "rtf", "txt", "xml", "mhtml", "mht", "html", "htm", "uof"}
PPTs = []string{"ppt", "pptx", "pptm", "ppsx", "ppsm", "pps", "potx", "potm", "dpt", "dps", "pot"}
PDFs = []string{"pdf"}
)
// 通用权限
const (
Off = iota
On
)
// WatermarkText 水印
const (
WatermarkText = 1
)