StartMinioServer handler
(ctx context.Context, conf *object.MinioConfig, minioServiceName string)
| 104 | |
| 105 | // StartMinioServer handler |
| 106 | func (o *ObjectHandler) StartMinioServer(ctx context.Context, conf *object.MinioConfig, minioServiceName string) error { |
| 107 | |
| 108 | if conf.StorageType == object.StorageType_GCS { |
| 109 | return errors.New("GCS Gateway is not supported anymore, use Google Storage S3 API instead") |
| 110 | } else if conf.StorageType != object.StorageType_LOCAL { |
| 111 | // Ignore |
| 112 | return nil |
| 113 | } |
| 114 | |
| 115 | accessKey := conf.ApiKey |
| 116 | secretKey := conf.ApiSecret |
| 117 | |
| 118 | // Replace secretKey on the fly |
| 119 | if sec := config.GetSecret(ctx, secretKey).String(); sec != "" { |
| 120 | secretKey = sec |
| 121 | } |
| 122 | |
| 123 | return o.startMinioServer(ctx, minioServiceName, accessKey, secretKey, conf.LocalFolder, conf.RunningPort) |
| 124 | |
| 125 | } |
| 126 | |
| 127 | // StartMinioServer handler |
| 128 | func (o *ObjectHandler) startMinioServer(ctx context.Context, minioServiceName, accessKey, secretKey, localFolder string, runningPort int32) error { |
no test coverage detected