Documentation ¶
Index ¶
- func InsufficientArgsError(cmd string, exp, got int) error
- func NopExec(context.Context, []string) error
- func NopOpen(context.Context, string, int, os.FileMode) (io.ReadWriteCloser, error)
- func NopReadDir(context.Context, string) ([]os.FileInfo, error)
- func NopStat(context.Context, string, bool) (os.FileInfo, error)
- func RestrictedExec(allowedCmds ...string) interp.ExecHandlerFunc
- func RestrictedOpen(allowedPrefixes ...string) interp.OpenHandlerFunc
- func RestrictedReadDir(allowedPrefixes ...string) interp.ReadDirHandlerFunc
- func RestrictedStat(allowedPrefixes ...string) interp.StatHandlerFunc
- type ExecFunc
- type ExecFuncs
- type NopRWC
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InsufficientArgsError ¶
func RestrictedExec ¶
func RestrictedExec(allowedCmds ...string) interp.ExecHandlerFunc
func RestrictedOpen ¶
func RestrictedOpen(allowedPrefixes ...string) interp.OpenHandlerFunc
func RestrictedReadDir ¶
func RestrictedReadDir(allowedPrefixes ...string) interp.ReadDirHandlerFunc
func RestrictedStat ¶
func RestrictedStat(allowedPrefixes ...string) interp.StatHandlerFunc
Types ¶
type ExecFuncs ¶
func (ExecFuncs) ExecHandler ¶
func (ef ExecFuncs) ExecHandler(fallback interp.ExecHandlerFunc) interp.ExecHandlerFunc
ExecHandler returns a new ExecHandlerFunc that falls back to fallback if the command cannot be found in the map. If fallback is nil, the default handler is used.
Click to show internal directories.
Click to hide internal directories.