Documentation ¶
Overview ¶
Package executor calls UiPath services.
Index ¶
Constants ¶
const NotConfiguredErrorTemplate = `` /* 141-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExecutionContext ¶
type ExecutionContext struct { Organization string Tenant string Method string BaseUri url.URL Route string ContentType string Input utils.Stream Parameters ExecutionParameters AuthConfig config.AuthConfig Insecure bool Debug bool Plugin plugin.CommandPlugin }
The ExecutionContext provides all the data needed by the executor to construct the HTTP request including URL, headers and body.
func NewExecutionContext ¶
func NewExecutionContext( organization string, tenant string, method string, uri url.URL, route string, contentType string, input utils.Stream, parameters []ExecutionParameter, authConfig config.AuthConfig, insecure bool, debug bool, plugin plugin.CommandPlugin) *ExecutionContext
type ExecutionParameter ¶
An ExecutionParameter is a value which is used by the executor to build the request. Parameter values are typicall provided by multiple sources like config files, command line arguments and environment variables.
func NewExecutionParameter ¶
func NewExecutionParameter(name string, value interface{}, in string) *ExecutionParameter
type ExecutionParameters ¶
type ExecutionParameters []ExecutionParameter
func (ExecutionParameters) Body ¶
func (p ExecutionParameters) Body() []ExecutionParameter
func (ExecutionParameters) Form ¶
func (p ExecutionParameters) Form() []ExecutionParameter
func (ExecutionParameters) Header ¶
func (p ExecutionParameters) Header() []ExecutionParameter
func (ExecutionParameters) Path ¶
func (p ExecutionParameters) Path() []ExecutionParameter
func (ExecutionParameters) Query ¶
func (p ExecutionParameters) Query() []ExecutionParameter
type Executor ¶
type Executor interface {
Call(context ExecutionContext, writer output.OutputWriter, logger log.Logger) error
}
The Executor interface is an abstraction for carrying out CLI commands.
The ExecutionContext provides all the data needed to execute a command. The OutputWriter should be used to output the result of the command. The Logger should be used for providing additional information when running a command.
type HttpExecutor ¶
type HttpExecutor struct {
// contains filtered or unexported fields
}
The HttpExecutor implements the Executor interface and constructs HTTP request from the given command line parameters and configurations.
func NewHttpExecutor ¶
func NewHttpExecutor(authenticators []auth.Authenticator) *HttpExecutor
func (HttpExecutor) Call ¶
func (e HttpExecutor) Call(context ExecutionContext, writer output.OutputWriter, logger log.Logger) error
type PluginExecutor ¶
type PluginExecutor struct {
// contains filtered or unexported fields
}
The PluginExecutor implements the Executor interface and invokes the registered plugin for the executed command. The plugin takes care of sending the HTTP request or performing other operations.
func NewPluginExecutor ¶
func NewPluginExecutor(authenticators []auth.Authenticator) *PluginExecutor
func (PluginExecutor) Call ¶
func (e PluginExecutor) Call(context ExecutionContext, writer output.OutputWriter, logger log.Logger) error