Documentation ¶
Index ¶
- Variables
- func AddCommand(c Commander)
- func Exec(w io.Writer, r io.Reader) error
- func ExecInput(w io.Writer, in *Input) error
- type Action
- type Command
- type Commander
- type File
- type FilePool
- func (p *FilePool) Elts() uint
- func (p *FilePool) Foreach(f func(x File))
- func (p *FilePool) ForeachIndex(f func(i uint))
- func (p *FilePool) GetIndex() (i uint)
- func (p *FilePool) IsFree(i uint) (v bool)
- func (p *FilePool) Len() uint
- func (p *FilePool) PutIndex(i uint) (ok bool)
- func (p *FilePool) Reset()
- func (p *FilePool) Resize(n uint)
- func (p *FilePool) Validate(i uint)
- type Helper
- type Input
- type LoopStarter
- type Main
- func (c *Main) Add(name string, action Action)
- func (m *Main) AddCommand(C Commander)
- func (c *Main) AddFile(f iomux.FileReadWriteCloser, cf ServerConfig)
- func (c *Main) AddServer(config string, cf ServerConfig) (s *Server, err error)
- func (c *Main) AddStdin()
- func (c *Main) End()
- func (m *Main) Exec(w io.Writer, r io.Reader) error
- func (m *Main) ExecInput(w io.Writer, in *Input) (err error)
- func (c *Main) Exit()
- func (c *Main) Loop()
- func (m *Main) Start()
- func (m *Main) Write(p []byte) (n int, err error)
- type Server
- func (p *Server) Elts() uint
- func (p *Server) Foreach(f func(x client))
- func (p *Server) ForeachIndex(f func(i uint))
- func (p *Server) GetIndex() (i uint)
- func (p *Server) IsFree(i uint) (v bool)
- func (p *Server) Len() uint
- func (p *Server) PutIndex(i uint) (ok bool)
- func (s *Server) ReadReady() (err error)
- func (p *Server) Reset()
- func (p *Server) Resize(n uint)
- func (p *Server) Validate(i uint)
- type ServerConfig
- type ShortHelper
- type Writer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAmbiguous = errors.New("ambiguous") ParseError = errors.New("parse error") // generic parse error )
View Source
var Default = &Main{
Prompt: "# ",
}
View Source
var ErrQuit = errors.New("")
Functions ¶
func AddCommand ¶
func AddCommand(c Commander)
Types ¶
type Command ¶
type Command struct { // Command name separated by space; alias by commas. Name string ShortHelp, Help string Action }
func (*Command) CliShortHelp ¶
type File ¶
type File struct { ServerConfig iomux.FileReadWriteCloser // contains filtered or unexported fields }
func (*File) WriteReady ¶
type FilePool ¶
func (*FilePool) ForeachIndex ¶
type LoopStarter ¶
type LoopStarter interface {
CliLoopStart(m *Main)
}
type Main ¶
type Main struct { Prompt string RxReady func(c *File) FilePool // contains filtered or unexported fields }
func (*Main) AddCommand ¶
func (*Main) AddFile ¶
func (c *Main) AddFile(f iomux.FileReadWriteCloser, cf ServerConfig)
type Server ¶
type Server struct { ServerConfig socket.Server // contains filtered or unexported fields }
func (*Server) ForeachIndex ¶
func (p *Server) ForeachIndex(f func(i uint))
type ServerConfig ¶
type ShortHelper ¶
type ShortHelper interface {
CliShortHelp() string
}
Click to show internal directories.
Click to hide internal directories.