Documentation ¶
Index ¶
- func NewManager(config *models.Config, logger *log.Logger) eval.SandboxManager
- type Container
- func (c *Container) Cleanup() error
- func (c *Container) CreateDirectory(path string, perm fs.FileMode) error
- func (c *Container) CreateFile(path string, perm fs.FileMode) error
- func (c *Container) DeleteDirectory(path string) error
- func (c *Container) DeleteFile(path string) error
- func (c *Container) ExecuteCommand(ctx context.Context, command []string, config *eval.RunConfig) (*eval.RunStatus, error)
- func (c *Container) GetID() int
- func (c *Container) GetPath(path string) string
- func (c *Container) ReadFile(path string) ([]byte, error)
- func (c *Container) WriteToFile(path string, data []byte, perm fs.FileMode) error
- type Manager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewManager ¶
Types ¶
type Container ¶
type Container struct {
// contains filtered or unexported fields
}
Container implements eval.Sandbox
func (*Container) CreateDirectory ¶
func (*Container) DeleteDirectory ¶
func (*Container) DeleteFile ¶
func (*Container) ExecuteCommand ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager implements eval.SandboxManager
func (*Manager) ReleaseSandbox ¶
Click to show internal directories.
Click to hide internal directories.