Documentation ¶
Index ¶
- Constants
- func NewBroadcaster() *broadcaster
- func NewElfinderFileInfo(id, dirPath string, originFileInfo os.FileInfo) elfinder.FileDir
- func TrimPrefix(path string) string
- type Client
- func (c *Client) Close() (err error)
- func (c *Client) Context() context.Context
- func (c *Client) HandleRoomEvent(event string, roomMsg *exchange.RoomMessage)
- func (c *Client) ID() string
- func (c *Client) LoginFrom() string
- func (c *Client) Pty() ssh.Pty
- func (c *Client) Read(p []byte) (n int, err error)
- func (c *Client) RemoteAddr() string
- func (c *Client) SetWinSize(size ssh.Window)
- func (c *Client) WinCh() <-chan ssh.Window
- func (c *Client) Write(p []byte) (n int, err error)
- func (c *Client) WriteData(p []byte)
- type GetUserParams
- type Handler
- type Message
- type Server
- func (s *Server) GenerateViewMeta(targetId string) (meta ViewPageMata)
- func (s *Server) HealthStatusHandler(ctx *gin.Context)
- func (s *Server) ProcessElfinderWebsocket(ctx *gin.Context)
- func (s *Server) ProcessTerminalWebsocket(ctx *gin.Context)
- func (s *Server) ProcessTokenWebsocket(ctx *gin.Context)
- func (s *Server) SftpHostConnectorView(ctx *gin.Context)
- func (s *Server) Start()
- func (s *Server) Stop()
- func (s *Server) Upgrade(ctx *gin.Context) (*ws.Socket, error)
- type ShareInfo
- type ShareRequestMeta
- type ShareRequestParams
- type ShareResponse
- type TerminalConnectData
- type UserVolume
- func (u *UserVolume) Close()
- func (u *UserVolume) GetFile(path string) (reader io.ReadCloser, err error)
- func (u *UserVolume) ID() string
- func (u *UserVolume) Info(path string) (elfinder.FileDir, error)
- func (u *UserVolume) List(path string) []elfinder.FileDir
- func (u *UserVolume) MakeDir(dir, newDirname string) (elfinder.FileDir, error)
- func (u *UserVolume) MakeFile(dir, newFilename string) (elfinder.FileDir, error)
- func (u *UserVolume) MergeChunk(cid, total int, dirPath, uploadPath, filename string) (elfinder.FileDir, error)
- func (u *UserVolume) Parents(path string, dep int) []elfinder.FileDir
- func (u *UserVolume) Paste(dir, filename, suffix string, reader io.ReadCloser) (elfinder.FileDir, error)
- func (u *UserVolume) Remove(path string) error
- func (u *UserVolume) Rename(oldNamePath, newName string) (elfinder.FileDir, error)
- func (u *UserVolume) RootFileDir() elfinder.FileDir
- func (u *UserVolume) Search(path, key string, mimes ...string) (res []elfinder.FileDir, err error)
- func (u *UserVolume) UploadChunk(cid int, dirPath, uploadPath, filename string, rangeData elfinder.ChunkRange, ...) error
- func (u *UserVolume) UploadFile(dirPath, uploadPath, filename string, reader io.Reader) (elfinder.FileDir, error)
- type UserWebsocket
- type ViewPageMata
- type WindowSize
Constants ¶
View Source
const ( PING = "PING" PONG = "PONG" CONNECT = "CONNECT" CLOSE = "CLOSE" TERMINALINIT = "TERMINAL_INIT" TERMINALDATA = "TERMINAL_DATA" TERMINALRESIZE = "TERMINAL_RESIZE" TERMINALBINARY = "TERMINAL_BINARY" TERMINALACTION = "TERMINAL_ACTION" TERMINALSESSION = "TERMINAL_SESSION" TERMINALSHARE = "TERMINAL_SHARE" TERMINALSHAREJOIN = "TERMINAL_SHARE_JOIN" TERMINALSHARELEAVE = "TERMINAL_SHARE_LEAVE" TERMINALSHAREUSERS = "TERMINAL_SHARE_USERS" TERMINALGETSHAREUSERS = "TERMINAL_GET_SHARE_USER" TERMINALERROR = "TERMINAL_ERROR" )
View Source
const ( TargetTypeAsset = "asset" // TargetTypeMonitor todo: 前端参数将 统一修改成 monitor TargetTypeMonitor = "shareroom" )
View Source
const ( TTYName = "terminal" WebFolderName = "web_folder" )
View Source
const MaxMessageLen = 1024
Variables ¶
This section is empty.
Functions ¶
func NewBroadcaster ¶
func NewBroadcaster() *broadcaster
func NewElfinderFileInfo ¶
func TrimPrefix ¶
Types ¶
type Client ¶
type Client struct { WinChan chan ssh.Window UserRead io.ReadCloser UserWrite io.WriteCloser Conn *UserWebsocket sync.Mutex // contains filtered or unexported fields }
func (*Client) HandleRoomEvent ¶
func (c *Client) HandleRoomEvent(event string, roomMsg *exchange.RoomMessage)
func (*Client) RemoteAddr ¶
func (*Client) SetWinSize ¶
type GetUserParams ¶
type GetUserParams struct {
Query string `json:"query"`
}
type Server ¶
type Server struct { Srv *http.Server JmsService *service.JMService // contains filtered or unexported fields }
func (*Server) GenerateViewMeta ¶
func (s *Server) GenerateViewMeta(targetId string) (meta ViewPageMata)
func (*Server) HealthStatusHandler ¶
func (*Server) ProcessElfinderWebsocket ¶
func (*Server) ProcessTerminalWebsocket ¶
func (*Server) ProcessTokenWebsocket ¶
func (*Server) SftpHostConnectorView ¶
type ShareRequestMeta ¶
type ShareRequestMeta struct {
}type ShareRequestParams ¶
type ShareRequestParams struct {}
type ShareResponse ¶
type ShareResponse struct {}
type TerminalConnectData ¶
type UserVolume ¶
type UserVolume struct { Uuid string UserSftp *srvconn.UserSftpConn Homename string // contains filtered or unexported fields }
func NewUserVolume ¶
func (*UserVolume) Close ¶
func (u *UserVolume) Close()
func (*UserVolume) GetFile ¶
func (u *UserVolume) GetFile(path string) (reader io.ReadCloser, err error)
func (*UserVolume) ID ¶
func (u *UserVolume) ID() string
func (*UserVolume) MakeDir ¶
func (u *UserVolume) MakeDir(dir, newDirname string) (elfinder.FileDir, error)
func (*UserVolume) MakeFile ¶
func (u *UserVolume) MakeFile(dir, newFilename string) (elfinder.FileDir, error)
func (*UserVolume) MergeChunk ¶
func (*UserVolume) Paste ¶
func (u *UserVolume) Paste(dir, filename, suffix string, reader io.ReadCloser) (elfinder.FileDir, error)
func (*UserVolume) Remove ¶
func (u *UserVolume) Remove(path string) error
func (*UserVolume) Rename ¶
func (u *UserVolume) Rename(oldNamePath, newName string) (elfinder.FileDir, error)
func (*UserVolume) RootFileDir ¶
func (u *UserVolume) RootFileDir() elfinder.FileDir
func (*UserVolume) UploadChunk ¶
func (u *UserVolume) UploadChunk(cid int, dirPath, uploadPath, filename string, rangeData elfinder.ChunkRange, reader io.Reader) error
func (*UserVolume) UploadFile ¶
type UserWebsocket ¶
type UserWebsocket struct { Uuid string // contains filtered or unexported fields }
func (*UserWebsocket) ClientIP ¶
func (userCon *UserWebsocket) ClientIP() string
func (*UserWebsocket) CurrentUser ¶
func (userCon *UserWebsocket) CurrentUser() *model.User
func (*UserWebsocket) GetHandler ¶
func (userCon *UserWebsocket) GetHandler() Handler
func (*UserWebsocket) Run ¶
func (userCon *UserWebsocket) Run()
func (*UserWebsocket) SendMessage ¶
func (userCon *UserWebsocket) SendMessage(msg *Message)
type ViewPageMata ¶
type WindowSize ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.