fsck

package module
v0.0.0-...-be0fb85 Latest Latest
Warning

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

Go to latest
Published: May 28, 2018 License: GPL-3.0 Imports: 38 Imported by: 0

README

Install

go get github.com/sutils/fsck/sctrl
cd $GOPATH/src/github.com/sutils/fsck/sctrl/
./install.sh

Documentation

Index

Constants

View Source
const (
	ChannelCmdS = 100
	ChannelCmdC = 110

	//
	TypeSlaver = "slaver"
	TypeClient = "client"
)
View Source
const (
	SS_NEW    = 20
	SS_NORMAL = 0
	SS_CLOSED = 10
)

Variables

View Source
var CMD_CTRL_C = []byte{255, 244, 255, 253, 6}
View Source
var CtrlC = []byte{255, 244, 255, 253, 6}
View Source
var ErrSessionClosed = fmt.Errorf("-session:closed")
View Source
var ErrSessionNotFound = fmt.Errorf("-session:not found")
View Source
var OK = "ok"
View Source
var ShowLog int
View Source
var WEBUI_HTML = `` /* 3582-byte string literal not displayed */

Functions

func ColumnBytes

func ColumnBytes(prefix string, max []int, vals ...string) (buf *bytes.Buffer)

func GetFileWinSize

func GetFileWinSize(t *os.File) (rows, cols int, err error)

func GetWindowRect

func GetWindowRect(ws *WinSize, fd uintptr) error

func Having

func Having(all []string, val string) bool

func IsErrOK

func IsErrOK(err error) bool

func JoinArgs

func JoinArgs(cmd string, args ...string) string

func MarshalAll

func MarshalAll(v interface{}) string

func NotifyReal

func NotifyReal(url string, data util.Map) (res util.Map, err error)

func ParseMessageErr

func ParseMessageErr(message string) (err error)

func SetFileWinSize

func SetFileWinSize(t *os.File, rows, cols int) (err error)

func SetWindowRect

func SetWindowRect(ws *WinSize, fd uintptr) error

func WriteColumn

func WriteColumn(w io.Writer, vals ...string) (n int64, err error)

Types

type CallbackCmd

type CallbackCmd struct {
	*Cmd
	*MultiWriter
	// contains filtered or unexported fields
}

func NewCallbackCmd

func NewCallbackCmd(name, ps1, shell string) (cmd *CallbackCmd)

func (*CallbackCmd) Close

func (c *CallbackCmd) Close() error

func (*CallbackCmd) DisableCallback

func (c *CallbackCmd) DisableCallback()

func (*CallbackCmd) EnableCallback

func (c *CallbackCmd) EnableCallback(prefix []byte, back chan []byte)

func (*CallbackCmd) Read

func (c *CallbackCmd) Read(b []byte) (n int, err error)

func (*CallbackCmd) Start

func (c *CallbackCmd) Start() (err error)

func (*CallbackCmd) Write

func (c *CallbackCmd) Write(p []byte) (n int, err error)

type Channel

type Channel struct {
	Name string
	BH   *impl.OBDH
	RC   *impl.RC_Con
	RM   *impl.RCM_Con
	RS   *impl.RCM_S
	SP   *SessionPool
	M    *tutil.Monitor

	Real *RealTime
	// contains filtered or unexported fields
}

func NewChannel

func NewChannel(bh *impl.OBDH, rc *impl.RC_Con, rm *impl.RCM_Con, rs *impl.RCM_S, sp *SessionPool) *Channel

func (*Channel) Close

func (c *Channel) Close(sid uint16) (err error)

func (*Channel) CloseH

func (c *Channel) CloseH(rc *impl.RCM_Cmd) (val interface{}, err error)

func (*Channel) CloseSession

func (c *Channel) CloseSession(session Session) (err error)

func (*Channel) Dial

func (c *Channel) Dial(name, uri string) (sid uint16, err error)

func (*Channel) DialH

func (c *Channel) DialH(rc *impl.RCM_Cmd) (val interface{}, err error)

