wps

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2023 License: MIT Imports: 7 Imported by: 0

README

wps

used for wps online reading & editing

Documentation

Index

Constants

View Source
const (
	// UA WPS UA
	UA = "weboffice-httpclient"

	// XFileIdField 文件 id
	XFileIdField = "x-weboffice-file-id"

	// XUserTokenField 校验身份的 token,值根据对接的企业而定
	XUserTokenField = "x-wps-weboffice-token"
)
View Source
const (
	AppIdParam       = "_w_appid"
	FileTypeParam    = "_w_filetype"
	SignatureParam   = "_w_signature"
	TokenTypeParam   = "_w_tokentype"
	AccessTokenParam = "_w_access_token"
)
View Source
const (
	PermissionRead  = "read"
	PermissionWrite = "write"
)

用户操作权限

View Source
const (
	Excel = "s"
	Word  = "w"
	PPT   = "p"
	PDF   = "f"
)

文件类型

View Source
const (
	Off = iota
	On
)

通用权限

View Source
const (
	WatermarkText = 1
)

WatermarkText 水印

Variables

View Source
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"}
)

Functions

func GetHmacSHA1

func GetHmacSHA1(key, data string) []byte

GetHmacSHA1 generates the hmac sha1 @param key: the key, data: the data @return the hmac sha1

func Sign

func Sign(values url.Values, secretKey string) string

Sign signs the values with the secretKey @param values: the values to sign, secretKey: the secret key @return the signature

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL