Documentation
¶
Overview ¶
* @Author: NyanCatda * @Date: 2022-04-03 16:49:40 * @LastEditTime: 2022-04-03 20:38:20 * @LastEditors: NyanCatda * @Description: 文件操作API * @FilePath: \Momizi\Internal\MessageSend\ChatSoftwareAPI\Mirai\File.go
* @Author: NyanCatda * @Date: 2022-04-03 17:49:08 * @LastEditTime: 2022-04-03 17:51:11 * @LastEditors: NyanCatda * @Description: Mirai APi封装 * @FilePath: \Momizi\Internal\MessageSend\ChatSoftwareAPI\Mirai\Mirai.go
* @Author: NyanCatda * @Date: 2022-04-03 16:56:12 * @LastEditTime: 2022-04-03 21:03:52 * @LastEditors: NyanCatda * @Description: SessionKey处理 * @FilePath: \Momizi\Internal\MessageSend\ChatSoftwareAPI\Mirai\SessionKey.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
SessionKeyCacheFile = Controller.BotFilePath + "Mirai/SessionKey"
)
Functions ¶
func CreateSessionKey ¶
*
- @description: 创建SessionKey
- @param {*}
- @return {string} SessionKey
- @return {error} 错误信息
func GetSessionKey ¶
*
- @description: 获取SessionKey
- @param {*}
- @return {string} SessionKey
- @return {error} 错误信息
Types ¶
type FileInfo ¶
type FileInfo struct {
ResponseTemplate
Data struct {
Name string `json:"name"` // 文件名
ID string `json:"id"` // 文件ID
Path string `json:"path"` // 文件路径
Parent interface{} `json:"parent"` // 文件对象, 递归类型. null 为存在根目录
Contact struct {
ID int `json:"id"` // 文件来源聊天ID
Name string `json:"name"` // 文件来源聊天名称
Permission string `json:"permission"` // 文件来源聊天权限
} `json:"contact"`
IsFile bool `json:"isFile"` // 是否为文件
IsDirectory bool `json:"isDirectory"` // 是否为目录
DownloadInfo struct {
Sha1 string `json:"sha1"` // 文件SHA1
Md5 string `json:"md5"` // 文件MD5
DownloadTimes int `json:"downloadTimes"` // 下载次数
UploaderID int `json:"uploaderId"` // 上传者ID
UploadTime int `json:"uploadTime"` // 上传时间
LastModifyTime int `json:"lastModifyTime"` // 最后修改时间
URL string `json:"url"` // 文件下载地址
} `json:"downloadInfo"`
} `json:"data"`
}
type ResponseTemplate ¶
Click to show internal directories.
Click to hide internal directories.