func (*Channel) DialSession

func (c *Channel) DialSession(name, uri string, raw io.WriteCloser) (session Session, err error)

func (*Channel) ExecBytes

func (c *Channel) ExecBytes(args []byte) (reply []byte, err error)

func (*Channel) List

func (c *Channel) List() (res util.Map, err error)

func (*Channel) OnMasterCmd

func (c *Channel) OnMasterCmd(cmd netw.Cmd) int

func (*Channel) PingExec

func (c *Channel) PingExec(name, data string) (used, slaver int64, err error)

func (*Channel) PingH

func (c *Channel) PingH(rc *impl.RCM_Cmd) (val interface{}, err error)

func (*Channel) PingSession

func (c *Channel) PingSession(name, data string) (used, slaverCall, slaverBack int64, err error)

func (*Channel) RealLog

func (c *Channel) RealLog(name []string, ns map[string]int64, keys map[string]string, clear int) (all util.Map, err error)

func (*Channel) RealLogH

func (c *Channel) RealLogH(rc *impl.RCM_Cmd) (val interface{}, err error)

func (*Channel) Status

func (c *Channel) Status(name ...string) (status util.Map, err error)

func (*Channel) StatusH

func (c *Channel) StatusH(rc *impl.RCM_Cmd) (val interface{}, err error)

func (*Channel) Write

func (c *Channel) Write(p []byte) (n int, err error)

type ChannelInfo

type ChannelInfo struct {
	Name   string
	Online bool
	MS     []*Mapping
	Remote string
}

type Cmd

type Cmd struct {
	Raw  *exec.Cmd
	Name string
	PS1  string

	Prefix io.Reader
	OnExit func(err error)
	Rows   int
	Cols   int
	// contains filtered or unexported fields
}

func NewCmd

func NewCmd(name, ps1, shell string) (cmd *Cmd)

func (*Cmd) AddEnvf

func (c *Cmd) AddEnvf(format string, args ...interface{})

func (*Cmd) Close

func (c *Cmd) Close() error

func (*Cmd) Read

func (c *Cmd) Read(p []byte) (n int, err error)

func (*Cmd) Start

func (c *Cmd) Start() (err error)

func (*Cmd) String

func (c *Cmd) String() string

func (*Cmd) Write

func (c *Cmd) Write(p []byte) (n int, err error)

type CmdDialer

type CmdDialer struct {
	Replace  []byte
	CloseTag []byte
	BASH     string
	PS1      string
}

func NewCmdDialer

func NewCmdDialer() *CmdDialer

func (*CmdDialer) Bootstrap

func (c *CmdDialer) Bootstrap() error

func (*CmdDialer) Dial

func (c *CmdDialer) Dial(cid uint16, uri string) (raw io.ReadWriteCloser, err error)

func (*CmdDialer) Matched

func (c *CmdDialer) Matched(uri string) bool

func (*CmdDialer) String

func (t *CmdDialer) String() string

type CmdStdinWriter

type CmdStdinWriter struct {
	io.Writer
	Replace  []byte
	CloseTag []byte
}

func (*CmdStdinWriter) Write

func (c *CmdStdinWriter) Write(p []byte) (n int, err error)

type CombinedReadWriterCloser

type CombinedReadWriterCloser struct {
	io.Reader
	io.Writer
	Closer func() error
	// contains filtered or unexported fields
}

func (*CombinedReadWriterCloser) Close

func (c *CombinedReadWriterCloser) Close() (err error)

type Dialer

type Dialer interface {
	Bootstrap() error
	Matched(uri string) bool
	Dial(cid uint16, uri string) (r io.ReadWriteCloser, err error)
}

type DuplexPiped

type DuplexPiped struct {
	UpReader   *os.File
	UpWriter   *os.File
	DownReader *os.File
	DownWriter *os.File
	// contains filtered or unexported fields
}

func (*DuplexPiped) Close

func (d *DuplexPiped) Close() error

type EchoDialer

type EchoDialer struct {
}

func NewEchoDialer

func NewEchoDialer() (dialer *EchoDialer)

