Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alist-org
GitHub Repository: alist-org/alist
Path: blob/main/drivers/aliyundrive_open/meta.go
1986 views
1
package aliyundrive_open
2
3
import (
4
"github.com/alist-org/alist/v3/internal/driver"
5
"github.com/alist-org/alist/v3/internal/op"
6
)
7
8
type Addition struct {
9
DriveType string `json:"drive_type" type:"select" options:"default,resource,backup" default:"resource"`
10
driver.RootID
11
RefreshToken string `json:"refresh_token" required:"true"`
12
OrderBy string `json:"order_by" type:"select" options:"name,size,updated_at,created_at"`
13
OrderDirection string `json:"order_direction" type:"select" options:"ASC,DESC"`
14
OauthTokenURL string `json:"oauth_token_url" default:"https://api.alistgo.com/alist/ali_open/token"`
15
ClientID string `json:"client_id" required:"false" help:"Keep it empty if you don't have one"`
16
ClientSecret string `json:"client_secret" required:"false" help:"Keep it empty if you don't have one"`
17
RemoveWay string `json:"remove_way" required:"true" type:"select" options:"trash,delete"`
18
RapidUpload bool `json:"rapid_upload" help:"If you enable this option, the file will be uploaded to the server first, so the progress will be incorrect"`
19
InternalUpload bool `json:"internal_upload" help:"If you are using Aliyun ECS is located in Beijing, you can turn it on to boost the upload speed"`
20
LIVPDownloadFormat string `json:"livp_download_format" type:"select" options:"jpeg,mov" default:"jpeg"`
21
AccessToken string
22
}
23
24
var config = driver.Config{
25
Name: "AliyundriveOpen",
26
LocalSort: false,
27
OnlyLocal: false,
28
OnlyProxy: false,
29
NoCache: false,
30
NoUpload: false,
31
NeedMs: false,
32
DefaultRoot: "root",
33
NoOverwriteUpload: true,
34
}
35
var API_URL = "https://openapi.alipan.com"
36
37
func init() {
38
op.RegisterDriver(func() driver.Driver {
39
return &AliyundriveOpen{}
40
})
41
}
42
43