e580ee991d
[ #271 ] Drop handling of system attributes with NeoFS prefix
...
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-09-18 09:59:38 +00:00
46ee543899
[ #265 ] go.mod: Use range
over int
...
Since Go 1.22 a `for` statement with a `range` clause is able
to iterate through integer values from zero to an upper limit.
gopatch script:
@@
var i, e expression
@@
-for i := 0; i <= e - 1; i++ {
+for i := range e {
...
}
@@
var i, e expression
@@
-for i := 0; i <= e; i++ {
+for i := range e + 1 {
...
}
@@
var i, e expression
@@
-for i := 0; i < e; i++ {
+for i := range e {
...
}
Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
2024-09-04 12:37:46 +03:00
9da46f566f
[ #243 ] go.mod: Update api-go
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-07-26 14:13:49 +03:00
56debcfa56
[ #190 ] sdk-go: Gofumpt fixes
...
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-11-22 19:21:20 +03:00
157a9930e8
[ #190 ] sdk-go: Pass user.ID by value
...
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-11-22 19:21:20 +03:00
49ad985cad
[ #161 ] *: Do not use math/rand.Read()
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-09-08 17:17:02 +03:00
d70ef2187b
[ #97 ] Add a method IterateUserAttributes
in Container
...
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
2023-07-10 09:05:01 +00:00
c8e620ad24
[ #53 ] sdk-go: Drop subnet
...
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-04-14 16:31:08 +03:00
25e9336d68
[ #47 ] container: Make readFromV2() pass funlen
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-04-07 08:59:19 +03:00
1395b282fe
[ #47 ] acl: Remove unused resetBit()
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-04-07 08:59:19 +03:00
708d933fe3
[ #47 ] .golangci.yml: Unify with other FrostFS repos
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-04-07 08:59:19 +03:00
bec77f280a
[ #37 ] container: Support legacy sys attributes
...
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2023-03-16 11:14:42 +03:00
94476f9055
Rename package name
...
Due to source code relocation from GitHub.
Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2023-03-07 15:47:21 +03:00
4ff9c00de3
[ #4 ] Rename NeoFS mentions in comments and method names
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2022-12-30 13:40:50 +03:00
Pavel Karpy
4c779423f5
Move to frostfs-sdk-go
...
Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
2022-12-14 09:59:29 +03:00
Evgenii Stratonikov
84888854ab
[ #322 ] *: Go fmt -s
...
go1.19 rewrites comments to proper render them in docs.
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-08-24 18:58:59 +03:00
Leonard Lyubich
7d10b432d1
[ #284 ] *: Return error from all ReadFromV2
methods
...
Return `error` from all `ReadFromV2` methods in order to support
backward compatibility if message will be extended with some formatted
field.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-07-07 14:20:18 +03:00
Pavel Karpy
9996b3be01
[ #240 ] container: Support disabling homomorphic hashing
...
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2022-07-05 15:37:49 +03:00
Leonard Lyubich
2ad89085a3
[ #225 ] container: Clarify docs of Container
type initialization
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-07-04 11:21:16 +03:00
Leonard Lyubich
70845147f6
[ #225 ] container: Refactor and document package functionality
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-07-04 11:21:16 +03:00
Leonard Lyubich
aa5ee1dcde
[ #225 ] container/acl: Make Basic
type numeric
...
Also make well-known values constant not variables.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-06-23 11:05:32 +03:00
Leonard Lyubich
3b15a01327
[ #225 ] container/acl: Fix minor places
...
Make test value generator to be random as documented. Add `default`
keyword to switch-case to avoid linter comments.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-06-23 11:05:32 +03:00
Leonard Lyubich
c4ebe8d854
[ #225 ] container: Replace basic ACL code to a separate package
...
Create `acl` package inside `container` path. Replace basic ACL
functionality into it.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-06-23 11:05:32 +03:00
Leonard Lyubich
e82a2d86ef
[ #225 ] container: Refactor and document basic ACL
...
Replace basic ACL functionality from `acl` package to the `container`
one. Create `BasicACL` type and provide convenient interface to work
with it.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-06-23 11:05:32 +03:00
Leonard Lyubich
721df386c5
[ #276 ] container: Remove session token and signature from Container/eACL
...
Session token and signature isn't presented in `Container` and
`EACLTable` messages of NeoFS API V2 protocol. These entities are needed
for access control and doesn't carry payload of these messages.
Remove `SetSessionToken` / `SessionToken` methods of
`container.Container` and `eacl.Table` types. Provide methods to specify
these components in corresponding `Client` operations.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-06-21 20:03:07 +03:00
Leonard Lyubich
ca523f1ff1
[ #227 ] netmap: Refactor and document package functionality
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-06-15 20:50:32 +03:00
Leonard Lyubich
82d762f536
[ #258 ] Fix string encoding of identifiers
...
Use `EncodeToString` method to get protocol string according to type
docs.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-05-31 12:14:04 +03:00
Leonard Lyubich
6cb513c976
[ #257 ] Upgrade NeoFS API Go module
...
New version contains fix for `object.GetRangeResponse` message type.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-05-31 09:47:55 +03:00
Leonard Lyubich
552c7875bf
[ #197 ] session: Refactor and document the package
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-04-27 11:09:29 +03:00
Leonard Lyubich
1ed426b8a6
[ #199 ] owner: Rename to user
, refactor and doc
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-04-19 18:44:02 +03:00
Leonard Lyubich
ea043f4ca3
[ #190 ] Refactor cryptographic functionality
...
Remove `signature` and `util/signature` packages. Re-implement their
functionality in new `crypto` package. Generalize the approach of
digital signature computation and verification by adding `Signer` and
`PublicKey` primitives similar to standard `crypto` package. Support
already exising in protocol signature schemes.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-04-19 12:55:11 +03:00
Pavel Karpy
1186f2f703
[ #170 ] oid, cid: Add marshal format checks
...
Also add checking presence of the `oid`, `cid` fields via `set` flag.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2022-04-13 17:32:25 +03:00
Pavel Karpy
f7172adf18
[ #170 ] oid, cid: Refactor and document package functionality
...
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2022-04-13 17:32:25 +03:00
Alex Vanin
ade8822a2f
[ #170 ] version: Add docs, refactor
...
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-04-13 10:28:12 +03:00
Alex Vanin
e89a0d88d2
[ #168 ] container: Remove pointer tricks from setAttribute
...
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-03-15 16:59:59 +03:00
Alex Vanin
98d4b5c926
[ #168 ] container: Replace []*Attribute with []Attribute
...
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-03-15 16:59:59 +03:00
Leonard Lyubich
eee9a72a4e
[ #131 ] container: Set current SDK version in New
...
Make `container.New` function to write `version.Current` into created
container.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-02-18 17:01:08 +03:00
Evgenii Stratonikov
596774ce5b
[ #103 ] owner: remove NEO3Wallet type
...
Allow to use public keys and N3 wallet accounts instead.
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-01-21 11:01:44 +03:00
Denis Kirillov
2d597c1be8
[ #106 ] Use BasicACL instead of uint32
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-01-11 11:01:37 +03:00
Evgenii Stratonikov
3d0df0d068
[ #54 ] tests: unify test generator names
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-12-01 10:34:54 +03:00
Evgenii Stratonikov
7627f8376a
[ #60 ] container: rename NewOption
and make code more consistent
...
In all other places we use `Option` as `func`, there is no need in
additional indirection.
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-11-10 10:31:57 +03:00
Evgenii Stratonikov
73686827d3
[ #60 ] container: move package from neofs-api-go
...
Also, remove deprecated methods and types.
Close #60 .
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-11-10 10:31:57 +03:00
Evgenii Stratonikov
372468c320
[ #41 ] container: move id from neofs-api-go
...
Change `Marshal` signature to `Marshal() ([]byte, error)`.
Dependency update in SDK itself should be done after moving client
as `pool` package has some dependent function signatures.
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-11-01 17:52:27 +03:00