Documentation
¶
Index ¶
- Variables
- type Factory
- func (f *Factory) GetOrCreateProvider(ctx op.Context) op.ContextProvider
- func (f *Factory) NewExecuting(ctx op.Context) starlark.Value
- func (f *Factory) NewPlanning(graph *op.Graph, project string, registry *op.ActionRegistry) starlark.Value
- func (f *Factory) ProviderType() reflect.Type
- func (f *Factory) ReceiverName() string
- func (f *Factory) Register(registry *op.ActionRegistry, ctx op.Context)
Constants ¶
This section is empty.
Variables ¶
var Params = op.MethodParams{
"Encode": {"value"},
"EncodeIndent": {"value", "indent"},
"Decode": {"data"},
}
Params maps Go method names to Starlark parameter name lists.
var Receiver op.ReceiverFactory = &Factory{}
Receiver is the ReceiverFactory for the json provider.
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
Factory implements op.ReceiverFactory for the json provider.
func (*Factory) GetOrCreateProvider ¶
func (f *Factory) GetOrCreateProvider(ctx op.Context) op.ContextProvider
GetOrCreateProvider returns a cached provider for the given context, creating one if needed. The provider is invalidated when the Root changes.
Parameters:
- ctx: the execution context providing Root and platform state.
Returns:
- op.ContextProvider: the provider instance.
func (*Factory) NewExecuting ¶
NewExecuting creates a Starlark receiver that dispatches method calls to a fresh provider.
Parameters:
- ctx: the execution context.
Returns:
- starlark.Value: the executing receiver.
func (*Factory) NewPlanning ¶
func (f *Factory) NewPlanning(graph *op.Graph, project string, registry *op.ActionRegistry) starlark.Value
NewPlanning creates a Starlark receiver that records method calls as graph nodes.
Parameters:
- graph: the operation graph to populate.
- project: the project identifier.
- registry: the action registry for node creation.
Returns:
- starlark.Value: the planning receiver.
func (*Factory) ProviderType ¶
ProviderType returns the reflect.Type of the underlying provider struct.
Returns:
- reflect.Type: the provider's concrete type.
func (*Factory) ReceiverName ¶
ReceiverName returns the Starlark receiver name for this provider.
Returns:
- string: the receiver name "json".