Documentation ¶
Index ¶
- Variables
- func AddFile(s MutStreams, key string, path string, mode IOMode, fsys afero.Fs) error
- func ParseSetupInto(lp LineParser, sl SetupLines, fsys afero.Fs, s MutStreams) error
- type Closer
- type Config
- type ConfigParser
- type IOMode
- type IOModeToStd
- type InOutStreams
- type InStreams
- type LineParser
- type Maker
- type Manager
- func (m Manager) CloseAll() error
- func (m *Manager) Create(path string) (io.WriteCloser, error)
- func (m *Manager) CreateRw(path string) (io.ReadWriteCloser, error)
- func (m Manager) GetReadWriter(key string) (io.ReadWriter, error)
- func (m Manager) GetReader(key string) (io.Reader, error)
- func (m Manager) GetWriter(key string) (io.Writer, error)
- func (m *Manager) NamedOpen(name string) (io.Reader, error)
- func (m *Manager) NamedReadWriter(name string) (io.ReadWriter, error)
- func (m *Manager) NamedWriter(name string) (io.Writer, error)
- func (m *Manager) Open(path string) (io.ReadCloser, error)
- func (m *Manager) SetReadWriter(key string, w io.ReadWriteCloser) error
- func (m *Manager) SetReader(key string, r io.ReadCloser) error
- func (m *Manager) SetWriter(key string, w io.WriteCloser) error
- type Methods
- type Mode
- type MutStreams
- type NameToStd
- type NamedGetter
- type OutStreams
- type ParseEachLine
- type Parser
- type ReadCloser
- type ReadWriteCloser
- type Setup
- type SetupLines
- type StdNameMap
- type StdSetup
- type StdToIOMode
- type Streams
- func (s *Streams) MutRef(meth *mapping.Methods) MutStreams
- func (s Streams) SetReadWriter(meth *mapping.Methods, key string, rw ReadWriteCloser) error
- func (s Streams) SetReader(meth *mapping.Methods, key string, rc ReadCloser) error
- func (s Streams) SetWriter(meth *mapping.Methods, key string, wc WriteCloser) error
- type WriteCloser
Constants ¶
This section is empty.
Variables ¶
View Source
var ( StdModes = [...]Mode{ModeStdout, ModeStdin, ModeStderr} StdIOModes = StdToIOMode{ ModeStdin: IOModeRead, ModeStdout: IOModeWrite, ModeStderr: IOModeWrite, } IOModesToStd = mapping.Reverse(StdIOModes) StdSetups = makeStdSetups() )
View Source
var StdNames = StdNameMap{
ModeStderr: "stderr",
ModeStdin: "stdin",
ModeStdout: "stdout",
}
Functions ¶
func ParseSetupInto ¶
func ParseSetupInto(lp LineParser, sl SetupLines, fsys afero.Fs, s MutStreams) error
Types ¶
type ConfigParser ¶
type IOMode ¶
type IOMode int
ENUM(
Read Write ReadWrite
)
func ParseIOMode ¶
ParseIOMode attempts to convert a string to a IOMode.
func (IOMode) MarshalText ¶
MarshalText implements the text marshaller method.
func (*IOMode) UnmarshalText ¶
UnmarshalText implements the text unmarshaller method.
type IOModeToStd ¶
type InOutStreams ¶
type InOutStreams map[string]ReadWriteCloser
type InStreams ¶
type InStreams map[string]ReadCloser
type LineParser ¶
type Maker ¶
type Maker interface { OpenStream(fsys fs.FS, path string) (ReadCloser, error) CreateStream(fsys fs.FS, path string) (WriteCloser, error) OpenMutStream(fsys fs.FS, path string) (ReadWriteCloser, error) }
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func (Manager) GetReadWriter ¶
func (m Manager) GetReadWriter(key string) (io.ReadWriter, error)
func (*Manager) NamedReadWriter ¶
func (m *Manager) NamedReadWriter(name string) (io.ReadWriter, error)
func (*Manager) SetReadWriter ¶
func (m *Manager) SetReadWriter(key string, w io.ReadWriteCloser) error
type Mode ¶
type Mode int
ENUM(
Stdout Stdin Stderr DevNull File
)
func (Mode) MarshalText ¶
MarshalText implements the text marshaller method.
func (*Mode) UnmarshalText ¶
UnmarshalText implements the text unmarshaller method.
type MutStreams ¶
type MutStreams struct {
// contains filtered or unexported fields
}
func (MutStreams) SetReadWriter ¶
func (ms MutStreams) SetReadWriter(key string, rw ReadWriteCloser) error
func (MutStreams) SetReader ¶
func (ms MutStreams) SetReader(key string, rc ReadCloser) error
func (MutStreams) SetWriter ¶
func (ms MutStreams) SetWriter(key string, wc WriteCloser) error
type NamedGetter ¶
type OutStreams ¶
type OutStreams map[string]WriteCloser
type ParseEachLine ¶
type ParseEachLine struct {
// contains filtered or unexported fields
}
func (ParseEachLine) ParseStreamSetup ¶
func (pl ParseEachLine) ParseStreamSetup(sl SetupLines, fsys afero.Fs, s MutStreams) error
type Parser ¶
type Parser interface {
ParseStreamSetup(SetupLines, afero.Fs, MutStreams) error
}
type ReadCloser ¶
type ReadCloser = io.ReadCloser
type ReadWriteCloser ¶
type ReadWriteCloser = io.ReadWriteCloser
type SetupLines ¶
type StdNameMap ¶
func (StdNameMap) IsStderr ¶
func (s StdNameMap) IsStderr(name string) bool
func (StdNameMap) IsStdin ¶
func (s StdNameMap) IsStdin(name string) bool
func (StdNameMap) IsStdout ¶
func (s StdNameMap) IsStdout(name string) bool
type StdToIOMode ¶
type Streams ¶
type Streams struct {
// contains filtered or unexported fields
}
func EmptyStreams ¶
func EmptyStreams() Streams
func ParseSetup ¶
func ParseSetup(lp LineParser, sl SetupLines, fsys afero.Fs, meth *mapping.Methods) (Streams, error)
func (Streams) SetReadWriter ¶
type WriteCloser ¶
type WriteCloser = io.WriteCloser
Click to show internal directories.
Click to hide internal directories.