2023-06-28 14:53:43 +08:00
|
|
|
package mopan
|
|
|
|
|
|
|
|
import (
|
2025-07-01 09:54:50 +08:00
|
|
|
"github.com/OpenListTeam/OpenList/v4/internal/driver"
|
|
|
|
"github.com/OpenListTeam/OpenList/v4/internal/op"
|
2023-06-28 14:53:43 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
type Addition struct {
|
|
|
|
Phone string `json:"phone" required:"true"`
|
|
|
|
Password string `json:"password" required:"true"`
|
2024-02-02 21:04:43 +08:00
|
|
|
SMSCode string `json:"sms_code" help:"input 'send' send sms "`
|
2023-06-28 14:53:43 +08:00
|
|
|
|
2023-08-25 14:10:05 +08:00
|
|
|
RootFolderID string `json:"root_folder_id" default:""`
|
2023-06-28 14:53:43 +08:00
|
|
|
|
|
|
|
CloudID string `json:"cloud_id"`
|
|
|
|
|
|
|
|
OrderBy string `json:"order_by" type:"select" options:"filename,filesize,lastOpTime" default:"filename"`
|
|
|
|
OrderDirection string `json:"order_direction" type:"select" options:"asc,desc" default:"asc"`
|
|
|
|
|
|
|
|
DeviceInfo string `json:"device_info"`
|
2023-08-09 16:13:09 +08:00
|
|
|
|
|
|
|
UploadThread string `json:"upload_thread" default:"3" help:"1<=thread<=32"`
|
2023-06-28 14:53:43 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (a *Addition) GetRootId() string {
|
|
|
|
return a.RootFolderID
|
|
|
|
}
|
|
|
|
|
|
|
|
var config = driver.Config{
|
2025-07-12 17:57:54 +08:00
|
|
|
Name: "MoPan",
|
2023-06-28 14:53:43 +08:00
|
|
|
CheckStatus: true,
|
|
|
|
Alert: "warning|This network disk may store your password in clear text. Please set your password carefully",
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
op.RegisterDriver(func() driver.Driver {
|
|
|
|
return &MoPan{}
|
|
|
|
})
|
|
|
|
}
|