func (*EchoDialer) Bootstrap

func (e *EchoDialer) Bootstrap() error

func (*EchoDialer) Dial

func (e *EchoDialer) Dial(cid uint16, uri string) (r io.ReadWriteCloser, err error)

func (*EchoDialer) Matched

func (e *EchoDialer) Matched(uri string) bool

type EchoPing

type EchoPing struct {
	S Session
}

func NewEchoPing

func NewEchoPing(s Session) *EchoPing

func (*EchoPing) Ping

func (e *EchoPing) Ping(data string) (used, slaverCall, slaverBack int64, err error)

type EchoReadWriteCloser

type EchoReadWriteCloser struct {
	// contains filtered or unexported fields
}

func NewEchoReadWriteCloser

func NewEchoReadWriteCloser() *EchoReadWriteCloser

func (*EchoReadWriteCloser) Close

func (e *EchoReadWriteCloser) Close() (err error)

func (*EchoReadWriteCloser) Read

func (e *EchoReadWriteCloser) Read(p []byte) (n int, err error)

func (*EchoReadWriteCloser) Write

func (e *EchoReadWriteCloser) Write(p []byte) (n int, err error)

type EchoServer

type EchoServer struct {
	L net.Listener
}

func NewEchoServer

func NewEchoServer(network, address string) (echo *EchoServer, err error)

func (*EchoServer) Start

func (e *EchoServer) Start()

type ErrOK

type ErrOK struct {
	Data string
}

func (*ErrOK) Error

func (e *ErrOK) Error() string

type Forward

type Forward struct {
	WebPrefix string
	WebSuffix string
	WebAuth   string
	Dialer    ForwardDialerF
	// contains filtered or unexported fields
}

func NewForward

func NewForward(dialer ForwardDialerF) *Forward

func (*Forward) AddForward

func (f *Forward) AddForward(m *Mapping) (err error)

func (*Forward) AddUriForward

func (f *Forward) AddUriForward(name, uri string) (mapping *Mapping, err error)

func (*Forward) AllForwards

func (f *Forward) AllForwards() (mapping map[string][]*Mapping)

func (*Forward) Close

func (f *Forward) Close() error

func (*Forward) HostForwardF

func (f *Forward) HostForwardF(hs *routing.HTTPSession) routing.HResult

func (*Forward) List

func (f *Forward) List() (ms []*Mapping)

func (*Forward) ProcName

func (f *Forward) ProcName(name string, hs *routing.HTTPSession) routing.HResult

func (*Forward) ProcWebSubsH

func (f *Forward) ProcWebSubsH(hs *routing.HTTPSession) routing.HResult

func (*Forward) RemoveForward

func (f *Forward) RemoveForward(local string) (err error)

func (*Forward) Stop

func (f *Forward) Stop(name string, connected bool) (err error)

type ForwardCtrl

type ForwardCtrl interface {
	LoadForward() *Forward
	AllForwards() (ns []string, fs map[string]*ChannelInfo, err error)
}

type ForwardDialerF

type ForwardDialerF func(channel, uri string, raw io.WriteCloser) (session Session, err error)

type ForwardListener

type ForwardListener struct {
	*Mapping
	net.Listener
}

func NewForwardListener

func NewForwardListener(m *Mapping) (l *ForwardListener, err error)

func (*ForwardListener) String

func (f *ForwardListener) String() string

type Mapping

type Mapping struct {
	Name    string   `json:"name"`
	Channel string   `json:"channel"`
	Local   *url.URL `json:"local"`
	Remote  *url.URL `json:"remote"`
}

func NewMapping

func NewMapping(name, uri string) (mapping *Mapping, err error)

func (*Mapping) LocalValidF

func (m *Mapping) LocalValidF(format string, args ...interface{}) error

func (*Mapping) RemoteValidF

func (m *Mapping) RemoteValidF(format string, args ...interface{}) error

func (*Mapping) String

func (m *Mapping) String() string

type MappingSorter

type MappingSorter []*Mapping

