mirror of
https://github.com/versity/versitygw.git
synced 2026-01-03 10:35:15 +00:00
18 lines
371 B
Go
18 lines
371 B
Go
package command
|
|
|
|
import (
|
|
"errors"
|
|
)
|
|
|
|
func NewPutObjectCommand(s3Command *S3Command) (*S3Command, error) {
|
|
if s3Command.BucketName == "" {
|
|
return nil, errors.New("PutObject must have bucket name")
|
|
}
|
|
if s3Command.ObjectKey == "" {
|
|
return nil, errors.New("PutObject must have object key")
|
|
}
|
|
s3Command.Method = "PUT"
|
|
s3Command.Query = ""
|
|
return s3Command, nil
|
|
}
|