feat: add dry run and individual db config parameters

Add a dry-run mode that validates connections and counts source rows without writing, and accept per-connection host/port/user/password/options alongside URLs.
This commit is contained in:
2026-05-15 13:00:00 -05:00
parent 5ee132a1ce
commit 4ce79687b3
5 changed files with 261 additions and 18 deletions

View File

@@ -70,6 +70,15 @@ func (c *Client) UploadBuffer(ctx context.Context, containerName, blobPath strin
return nil
}
func (c *Client) Ping(ctx context.Context) error {
pager := c.client.NewListBlobsFlatPager(c.azureStorageConfig.Container, nil)
_, err := pager.NextPage(ctx)
if err != nil {
return fmt.Errorf("storage access check failed: %w", err)
}
return nil
}
func (c *Client) UploadAndGetURL(ctx context.Context, blobPath string, buffer []byte) (string, error) {
if blobPath == "" || buffer == nil {
return "", ErrInvalidInput