Documentation
¶
Index ¶
- Variables
- func Contain(root, candidate string) (string, error)
- func ControlPlaneDenied() []string
- func IsControlPlanePath(candidate string) (string, bool)
- func ResolveRoot(root string) (string, error)
- func ResolveSessionCwd(f *Factory, cwd, fallback string) (string, error)
- func SetControlPlaneDenied(paths ...string) error
- func Within(root, abs string) bool
- func WithinControlPlane(deniedDirs []string, candidate string) (string, bool)
- type Factory
- func (f *Factory) Allows(root string) (string, bool)
- func (f *Factory) Default() string
- func (f *Factory) DescribeRoots() string
- func (f *Factory) Open(root string) (*View, error)
- func (f *Factory) Resolve(root string) (string, error)
- func (f *Factory) Roots() []string
- func (f *Factory) SetRoots(roots []string) error
- type View
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrControlPlane = errors.New("path is inside the runtime control plane")
View Source
var ErrCwdNotPermitted = errors.New("session cwd is not permitted")
View Source
var ErrEscape = errors.New("path escapes workspace root")
View Source
var ErrNotAllowed = errors.New("workspace root is not allowed")
Functions ¶
func ControlPlaneDenied ¶
func ControlPlaneDenied() []string
func IsControlPlanePath ¶
func ResolveRoot ¶
func SetControlPlaneDenied ¶
Types ¶
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
func NewFactory ¶
func (*Factory) DescribeRoots ¶
type View ¶
type View struct {
// contains filtered or unexported fields
}
func OpenPrivilegedView ¶
Click to show internal directories.
Click to hide internal directories.