Make a new S3 Server to serve the remote
(ctx context.Context)
| 12 | |
| 13 | // Make a new S3 Server to serve the remote |
| 14 | func NewServer(ctx context.Context) (h http.Handler, err error) { |
| 15 | var newLogger logger |
| 16 | authPairs := authlistResolver() |
| 17 | faker := gofakes3.New( |
| 18 | newBackend(), |
| 19 | // gofakes3.WithHostBucket(!opt.pathBucketMode), |
| 20 | gofakes3.WithLogger(newLogger), |
| 21 | gofakes3.WithRequestID(rand.Uint64()), |
| 22 | gofakes3.WithoutVersioning(), |
| 23 | gofakes3.WithV4Auth(authPairs), |
| 24 | gofakes3.WithIntegrityCheck(true), // Check Content-MD5 if supplied |
| 25 | ) |
| 26 | |
| 27 | return redirectHandler(faker.Server(), authPairs), nil |
| 28 | } |
no test coverage detected