func (MappingSorter) Len

func (f MappingSorter) Len() int

func (MappingSorter) Less

func (f MappingSorter) Less(i, j int) bool

func (MappingSorter) Swap

func (f MappingSorter) Swap(i, j int)

type Master

type Master struct {
	L       *rc.RC_Listener_m
	HbDelay int64
	SP      *SessionPool
	Forward *Forward

	//
	NewListenerF func(l *netw.Listener) (raw net.Listener, err error)
	// contains filtered or unexported fields
}

func NewMaster

func NewMaster() *Master

func (*Master) AccessH

func (m *Master) AccessH(rc *impl.RCM_Cmd) (bool, interface{}, error)

func (*Master) AllForwards

func (m *Master) AllForwards() (ns []string, fs map[string]*ChannelInfo, err error)

func (*Master) Close

func (m *Master) Close() (err error)

func (*Master) CloseH

func (m *Master) CloseH(rc *impl.RCM_Cmd) (val interface{}, err error)

func (*Master) Dial

func (m *Master) Dial(session, name, uri string) (sid uint16, res util.Map, err error)

func (*Master) DialH

func (m *Master) DialH(rc *impl.RCM_Cmd) (val interface{}, err error)

func (*Master) DialSession

func (m *Master) DialSession(name, uri string, raw io.WriteCloser) (session Session, err error)

func (*Master) ListH

func (m *Master) ListH(rc *impl.RCM_Cmd) (val interface{}, err error)

func (*Master) LoadForward

func (m *Master) LoadForward() *Forward

func (*Master) OnChannelCmd

func (m *Master) OnChannelCmd(c netw.Cmd) int

func (*Master) OnClientCmd

func (m *Master) OnClientCmd(c netw.Cmd) int

func (*Master) OnClose

func (m *Master) OnClose(c netw.Con)

OnClose see ConHandler for detail

func (*Master) OnCmd

func (m *Master) OnCmd(c netw.Cmd) int

OnCmd see ConHandler for detail

func (*Master) OnConn

func (m *Master) OnConn(c netw.Con) bool

OnConn see ConHandler for detail

func (*Master) OnLogin

func (m *Master) OnLogin(rc *impl.RCM_Cmd, token string) (cid string, err error)

func (*Master) OnSessionClosed

func (m *Master) OnSessionClosed(session Session)

func (*Master) OnSlaverCmd

func (m *Master) OnSlaverCmd(c netw.Cmd) int

func (*Master) PingH

func (m *Master) PingH(rc *impl.RCM_Cmd) (val interface{}, err error)

func (*Master) RealLogH

func (m *Master) RealLogH(rc *impl.RCM_Cmd) (val interface{}, err error)

func (*Master) Run

func (m *Master) Run(rcaddr string, ts map[string]int) (err error)

func (*Master) Send

func (m *Master) Send(sid uint16, cid string, data []byte) (reply []byte, err error)

func (*Master) StatusH

func (m *Master) StatusH(rc *impl.RCM_Cmd) (val interface{}, err error)

func (*Master) Wait

func (m *Master) Wait()

func (*Master) WriteToClient

func (m *Master) WriteToClient(name string, data []byte) (reply []byte, err error)

func (*Master) WriteToSlaver

func (m *Master) WriteToSlaver(session string, data []byte) (reply []byte, err error)

type MultiWriter

type MultiWriter struct {
	Disable bool
	// contains filtered or unexported fields
}

func NewMultiWriter

func NewMultiWriter() *MultiWriter

func (*MultiWriter) Add

func (m *MultiWriter) Add(w io.Writer)

func (*MultiWriter) Remove

func (m *MultiWriter) Remove(w io.Writer)

func (*MultiWriter) Write

func (m *MultiWriter) Write(p []byte) (n int, err error)

type OutWriter

type OutWriter struct {
	Out io.Writer

	Buffered bool
	// contains filtered or unexported fields
}

func NewOutWriter

func NewOutWriter() *OutWriter

func (*OutWriter) DisableCallback

func (b *OutWriter) DisableCallback()

