Commit graph

394 commits

Author SHA1 Message Date
Angira Kekteeva
2b6843f8fa [#389] Fix checks of bucket settings
In Put/CopyObject and PutBucketVersioning

Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2022-04-01 14:22:10 +04:00
Denis Kirillov
c399cfbdda [#382] Refactor neofs related types
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-31 11:47:24 +03:00
Angira Kekteeva
83bb6fc020 [#384] Add check of Notificator interface value
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2022-03-30 10:29:28 +03:00
Denis Kirillov
f0914b8a43 [#377] Reuse BucketInfo in layer
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-29 02:43:28 +04:00
Denis Kirillov
46e4b28489 [#195] Add logger to notification controller
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-23 14:32:13 +04:00
Denis Kirillov
9d19acadcd [#195] Use exp epoch attribute instead of tick
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-23 14:32:13 +04:00
Denis Kirillov
cfcc8933e4 [#195] Add response lock headers
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-23 14:32:13 +04:00
Denis Kirillov
e0b8bc6cd6 [#195] Fix object deletion
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-23 14:32:13 +04:00
Denis Kirillov
4a67e4b311 [#195] Set tick attribute to lock objects
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-23 14:32:13 +04:00
Denis Kirillov
4c3c4b6bee [#195] Add Lock tick listening
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-23 14:32:13 +04:00
Denis Kirillov
32e83db064 [#195] Set Lock type to system lock objects
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-23 14:32:13 +04:00
Denis Kirillov
13080d6d96 [#195] Refactor TestNeoFS
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-23 14:32:13 +04:00
Denis Kirillov
5c530123ab [#195] Fix lint errors
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-23 14:32:13 +04:00
Denis Kirillov
6cf01bed14 [#195] Add tests
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-23 14:32:13 +04:00
Denis Kirillov
7d6271be8a [#195] Implement PUT, GET locks to certain object
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-23 14:32:13 +04:00
Denis Kirillov
8553158b81 [#195] Add handling lock headers for PUT and COPY
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-23 14:32:13 +04:00
Denis Kirillov
fe9eb9cedc [#195] Add PUT and GET default lock configuration
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-23 14:32:13 +04:00
Denis Kirillov
b96c3c5a33 [#195] Refactor
Using object settings to save bucket versioning

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-23 14:32:13 +04:00
Denis Kirillov
3046d80b37 [#195] Check object locking when disable versioning
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-23 14:32:13 +04:00
Denis Kirillov
e98c663bd6 [#195] Support enabling object locking for bucket
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-23 14:32:13 +04:00
Denis Kirillov
94406b08f3 [#376] Update NeoFS SDK to v1.0.0-rc.3
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-16 15:44:19 +03:00
Denis Kirillov
02f4524d67 [#368] Unify cache value deletion
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-16 10:59:42 +03:00
Denis Kirillov
e7b742df4d [#366] Add wait for container removed
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-04 10:41:15 +03:00
Leonard Lyubich
20b8e3d249 [#346] Upgrade NeoFS SDK Go to 2nd release candidate v1.0.0
Avoid using the deprecated elements.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-04 00:14:30 +03:00
Leonard Lyubich
8fb3835250 [#346] api: Do not use io.Pipe in CompleteMultipartUpload
Replace `layer.objectWritePayload` method with `initObjectPayloadReader`
which returns `io.Reader` of the object payload. Copy payload data to
the parameterized `io.Writer` in `layer.GetObject`. Remove `io.Pipe`
from `CompleteMultipartUpload` implementation and build analogue of
`io.MultiReader` for the part list.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-04 00:14:30 +03:00
Leonard Lyubich
eac4c4d849 [#346] api: Remove unused and no longer needed layer.Get method
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-04 00:14:30 +03:00
Leonard Lyubich
1517b5c638 [#346] neofs: Fix belated updateCRDT2PSetHeaders call
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-04 00:14:30 +03:00
Leonard Lyubich
cd64f41ce8 [#346] *: Refactor communication with NeoFS at the protocol level
Make `tokens`, `authmate` and `layer` packages to depend from locally
defined `NeoFS` interface of the virtual connection to NeoFS network.
Create internal `neofs` package and implement these interfaces through
`pool.Pool` there. Implement mediators between `NeoFS` interfaces and
`neofs.NeoFS` implementation.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-04 00:14:30 +03:00
Leonard Lyubich
34a221c5c9 [#346] Upgrade NeoFS SDK Go library
Core changes:
  - `object.ID` moved to new package `oid`;
  - `object.Address` moved to new package `address`;
  - `pool.Object` interface changes.

Additionally:
  - Set container owner in `Agent.IssueSecret`.
  - Remove no longer needed fields from `GetObjectParams`
  - `Length` and `Offset` are never assigned. These values
  are set in `Range` field.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-04 00:14:30 +03:00
Angira Kekteeva
4454821285 [#340] Add notification configuration handlers
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2022-02-18 16:59:42 +03:00
Angira Kekteeva
4cbce87eac [#340] Make nats tls and ca params optional
nats.Connect returned error when tls and ca files were not set, what
made these params required, but establishing of unsecured connection
for debug is acceptable.

Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2022-02-18 16:59:42 +03:00
Angira Kekteeva
e0c6544567 [#340] Move notification controller to layer
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2022-02-18 16:59:42 +03:00
Denis Kirillov
f04815c32f [#354] Check container owner if bucket exists
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-02-15 17:08:46 +03:00
Angira Kekteeva
3277293bb3 [#341] Add notifications controller
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2022-02-04 14:41:22 +03:00
Denis Kirillov
c383f332d5 [#329] Use suitable tokens for container requests
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-01-31 11:05:35 +03:00
Denis Kirillov
9be4bbbed4 [#312] Support Expires and Cache-Control headers
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-01-31 00:04:41 +03:00
Denis Kirillov
8fc19b11db [#333] Update sdk
Update sdk to fix "invalid session token owner" error

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-01-28 12:42:40 +03:00
Angira Kekteeva
1502857dba [#313] Remove extra QueryUnescapes
Removed extra QueryUnescapes in search and objectPut

Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2022-01-27 10:25:11 +03:00
Denis Kirillov
4f5b316211 [#319] Fix tests
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-01-26 16:22:58 +03:00
Denis Kirillov
8985681493 [#319] Delete null versions in different modes
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-01-26 16:22:58 +03:00
Denis Kirillov
f5d365af1d [#319] Update CRDT headers
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-01-26 16:22:58 +03:00
Denis Kirillov
58df410111 [#319] Head and delete null versions
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-01-26 16:22:58 +03:00
Denis Kirillov
a46726a545 [#331] Use UTC Last-Modified time
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-01-26 16:04:14 +03:00
Denis Kirillov
962d136e73 [#308] Correct access denied status code
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-01-24 18:47:03 +03:00
Denis Kirillov
2b4ed8487b [#310] Support response headers overriding
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-01-21 16:02:06 +03:00
Angira Kekteeva
bffc09167a [#316] Remove minio mentions in commits
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2022-01-21 10:44:54 +03:00
Angira Kekteeva
e5a256df0c [#316] Return badrequest err if couldnt parse body
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2022-01-21 10:44:54 +03:00
Angira Kekteeva
3307953a4c [#316] Remove MinIO related errors
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2022-01-21 10:44:54 +03:00
Denis Kirillov
c202893563 [#307] Filter system metadata
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-01-21 10:28:51 +03:00
Denis Kirillov
d532eb710f [#306] Add test to check empty policy
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-01-18 13:23:32 +03:00
Denis Kirillov
76042f6728 [#306] Handle empty post policy
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-01-18 13:23:32 +03:00
Denis Kirillov
e8e07147a8 [#318] Add x-amz-version-id header
Support version id in CompleteMultipartUpload method

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-01-17 18:18:17 +03:00
Denis Kirillov
8872b6f196 [#285] Add resolving order
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-01-17 18:14:19 +03:00
Denis Kirillov
097f745d3e [#305] Fix UnknownAPIRequest handling
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-01-17 17:29:06 +03:00
Denis Kirillov
b9f77b3d96 [#301] Implement GetBucketLocation
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-01-13 20:24:21 +03:00
Denis Kirillov
9b14340816 [#299] Fix creating named containers
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-01-13 13:12:20 +03:00
Denis Kirillov
12c15504ef [#297] Update neofs-sdk-go and neo-go
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-12-30 13:00:23 +03:00
Angira Kekteeva
8127d68128 [#186] Fix errors
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-11-30 11:32:59 +03:00
Angira Kekteeva
8c80b16360 [#186] Add unittests for MultipartUpload
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-11-30 11:32:59 +03:00
Angira Kekteeva
d6f0ab8ea4 [#186] Fix versioning issues in UploadPart
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-11-30 11:32:59 +03:00
Angira Kekteeva
873622d4d5 [#186] Add MultipartUpload support
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-11-30 11:32:59 +03:00
Angira Kekteeva
284a560ea6 [#186] Refactor objectSearch, fix objectPut
Fixed panic in objectPut() if input reader is nil
Made objectSearch searching by any attribute

Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-11-30 11:32:59 +03:00
Denis Kirillov
befe084900 [#219] Add container name resolving
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-11-24 13:24:39 +03:00
Denis Kirillov
d36dfe8c61 [#271] Update neo-sdk-go to the latest version
Refactoring invoking pool methods for anonymous requests.

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-11-16 14:42:08 +03:00
Denis Kirillov
ae87effb28 [#271] Add random key for no sign requests
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-11-16 14:42:08 +03:00
Angira Kekteeva
91bed76010 [#274] Refactor system cache and cors
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-10-15 17:44:40 +03:00
Angira Kekteeva
5b4b9df031 [#217] Add errors for cors
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-10-12 09:03:09 +03:00
Angira Kekteeva
f4afe41086 [#217] Add headers in response to simple requests
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-10-12 09:03:09 +03:00
Angira Kekteeva
7d0bc1e992 [#217] Add CORS support
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-10-12 09:03:09 +03:00
Angira Kekteeva
ccf5db95a5 [#217] Refactor system objects
Moved into a separate file
getSystemObject renamed to headSystemObject, implemented getSystemObject
for system objects with payload
Refactor putSystemObjects
Moved systemCacheKey from data system_object

Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-10-12 09:03:09 +03:00
Angira Kekteeva
0460225869 [#272] Fix linter warning
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-10-01 12:25:54 +03:00
Denis Kirillov
3231ecab03 [#263] Add LWW to system objects
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-09-23 20:37:55 +03:00
Denis Kirillov
d616d9e2d9 [#262] Fix status codes
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-09-23 14:22:24 +03:00
Alex Vanin
16296490ee [#264] Adopt minio code distributed with AGPLv3 license in gateway components
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-09-20 10:38:28 +03:00
Alex Vanin
15023b9371 [#264] Add minio code distributed with AGPLv3 license
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-09-20 10:38:28 +03:00
Alex Vanin
5d11d8f556 [#264] Remove minio code distributed with Apache 2.0 license
NeoFS S3 Gate based on Minio RELEASE.2020-07-02T00-15-09Z
code which distributed with Apache 2.0 license. This commit
removes remaining minio code with that license.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-09-20 10:38:28 +03:00
Denis Kirillov
19b917e3b5 [#253] Caches refactoring
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-09-14 10:46:18 +03:00
Denis Kirillov
951eb6fda8 [#253] Add access box cache
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-09-14 10:46:18 +03:00
Denis Kirillov
3c2e25f977 [#248] Support delete marker
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-09-14 09:44:39 +03:00
Denis Kirillov
458f9cf17b [#242] Fix versions sorting
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-09-07 17:06:22 +03:00
Denis Kirillov
42ed6a16ea [#190] Add POST object
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-09-07 11:10:48 +03:00
Angira Kekteeva
b2bf81cec7 [#231] cache: Add unittests for ListObjectsCache
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-09-07 11:08:48 +03:00
Angira Kekteeva
d4a6a3ea2c [#236] cache: Update comments for ListObjectsCache
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-09-07 11:08:48 +03:00
Angira Kekteeva
be08596c22 [#231] cache: Add invalidation of ListObjectsCache
In put operations ListObjectsCache remove entries which can contain
put object

Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-09-07 11:08:48 +03:00
Angira Kekteeva
1ece42b23f [#236] cache: Refactor ListObjectsCache
Replaced map in ListObjectsCache by gcache.
Now ListObjectsCache keeps only objectIDs and
requests ObjectInfo from cache or NeoFS.
Refactored ListObjectsCache keys: removed delimiter and method fields.
Now ListObjectsCache keeps cache with all objects versions.

Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-09-07 11:08:48 +03:00
Angira Kekteeva
1bc2e51cbc [#236] api: Refactor caches: ObjectsList, Objects
Move ObjectsList from layer to cache package
Rename object_cache.go to objects.go

Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-09-07 11:08:48 +03:00
Angira Kekteeva
239742f413 [#236] api: Create info.go for basic structs
Moved BucketInfo and ObjectInfo from layer and handler to api

Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-09-07 11:08:48 +03:00
Denis Kirillov
a9be642eaf [#213] Add object acl versioning
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-31 12:38:23 +03:00
Denis Kirillov
5502fb97c3 [#196] Add tagging caching
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-31 10:46:42 +03:00
Denis Kirillov
987185b9e1 [#196] Add bucket tagging
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-31 10:46:42 +03:00
Denis Kirillov
16da1aba64 [#196] Add DeleteObjectTagging
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-31 10:46:42 +03:00
Denis Kirillov
4a2575fbf3 [#196] Add GetObjectTagging
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-31 10:46:42 +03:00
Denis Kirillov
8b5ebe2ec2 [#196] Add PutObjectTagging
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-31 10:46:42 +03:00
Angira Kekteeva
44a2f1b471 [#234] *: Update go.mod
Remove neofs-node dep
Update versions neofs reps

Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-08-30 17:01:41 +03:00
Angira Kekteeva
dcac1aa3e3 [#230] layer: Change objects_list_cache's key
Remove access_key from objectsListCache key

Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-08-26 12:54:58 +03:00
Kirillov Denis
04b7958ab3
Merge pull request #207 from KirillovDenis/feature/122-poc_versioning
[#122] Add enabling versioning
2021-08-25 15:01:33 +03:00
Denis Kirillov
4bb885d526 [#122] Refactor
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-25 14:49:21 +03:00
Angira Kekteeva
2299db4e81 [#218] handler,s3-gw: Make policy configurable
Now default policy of placing containers can be set via config/env
variable.

Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-08-25 12:18:23 +03:00
Angira Kekteeva
6d4fe34f3d [#218] handler: Remove unused struct
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-08-25 12:18:23 +03:00
Denis Kirillov
11558124cd [#122] Add versioning cache
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-25 09:15:00 +03:00
Denis Kirillov
f6c51cc9ee [#122] Update listObjectVerions
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-25 09:15:00 +03:00
Denis Kirillov
9c058a70fd [#122] Add tests
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-25 09:15:00 +03:00
Denis Kirillov
43185de52a [#122] Add list object versions
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-25 09:15:00 +03:00
Denis Kirillov
d5aef7566f [#122] Add delete versioned object
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-25 09:15:00 +03:00
Denis Kirillov
3130784ee6 [#122] Add getting specific object version
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-25 09:13:12 +03:00
Denis Kirillov
f463522f34 [#122] Add versioning put object
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-25 09:10:46 +03:00
Denis Kirillov
feb45d0633 [#122] Add replacing objects
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-25 09:10:46 +03:00
Denis Kirillov
c50a16a5e3 [#122] Add enabling versioning
New handlers:
PutBucketVersioning, GetBucketVersioning

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-25 09:10:46 +03:00
Denis Kirillov
d81a3d7b45 [#216] Add bucket owner check
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-25 09:07:38 +03:00
Alex Vanin
68e4e1bbc3
Merge pull request #224 from KirillovDenis/feature/220-add_cid_to_head_bucket_response
[#220] Add cid to HeadBucket response
2021-08-24 18:10:13 +03:00
Alex Vanin
036662feab
Merge pull request #222 from KirillovDenis/feature/221-unify_source_filenames
[#221] Unify source file naming
2021-08-24 12:44:23 +03:00
Denis Kirillov
84508a1706 [#220] Add cid to HeadBucket response
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-23 11:37:08 +03:00
Denis Kirillov
76fc241bc1 [#214] Add condition to update eacl
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-20 16:32:51 +03:00
Denis Kirillov
bf3d81f928 [#221] Unify source file naming
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-20 15:19:49 +03:00
Denis Kirillov
efe11c271f [#49] Add basic ACL translation
Implement functions:
GetBucketACL, PutBucketACL, GetObjectACL,
PutObjectACL, GetBucketPolicy, PutBucketPolicy

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-18 17:20:17 +03:00
Angira Kekteeva
b1c6629b10 [#206] Make caches' options configurable
Now caches' options can be configured in .yanl file.
Export caches' variables (listobjects and objects).

Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-08-18 10:16:27 +03:00
Angira Kekteeva
376642565f [#206] Add unit tests
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-08-18 10:16:27 +03:00
Angira Kekteeva
295be71f00 [#206] api: Add objects cache
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-08-18 10:16:27 +03:00
Angira Kekteeva
ae19eb4ad4 [#206] Refactor ListObjectsCache
Replaced conflicting names

Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-08-18 10:16:27 +03:00
Denis Kirillov
4ca56d3d6e [#199] Add fine-grained handle auth header
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-11 13:17:37 +03:00
Denis Kirillov
d332096598 [#199] Refactor
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-11 13:17:37 +03:00
Denis Kirillov
f3a6636efd [#191] Improve copy object compatibility
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-11 12:37:26 +03:00
Denis Kirillov
7eb9713a67 [#189] Add bucket name checking
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-11 12:04:00 +03:00
Kirillov Denis
b555a1b1d8
Merge pull request #181 from masterSplinter01/feature/179-add-cache-to-lov1
Add cache to ListObjectsV1
2021-08-09 14:20:20 +03:00
Angira Kekteeva
3cdcbf6e21 [#179] Add unittests for cache
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-08-09 13:52:11 +03:00
Angira Kekteeva
8a69c7cca0 [#179] api: Add cache for ListObjectsV1/V2
Refactored cache for ListObjects:
made cache common for all versions,
simplified: remove dependendence on token/startafter
add mitable cachelifetime.

Refactored listobjects

Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-08-09 13:52:11 +03:00
Denis Kirillov
a89add8ff3 [#198] Fix object metadata
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-06 15:06:40 +03:00
Denis Kirillov
e5b1dae750 [#194] Fix range header handling
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-06 13:14:50 +03:00
Denis Kirillov
45110b4c5d [#184] Fix typo
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-05 12:29:31 +03:00
Denis Kirillov
f4c29cd300 [#184] Unify error handling
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-05 12:18:52 +03:00
Angira Kekteeva
eaec271283 [#180] api: Add unittests
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-08-03 12:40:28 +03:00
Angira Kekteeva
88aaad361a [#180] api: Add continuation-token check
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-08-03 12:40:02 +03:00
Angira Kekteeva
7291b81040 [#180] api: Format object_list.go
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-07-29 17:31:48 +03:00
Angira Kekteeva
afff616675 [#180] api: Remove extra parses of url requests
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-07-29 17:18:51 +03:00
Angira Kekteeva
0ceea95e11 [#112] Add cache to ListObjects and layer
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-07-28 17:05:11 +03:00
Angira Kekteeva
c24fe5cc21 [#112] Move getBoxData from handler to layer
And made it exported

Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-07-28 16:27:06 +03:00
Angira Kekteeva
97a7d16f68 [#112] api: Refactor allObjectsParams struct
Replaced Bucket (means name) by BucketInfo struct

Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-07-26 23:22:05 +03:00
Denis Kirillov
2479650739 [#118] Correct NotFound status
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-07-26 14:03:26 +03:00
Alex Vanin
f4cd1e4c38
Merge pull request #170 from KirillovDenis/feature/89-placement_policy
[#89] Add placement policy
2021-07-26 13:43:38 +03:00
Denis Kirillov
8aac61652f [#89] Move BoxData to CreateBucketParams
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-07-26 13:35:52 +03:00
Alex Vanin
3f7941fdf3
Merge pull request #174 from nspcc-dev/feature/159-optional_owner
[#159] Add fetch-owner param
2021-07-26 13:32:04 +03:00
Denis Kirillov
c7cf5afd2f [#149] Add benchmarks
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-07-22 09:55:35 +03:00
Denis Kirillov
60bc0037fd [#149] Remove unused
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-07-22 09:55:35 +03:00
Denis Kirillov
28974474f2 [#149] Refactoring
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-07-22 09:55:35 +03:00
Denis Kirillov
63652d213c [#149] Removed grpc errors
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-07-22 09:54:12 +03:00
Denis Kirillov
b695e6a3b4 [#89] Refactor error logging
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-07-22 09:45:24 +03:00
Denis Kirillov
65a61a9f7d [#159] Add fetch-owner param
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-07-20 15:40:38 +03:00
Denis Kirillov
c05e2d6757 [#160] Fix head dir object
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-07-20 12:36:41 +03:00
Angira Kekteeva
b1cda2a714 [#154] api: refactor EncodeV1 and EncodeV2
Move common parts of Encode to separate functions.

Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-07-19 16:38:51 +03:00
Angira Kekteeva
ee84062154 [#154] api: refactor ListObjectsV1 and V2
Separate ListObject for different versions.
Remove useless grouping of keys on V2.

Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-07-19 10:12:47 +03:00