Documentation
¶
Index ¶
- Variables
- func AesEncrypt(data, key []byte) []byte
- func ComputePieceSHA1(data []byte) []byte
- func ComputeTorrentFromReader(reader io.Reader, fileName string, fileSize int64, sliceSize int64) ([]byte, error)
- func EncodeParam(v url.Values) string
- func ExtractCASFromTorrent(torrentData []byte) (*torrent.CASInfo, string, int64, error)
- func GenerateTorrent(fileName string, fileSize int64, fileMD5 string, sliceMD5s []string, ...) ([]byte, error)
- func GetInfoHashHex(torrentData []byte) (string, error)
- func PKCS7Padding(ciphertext []byte, blockSize int) []byte
- func Random(v string) string
- func RsaEncode(origData []byte, j_rsakey string, hex bool) string
- type Addition
- type AppConf
- type CapacityResp
- type Cloud189
- func (d *Cloud189) Config() driver.Config
- func (d *Cloud189) Copy(ctx context.Context, srcObj, dstDir model.Obj) error
- func (d *Cloud189) Drop(ctx context.Context) error
- func (d *Cloud189) GetAddition() driver.Additional
- func (d *Cloud189) GetDetails(ctx context.Context) (*model.StorageDetails, error)
- func (d *Cloud189) Init(ctx context.Context) error
- func (d *Cloud189) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error)
- func (d *Cloud189) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error)
- func (d *Cloud189) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) error
- func (d *Cloud189) Move(ctx context.Context, srcObj, dstDir model.Obj) error
- func (d *Cloud189) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, ...) error
- func (d *Cloud189) RapidUploadFromTorrent(ctx context.Context, dstDir model.Obj, torrentData []byte) error
- func (d *Cloud189) Remove(ctx context.Context, obj model.Obj) error
- func (d *Cloud189) Rename(ctx context.Context, srcObj model.Obj, newName string) error
- type Down
- type DownResp
- type EncryptConf
- type Error
- type File
- type Files
- type Folder
- type LoginResp
- type Part
- type Rsa
- type UploadUrlsResp
Constants ¶
This section is empty.
Variables ¶
View Source
var BI_RM = "0123456789abcdefghijklmnopqrstuvwxyz"
Functions ¶
func AesEncrypt ¶
func ComputePieceSHA1 ¶ added in v4.2.2
ComputePieceSHA1 计算单个分片的 SHA-1 哈希
func ComputeTorrentFromReader ¶ added in v4.2.2
func ComputeTorrentFromReader(reader io.Reader, fileName string, fileSize int64, sliceSize int64) ([]byte, error)
ComputeTorrentFromReader 从 io.Reader 计算并生成 torrent 文件
func EncodeParam ¶
func ExtractCASFromTorrent ¶ added in v4.2.2
ExtractCASFromTorrent 从 torrent 数据中提取 CAS 信息
func GenerateTorrent ¶ added in v4.2.2
func GenerateTorrent(fileName string, fileSize int64, fileMD5 string, sliceMD5s []string, sliceSize int64, pieceHashes []byte) ([]byte, error)
GenerateTorrent 根据上传过程中收集的哈希信息生成包含 CAS 扩展的 torrent 文件
func GetInfoHashHex ¶ added in v4.2.2
GetInfoHashHex 获取 torrent 的 info_hash(十六进制字符串)
func PKCS7Padding ¶
Types ¶
type AppConf ¶
type AppConf struct {
Data struct {
AccountType string `json:"accountType"`
AgreementCheck string `json:"agreementCheck"`
AppKey string `json:"appKey"`
ClientType int `json:"clientType"`
IsOauth2 bool `json:"isOauth2"`
LoginSort string `json:"loginSort"`
MailSuffix string `json:"mailSuffix"`
PageKey string `json:"pageKey"`
ParamId string `json:"paramId"`
RegReturnUrl string `json:"regReturnUrl"`
ReqId string `json:"reqId"`
ReturnUrl string `json:"returnUrl"`
ShowFeedback string `json:"showFeedback"`
ShowPwSaveName string `json:"showPwSaveName"`
ShowQrSaveName string `json:"showQrSaveName"`
ShowSmsSaveName string `json:"showSmsSaveName"`
Sso string `json:"sso"`
} `json:"data"`
Msg string `json:"msg"`
Result string `json:"result"`
}
type CapacityResp ¶ added in v4.1.4
type CapacityResp struct {
ResCode int `json:"res_code"`
ResMessage string `json:"res_message"`
Account string `json:"account"`
CloudCapacityInfo struct {
FreeSize int64 `json:"freeSize"`
MailUsedSize int64 `json:"mail189UsedSize"`
TotalSize int64 `json:"totalSize"`
UsedSize int64 `json:"usedSize"`
} `json:"cloudCapacityInfo"`
FamilyCapacityInfo struct {
FreeSize int64 `json:"freeSize"`
TotalSize int64 `json:"totalSize"`
UsedSize int64 `json:"usedSize"`
} `json:"familyCapacityInfo"`
TotalSize uint64 `json:"totalSize"`
}
type Cloud189 ¶
func (*Cloud189) GetAddition ¶
func (d *Cloud189) GetAddition() driver.Additional
func (*Cloud189) GetDetails ¶ added in v4.1.4
func (*Cloud189) Put ¶
func (d *Cloud189) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, up driver.UpdateProgress) error
type EncryptConf ¶
type UploadUrlsResp ¶
Click to show internal directories.
Click to hide internal directories.