Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alist-org
GitHub Repository: alist-org/alist
Path: blob/main/drivers/alias/meta.go
1986 views
1
package alias
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
// Usually one of two
10
// driver.RootPath
11
// define other
12
Paths string `json:"paths" required:"true" type:"text"`
13
ProtectSameName bool `json:"protect_same_name" default:"true" required:"false" help:"Protects same-name files from Delete or Rename"`
14
DownloadConcurrency int `json:"download_concurrency" default:"0" required:"false" type:"number" help:"Need to enable proxy"`
15
DownloadPartSize int `json:"download_part_size" default:"0" type:"number" required:"false" help:"Need to enable proxy. Unit: KB"`
16
Writable bool `json:"writable" type:"bool" default:"false"`
17
}
18
19
var config = driver.Config{
20
Name: "Alias",
21
LocalSort: true,
22
NoCache: true,
23
NoUpload: false,
24
DefaultRoot: "/",
25
ProxyRangeOption: true,
26
}
27
28
func init() {
29
op.RegisterDriver(func() driver.Driver {
30
return &Alias{
31
Addition: Addition{
32
ProtectSameName: true,
33
},
34
}
35
})
36
}
37
38