func (*OutWriter) EnableCallback

func (b *OutWriter) EnableCallback(prefix []byte, back chan []byte)

func (*OutWriter) Write

func (b *OutWriter) Write(p []byte) (n int, err error)

type PipedConn

type PipedConn struct {
	// contains filtered or unexported fields
}

func CreatePipedConn

func CreatePipedConn() (a, b *PipedConn, err error)

func (*PipedConn) Close

func (p *PipedConn) Close() error

func (*PipedConn) LocalAddr

func (p *PipedConn) LocalAddr() net.Addr

func (*PipedConn) Network

func (p *PipedConn) Network() string

func (*PipedConn) Read

func (p *PipedConn) Read(b []byte) (n int, err error)

func (*PipedConn) RemoteAddr

func (p *PipedConn) RemoteAddr() net.Addr

func (*PipedConn) SetDeadline

func (p *PipedConn) SetDeadline(t time.Time) error

func (*PipedConn) SetReadDeadline

func (p *PipedConn) SetReadDeadline(t time.Time) error

func (*PipedConn) SetWriteDeadline

func (p *PipedConn) SetWriteDeadline(t time.Time) error

func (*PipedConn) String

func (p *PipedConn) String() string

func (*PipedConn) Write

func (p *PipedConn) Write(b []byte) (n int, err error)

type RealLog

type RealLog struct {
	Last int64
	Log  util.Map
}

type RealTime

type RealTime struct {
	// contains filtered or unexported fields
}

func NewRealTime

func NewRealTime() *RealTime

func (*RealTime) Clear

func (r *RealTime) Clear()

func (*RealTime) ListH

func (r *RealTime) ListH(hs *routing.HTTPSession) routing.HResult

func (*RealTime) MergeLog

func (r *RealTime) MergeLog(ns map[string]int64, keys map[string]string) (hosts, alllog util.Map)

func (*RealTime) ShowH

func (r *RealTime) ShowH(hs *routing.HTTPSession) routing.HResult

func (*RealTime) UpdateH

func (r *RealTime) UpdateH(hs *routing.HTTPSession) routing.HResult

type RecentLess

type RecentLess string

func (RecentLess) Less

func (m RecentLess) Less(a, b interface{}, desc bool) bool

type Server

type Server struct {
	*Master
	Local *Slaver
}

func NewServer

func NewServer() *Server

func (*Server) Close

func (s *Server) Close() error

func (*Server) Run

func (s *Server) Run(addr string, ts map[string]int) (err error)

type Session

type Session interface {
	net.Conn
	ID() uint16
	RawWrite(p []byte) (n int, err error)
	OnlyClose() (err error)
}

type SessionDialer

type SessionDialer interface {
	Dial(sid uint16, uri string, out io.Writer) (session Session, err error)
	Bind(sid uint16, out io.Writer) (session Session, err error)
}

type SessionPool

type SessionPool struct {
	Dialers         []Dialer
	OnSessionClosed func(session Session)
	// contains filtered or unexported fields
}

func NewSessionPool

func NewSessionPool() *SessionPool

func (*SessionPool) AddDialer

func (s *SessionPool) AddDialer(dialer Dialer) error

func (*SessionPool) Bind

func (s *SessionPool) Bind(sid uint16, out io.Writer, raw io.WriteCloser) (session Session)

func (*SessionPool) Close

func (s *SessionPool) Close() error

func (*SessionPool) Dial

func (s *SessionPool) Dial(sid uint16, uri string, out io.Writer) (session Session, err error)

func (*SessionPool) Find

func (s *SessionPool) Find(sid uint16) (session Session)

func (*SessionPool) RegisterDefaulDialer

func (s *SessionPool) RegisterDefaulDialer() (err error)

func (*SessionPool) Remove

func (s *SessionPool) Remove(sid uint16) (session Session)

func (*SessionPool) Start

func (s *SessionPool) Start(sid uint16, out io.Writer) (session Session)

func (*SessionPool) Write

func (s *SessionPool) Write(p []byte) (n int, err error)

