Documentation
¶
Index ¶
- type Environment
- func (e *Environment) CloseSession(_ context.Context, _ *sandboxenv.PreparedSession) error
- func (e *Environment) EditFile(ctx context.Context, ps *sandboxenv.PreparedSession, ...) error
- func (e *Environment) Glob(_ context.Context, _ *sandboxenv.PreparedSession, pattern string) ([]string, error)
- func (e *Environment) Grep(_ context.Context, _ *sandboxenv.PreparedSession, _ sandboxenv.GrepRequest) ([]sandboxenv.GrepMatch, error)
- func (e *Environment) PrepareSession(_ context.Context, session sandboxenv.SessionContext) (*sandboxenv.PreparedSession, error)
- func (e *Environment) ReadFile(_ context.Context, _ *sandboxenv.PreparedSession, path string) ([]byte, error)
- func (e *Environment) RunCommand(context.Context, *sandboxenv.PreparedSession, sandboxenv.CommandRequest) (*sandboxenv.CommandResult, error)
- func (e *Environment) WriteFile(_ context.Context, _ *sandboxenv.PreparedSession, path string, data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Environment ¶
type Environment struct {
// contains filtered or unexported fields
}
Environment is the host-native execution environment.
func New ¶
func New(projectRoot string) *Environment
func (*Environment) CloseSession ¶
func (e *Environment) CloseSession(_ context.Context, _ *sandboxenv.PreparedSession) error
func (*Environment) EditFile ¶
func (e *Environment) EditFile(ctx context.Context, ps *sandboxenv.PreparedSession, req sandboxenv.EditRequest) error
func (*Environment) Glob ¶
func (e *Environment) Glob(_ context.Context, _ *sandboxenv.PreparedSession, pattern string) ([]string, error)
func (*Environment) Grep ¶
func (e *Environment) Grep(_ context.Context, _ *sandboxenv.PreparedSession, _ sandboxenv.GrepRequest) ([]sandboxenv.GrepMatch, error)
func (*Environment) PrepareSession ¶
func (e *Environment) PrepareSession(_ context.Context, session sandboxenv.SessionContext) (*sandboxenv.PreparedSession, error)
func (*Environment) ReadFile ¶
func (e *Environment) ReadFile(_ context.Context, _ *sandboxenv.PreparedSession, path string) ([]byte, error)
func (*Environment) RunCommand ¶
func (e *Environment) RunCommand(context.Context, *sandboxenv.PreparedSession, sandboxenv.CommandRequest) (*sandboxenv.CommandResult, error)
func (*Environment) WriteFile ¶
func (e *Environment) WriteFile(_ context.Context, _ *sandboxenv.PreparedSession, path string, data []byte) error
Click to show internal directories.
Click to hide internal directories.