-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Merge pull request #958 from Xhofe/dev
Dev 2.4.0
- Loading branch information
Showing
56 changed files
with
1,565 additions
and
430 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
package _23 | ||
|
||
import ( | ||
"github.com/Xhofe/alist/conf" | ||
"github.com/Xhofe/alist/utils" | ||
"path" | ||
"time" | ||
) | ||
|
||
type Pan123File struct { | ||
FileName string `json:"FileName"` | ||
Size int64 `json:"Size"` | ||
UpdateAt *time.Time `json:"UpdateAt"` | ||
FileId int64 `json:"FileId"` | ||
Type int `json:"Type"` | ||
Etag string `json:"Etag"` | ||
S3KeyFlag string `json:"S3KeyFlag"` | ||
} | ||
|
||
func (f Pan123File) GetSize() uint64 { | ||
return uint64(f.Size) | ||
} | ||
|
||
func (f Pan123File) GetName() string { | ||
return f.FileName | ||
} | ||
|
||
func (f Pan123File) GetType() int { | ||
if f.Type == 1 { | ||
return conf.FOLDER | ||
} | ||
return utils.GetFileType(path.Ext(f.FileName)) | ||
} | ||
|
||
type BaseResp struct { | ||
Code int `json:"code"` | ||
Message string `json:"message"` | ||
} | ||
|
||
type Pan123TokenResp struct { | ||
BaseResp | ||
Data struct { | ||
Token string `json:"token"` | ||
} `json:"data"` | ||
} | ||
|
||
type Pan123Files struct { | ||
BaseResp | ||
Data struct { | ||
InfoList []Pan123File `json:"InfoList"` | ||
Next string `json:"Next"` | ||
} `json:"data"` | ||
} | ||
|
||
type Pan123DownResp struct { | ||
BaseResp | ||
Data struct { | ||
DownloadUrl string `json:"DownloadUrl"` | ||
} `json:"data"` | ||
} | ||
|
||
type UploadResp struct { | ||
BaseResp | ||
Data struct { | ||
AccessKeyId string `json:"AccessKeyId"` | ||
Bucket string `json:"Bucket"` | ||
Key string `json:"Key"` | ||
SecretAccessKey string `json:"SecretAccessKey"` | ||
SessionToken string `json:"SessionToken"` | ||
FileId int64 `json:"FileId"` | ||
} `json:"data"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.