type SidSession

type SidSession struct {
	Raw      io.WriteCloser
	Out      io.Writer
	SID      uint16
	Timeout  time.Duration
	MaxDelay time.Duration

	OnClose func(session Session)
	// contains filtered or unexported fields
}

func NewSidSession

func NewSidSession(sid uint16, out io.Writer, raw io.WriteCloser) *SidSession

func (*SidSession) Close

func (s *SidSession) Close() (err error)

func (*SidSession) ID

func (s *SidSession) ID() uint16

func (*SidSession) LocalAddr

func (s *SidSession) LocalAddr() net.Addr

func (*SidSession) Network

func (s *SidSession) Network() string

func (*SidSession) OnlyClose

func (s *SidSession) OnlyClose() (err error)

func (*SidSession) RawWrite

func (s *SidSession) RawWrite(p []byte) (n int, err error)

func (*SidSession) Read

func (s *SidSession) Read(p []byte) (n int, err error)

func (*SidSession) RemoteAddr

func (s *SidSession) RemoteAddr() net.Addr

func (*SidSession) SetDeadline

func (s *SidSession) SetDeadline(t time.Time) error

func (*SidSession) SetReadDeadline

func (s *SidSession) SetReadDeadline(t time.Time) error

func (*SidSession) SetWriteDeadline

func (s *SidSession) SetWriteDeadline(t time.Time) error

func (*SidSession) String

func (s *SidSession) String() string

func (*SidSession) Write

func (s *SidSession) Write(p []byte) (n int, err error)

type Slaver

type Slaver struct {
	Alias   string
	R       *rc.RC_Runner_m
	SP      *SessionPool
	Channel *Channel
	HbDelay int64
	Auto    *rc.AutoLoginH
	OnLogin func(a *rc.AutoLoginH, err error)
	Real    *RealTime
	Forward *Forward
	//
	DailAddr func(addr string) (raw net.Conn, err error)
}

func NewSlaver

func NewSlaver(alias string) *Slaver

func (*Slaver) AllForwards

func (s *Slaver) AllForwards() (ns []string, fs map[string]*ChannelInfo, err error)

func (*Slaver) Close

func (s *Slaver) Close() error

func (*Slaver) CloseSession

func (s *Slaver) CloseSession(sid uint16) (err error)

func (*Slaver) DialSession

func (s *Slaver) DialSession(name, uri string, raw io.WriteCloser) (session Session, err error)

func (*Slaver) List

func (s *Slaver) List() (res util.Map, err error)

func (*Slaver) LoadForward

func (s *Slaver) LoadForward() *Forward

func (*Slaver) OnClose

func (s *Slaver) OnClose(con netw.Con)

OnClose see ConHandler for detail

func (*Slaver) OnCmd

func (s *Slaver) OnCmd(con netw.Cmd) int

OnCmd see ConHandler for detail

func (*Slaver) OnConn

func (s *Slaver) OnConn(con netw.Con) bool

OnConn see ConHandler for detail

func (*Slaver) OnSessionClosed

func (s *Slaver) OnSessionClosed(session Session)

func (*Slaver) PingExec

func (s *Slaver) PingExec(name, data string) (used, slaver int64, err error)

func (*Slaver) PingSession

func (s *Slaver) PingSession(name, data string) (used, slaverCall, slaverBack int64, err error)

func (*Slaver) RealLog

func (s *Slaver) RealLog(name []string, ns map[string]int64, keys map[string]string, clear int) (all util.Map, err error)

func (*Slaver) Start

func (s *Slaver) Start(rcaddr, name, session, token, ctype string) (err error)

func (*Slaver) StartClient

func (s *Slaver) StartClient(rcaddr, session, token string) (err error)

func (*Slaver) StartSlaver

func (s *Slaver) StartSlaver(rcaddr, name, token string) (err error)

func (*Slaver) Status

func (s *Slaver) Status(name ...string) (status util.Map, err error)

type TCPDialer

type TCPDialer struct {
	// contains filtered or unexported fields
}

