MCPcopy Create free account
hub / github.com/pydio/cells / StartMinioServer

Method StartMinioServer

data/source/objects/grpc/handler.go:106–125  ·  view source on GitHub ↗

StartMinioServer handler

(ctx context.Context, conf *object.MinioConfig, minioServiceName string)

Source from the content-addressed store, hash-verified

104
105// StartMinioServer handler
106func (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
128func (o *ObjectHandler) startMinioServer(ctx context.Context, minioServiceName, accessKey, secretKey, localFolder string, runningPort int32) error {

Callers 1

initFunction · 0.80

Calls 4

startMinioServerMethod · 0.95
GetSecretFunction · 0.92
NewMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected