[#1479] tree: Regenerate service protobufs

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
This commit is contained in:
Airat Arifullin 2024-11-07 17:51:33 +03:00
parent 755cae3f19
commit 764450d04a
2 changed files with 1172 additions and 223 deletions

File diff suppressed because it is too large Load diff

View file

@ -11,6 +11,7 @@ import (
easyproto "github.com/VictoriaMetrics/easyproto" easyproto "github.com/VictoriaMetrics/easyproto"
jlexer "github.com/mailru/easyjson/jlexer" jlexer "github.com/mailru/easyjson/jlexer"
jwriter "github.com/mailru/easyjson/jwriter" jwriter "github.com/mailru/easyjson/jwriter"
strconv "strconv"
) )
type KeyValue struct { type KeyValue struct {
@ -113,16 +114,31 @@ func (x *KeyValue) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"key\":" if !first {
out.RawString(prefix[1:]) out.RawByte(',')
} else {
first = false
}
const prefix string = "\"key\":"
out.RawString(prefix)
out.String(x.Key) out.String(x.Key)
} }
{ {
const prefix string = ",\"value\":" if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"value\":"
out.RawString(prefix) out.RawString(prefix)
out.Base64Bytes(x.Value) if x.Value != nil {
out.Base64Bytes(x.Value)
} else {
out.String("")
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -161,7 +177,13 @@ func (x *KeyValue) UnmarshalEasyJSON(in *jlexer.Lexer) {
case "value": case "value":
{ {
var f []byte var f []byte
f = in.Bytes() {
tmp := in.Bytes()
if len(tmp) == 0 {
tmp = nil
}
f = tmp
}
x.Value = f x.Value = f
} }
} }
@ -293,21 +315,45 @@ func (x *LogMove) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"parentID\":" if !first {
out.RawString(prefix[1:]) out.RawByte(',')
out.Uint64(x.ParentId) } else {
first = false
}
const prefix string = "\"parentID\":"
out.RawString(prefix)
out.RawByte('"')
out.Buffer.Buf = strconv.AppendUint(out.Buffer.Buf, x.ParentId, 10)
out.RawByte('"')
} }
{ {
const prefix string = ",\"meta\":" if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"meta\":"
out.RawString(prefix) out.RawString(prefix)
out.Base64Bytes(x.Meta) if x.Meta != nil {
out.Base64Bytes(x.Meta)
} else {
out.String("")
}
} }
{ {
const prefix string = ",\"childID\":" if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"childID\":"
out.RawString(prefix) out.RawString(prefix)
out.Uint64(x.ChildId) out.RawByte('"')
out.Buffer.Buf = strconv.AppendUint(out.Buffer.Buf, x.ChildId, 10)
out.RawByte('"')
} }
out.RawByte('}') out.RawByte('}')
} }
@ -340,19 +386,41 @@ func (x *LogMove) UnmarshalEasyJSON(in *jlexer.Lexer) {
case "parentID": case "parentID":
{ {
var f uint64 var f uint64
f = in.Uint64() r := in.JsonNumber()
n := r.String()
v, err := strconv.ParseUint(n, 10, 64)
if err != nil {
in.AddError(err)
return
}
pv := uint64(v)
f = pv
x.ParentId = f x.ParentId = f
} }
case "meta": case "meta":
{ {
var f []byte var f []byte
f = in.Bytes() {
tmp := in.Bytes()
if len(tmp) == 0 {
tmp = nil
}
f = tmp
}
x.Meta = f x.Meta = f
} }
case "childID": case "childID":
{ {
var f uint64 var f uint64
f = in.Uint64() r := in.JsonNumber()
n := r.String()
v, err := strconv.ParseUint(n, 10, 64)
if err != nil {
in.AddError(err)
return
}
pv := uint64(v)
f = pv
x.ChildId = f x.ChildId = f
} }
} }
@ -464,16 +532,35 @@ func (x *Signature) MarshalEasyJSON(out *jwriter.Writer) {
out.RawString("null") out.RawString("null")
return return
} }
first := true
out.RawByte('{') out.RawByte('{')
{ {
const prefix string = ",\"key\":" if !first {
out.RawString(prefix[1:]) out.RawByte(',')
out.Base64Bytes(x.Key) } else {
first = false
}
const prefix string = "\"key\":"
out.RawString(prefix)
if x.Key != nil {
out.Base64Bytes(x.Key)
} else {
out.String("")
}
} }
{ {
const prefix string = ",\"signature\":" if !first {
out.RawByte(',')
} else {
first = false
}
const prefix string = "\"signature\":"
out.RawString(prefix) out.RawString(prefix)
out.Base64Bytes(x.Sign) if x.Sign != nil {
out.Base64Bytes(x.Sign)
} else {
out.String("")
}
} }
out.RawByte('}') out.RawByte('}')
} }
@ -506,13 +593,25 @@ func (x *Signature) UnmarshalEasyJSON(in *jlexer.Lexer) {
case "key": case "key":
{ {
var f []byte var f []byte
f = in.Bytes() {
tmp := in.Bytes()
if len(tmp) == 0 {
tmp = nil
}
f = tmp
}
x.Key = f x.Key = f
} }
case "signature": case "signature":
{ {
var f []byte var f []byte
f = in.Bytes() {
tmp := in.Bytes()
if len(tmp) == 0 {
tmp = nil
}
f = tmp
}
x.Sign = f x.Sign = f
} }
} }