(ctx plugin.ExecutionContext, logger log.Logger)
| 57 | } |
| 58 | |
| 59 | func (c DigitizeCommand) startDigitization(ctx plugin.ExecutionContext, logger log.Logger) (string, error) { |
| 60 | uploadBar := visualization.NewProgressBar(logger) |
| 61 | defer uploadBar.Remove() |
| 62 | |
| 63 | projectId := c.getProjectId(ctx.Parameters) |
| 64 | file := ctx.Input |
| 65 | if file == nil { |
| 66 | file = c.getFileParameter(ctx.Parameters) |
| 67 | } |
| 68 | contentType := c.getStringParameter("content-type", "application/octet-stream", ctx.Parameters) |
| 69 | |
| 70 | client := api.NewDuClient(ctx.BaseUri, ctx.Organization, ctx.Tenant, ctx.Auth.Token, ctx.Debug, ctx.Settings, logger) |
| 71 | return client.StartDigitization(projectId, file, contentType, uploadBar) |
| 72 | } |
| 73 | |
| 74 | func (c DigitizeCommand) waitForDigitization(documentId string, ctx plugin.ExecutionContext, writer output.OutputWriter, logger log.Logger) (bool, error) { |
| 75 | projectId := c.getProjectId(ctx.Parameters) |
no test coverage detected