Documentation ¶
Index ¶
- Constants
- Variables
- func AddClientCache(key string, client *SSHClient)
- func BuildMongoDBURI(opts ...MongoOpt) string
- func ClearTempFileDelay(sleepTime time.Duration, filepath ...string)
- func DoLogin(opt *sqlOption, lcmd *localcommand.LocalCommand, dbType string) (*localcommand.LocalCommand, error)
- func FindAvailableShell(opt *ContainerOptions) (shell string, err error)
- func HasShellInContainer(opt *ContainerOptions, shell string) error
- func IsSupportedProtocol(p string) error
- func LoginToSu(sc *SSHConnection) error
- func MakeReuseSSHClientKey(userId, assetId, systemUserId, ip, username string) string
- func MatchLoginPrefix(prefix string, dbType string, lcmd *localcommand.LocalCommand) (*localcommand.LocalCommand, error)
- func NewSftpConn(sess *gossh.Session) (*sftp.Client, error)
- func StoreCAFileToLocal(caCert string) (caFilepath string, err error)
- type AssetDir
- func (ad *AssetDir) Create(path string) (*sftp.File, error)
- func (ad *AssetDir) CreateFTPLog(su *model.SystemUser, operate, filename string, isSuccess bool)
- func (ad *AssetDir) GetSFTPAndRealPath(su *model.SystemUser, path string) (conn *SftpConn, realPath string)
- func (ad *AssetDir) GetSftpClient(su *model.SystemUser) (conn *SftpConn, err error)
- func (ad *AssetDir) IsDir() bool
- func (ad *AssetDir) IsUniqueSu() (folderName string, ok bool)
- func (ad *AssetDir) MkdirAll(path string) (err error)
- func (ad *AssetDir) ModTime() time.Time
- func (ad *AssetDir) Mode() os.FileMode
- func (ad *AssetDir) Name() string
- func (ad *AssetDir) Open(path string) (*sftp.File, error)
- func (ad *AssetDir) ReadDir(path string) (res []os.FileInfo, err error)
- func (ad *AssetDir) ReadLink(path string) (res string, err error)
- func (ad *AssetDir) Remove(path string) (err error)
- func (ad *AssetDir) RemoveDirectory(path string) (err error)
- func (ad *AssetDir) Rename(oldNamePath, newNamePath string) (err error)
- func (ad *AssetDir) Size() int64
- func (ad *AssetDir) Stat(path string) (res os.FileInfo, err error)
- func (ad *AssetDir) Symlink(oldNamePath, newNamePath string) (err error)
- func (ad *AssetDir) Sys() interface{}
- type ContainerConnection
- type ContainerOption
- func ContainerHost(host string) ContainerOption
- func ContainerName(container string) ContainerOption
- func ContainerNamespace(namespace string) ContainerOption
- func ContainerPodName(name string) ContainerOption
- func ContainerPtyWin(win Windows) ContainerOption
- func ContainerSkipTls(isSkipTls bool) ContainerOption
- func ContainerToken(token string) ContainerOption
- type ContainerOptions
- type ExecuteResult
- type FakeFileInfo
- type FileInfoList
- type FolderBuilderOption
- func WitRemoteAddr(addr string) FolderBuilderOption
- func WithAsset(asset model.Asset) FolderBuilderOption
- func WithDomain(domain model.Domain) FolderBuilderOption
- func WithFolderID(id string) FolderBuilderOption
- func WithFolderName(name string) FolderBuilderOption
- func WithSubFoldersLoadFunc(loadFunc SubFoldersLoadFunc) FolderBuilderOption
- func WithSystemUsers(systemUsers []model.SystemUser) FolderBuilderOption
- type K8sCon
- type K8sOption
- type MongoDBConn
- type MongoOpt
- type MySQLConn
- type NodeDir
- type OracleConn
- type PostgreSQLConn
- type RedisConn
- type SQLServerConn
- type SQLiteConn
- type SSHClient
- type SSHClientOption
- func SSHClientHost(host string) SSHClientOption
- func SSHClientKeyboardAuth(keyboardAuth gossh.KeyboardInteractiveChallenge) SSHClientOption
- func SSHClientPassphrase(passphrase string) SSHClientOption
- func SSHClientPassword(password string) SSHClientOption
- func SSHClientPort(port int) SSHClientOption
- func SSHClientPrivateAuth(privateAuth gossh.Signer) SSHClientOption
- func SSHClientPrivateKey(privateKey string) SSHClientOption
- func SSHClientProxyClient(proxyArgs ...SSHClientOptions) SSHClientOption
- func SSHClientTimeout(timeout int) SSHClientOption
- func SSHClientUsername(username string) SSHClientOption
- type SSHClientOptions
- type SSHConnection
- type SSHManager
- type SSHOption
- type SSHOptions
- type SearchResultDir
- func (sd *SearchResultDir) IsDir() bool
- func (sd *SearchResultDir) List() (res []os.FileInfo, err error)
- func (sd *SearchResultDir) ModTime() time.Time
- func (sd *SearchResultDir) Mode() os.FileMode
- func (sd *SearchResultDir) Name() string
- func (sd *SearchResultDir) SetSubDirs(subDirs map[string]os.FileInfo)
- func (sd *SearchResultDir) Size() int64
- func (sd *SearchResultDir) Sys() interface{}
- type ServerConnection
- type SftpConn
- type SqlOption
- func MySQLDisableAutoReHash() SqlOption
- func SqlAllowInvalidCert(allowInvalidCert bool) SqlOption
- func SqlCaCert(caCert string) SqlOption
- func SqlCertKey(certKey string) SqlOption
- func SqlClientCert(clientCert string) SqlOption
- func SqlCreateDbIfNotExist(flag bool) SqlOption
- func SqlDBName(dbName string) SqlOption
- func SqlHost(host string) SqlOption
- func SqlPassword(password string) SqlOption
- func SqlPathToDb(path string) SqlOption
- func SqlPort(port int) SqlOption
- func SqlPtyWin(win Windows) SqlOption
- func SqlUseSSL(useSSL bool) SqlOption
- func SqlUsername(username string) SqlOption
- type SubFoldersLoadFunc
- type TelnetConfig
- type TelnetConnection
- func (tc *TelnetConnection) Close() (err error)
- func (tc *TelnetConnection) KeepAlive() error
- func (tc *TelnetConnection) Protocol() string
- func (tc *TelnetConnection) Read(p []byte) (n int, err error)
- func (tc *TelnetConnection) SetWinSize(w, h int) error
- func (tc *TelnetConnection) Write(p []byte) (n int, err error)
- type TelnetOption
- func TelnetCharset(charset string) TelnetOption
- func TelnetCustomSuccessPattern(successPattern *regexp.Regexp) TelnetOption
- func TelnetHost(host string) TelnetOption
- func TelnetPort(port int) TelnetOption
- func TelnetProxyOptions(proxyOpts []SSHClientOptions) TelnetOption
- func TelnetPtyWin(win Windows) TelnetOption
- func TelnetUPassword(password string) TelnetOption
- func TelnetUTimeout(timeout int) TelnetOption
- func TelnetUsername(username string) TelnetOption
- type UserSSHClient
- type UserSftpConn
- func (u *UserSftpConn) Close()
- func (u *UserSftpConn) Create(path string) (*sftp.File, error)
- func (u *UserSftpConn) IsDir() bool
- func (u *UserSftpConn) List() (res []os.FileInfo, err error)
- func (u *UserSftpConn) LoadNodeSubFoldersByKey(nodeKey string) SubFoldersLoadFunc
- func (u *UserSftpConn) MkdirAll(path string) (err error)
- func (u *UserSftpConn) ModTime() time.Time
- func (u *UserSftpConn) Mode() os.FileMode
- func (u *UserSftpConn) Name() string
- func (u *UserSftpConn) Open(path string) (*sftp.File, error)
- func (u *UserSftpConn) ParsePath(path string) (fi os.FileInfo, restPath string)
- func (u *UserSftpConn) ReadDir(path string) (res []os.FileInfo, err error)
- func (u *UserSftpConn) ReadLink(path string) (name string, err error)
- func (u *UserSftpConn) Remove(path string) (err error)
- func (u *UserSftpConn) RemoveDirectory(path string) (err error)
- func (u *UserSftpConn) Rename(oldNamePath, newNamePath string) (err error)
- func (u *UserSftpConn) Search(key string) (res []os.FileInfo, err error)
- func (u *UserSftpConn) Size() int64
- func (u *UserSftpConn) Stat(path string) (res os.FileInfo, err error)
- func (u *UserSftpConn) Symlink(oldNamePath, newNamePath string) (err error)
- func (u *UserSftpConn) Sys() interface{}
- type Windows
Constants ¶
View Source
const ( ProtocolSSH = "ssh" ProtocolTELNET = "telnet" ProtocolK8s = "k8s" ProtocolMySQL = "mysql" ProtocolMariadb = "mariadb" ProtocolSQLServer = "sqlserver" ProtocolRedis = "redis" ProtocolMongoDB = "mongodb" ProtocolPostgreSQL = "postgresql" ProtocolSQLite = "sqlite" ProtocolOracle = "oracle" )
View Source
const (
LinuxSuCommand = "su - %s; exit"
)
View Source
const (
OraclePrompt = "Password for user %s:"
)
View Source
const (
PostgreSQLPrompt = "Password for user %s:"
)
View Source
const (
SFTPPathSeparator = "/"
)
View Source
const (
SearchFolderName = "_Search"
)
Variables ¶
View Source
var ( ErrUnSupportedProtocol = errors.New("unsupported protocol") ErrKubectlClient = errors.New("not found Kubectl client") ErrMySQLClient = errors.New("not found MySQL client") ErrSQLServerClient = errors.New("not found SQLServer client") ErrRedisClient = errors.New("not found Redis client") ErrMongoDBClient = errors.New("not found MongoDB client") ErrPostgreSQLClient = errors.New("not found PostgreSQL client") ErrSQLiteClient = errors.New("not found SQLite client") ErrOracleClient = errors.New("not found Oracle client") )
View Source
var ( ErrNotFoundCommand = errors.New("not found command") ErrNotFoundShell = errors.New("not found any shell") )
View Source
var ( ErrNoAvailable = errors.New("no available gateway") ErrGatewayDial = errors.New("gateway dial addr failed") ErrSSHClient = errors.New("new ssh client failed") )
View Source
var ErrorTimeout = errors.New("time out")
View Source
var (
InValidToken = errors.New("invalid token")
)
Functions ¶
func AddClientCache ¶
func BuildMongoDBURI ¶
func ClearTempFileDelay ¶
func DoLogin ¶
func DoLogin(opt *sqlOption, lcmd *localcommand.LocalCommand, dbType string) (*localcommand.LocalCommand, error)
func FindAvailableShell ¶
func FindAvailableShell(opt *ContainerOptions) (shell string, err error)
func HasShellInContainer ¶
func HasShellInContainer(opt *ContainerOptions, shell string) error
func IsSupportedProtocol ¶
func LoginToSu ¶
func LoginToSu(sc *SSHConnection) error
func MakeReuseSSHClientKey ¶
func MatchLoginPrefix ¶
func MatchLoginPrefix(prefix string, dbType string, lcmd *localcommand.LocalCommand) (*localcommand.LocalCommand, error)
func StoreCAFileToLocal ¶
Types ¶
type AssetDir ¶
func NewAssetDir ¶
func (*AssetDir) CreateFTPLog ¶
func (ad *AssetDir) CreateFTPLog(su *model.SystemUser, operate, filename string, isSuccess bool)
func (*AssetDir) GetSFTPAndRealPath ¶
func (*AssetDir) GetSftpClient ¶
func (ad *AssetDir) GetSftpClient(su *model.SystemUser) (conn *SftpConn, err error)
func (*AssetDir) IsUniqueSu ¶
func (*AssetDir) RemoveDirectory ¶
type ContainerConnection ¶
type ContainerConnection struct {
// contains filtered or unexported fields
}
func NewContainerConnection ¶
func NewContainerConnection(opts ...ContainerOption) (*ContainerConnection, error)
func (*ContainerConnection) Close ¶
func (c *ContainerConnection) Close() error
func (*ContainerConnection) KeepAlive ¶
func (c *ContainerConnection) KeepAlive() error
func (*ContainerConnection) SetWinSize ¶
func (c *ContainerConnection) SetWinSize(w, h int) error
type ContainerOption ¶
type ContainerOption func(*ContainerOptions)
func ContainerHost ¶
func ContainerHost(host string) ContainerOption
func ContainerName ¶
func ContainerName(container string) ContainerOption
func ContainerNamespace ¶
func ContainerNamespace(namespace string) ContainerOption
func ContainerPodName ¶
func ContainerPodName(name string) ContainerOption
func ContainerPtyWin ¶
func ContainerPtyWin(win Windows) ContainerOption
func ContainerSkipTls ¶
func ContainerSkipTls(isSkipTls bool) ContainerOption
func ContainerToken ¶
func ContainerToken(token string) ContainerOption
type ContainerOptions ¶
type ContainerOptions struct { Host string Token string PodName string Namespace string ContainerName string IsSkipTls bool // contains filtered or unexported fields }
func (ContainerOptions) K8sCfg ¶
func (o ContainerOptions) K8sCfg() *rest.Config
func (ContainerOptions) String ¶
func (o ContainerOptions) String() string
type ExecuteResult ¶
type FakeFileInfo ¶
type FakeFileInfo struct {
// contains filtered or unexported fields
}
func NewFakeFile ¶
func NewFakeFile(name string, isDir bool) *FakeFileInfo
func NewFakeSymFile ¶
func NewFakeSymFile(name string) *FakeFileInfo
func (*FakeFileInfo) IsDir ¶
func (f *FakeFileInfo) IsDir() bool
func (*FakeFileInfo) ModTime ¶
func (f *FakeFileInfo) ModTime() time.Time
func (*FakeFileInfo) Mode ¶
func (f *FakeFileInfo) Mode() os.FileMode
func (*FakeFileInfo) Name ¶
func (f *FakeFileInfo) Name() string
func (*FakeFileInfo) Size ¶
func (f *FakeFileInfo) Size() int64
func (*FakeFileInfo) Sys ¶
func (f *FakeFileInfo) Sys() interface{}
type FileInfoList ¶
func (FileInfoList) Len ¶
func (fl FileInfoList) Len() int
func (FileInfoList) Less ¶
func (fl FileInfoList) Less(i, j int) bool
func (FileInfoList) Swap ¶
func (fl FileInfoList) Swap(i, j int)
type FolderBuilderOption ¶
type FolderBuilderOption func(info *folderOptions)
func WitRemoteAddr ¶
func WitRemoteAddr(addr string) FolderBuilderOption
func WithAsset ¶
func WithAsset(asset model.Asset) FolderBuilderOption
func WithDomain ¶
func WithDomain(domain model.Domain) FolderBuilderOption
func WithFolderID ¶
func WithFolderID(id string) FolderBuilderOption
func WithFolderName ¶
func WithFolderName(name string) FolderBuilderOption
func WithSubFoldersLoadFunc ¶
func WithSubFoldersLoadFunc(loadFunc SubFoldersLoadFunc) FolderBuilderOption
func WithSystemUsers ¶
func WithSystemUsers(systemUsers []model.SystemUser) FolderBuilderOption
type K8sCon ¶
type K8sCon struct { *localcommand.LocalCommand // contains filtered or unexported fields }
func NewK8sConnection ¶
type K8sOption ¶
type K8sOption func(*k8sOptions)
func K8sClusterServer ¶
func K8sExtraEnvs ¶
func K8sSkipTls ¶
func K8sUsername ¶
type MongoDBConn ¶
type MongoDBConn struct { *localcommand.LocalCommand // contains filtered or unexported fields }
func NewMongoDBConnection ¶
func NewMongoDBConnection(ops ...SqlOption) (*MongoDBConn, error)
func (*MongoDBConn) Close ¶
func (conn *MongoDBConn) Close() error
func (*MongoDBConn) KeepAlive ¶
func (conn *MongoDBConn) KeepAlive() error
type MySQLConn ¶
type MySQLConn struct { *localcommand.LocalCommand // contains filtered or unexported fields }
func NewMySQLConnection ¶
type NodeDir ¶
type NodeDir struct { ID string // contains filtered or unexported fields }
func NewNodeDir ¶
func NewNodeDir(builders ...FolderBuilderOption) NodeDir
type OracleConn ¶
type OracleConn struct { *localcommand.LocalCommand // contains filtered or unexported fields }
func NewOracleConnection ¶
func NewOracleConnection(ops ...SqlOption) (*OracleConn, error)
func (*OracleConn) Close ¶
func (conn *OracleConn) Close() error
func (*OracleConn) KeepAlive ¶
func (conn *OracleConn) KeepAlive() error
type PostgreSQLConn ¶
type PostgreSQLConn struct { *localcommand.LocalCommand // contains filtered or unexported fields }
func NewPostgreSQLConnection ¶
func NewPostgreSQLConnection(ops ...SqlOption) (*PostgreSQLConn, error)
func (*PostgreSQLConn) Close ¶
func (conn *PostgreSQLConn) Close() error
func (*PostgreSQLConn) KeepAlive ¶
func (conn *PostgreSQLConn) KeepAlive() error
type RedisConn ¶
type RedisConn struct { *localcommand.LocalCommand // contains filtered or unexported fields }
func NewRedisConnection ¶
type SQLServerConn ¶
type SQLServerConn struct { *localcommand.LocalCommand // contains filtered or unexported fields }
func NewSQLServerConnection ¶
func NewSQLServerConnection(ops ...SqlOption) (*SQLServerConn, error)
func (*SQLServerConn) Close ¶
func (conn *SQLServerConn) Close() error
func (*SQLServerConn) KeepAlive ¶
func (conn *SQLServerConn) KeepAlive() error
type SQLiteConn ¶
type SQLiteConn struct { *localcommand.LocalCommand // contains filtered or unexported fields }
func NewSQLiteConnection ¶
func NewSQLiteConnection(ops ...SqlOption) (*SQLiteConn, error)
func (*SQLiteConn) Close ¶
func (conn *SQLiteConn) Close() error
func (*SQLiteConn) KeepAlive ¶
func (conn *SQLiteConn) KeepAlive() error
type SSHClient ¶
type SSHClient struct { *gossh.Client Cfg *SSHClientOptions ProxyClient *SSHClient sync.Mutex // contains filtered or unexported fields }
func GetClientFromCache ¶
func NewSSHClient ¶
func NewSSHClient(opts ...SSHClientOption) (*SSHClient, error)
func NewSSHClientWithCfg ¶
func NewSSHClientWithCfg(cfg *SSHClientOptions) (*SSHClient, error)
func (*SSHClient) ReleaseSession ¶
type SSHClientOption ¶
type SSHClientOption func(conf *SSHClientOptions)
func SSHClientHost ¶
func SSHClientHost(host string) SSHClientOption
func SSHClientKeyboardAuth ¶
func SSHClientKeyboardAuth(keyboardAuth gossh.KeyboardInteractiveChallenge) SSHClientOption
func SSHClientPassphrase ¶
func SSHClientPassphrase(passphrase string) SSHClientOption
func SSHClientPassword ¶
func SSHClientPassword(password string) SSHClientOption
func SSHClientPort ¶
func SSHClientPort(port int) SSHClientOption
func SSHClientPrivateAuth ¶
func SSHClientPrivateAuth(privateAuth gossh.Signer) SSHClientOption
func SSHClientPrivateKey ¶
func SSHClientPrivateKey(privateKey string) SSHClientOption
func SSHClientProxyClient ¶
func SSHClientProxyClient(proxyArgs ...SSHClientOptions) SSHClientOption
func SSHClientTimeout ¶
func SSHClientTimeout(timeout int) SSHClientOption
func SSHClientUsername ¶
func SSHClientUsername(username string) SSHClientOption
type SSHClientOptions ¶
type SSHClientOptions struct { Host string Port string Username string Password string PrivateKey string Passphrase string Timeout int PrivateAuth gossh.Signer // contains filtered or unexported fields }
func (*SSHClientOptions) AuthMethods ¶
func (cfg *SSHClientOptions) AuthMethods() []gossh.AuthMethod
type SSHConnection ¶
type SSHConnection struct {
// contains filtered or unexported fields
}
func NewSSHConnection ¶
func NewSSHConnection(sess *gossh.Session, opts ...SSHOption) (*SSHConnection, error)
func (*SSHConnection) Close ¶
func (sc *SSHConnection) Close() (err error)
func (*SSHConnection) KeepAlive ¶
func (sc *SSHConnection) KeepAlive() error
func (*SSHConnection) SetWinSize ¶
func (sc *SSHConnection) SetWinSize(w, h int) error
type SSHManager ¶
type SSHManager struct {
// contains filtered or unexported fields
}
func (*SSHManager) AddClientCache ¶
func (s *SSHManager) AddClientCache(key string, client *SSHClient)
type SSHOption ¶
type SSHOption func(*SSHOptions)
func SSHCharset ¶
func SSHLoginToSudo ¶
func SSHSudoCommand ¶
func SSHSudoPassword ¶
func SSHSudoUsername ¶
type SSHOptions ¶
type SSHOptions struct {
// contains filtered or unexported fields
}
type SearchResultDir ¶
type SearchResultDir struct {
// contains filtered or unexported fields
}
func (*SearchResultDir) IsDir ¶
func (sd *SearchResultDir) IsDir() bool
func (*SearchResultDir) ModTime ¶
func (sd *SearchResultDir) ModTime() time.Time
func (*SearchResultDir) Mode ¶
func (sd *SearchResultDir) Mode() os.FileMode
func (*SearchResultDir) Name ¶
func (sd *SearchResultDir) Name() string
func (*SearchResultDir) SetSubDirs ¶
func (sd *SearchResultDir) SetSubDirs(subDirs map[string]os.FileInfo)
func (*SearchResultDir) Size ¶
func (sd *SearchResultDir) Size() int64
func (*SearchResultDir) Sys ¶
func (sd *SearchResultDir) Sys() interface{}
type ServerConnection ¶
type ServerConnection interface { io.ReadWriteCloser SetWinSize(width, height int) error KeepAlive() error }
type SftpConn ¶
type SftpConn struct { HomeDirPath string // contains filtered or unexported fields }
type SqlOption ¶
type SqlOption func(*sqlOption)
func MySQLDisableAutoReHash ¶
func MySQLDisableAutoReHash() SqlOption
func SqlAllowInvalidCert ¶
func SqlCertKey ¶
func SqlClientCert ¶
func SqlCreateDbIfNotExist ¶
func SqlPassword ¶
func SqlPathToDb ¶
func SqlUsername ¶
type SubFoldersLoadFunc ¶
type TelnetConfig ¶
type TelnetConnection ¶
type TelnetConnection struct {
// contains filtered or unexported fields
}
func NewTelnetConnection ¶
func NewTelnetConnection(opts ...TelnetOption) (*TelnetConnection, error)
func (*TelnetConnection) Close ¶
func (tc *TelnetConnection) Close() (err error)
func (*TelnetConnection) KeepAlive ¶
func (tc *TelnetConnection) KeepAlive() error
func (*TelnetConnection) Protocol ¶
func (tc *TelnetConnection) Protocol() string
func (*TelnetConnection) SetWinSize ¶
func (tc *TelnetConnection) SetWinSize(w, h int) error
type TelnetOption ¶
type TelnetOption func(*TelnetConfig)
func TelnetCharset ¶
func TelnetCharset(charset string) TelnetOption
func TelnetCustomSuccessPattern ¶
func TelnetCustomSuccessPattern(successPattern *regexp.Regexp) TelnetOption
func TelnetHost ¶
func TelnetHost(host string) TelnetOption
func TelnetPort ¶
func TelnetPort(port int) TelnetOption
func TelnetProxyOptions ¶
func TelnetProxyOptions(proxyOpts []SSHClientOptions) TelnetOption
func TelnetPtyWin ¶
func TelnetPtyWin(win Windows) TelnetOption
func TelnetUPassword ¶
func TelnetUPassword(password string) TelnetOption
func TelnetUTimeout ¶
func TelnetUTimeout(timeout int) TelnetOption
func TelnetUsername ¶
func TelnetUsername(username string) TelnetOption
type UserSSHClient ¶
type UserSSHClient struct { ID string // userID_assetID_systemUserID_systemUsername // contains filtered or unexported fields }
func (*UserSSHClient) AddClient ¶
func (u *UserSSHClient) AddClient(client *SSHClient)
func (*UserSSHClient) Count ¶
func (u *UserSSHClient) Count() int
func (*UserSSHClient) GetClient ¶
func (u *UserSSHClient) GetClient() *SSHClient
type UserSftpConn ¶
type UserSftpConn struct { User *model.User Addr string Dirs map[string]os.FileInfo // contains filtered or unexported fields }
func NewUserSftpConn ¶
func NewUserSftpConn(jmsService *service.JMService, user *model.User, addr string, assets []model.Asset, systemUsers []model.SystemUser) *UserSftpConn
func (*UserSftpConn) Close ¶
func (u *UserSftpConn) Close()
func (*UserSftpConn) IsDir ¶
func (u *UserSftpConn) IsDir() bool
func (*UserSftpConn) LoadNodeSubFoldersByKey ¶
func (u *UserSftpConn) LoadNodeSubFoldersByKey(nodeKey string) SubFoldersLoadFunc
func (*UserSftpConn) MkdirAll ¶
func (u *UserSftpConn) MkdirAll(path string) (err error)
func (*UserSftpConn) ModTime ¶
func (u *UserSftpConn) ModTime() time.Time
func (*UserSftpConn) Mode ¶
func (u *UserSftpConn) Mode() os.FileMode
func (*UserSftpConn) Name ¶
func (u *UserSftpConn) Name() string
func (*UserSftpConn) ParsePath ¶
func (u *UserSftpConn) ParsePath(path string) (fi os.FileInfo, restPath string)
func (*UserSftpConn) ReadDir ¶
func (u *UserSftpConn) ReadDir(path string) (res []os.FileInfo, err error)
func (*UserSftpConn) ReadLink ¶
func (u *UserSftpConn) ReadLink(path string) (name string, err error)
func (*UserSftpConn) Remove ¶
func (u *UserSftpConn) Remove(path string) (err error)
func (*UserSftpConn) RemoveDirectory ¶
func (u *UserSftpConn) RemoveDirectory(path string) (err error)
func (*UserSftpConn) Rename ¶
func (u *UserSftpConn) Rename(oldNamePath, newNamePath string) (err error)
func (*UserSftpConn) Search ¶
func (u *UserSftpConn) Search(key string) (res []os.FileInfo, err error)
func (*UserSftpConn) Size ¶
func (u *UserSftpConn) Size() int64
func (*UserSftpConn) Symlink ¶
func (u *UserSftpConn) Symlink(oldNamePath, newNamePath string) (err error)
func (*UserSftpConn) Sys ¶
func (u *UserSftpConn) Sys() interface{}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.