CreateSnapshotSource creates snapshot source with a given path.
(ctx context.Context, c *apiclient.KopiaAPIClient, req *CreateSnapshotSourceRequest)
| 17 | |
| 18 | // CreateSnapshotSource creates snapshot source with a given path. |
| 19 | func CreateSnapshotSource(ctx context.Context, c *apiclient.KopiaAPIClient, req *CreateSnapshotSourceRequest) (*CreateSnapshotSourceResponse, error) { |
| 20 | resp := &CreateSnapshotSourceResponse{} |
| 21 | if err := c.Post(ctx, "sources", req, resp); err != nil { |
| 22 | return nil, errors.Wrap(err, "CreateSnapshotSource") |
| 23 | } |
| 24 | |
| 25 | return resp, nil |
| 26 | } |
| 27 | |
| 28 | // Estimate starts snapshot estimation task for a given directory. |
| 29 | func Estimate(ctx context.Context, c *apiclient.KopiaAPIClient, req *EstimateRequest) (*uitask.Info, error) { |