refactor: implement dry run feature to validate connections and count source rows without migrating
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user