forked from TrueCloudLab/frostfs-http-gw
[#19] Extract uploading logic into a separate package
Signed-off-by: Pavel Korotkov <pavel@nspcc.ru>
This commit is contained in:
parent
4c96885a42
commit
eb92219e14
9 changed files with 153 additions and 188 deletions
|
@ -21,14 +21,17 @@ import (
|
|||
|
||||
const (
|
||||
nodeConnectionTimeout = 10 * time.Second
|
||||
maxObjectSize = uint64(1 << (20 + 6)) // 64MB
|
||||
maxObjectSize = uint64(1 << 26) // 64MiB
|
||||
)
|
||||
|
||||
type PutOptions struct {
|
||||
type BaseOptions struct {
|
||||
Client client.Client
|
||||
SessionToken *token.SessionToken
|
||||
BearerToken *token.BearerToken
|
||||
// ...
|
||||
}
|
||||
|
||||
type PutOptions struct {
|
||||
BaseOptions
|
||||
ContainerID *container.ID
|
||||
OwnerID *owner.ID
|
||||
PrepareObjectOnsite bool
|
||||
|
@ -36,19 +39,13 @@ type PutOptions struct {
|
|||
}
|
||||
|
||||
type GetOptions struct {
|
||||
Client client.Client
|
||||
SessionToken *token.SessionToken
|
||||
BearerToken *token.BearerToken
|
||||
// ...
|
||||
BaseOptions
|
||||
ObjectAddress *object.Address
|
||||
Writer io.Writer
|
||||
}
|
||||
|
||||
type SearchOptions struct {
|
||||
Client client.Client
|
||||
SessionToken *token.SessionToken
|
||||
BearerToken *token.BearerToken
|
||||
// ...
|
||||
BaseOptions
|
||||
ContainerID *container.ID
|
||||
Attribute struct {
|
||||
Key string
|
||||
|
@ -57,10 +54,7 @@ type SearchOptions struct {
|
|||
}
|
||||
|
||||
type DeleteOptions struct {
|
||||
Client client.Client
|
||||
SessionToken *token.SessionToken
|
||||
BearerToken *token.BearerToken
|
||||
// ...
|
||||
BaseOptions
|
||||
ObjectAddress *object.Address
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue