forked from TrueCloudLab/frostfs-s3-gw
[TrueCloudLab#40] Add param to configure xml decoder
This parameter enables parsing xml body without xmlns="http://s3.amazonaws.com/doc/2006-03-01/" attribute for CompleteMultipartUpload requests Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
This commit is contained in:
parent
680c0dbe3d
commit
0af06c3bd9
12 changed files with 175 additions and 7 deletions
|
@ -1,7 +1,9 @@
|
|||
package handler
|
||||
|
||||
import (
|
||||
"encoding/xml"
|
||||
"errors"
|
||||
"io"
|
||||
"time"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-s3-gw/api"
|
||||
|
@ -26,6 +28,7 @@ type (
|
|||
// Config contains data which handler needs to keep.
|
||||
Config struct {
|
||||
Policy PlacementPolicy
|
||||
XMLDecoder XMLDecoderProvider
|
||||
DefaultMaxAge int
|
||||
NotificatorEnabled bool
|
||||
CopiesNumber uint32
|
||||
|
@ -37,6 +40,10 @@ type (
|
|||
Default() netmap.PlacementPolicy
|
||||
Get(string) (netmap.PlacementPolicy, bool)
|
||||
}
|
||||
|
||||
XMLDecoderProvider interface {
|
||||
NewCompleteMultipartDecoder(io.Reader) *xml.Decoder
|
||||
}
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue