-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate type for object header #652
Comments
I always did not understand why there is no header while IMO it is a natural understanding for our HEAD operation and objects in general: every object has a header and every object has a payload. Sometimes we need only a header and vice versa. I have not opened any issues about it. |
Yeah, we need this type, passing |
signature is not a part of header itself https://github.com/nspcc-dev/neofs-api/blob/e66b25d4bf2afc4472023e1e2c2467f694f5a0e1/object/types.proto#L226, so it's transmitted beside https://github.com/nspcc-dev/neofs-api/blob/e66b25d4bf2afc4472023e1e2c2467f694f5a0e1/object/service.proto#L462 |
Header, SignedHeader, Object? |
|
It's so tempting for me to make it a method with cached internal value ( |
cached values are often a source of errors. I would stick with simple tuples with open logic
https://pkg.go.dev/github.com/nspcc-dev/neofs-sdk-go/object#Object.MarshalHeaderJSON is what i remember. https://github.com/nspcc-dev/neo-go/blob/5f92da21fa43e4fe80fb965c78d5d244b6003ffd/pkg/services/oracle/neofs/neofs.go#L185. The various tuples can be used:
and i remember no usecase where we need (ID, signature, header) tuple finally, for now i see |
it must be noted that transition to the heading types must be carried out carefully. For example, ALSO!!!: do not forget about field numbers. |
Is your feature request related to a problem? Please describe.
currently,
object
providesObject
structure type, but noHeader
one. This type would be helpful for HEAD ops (Client
, node storage, etc.). Now such ops return instances of theObject
type with unset payload field. I see following drawbacks in this approach:Describe the solution you'd like
Additional context
iirc @carpawell had questions why there is no header type. I couldnt find any issue, pls share if smth already exists
The text was updated successfully, but these errors were encountered: