Documentation
¶
Overview ¶
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Copyright © 2023 NAME HERE <EMAIL ADDRESS> doc: https://pan.baidu.com/union/doc/pkuo3snyp
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Index ¶
- Constants
- Variables
- func DrawText(s tcell.Screen, StartX, StartY, EndX, EndY int, style tcell.Style, text string) error
- func Execute()
- type AuthCommand
- type Box
- type DownloadCommand
- type GlobalArg
- type ListCommand
- type LoginCommand
- type ManageCommand
- type Mode
- type QueryArg
- type QueryCommand
- type RootCommand
- func (r *RootCommand) DrawBottomLeft(text string) error
- func (r *RootCommand) DrawBottomRight(text string) error
- func (r *RootCommand) DrawEventKey(ev *tcell.EventKey) error
- func (r *RootCommand) DrawLayout() error
- func (r *RootCommand) DrawSelect() error
- func (r *RootCommand) DrawSelectItem(s *Select)
- func (r *RootCommand) DrawTopLeft(text string) error
- func (r *RootCommand) Exec(args []string) error
- func (r *RootCommand) GetSelectInfo() *bdpan.FileInfoDto
- func (r *RootCommand) InitScreen(file *bdpan.FileInfoDto) error
- func (r *RootCommand) ListenEventKeyInModeConfirm(ev *tcell.EventKey) error
- func (r *RootCommand) ListenEventKeyInModeNormal(ev *tcell.EventKey) error
- type Select
- type SelectItem
- type SyncAddCommand
- type SyncCommand
- type SyncExecCommand
- type Terminal
- type TestCommand
- type UploadCommand
Constants ¶
const ( ORDER_TIME = "time" ORDER_NAME = "name" ORDER_SIZE = "size" )
const (
ActionSync bdpan.SelectAction = iota
)
Variables ¶
var (
Log = bdpan.GetLogger()
)
var (
ORDERS = []string{ORDER_NAME, ORDER_TIME, ORDER_SIZE}
)
Functions ¶
Types ¶
type AuthCommand ¶
type AuthCommand struct {
}
func (AuthCommand) Run ¶
func (a AuthCommand) Run() error
type DownloadCommand ¶
func NewDownloadCommand ¶
func NewDownloadCommand(c *cobra.Command) *DownloadCommand
func (DownloadCommand) Download ¶
func (d DownloadCommand) Download(file *bdpan.FileInfoDto) error
func (DownloadCommand) Run ¶
func (d DownloadCommand) Run() error
type ListCommand ¶
type ListCommand struct {
Dir string
IsRecursion bool
IsDesc bool
Start int32
Limit int32
Order string
}
func NewListCommand ¶
func NewListCommand(c *cobra.Command) *ListCommand
func (ListCommand) Run ¶
func (l ListCommand) Run() error
type LoginCommand ¶
type LoginCommand struct {
}
func (LoginCommand) Run ¶
func (l LoginCommand) Run() error
type ManageCommand ¶
type ManageCommand struct {
// contains filtered or unexported fields
}
func (ManageCommand) Copy ¶
func (m ManageCommand) Copy() error
func (ManageCommand) Exec ¶
func (m ManageCommand) Exec(args []string) error
type QueryCommand ¶
func NewQueryCommand ¶
func NewQueryCommand(cmd *cobra.Command) *QueryCommand
func (QueryCommand) Run ¶
func (q QueryCommand) Run() error
type RootCommand ¶
type RootCommand struct {
Path string
Limit int
T *Terminal
// contains filtered or unexported fields
}
func (*RootCommand) DrawBottomLeft ¶
func (r *RootCommand) DrawBottomLeft(text string) error
左下角输入内容
func (*RootCommand) DrawBottomRight ¶
func (r *RootCommand) DrawBottomRight(text string) error
右下角输入内容
func (*RootCommand) DrawEventKey ¶
func (r *RootCommand) DrawEventKey(ev *tcell.EventKey) error
func (*RootCommand) DrawSelect ¶
func (r *RootCommand) DrawSelect() error
func (*RootCommand) DrawSelectItem ¶
func (r *RootCommand) DrawSelectItem(s *Select)
绘制选中的 select item
func (*RootCommand) Exec ¶
func (r *RootCommand) Exec(args []string) error
func (*RootCommand) GetSelectInfo ¶
func (r *RootCommand) GetSelectInfo() *bdpan.FileInfoDto
获取被选中的文件对象
func (*RootCommand) InitScreen ¶
func (r *RootCommand) InitScreen(file *bdpan.FileInfoDto) error
func (*RootCommand) ListenEventKeyInModeConfirm ¶
func (r *RootCommand) ListenEventKeyInModeConfirm(ev *tcell.EventKey) error
func (*RootCommand) ListenEventKeyInModeNormal ¶
func (r *RootCommand) ListenEventKeyInModeNormal(ev *tcell.EventKey) error
type Select ¶
type Select struct {
StartX int
StartY int
MaxWidth int
MaxHeight int
Items []*SelectItem
SelectIndex int
StyleSelect tcell.Style
}
func (*Select) GetDrawItems ¶
func (s *Select) GetDrawItems() []*SelectItem
func (Select) GetSeleteItem ¶
func (s Select) GetSeleteItem() *SelectItem
func (*Select) MoveDownSelect ¶
func (*Select) MoveUpSelect ¶
type SelectItem ¶
type SelectItem struct {
IsSelect bool
Info interface{}
}
type SyncAddCommand ¶
type SyncAddCommand struct {
Remote string
Local string
IsBackup bool // 是否为备份
HasHide bool //是否备份隐藏文件
}
func (SyncAddCommand) Run ¶
func (s SyncAddCommand) Run() error
type SyncCommand ¶
func (SyncCommand) Run ¶
func (s SyncCommand) Run() error
type SyncExecCommand ¶
type SyncExecCommand struct {
*SyncCommand
// contains filtered or unexported fields
}
func (SyncExecCommand) Run ¶
func (s SyncExecCommand) Run() error
type TestCommand ¶
func (TestCommand) Init ¶
func (t TestCommand) Init()
type UploadCommand ¶
type UploadCommand struct {
From string
To string
IsSync bool
IsRecursion bool // 是否递归子文件夹文件
IsIncludeHide bool // 是否上传隐藏文件
// contains filtered or unexported fields
}
func NewUploadCommand ¶
func NewUploadCommand(c *cobra.Command) *UploadCommand
func (UploadCommand) Run ¶
func (u UploadCommand) Run() error