cmd

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 15 Imported by: 0

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> 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

View Source
const (
	ORDER_TIME = "time"
	ORDER_NAME = "name"
	ORDER_SIZE = "size"
)
View Source
const (
	ActionSync bdpan.SelectAction = iota
)

Variables

View Source
var (
	Log = bdpan.GetLogger()
)

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type Action added in v0.4.1

type Action int
const (
	ActionBack Action = iota
	ActionDownload
	ActionDelete
	ActionRename
	ActionCopyPath
	ActionViewDir
	ActionViewFile
	ActionCopy
	ActionMove
	ActionPaste
)

type AuthCommand

type AuthCommand struct {
}

func (AuthCommand) Run

func (a AuthCommand) Run() error

type DownloadCommand

type DownloadCommand struct {
	From string

	IsSync bool
	// contains filtered or unexported fields
}

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 FileAction added in v0.4.1

type FileAction struct {
	File   *bdpan.FileInfoDto
	Name   string
	Icon   string
	Action Action
	Desc   string
}

func NewBackFileAction added in v0.4.1

func NewBackFileAction(dir string) FileAction

func NewFileActions added in v0.4.1

func NewFileActions(file *bdpan.FileInfoDto) []FileAction

func NewSystemDirAction added in v0.4.1

func NewSystemDirAction(dir string) FileAction

func NewViewFileActions added in v0.4.1

func NewViewFileActions(files []*bdpan.FileInfoDto) []FileAction

type GlobalArg

type GlobalArg struct {
	IsVerbose bool
	AppId     string
}

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 QueryArg

type QueryArg struct {
	Dir string
}

type QueryCommand

type QueryCommand struct {
	Key   string // 搜索关键字
	Path  string // 文件地址
	FSIDS []string
}

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
	// contains filtered or unexported fields
}

func (*RootCommand) Run added in v0.4.1

func (r *RootCommand) Run() error

type SyncAddCommand

type SyncAddCommand struct {
	Remote   string
	Local    string
	IsBackup bool // 是否为备份
	HasHide  bool //是否备份隐藏文件
}

func (SyncAddCommand) Run

func (s SyncAddCommand) Run() error

type SyncCommand

type SyncCommand struct {
	ID string

	IsCmdDel  bool
	IsCmdList bool
}

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

type TestCommand struct {
	Cmd *cobra.Command
	ID  string
}

func (TestCommand) Init

func (t TestCommand) Init()

func (TestCommand) Run

func (t TestCommand) Run(cmd *cobra.Command, args []string)

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL