Documentation
¶
Index ¶
- Constants
- func ExecuteProcess(ctx context.Context, req RunRequest) ([]byte, []byte, error)
- func GetExecutionOp() ops.RegisterableOp
- func IsLocalSelector(selector string) bool
- func IsSelector(selector string) bool
- type ExecutionInput
- type ExtensionOpSpec
- type InputDefaults
- type ResolveOptions
- type ResolvedOp
- func (r *ResolvedOp) ApplyInvocationDefaults(raw map[string]interface{}) (bool, error)
- func (r *ResolvedOp) SanitizeInvocationInputs(raw map[string]interface{}) (map[string]interface{}, *SandboxInput, error)
- func (r *ResolvedOp) ValidateInvocationInputs(raw map[string]interface{}) error
- func (r *ResolvedOp) WorkingDir() string
- func (r *ResolvedOp) ZeroOutput() map[string]interface{}
- type ResolvedSelectorPath
- type RunRequest
- type SandboxInput
- type SandboxPathConfig
- type SandboxPathMapping
Constants ¶
View Source
const ( SandboxTypeNone = process.SandboxTypeNone SandboxTypeShai = process.SandboxTypeShai )
View Source
const ExecutionOpType = "extension_execution"
Variables ¶
This section is empty.
Functions ¶
func ExecuteProcess ¶
func GetExecutionOp ¶
func GetExecutionOp() ops.RegisterableOp
func IsLocalSelector ¶
func IsSelector ¶
Types ¶
type ExecutionInput ¶
type ExtensionOpSpec ¶
type ExtensionOpSpec struct {
Name string `yaml:"name"`
Description string `yaml:"description"`
Version string `yaml:"version"`
Shell string `yaml:"shell"`
Run string `yaml:"run"`
Command []string `yaml:"command"`
Env map[string]string `yaml:"env"`
Timeout string `yaml:"timeout"`
InputSchema map[string]any `yaml:"input_schema"`
OutputSchema map[string]any `yaml:"output_schema"`
}
ExtensionOpSpec models the op.yaml configuration for a selector-resolved extension op.
type InputDefaults ¶
type InputDefaults struct {
// contains filtered or unexported fields
}
InputDefaults applies schema-backed defaults to extension-op invocation inputs.
func BuildInputDefaults ¶
func BuildInputDefaults(raw map[string]any, compiled *jsonschemav6.Schema) (*InputDefaults, error)
type ResolveOptions ¶
type ResolvedOp ¶
type ResolvedOp struct {
Selector string
ResolvedSelector string
ResolvedCommit string
ProjectRoot string
OpDir string
SpecPath string
Spec ExtensionOpSpec
// contains filtered or unexported fields
}
func Resolve ¶
func Resolve(ctx context.Context, selector string, opts ResolveOptions) (*ResolvedOp, error)
func (*ResolvedOp) ApplyInvocationDefaults ¶
func (r *ResolvedOp) ApplyInvocationDefaults(raw map[string]interface{}) (bool, error)
func (*ResolvedOp) SanitizeInvocationInputs ¶
func (r *ResolvedOp) SanitizeInvocationInputs(raw map[string]interface{}) (map[string]interface{}, *SandboxInput, error)
func (*ResolvedOp) ValidateInvocationInputs ¶
func (r *ResolvedOp) ValidateInvocationInputs(raw map[string]interface{}) error
func (*ResolvedOp) WorkingDir ¶
func (r *ResolvedOp) WorkingDir() string
func (*ResolvedOp) ZeroOutput ¶
func (r *ResolvedOp) ZeroOutput() map[string]interface{}
type ResolvedSelectorPath ¶
type ResolvedSelectorPath struct {
Selector string
ResolvedSelector string
ResolvedCommit string
ProjectRoot string
Dir string
}
func ResolvePath ¶
func ResolvePath(ctx context.Context, selector string, opts ResolveOptions) (*ResolvedSelectorPath, error)
type RunRequest ¶
type RunRequest = process.RunRequest
type SandboxInput ¶
type SandboxInput = process.SandboxInput
func ParseSandboxInput ¶
func ParseSandboxInput(raw interface{}) (*SandboxInput, error)
type SandboxPathConfig ¶ added in v0.0.8
type SandboxPathConfig = process.SandboxPathConfig
type SandboxPathMapping ¶ added in v0.0.8
type SandboxPathMapping = process.SandboxPathMapping
Click to show internal directories.
Click to hide internal directories.