Documentation
¶
Index ¶
- Variables
- func Addr(ip, port string) string
- func DisableLogColor()
- func FileModeV1(root string) (string, error)
- func FileModeV2(file os.FileInfo) string
- func GetLogger(name string) *logHandle
- func LoadConfigBytes(names ...string) ([]byte, error)
- func MaxInt(a, b int) int
- func MaxInt64(a, b int64) int64
- func MinInt(a, b int) int
- func MinInt64(a, b int64) int64
- func NewSSH(node *Node) (*ssh.Client, error)
- func ParseInt64(str string) (int64, error)
- func ParseUnit32(str string) (uint32, error)
- func RandName(root string) string
- func SetLogLevel(lvl logrus.Level)
- func SetOutFile(name string)
- func SetOutput(w io.Writer)
- func StatDir(root string) (entries []os.DirEntry, name, mode, atime, mtime string, isDir bool, err error)
- func StatDirChild(root string) ([]os.DirEntry, error)
- func StatDirMeta(root string) (name, mode, atime, mtime string, isDir bool, err error)
- func StatFile(root string) (name string, mode string, atime string, mtime string, size string, err error)
- func StatTimeV2(file os.FileInfo) (string, string)
- func WalkTree(ctx Context, scpChan *scpChan, rootParent, root, dstPath string) error
- type Attr
- type CommandType
- type Context
- type File
- type LRMap
- type Node
- type Progress
- type SCP
- func (scp *SCP) Get(ctx Context, srcPath, dstPath string) error
- func (scp *SCP) GetAll(ctx Context, localPath, remotePath string) error
- func (scp *SCP) Put(ctx Context, srcPath, dstPath string) error
- func (scp *SCP) PutAll(ctx Context, srcPath, dstPath string) error
- func (scp *SCP) PutAllExcludeRoot(ctx Context, srcPath, dstPath string) error
- func (scp *SCP) SwitchScpwFunc(ctx Context, localPath, remotePath string, typ SCPWType) error
- type SCPWType
Constants ¶
This section is empty.
Variables ¶
View Source
var ONCE_LEN = 128 * 1024
Functions ¶
func DisableLogColor ¶
func DisableLogColor()
func FileModeV1 ¶
func FileModeV2 ¶
func LoadConfigBytes ¶
func ParseInt64 ¶
func ParseUnit32 ¶
func SetLogLevel ¶
SetLogLevel sets Level to all the loggers in the map
func SetOutFile ¶
func SetOutFile(name string)
func StatDirMeta ¶
Types ¶
type Attr ¶
type CommandType ¶
type CommandType = string
const ( C CommandType = "C" D CommandType = "D" E CommandType = "E" T CommandType = "T" NULL CommandType = "NULL" )
type File ¶
type Node ¶
type Node struct { Name string `yaml:"name"` Host string `yaml:"host"` User string `yaml:"user"` Port string `yaml:"port"` KeyPath string `yaml:"keypath"` Password string `yaml:"password"` Children []*Node `yaml:"children"` LRMap []LRMap `yaml:"lr-map"` Typ SCPWType `yaml:"type"` }
func LoadConfig ¶
type Progress ¶ added in v1.0.1
type Progress struct { *mpb.Progress // contains filtered or unexported fields }
func NewProgress ¶ added in v1.0.1
func NewProgress() *Progress
func (*Progress) NewInfiniteByesBar ¶ added in v1.0.1
type SCP ¶
func (*SCP) PutAllExcludeRoot ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.