Use constants for gateway names to avoid bugs caused by spelling. (#10355)

This commit is contained in:
飞雪无情
2020-08-26 23:52:46 +08:00
committed by GitHub
parent ea5094e842
commit ea1803417f
9 changed files with 31 additions and 37 deletions

View File

@@ -73,7 +73,6 @@ const (
azureBlockSize = 100 * humanize.MiByte
azureS3MinPartSize = 5 * humanize.MiByte
metadataObjectNameTemplate = minio.GatewayMinioSysTmp + "multipart/v1/%s.%x/azure.json"
azureBackend = "azure"
azureMarkerPrefix = "{minio}"
metadataPartNamePrefix = minio.GatewayMinioSysTmp + "multipart/v1/%s.%x"
maxPartsCount = 10000
@@ -113,7 +112,7 @@ EXAMPLES:
`
minio.RegisterGatewayCommand(cli.Command{
Name: azureBackend,
Name: minio.AzureBackendGateway,
Usage: "Microsoft Azure Blob Storage",
Action: azureGatewayMain,
CustomHelpTemplate: azureGatewayTemplate,
@@ -170,7 +169,7 @@ type Azure struct {
// Name implements Gateway interface.
func (g *Azure) Name() string {
return azureBackend
return minio.AzureBackendGateway
}
// NewGatewayLayer initializes azure blob storage client and returns AzureObjects.