MCPcopy Create free account
hub / github.com/UiPath/uipathcli / getWriteUrl

Method getWriteUrl

plugin/orchestrator/upload/upload_command.go:118–131  ·  view source on GitHub ↗
(ctx plugin.ExecutionContext, logger log.Logger)

Source from the content-addressed store, hash-verified

116}
117
118func (c UploadCommand) getWriteUrl(ctx plugin.ExecutionContext, logger log.Logger) (string, error) {
119 if ctx.Organization == "" {
120 return "", errors.New("Organization is not set")
121 }
122 if ctx.Tenant == "" {
123 return "", errors.New("Tenant is not set")
124 }
125 folderId := c.getIntParameter("folder-id", ctx.Parameters)
126 bucketId := c.getIntParameter("key", ctx.Parameters)
127 path := c.getStringParameter("path", ctx.Parameters)
128
129 client := api.NewOrchestratorClient(ctx.BaseUri, ctx.Organization, ctx.Tenant, ctx.Auth.Token, ctx.Debug, ctx.Settings, logger)
130 return client.GetWriteUrl(folderId, bucketId, path)
131}
132
133func (c UploadCommand) getStringParameter(name string, parameters []plugin.ExecutionParameter) string {
134 result := ""

Callers 1

ExecuteMethod · 0.95

Calls 5

getIntParameterMethod · 0.95
getStringParameterMethod · 0.95
GetWriteUrlMethod · 0.95
NewOrchestratorClientFunction · 0.92
NewMethod · 0.80

Tested by

no test coverage detected