Documentation ¶
Index ¶
- Constants
- func CompareIP(ipA, ipB string) bool
- func CompareString(a, b string) bool
- func ConstructNodeTree(assetNodes []model.Node) treeprint.Tree
- func JoinRoom(h *InteractiveHandler, roomId string)
- func NewWriterAt(f *sftp.File) io.WriterAt
- type ColorMeta
- type DirectHandler
- type DirectOpt
- func DirectConnectSftpMode(sftpMode bool) DirectOpt
- func DirectConnectToken(tokenInfo *model.ConnectTokenInfo) DirectOpt
- func DirectFormatType(format FormatType) DirectOpt
- func DirectTargetAsset(targetAsset string) DirectOpt
- func DirectTargetSystemUser(targetSystemUser string) DirectOpt
- func DirectTerminalConf(conf *model.TerminalConfig) DirectOpt
- func DirectUser(User *model.User) DirectOpt
- type FormatType
- type HostnameAssetList
- type IPAssetList
- type InteractiveHandler
- func (h *InteractiveHandler) ChangeLang()
- func (h *InteractiveHandler) CheckShareRoomReadPerm(shareRoomID string) bool
- func (h *InteractiveHandler) CheckShareRoomWritePerm(shareRoomID string) bool
- func (h *InteractiveHandler) Dispatch()
- func (h *InteractiveHandler) Initial()
- func (h *InteractiveHandler) WatchWinSizeChange(winChan <-chan ssh.Window)
- type Menu
- type MenuItem
- type SftpHandler
- func (fs *SftpHandler) Close()
- func (fs *SftpHandler) Filecmd(r *sftp.Request) (err error)
- func (fs *SftpHandler) Filelist(r *sftp.Request) (sftp.ListerAt, error)
- func (fs *SftpHandler) Fileread(r *sftp.Request) (io.ReaderAt, error)
- func (fs *SftpHandler) Filewrite(r *sftp.Request) (io.WriterAt, error)
- type UserSelectHandler
- func (u *UserSelectHandler) AutoCompletion()
- func (p UserSelectHandler) CurrentOffSet() int
- func (p UserSelectHandler) CurrentPage() int
- func (u *UserSelectHandler) DisplayCurrentResult()
- func (u *UserSelectHandler) HasNext() bool
- func (u *UserSelectHandler) HasPrev() bool
- func (u *UserSelectHandler) MoveNextPage()
- func (u *UserSelectHandler) MovePrePage()
- func (p UserSelectHandler) PageSize() int
- func (u *UserSelectHandler) Proxy(target map[string]interface{})
- func (u *UserSelectHandler) Retrieve(pageSize, offset int, searches ...string) []map[string]interface{}
- func (u *UserSelectHandler) Search(key string)
- func (u *UserSelectHandler) SearchAgain(key string)
- func (u *UserSelectHandler) SearchOrProxy(key string)
- func (u *UserSelectHandler) SetAllLocalData(data []map[string]interface{})
- func (u *UserSelectHandler) SetLoadPolicy(policy dataSource)
- func (u *UserSelectHandler) SetNode(node model.Node)
- func (u *UserSelectHandler) SetSelectType(s selectType)
- func (p UserSelectHandler) TotalCount() int
- func (p UserSelectHandler) TotalPage() int
- type WrapperSession
- func (w *WrapperSession) Close() error
- func (w *WrapperSession) Context() context.Context
- func (w *WrapperSession) HandleRoomEvent(event string, msg *exchange.RoomMessage)
- func (w *WrapperSession) ID() string
- func (w *WrapperSession) LoginFrom() string
- func (w *WrapperSession) Pty() ssh.Pty
- func (w *WrapperSession) Read(p []byte) (int, error)
- func (w *WrapperSession) RemoteAddr() string
- func (w *WrapperSession) SetWin(win ssh.Window)
- func (w *WrapperSession) WinCh() (winch <-chan ssh.Window)
- func (w *WrapperSession) Write(p []byte) (int, error)
Constants ¶
View Source
const ( TypeAsset selectType = iota + 1 TypeNodeAsset TypeK8s TypeDatabase )
View Source
const PAGESIZEALL = 0
Variables ¶
This section is empty.
Functions ¶
func CompareString ¶
func JoinRoom ¶
func JoinRoom(h *InteractiveHandler, roomId string)
Types ¶
type DirectHandler ¶
type DirectHandler struct {
// contains filtered or unexported fields
}
func NewDirectHandler ¶
func (*DirectHandler) Dispatch ¶
func (d *DirectHandler) Dispatch()
func (*DirectHandler) LoginAsset ¶
func (d *DirectHandler) LoginAsset()
func (*DirectHandler) LoginConnectToken ¶
func (d *DirectHandler) LoginConnectToken()
func (*DirectHandler) NewSFTPHandler ¶
func (d *DirectHandler) NewSFTPHandler() *SftpHandler
func (*DirectHandler) Proxy ¶
func (d *DirectHandler) Proxy(asset model.Asset)
func (*DirectHandler) WatchWinSizeChange ¶
func (d *DirectHandler) WatchWinSizeChange(winChan <-chan ssh.Window)
type DirectOpt ¶
type DirectOpt func(*directOpt)
func DirectConnectSftpMode ¶
func DirectConnectToken ¶
func DirectConnectToken(tokenInfo *model.ConnectTokenInfo) DirectOpt
func DirectFormatType ¶
func DirectFormatType(format FormatType) DirectOpt
func DirectTargetAsset ¶
func DirectTargetSystemUser ¶
func DirectTerminalConf ¶
func DirectTerminalConf(conf *model.TerminalConfig) DirectOpt
func DirectUser ¶
type FormatType ¶
type FormatType int
const ( FormatNORMAL FormatType = iota FormatUUID FormatToken )
type HostnameAssetList ¶
type HostnameAssetList []map[string]interface{}
func (HostnameAssetList) Len ¶
func (l HostnameAssetList) Len() int
func (HostnameAssetList) Less ¶
func (l HostnameAssetList) Less(i, j int) bool
func (HostnameAssetList) Swap ¶
func (l HostnameAssetList) Swap(i, j int)
type IPAssetList ¶
type IPAssetList []map[string]interface{}
func (IPAssetList) Len ¶
func (l IPAssetList) Len() int
func (IPAssetList) Less ¶
func (l IPAssetList) Less(i, j int) bool
func (IPAssetList) Swap ¶
func (l IPAssetList) Swap(i, j int)
type InteractiveHandler ¶
type InteractiveHandler struct {
// contains filtered or unexported fields
}
func NewInteractiveHandler ¶
func NewInteractiveHandler(sess ssh.Session, user *model.User, jmsService *service.JMService, termConfig model.TerminalConfig) *InteractiveHandler
func (*InteractiveHandler) ChangeLang ¶
func (h *InteractiveHandler) ChangeLang()
func (*InteractiveHandler) CheckShareRoomReadPerm ¶
func (h *InteractiveHandler) CheckShareRoomReadPerm(shareRoomID string) bool
func (*InteractiveHandler) CheckShareRoomWritePerm ¶
func (h *InteractiveHandler) CheckShareRoomWritePerm(shareRoomID string) bool
func (*InteractiveHandler) Dispatch ¶
func (h *InteractiveHandler) Dispatch()
func (*InteractiveHandler) Initial ¶
func (h *InteractiveHandler) Initial()
func (*InteractiveHandler) WatchWinSizeChange ¶
func (h *InteractiveHandler) WatchWinSizeChange(winChan <-chan ssh.Window)
type SftpHandler ¶
type SftpHandler struct {
*srvconn.UserSftpConn
}
func NewSFTPHandler ¶
func (*SftpHandler) Close ¶
func (fs *SftpHandler) Close()
type UserSelectHandler ¶
type UserSelectHandler struct {
// contains filtered or unexported fields
}
func (*UserSelectHandler) AutoCompletion ¶
func (u *UserSelectHandler) AutoCompletion()
func (UserSelectHandler) CurrentOffSet ¶
func (p UserSelectHandler) CurrentOffSet() int
func (UserSelectHandler) CurrentPage ¶
func (p UserSelectHandler) CurrentPage() int
func (*UserSelectHandler) DisplayCurrentResult ¶
func (u *UserSelectHandler) DisplayCurrentResult()
func (*UserSelectHandler) HasNext ¶
func (u *UserSelectHandler) HasNext() bool
func (*UserSelectHandler) HasPrev ¶
func (u *UserSelectHandler) HasPrev() bool
func (*UserSelectHandler) MoveNextPage ¶
func (u *UserSelectHandler) MoveNextPage()
func (*UserSelectHandler) MovePrePage ¶
func (u *UserSelectHandler) MovePrePage()
func (*UserSelectHandler) Proxy ¶
func (u *UserSelectHandler) Proxy(target map[string]interface{})
func (*UserSelectHandler) Retrieve ¶
func (u *UserSelectHandler) Retrieve(pageSize, offset int, searches ...string) []map[string]interface{}
func (*UserSelectHandler) Search ¶
func (u *UserSelectHandler) Search(key string)
func (*UserSelectHandler) SearchAgain ¶
func (u *UserSelectHandler) SearchAgain(key string)
func (*UserSelectHandler) SearchOrProxy ¶
func (u *UserSelectHandler) SearchOrProxy(key string)
func (*UserSelectHandler) SetAllLocalData ¶
func (u *UserSelectHandler) SetAllLocalData(data []map[string]interface{})
func (*UserSelectHandler) SetLoadPolicy ¶
func (u *UserSelectHandler) SetLoadPolicy(policy dataSource)
func (*UserSelectHandler) SetNode ¶
func (u *UserSelectHandler) SetNode(node model.Node)
func (*UserSelectHandler) SetSelectType ¶
func (u *UserSelectHandler) SetSelectType(s selectType)
func (UserSelectHandler) TotalCount ¶
func (p UserSelectHandler) TotalCount() int
type WrapperSession ¶
type WrapperSession struct { Uuid string Sess ssh.Session // contains filtered or unexported fields }
func NewWrapperSession ¶
func NewWrapperSession(sess ssh.Session) *WrapperSession
func (*WrapperSession) Close ¶
func (w *WrapperSession) Close() error
func (*WrapperSession) Context ¶
func (w *WrapperSession) Context() context.Context
func (*WrapperSession) HandleRoomEvent ¶
func (w *WrapperSession) HandleRoomEvent(event string, msg *exchange.RoomMessage)
func (*WrapperSession) ID ¶
func (w *WrapperSession) ID() string
func (*WrapperSession) LoginFrom ¶
func (w *WrapperSession) LoginFrom() string
func (*WrapperSession) Pty ¶
func (w *WrapperSession) Pty() ssh.Pty
func (*WrapperSession) RemoteAddr ¶
func (w *WrapperSession) RemoteAddr() string
func (*WrapperSession) SetWin ¶
func (w *WrapperSession) SetWin(win ssh.Window)
func (*WrapperSession) WinCh ¶
func (w *WrapperSession) WinCh() (winch <-chan ssh.Window)
Click to show internal directories.
Click to hide internal directories.