Plan computes ref actions without pushing.
(ctx context.Context, req PlanRequest)
| 45 | |
| 46 | // Plan computes ref actions without pushing. |
| 47 | func (c *Client) Plan(ctx context.Context, req PlanRequest) (PlanResult, error) { |
| 48 | if err := req.Validate(); err != nil { |
| 49 | return PlanResult{}, err |
| 50 | } |
| 51 | cfg, err := c.buildSyncConfig(ctx, req.Source, req.Target, req.Scope, req.Policy, req.CollectStats, true) |
| 52 | if err != nil { |
| 53 | return PlanResult{}, err |
| 54 | } |
| 55 | result, err := internalbridge.Run(ctx, cfg) |
| 56 | if err != nil { |
| 57 | return PlanResult{}, fmt.Errorf("plan: %w", err) |
| 58 | } |
| 59 | return internalbridge.FromSyncResult(result), nil |
| 60 | } |
| 61 | |
| 62 | // Sync executes a sync between two remotes. |
| 63 | func (c *Client) Sync(ctx context.Context, req SyncRequest) (SyncResult, error) { |
no test coverage detected