(ctx plugin.ExecutionContext, logger log.Logger)
| 116 | } |
| 117 | |
| 118 | func (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 | |
| 133 | func (c UploadCommand) getStringParameter(name string, parameters []plugin.ExecutionParameter) string { |
| 134 | result := "" |
no test coverage detected