(act func(ctx context.Context, rep repo.DirectRepositoryWriter) error)
| 427 | } |
| 428 | |
| 429 | func (c *App) directRepositoryWriteAction(act func(ctx context.Context, rep repo.DirectRepositoryWriter) error) func(ctx *kingpin.ParseContext) error { |
| 430 | return c.repositoryAction(assertDirectRepository(func(ctx context.Context, rep repo.DirectRepository) error { |
| 431 | rep.LogManager().Enable() |
| 432 | |
| 433 | return repo.DirectWriteSession(ctx, rep, repo.WriteSessionOptions{ |
| 434 | Purpose: "cli:" + c.currentActionName(), |
| 435 | OnUpload: c.progress.UploadedBytes, |
| 436 | }, func(ctx context.Context, dw repo.DirectRepositoryWriter) error { return act(ctx, dw) }) |
| 437 | }), repositoryAccessMode{}) |
| 438 | } |
| 439 | |
| 440 | func (c *App) directRepositoryReadAction(act func(ctx context.Context, rep repo.DirectRepository) error) func(ctx *kingpin.ParseContext) error { |
| 441 | return c.repositoryAction(assertDirectRepository(func(ctx context.Context, rep repo.DirectRepository) error { |
nothing calls this directly
no test coverage detected