You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: remote.go
    path of file: ./repos/tidb-operator/pkg/backup/util
    
    the code of the file until where you have to start completion: // Copyright 2019 PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// Yo
    
func GetStorageCredential(ns string, provider v1alpha1.StorageProvider, secretLister corelisterv1.SecretLister) *StorageCredential {
	var err error
	var secret *corev1.Secret
	storageType := GetStorageType(provider)

	switch storageType {
	case v1alpha1.BackupStorageTypeS3:
		s3SecretName := provider.S3.SecretName
		if s3SecretName != "" {
			secret, err = secretLister.Secrets(ns).Get(s3SecretName)
			if err != nil {
				klog.Errorf("Get the secret key failed.")
				return &StorageCredential{}
			}

			s3AccessKey := string(secret.Data[constants.S3AccessKey])
			s3SecretKey := string(secret.Data[constants.S3SecretKey])

			if s3AccessKey != "" && s3SecretKey != "" {
				cred := credentials.NewStaticCredentials(s3AccessKey, s3SecretKey, "")
				return &StorageCredential{
					cred,
				}
			}

		}
	//TODO: will support gcs
	case v1alpha1.BackupStorageTypeGcs:
		return &StorageCredential{}
	default:
		return &StorageCredential{}
	}

	return &StorageCredential{}
}