2022-05-15 15:43:37 +08:00
|
|
|
package s3api
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
2022-07-29 15:17:28 +08:00
|
|
|
"github.com/seaweedfs/seaweedfs/weed/pb/s3_pb"
|
2022-05-15 15:43:37 +08:00
|
|
|
)
|
|
|
|
|
2022-05-16 12:31:29 +08:00
|
|
|
func (s3a *S3ApiServer) Configure(ctx context.Context, request *s3_pb.S3ConfigureRequest) (*s3_pb.S3ConfigureResponse, error) {
|
2022-05-15 15:43:37 +08:00
|
|
|
|
2022-05-16 12:31:29 +08:00
|
|
|
if err := s3a.iam.LoadS3ApiConfigurationFromBytes(request.S3ConfigurationFileContent); err != nil {
|
2022-05-15 15:43:37 +08:00
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
|
2022-05-16 12:31:29 +08:00
|
|
|
return &s3_pb.S3ConfigureResponse{}, nil
|
2022-05-15 15:43:37 +08:00
|
|
|
|
|
|
|
}
|