frostfs-api-go/session
Evgenii Stratonikov 29f2157563
[#123] protogen: Treat bytes field as non-nullable
In protobuf 3.12 they have added an support for `optional` keyword,
which has made it into the main branch in 3.15.
https://github.com/protocolbuffers/protobuf/blob/main/docs/implementing_proto3_presence.md
https://github.com/protocolbuffers/protobuf/blob/v3.12.0/docs/field_presence.md#presence-in-proto3-apis

This means that without an explicit `optional` keyword field presence
for scalars is not tracked, thus empty string in JSON should be
unmarshaled to a nil byte slice. Relevant decoding code and tests from
protojson:
fb995f184a/internal/impl/message_reflect_field.go (L327)
fb995f184a/encoding/protojson/decode_test.go (L134)
fb995f184a/encoding/protojson/decode_test.go (L156)

We do not support `optional` keyword and the generator will fail if it sees on.
So only implement the default behaviour.

Refs #122

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-10-11 14:40:54 +03:00
..
grpc [#123] protogen: Treat bytes field as non-nullable 2024-10-11 14:40:54 +03:00
test [#106] test: Generate correct data for tests 2024-08-30 13:37:29 +03:00
convert.go [#111] protogen: Emit slice of messages without a pointer 2024-08-28 11:53:08 +03:00
json.go [#72] session: Unify unmarshaling code 2024-04-20 14:19:19 +03:00
marshal.go [#72] session: Unify unmarshaling code 2024-04-20 14:19:19 +03:00
message_test.go Rename package name 2023-03-07 13:42:36 +03:00
status.go Rename package name 2023-03-07 13:42:36 +03:00
status_test.go Rename package name 2023-03-07 13:42:36 +03:00
string.go Rename package name 2023-03-07 13:42:36 +03:00
types.go [#100] session: Introduce ObjectPatch verb 2024-08-06 12:31:11 +03:00
util.go [#68] Makefile: Use gofumpt for formatting 2024-03-14 10:31:58 +03:00
xheaders.go [#27] *: Resolve godot linter warnings 2023-05-03 14:15:56 +03:00