Core changes:
- `object.ID` moved to new package `oid`;
- `object.Address` moved to new package `address`;
- `pool.Object` interface changes.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Includes:
- fix for unavailable endpoints of client pool,
- session token cache with request retry in case
of missing session token,
- migrated neofs client.
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
Removed connections, logger, neofs because they were moved to sdk repo.
Made changes in downloader, uploader, main.go and app.go via
refactoring of neofs.
Replaced dependencies to removed packages by sdk packages.
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
After discussion, we decided to simplify attribute translation for now. Full translation requires support for UTF-8 values encoded according to RFC 8187/7230, this can be clarified and implemented in further PRs.
1. Remove translation tables
2. Use simple translation rules only, for now ignoring UTF-8 keys and values
- `X-Attribute-NEOFS-` prefixed headers considered well-known system attributes
- System Attribute key is uppercased
- System Attribute key's `-` translates to `_`
- `X-Attribute-` prefixed headers considered regular object attributes
- Normal attribute key is a result of http header prefix trimming
- Value string should be left as is, for now
```
HTTP:
X-Attribute-NEOFS-Expiration-Epoch: 123
X-Attribute-FileName: cat.jpg
NeoFS:
__NEOFS__EXPIRATION_EPOCH: "123"
FileName: "cat.jpg"
```
Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
- It's confusing. If there is no difference, I suggest having the route named after the protocol verb or resulting handler. So it should be either post or upload.
- Don't you find that it would be more understandable without else ifs?
- Why do we need a temporary file here?
- etc
Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
- Maybe it could be rephrased to "attribute name prefixed with X-Attribute-"
- Maybe it worth renaming to userAttributeHeaderPrefix
- Requirement for having only one file uploaded at a time has to be reflected in documentation.
- Maybe this should be reflected in doc
- I'm not sure if missing timestamp attribute should be forced on gateway level. Normally it should be set by app and there should be a way not to set it.
Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
Before, `attr_val` ignores attribute values that contains slashes in it value, now it's fixed.
Update to v0.3.2 with fixing status of connection pool.
Added debug log message when object not found, for debug reasons.
Update .test.env variables prefix, it was changed in one of previous releases.
Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>