mirror of
https://github.com/versity/versitygw.git
synced 2026-09-21 07:24:29 +00:00
feat: add azure local env auth
This is the recommended auth from the following: https://github.com/Azure-Samples/storage-blobs-go-quickstart/blob/master/storage-quickstart.go https://learn.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-go?toc=%2Fazure%2Fdeveloper%2Fgo%2Ftoc.json&bc=%2Fazure%2Fdeveloper%2Fgo%2Fbreadcrumb%2Ftoc.json&tabs=roles-azure-portal#authenticate-to-azure-and-authorize-access-to-blob-data
This commit is contained in:
@@ -65,14 +65,9 @@ func azureCommand() *cli.Command {
|
||||
}
|
||||
|
||||
func runAzure(ctx *cli.Context) error {
|
||||
if azServiceURL == "" {
|
||||
// if not otherwise specified, use the typical form: http(s)://<account>.blob.core.windows.net/
|
||||
azServiceURL = fmt.Sprintf("https://%s.blob.core.windows.net/", azAccount)
|
||||
}
|
||||
|
||||
be, err := azure.New(azAccount, azKey, azServiceURL, azSASToken)
|
||||
if err != nil {
|
||||
return fmt.Errorf("init azure: %v", err)
|
||||
return fmt.Errorf("init azure: %w", err)
|
||||
}
|
||||
|
||||
return runGateway(ctx.Context, be)
|
||||
|
||||
Reference in New Issue
Block a user