chore: 初始化 Cloudreve 源码仓库
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package serializer
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// RequestRawSign 待签名的HTTP请求
|
||||
type RequestRawSign struct {
|
||||
Path string
|
||||
Header string
|
||||
Body string
|
||||
}
|
||||
|
||||
// NewRequestSignString 返回JSON格式的待签名字符串
|
||||
func NewRequestSignString(path, header, body string) string {
|
||||
req := RequestRawSign{
|
||||
Path: path,
|
||||
Header: header,
|
||||
Body: body,
|
||||
}
|
||||
res, _ := json.Marshal(req)
|
||||
return string(res)
|
||||
}
|
||||
Reference in New Issue
Block a user