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 ¶ added in v0.0.4
func RestrictedExec ¶ added in v0.0.5
func RestrictedExec(allowedCmds ...string) interp.ExecHandlerFunc
func RestrictedOpen ¶ added in v0.0.5
func RestrictedOpen(allowedPrefixes ...string) interp.OpenHandlerFunc
func RestrictedReadDir ¶ added in v0.0.5
func RestrictedReadDir(allowedPrefixes ...string) interp.ReadDirHandlerFunc
func RestrictedStat ¶ added in v0.0.5
func RestrictedStat(allowedPrefixes ...string) interp.StatHandlerFunc
Types ¶
type ExecFunc ¶ added in v0.0.4
type ExecFunc func(hc interp.HandlerContext, name string, args []string) error
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.