func NewTCPDialer

func NewTCPDialer() *TCPDialer

func (*TCPDialer) Bootstrap

func (t *TCPDialer) Bootstrap() error

func (*TCPDialer) Dial

func (t *TCPDialer) Dial(cid uint16, uri string) (raw io.ReadWriteCloser, err error)

func (*TCPDialer) Matched

func (t *TCPDialer) Matched(uri string) bool

func (*TCPDialer) String

func (t *TCPDialer) String() string

type WebDialer

type WebDialer struct {
	// contains filtered or unexported fields
}

func NewWebDialer

func NewWebDialer() (dialer *WebDialer)

func (*WebDialer) Accept

func (web *WebDialer) Accept() (conn net.Conn, err error)

for net.Listener

func (*WebDialer) Addr

func (web *WebDialer) Addr() net.Addr

func (*WebDialer) Bootstrap

func (web *WebDialer) Bootstrap() error

func (*WebDialer) Close

func (web *WebDialer) Close() error

func (*WebDialer) Dial

func (web *WebDialer) Dial(cid uint16, uri string) (raw io.ReadWriteCloser, err error)

func (*WebDialer) Matched

func (web *WebDialer) Matched(uri string) bool

func (*WebDialer) Network

func (web *WebDialer) Network() string

func (*WebDialer) ServeHTTP

func (web *WebDialer) ServeHTTP(resp http.ResponseWriter, req *http.Request)

for http.Handler

func (*WebDialer) Shutdown

func (web *WebDialer) Shutdown() error

func (*WebDialer) String

func (web *WebDialer) String() string

type WebDialerConn

type WebDialerConn struct {
	*PipedConn
	CID uint16
	URI string
	DIR string
}

func PipeWebDialerConn

func PipeWebDialerConn(cid uint16, uri string) (conn *WebDialerConn, raw io.ReadWriteCloser, err error)

func (*WebDialerConn) LocalAddr

func (w *WebDialerConn) LocalAddr() net.Addr

func (*WebDialerConn) Network

func (w *WebDialerConn) Network() string

func (*WebDialerConn) RemoteAddr

func (w *WebDialerConn) RemoteAddr() net.Addr

func (*WebDialerConn) String

func (w *WebDialerConn) String() string

type WebUI

type WebUI struct {
	WS   string
	TEMP *template.Template

	Ctrl ForwardCtrl
	// contains filtered or unexported fields
}

func NewWebUI

func NewWebUI(ctrl ForwardCtrl) (webui *WebUI)

func (*WebUI) AddForwardH

func (w *WebUI) AddForwardH(hs *routing.HTTPSession) routing.HResult

func (*WebUI) AuthFilterH

func (w *WebUI) AuthFilterH(hs *routing.HTTPSession) routing.HResult

func (*WebUI) Hand

func (w *WebUI) Hand(mux *routing.SessionMux, redirect bool)

func (*WebUI) IndexH

func (w *WebUI) IndexH(hs *routing.HTTPSession) routing.HResult

func (*WebUI) ReadRecent

func (w *WebUI) ReadRecent() (recent map[string]int)

func (*WebUI) RemoveForwardH

func (w *WebUI) RemoveForwardH(hs *routing.HTTPSession) routing.HResult

func (*WebUI) RemoveRecentH

func (w *WebUI) RemoveRecentH(hs *routing.HTTPSession) routing.HResult

func (*WebUI) WriteRecent

func (w *WebUI) WriteRecent(recent map[string]int)

type WebdavHandler

type WebdavHandler struct {
	// contains filtered or unexported fields
}

func NewWebdavHandler

func NewWebdavHandler(dir string) *WebdavHandler

func (*WebdavHandler) ServeHTTP

func (w *WebdavHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request)

type WinSize

type WinSize struct {
	Row    uint16
	Col    uint16
	PixelX uint16
	PixelY uint16
}

type WriterF

type WriterF func(p []byte) (n int, err error)

func (WriterF) Write

func (w WriterF) Write(p []byte) (n int, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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