package impl
import (
)
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Bool()
return .tagsize + protowire.SizeVarint(protowire.EncodeBool())
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Bool()
= protowire.AppendVarint(, .wiretag)
= protowire.AppendVarint(, protowire.EncodeBool())
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.VarintType {
return , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return , errDecode
}
*.Bool() = protowire.DecodeBool()
.n =
return , nil
}
var coderBool = pointerCoderFuncs{
size: sizeBool,
marshal: appendBool,
unmarshal: consumeBool,
merge: mergeBool,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Bool()
if == false {
return 0
}
return .tagsize + protowire.SizeVarint(protowire.EncodeBool())
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Bool()
if == false {
return , nil
}
= protowire.AppendVarint(, .wiretag)
= protowire.AppendVarint(, protowire.EncodeBool())
return , nil
}
var coderBoolNoZero = pointerCoderFuncs{
size: sizeBoolNoZero,
marshal: appendBoolNoZero,
unmarshal: consumeBool,
merge: mergeBoolNoZero,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= **.BoolPtr()
return .tagsize + protowire.SizeVarint(protowire.EncodeBool())
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= **.BoolPtr()
= protowire.AppendVarint(, .wiretag)
= protowire.AppendVarint(, protowire.EncodeBool())
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.VarintType {
return , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return , errDecode
}
:= .BoolPtr()
if * == nil {
* = new(bool)
}
** = protowire.DecodeBool()
.n =
return , nil
}
var coderBoolPtr = pointerCoderFuncs{
size: sizeBoolPtr,
marshal: appendBoolPtr,
unmarshal: consumeBoolPtr,
merge: mergeBoolPtr,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.BoolSlice()
for , := range {
+= .tagsize + protowire.SizeVarint(protowire.EncodeBool())
}
return
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.BoolSlice()
for , := range {
= protowire.AppendVarint(, .wiretag)
= protowire.AppendVarint(, protowire.EncodeBool())
}
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
:= .BoolSlice()
if == protowire.BytesType {
:= *
, := protowire.ConsumeBytes()
if < 0 {
return , errDecode
}
for len() > 0 {
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return , errDecode
}
= append(, protowire.DecodeBool())
= [:]
}
* =
.n =
return , nil
}
if != protowire.VarintType {
return , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return , errDecode
}
* = append(*, protowire.DecodeBool())
.n =
return , nil
}
var coderBoolSlice = pointerCoderFuncs{
size: sizeBoolSlice,
marshal: appendBoolSlice,
unmarshal: consumeBoolSlice,
merge: mergeBoolSlice,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.BoolSlice()
if len() == 0 {
return 0
}
:= 0
for , := range {
+= protowire.SizeVarint(protowire.EncodeBool())
}
return .tagsize + protowire.SizeBytes()
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.BoolSlice()
if len() == 0 {
return , nil
}
= protowire.AppendVarint(, .wiretag)
:= 0
for , := range {
+= protowire.SizeVarint(protowire.EncodeBool())
}
= protowire.AppendVarint(, uint64())
for , := range {
= protowire.AppendVarint(, protowire.EncodeBool())
}
return , nil
}
var coderBoolPackedSlice = pointerCoderFuncs{
size: sizeBoolPackedSlice,
marshal: appendBoolPackedSlice,
unmarshal: consumeBoolSlice,
merge: mergeBoolSlice,
}
func ( protoreflect.Value, int, marshalOptions) int {
return + protowire.SizeVarint(protowire.EncodeBool(.Bool()))
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
= protowire.AppendVarint(, )
= protowire.AppendVarint(, protowire.EncodeBool(.Bool()))
return , nil
}
func ( []byte, protoreflect.Value, protowire.Number, protowire.Type, unmarshalOptions) ( protoreflect.Value, unmarshalOutput, error) {
if != protowire.VarintType {
return protoreflect.Value{}, , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return protoreflect.Value{}, , errDecode
}
.n =
return protoreflect.ValueOfBool(protowire.DecodeBool()), , nil
}
var coderBoolValue = valueCoderFuncs{
size: sizeBoolValue,
marshal: appendBoolValue,
unmarshal: consumeBoolValue,
merge: mergeScalarValue,
}
func ( protoreflect.Value, int, marshalOptions) ( int) {
:= .List()
for , := 0, .Len(); < ; ++ {
:= .Get()
+= + protowire.SizeVarint(protowire.EncodeBool(.Bool()))
}
return
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
:= .List()
for , := 0, .Len(); < ; ++ {
:= .Get()
= protowire.AppendVarint(, )
= protowire.AppendVarint(, protowire.EncodeBool(.Bool()))
}
return , nil
}
func ( []byte, protoreflect.Value, protowire.Number, protowire.Type, unmarshalOptions) ( protoreflect.Value, unmarshalOutput, error) {
:= .List()
if == protowire.BytesType {
, := protowire.ConsumeBytes()
if < 0 {
return protoreflect.Value{}, , errDecode
}
for len() > 0 {
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return protoreflect.Value{}, , errDecode
}
.Append(protoreflect.ValueOfBool(protowire.DecodeBool()))
= [:]
}
.n =
return , , nil
}
if != protowire.VarintType {
return protoreflect.Value{}, , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return protoreflect.Value{}, , errDecode
}
.Append(protoreflect.ValueOfBool(protowire.DecodeBool()))
.n =
return , , nil
}
var coderBoolSliceValue = valueCoderFuncs{
size: sizeBoolSliceValue,
marshal: appendBoolSliceValue,
unmarshal: consumeBoolSliceValue,
merge: mergeListValue,
}
func ( protoreflect.Value, int, marshalOptions) ( int) {
:= .List()
:= .Len()
if == 0 {
return 0
}
:= 0
for , := 0, ; < ; ++ {
:= .Get()
+= protowire.SizeVarint(protowire.EncodeBool(.Bool()))
}
return + protowire.SizeBytes()
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
:= .List()
:= .Len()
if == 0 {
return , nil
}
= protowire.AppendVarint(, )
:= 0
for := 0; < ; ++ {
:= .Get()
+= protowire.SizeVarint(protowire.EncodeBool(.Bool()))
}
= protowire.AppendVarint(, uint64())
for := 0; < ; ++ {
:= .Get()
= protowire.AppendVarint(, protowire.EncodeBool(.Bool()))
}
return , nil
}
var coderBoolPackedSliceValue = valueCoderFuncs{
size: sizeBoolPackedSliceValue,
marshal: appendBoolPackedSliceValue,
unmarshal: consumeBoolSliceValue,
merge: mergeListValue,
}
func ( protoreflect.Value, int, marshalOptions) int {
return + protowire.SizeVarint(uint64(.Enum()))
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
= protowire.AppendVarint(, )
= protowire.AppendVarint(, uint64(.Enum()))
return , nil
}
func ( []byte, protoreflect.Value, protowire.Number, protowire.Type, unmarshalOptions) ( protoreflect.Value, unmarshalOutput, error) {
if != protowire.VarintType {
return protoreflect.Value{}, , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return protoreflect.Value{}, , errDecode
}
.n =
return protoreflect.ValueOfEnum(protoreflect.EnumNumber()), , nil
}
var coderEnumValue = valueCoderFuncs{
size: sizeEnumValue,
marshal: appendEnumValue,
unmarshal: consumeEnumValue,
merge: mergeScalarValue,
}
func ( protoreflect.Value, int, marshalOptions) ( int) {
:= .List()
for , := 0, .Len(); < ; ++ {
:= .Get()
+= + protowire.SizeVarint(uint64(.Enum()))
}
return
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
:= .List()
for , := 0, .Len(); < ; ++ {
:= .Get()
= protowire.AppendVarint(, )
= protowire.AppendVarint(, uint64(.Enum()))
}
return , nil
}
func ( []byte, protoreflect.Value, protowire.Number, protowire.Type, unmarshalOptions) ( protoreflect.Value, unmarshalOutput, error) {
:= .List()
if == protowire.BytesType {
, := protowire.ConsumeBytes()
if < 0 {
return protoreflect.Value{}, , errDecode
}
for len() > 0 {
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return protoreflect.Value{}, , errDecode
}
.Append(protoreflect.ValueOfEnum(protoreflect.EnumNumber()))
= [:]
}
.n =
return , , nil
}
if != protowire.VarintType {
return protoreflect.Value{}, , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return protoreflect.Value{}, , errDecode
}
.Append(protoreflect.ValueOfEnum(protoreflect.EnumNumber()))
.n =
return , , nil
}
var coderEnumSliceValue = valueCoderFuncs{
size: sizeEnumSliceValue,
marshal: appendEnumSliceValue,
unmarshal: consumeEnumSliceValue,
merge: mergeListValue,
}
func ( protoreflect.Value, int, marshalOptions) ( int) {
:= .List()
:= .Len()
if == 0 {
return 0
}
:= 0
for , := 0, ; < ; ++ {
:= .Get()
+= protowire.SizeVarint(uint64(.Enum()))
}
return + protowire.SizeBytes()
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
:= .List()
:= .Len()
if == 0 {
return , nil
}
= protowire.AppendVarint(, )
:= 0
for := 0; < ; ++ {
:= .Get()
+= protowire.SizeVarint(uint64(.Enum()))
}
= protowire.AppendVarint(, uint64())
for := 0; < ; ++ {
:= .Get()
= protowire.AppendVarint(, uint64(.Enum()))
}
return , nil
}
var coderEnumPackedSliceValue = valueCoderFuncs{
size: sizeEnumPackedSliceValue,
marshal: appendEnumPackedSliceValue,
unmarshal: consumeEnumSliceValue,
merge: mergeListValue,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Int32()
return .tagsize + protowire.SizeVarint(uint64())
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Int32()
= protowire.AppendVarint(, .wiretag)
= protowire.AppendVarint(, uint64())
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.VarintType {
return , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return , errDecode
}
*.Int32() = int32()
.n =
return , nil
}
var coderInt32 = pointerCoderFuncs{
size: sizeInt32,
marshal: appendInt32,
unmarshal: consumeInt32,
merge: mergeInt32,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Int32()
if == 0 {
return 0
}
return .tagsize + protowire.SizeVarint(uint64())
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Int32()
if == 0 {
return , nil
}
= protowire.AppendVarint(, .wiretag)
= protowire.AppendVarint(, uint64())
return , nil
}
var coderInt32NoZero = pointerCoderFuncs{
size: sizeInt32NoZero,
marshal: appendInt32NoZero,
unmarshal: consumeInt32,
merge: mergeInt32NoZero,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= **.Int32Ptr()
return .tagsize + protowire.SizeVarint(uint64())
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= **.Int32Ptr()
= protowire.AppendVarint(, .wiretag)
= protowire.AppendVarint(, uint64())
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.VarintType {
return , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return , errDecode
}
:= .Int32Ptr()
if * == nil {
* = new(int32)
}
** = int32()
.n =
return , nil
}
var coderInt32Ptr = pointerCoderFuncs{
size: sizeInt32Ptr,
marshal: appendInt32Ptr,
unmarshal: consumeInt32Ptr,
merge: mergeInt32Ptr,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Int32Slice()
for , := range {
+= .tagsize + protowire.SizeVarint(uint64())
}
return
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Int32Slice()
for , := range {
= protowire.AppendVarint(, .wiretag)
= protowire.AppendVarint(, uint64())
}
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
:= .Int32Slice()
if == protowire.BytesType {
:= *
, := protowire.ConsumeBytes()
if < 0 {
return , errDecode
}
for len() > 0 {
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return , errDecode
}
= append(, int32())
= [:]
}
* =
.n =
return , nil
}
if != protowire.VarintType {
return , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return , errDecode
}
* = append(*, int32())
.n =
return , nil
}
var coderInt32Slice = pointerCoderFuncs{
size: sizeInt32Slice,
marshal: appendInt32Slice,
unmarshal: consumeInt32Slice,
merge: mergeInt32Slice,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Int32Slice()
if len() == 0 {
return 0
}
:= 0
for , := range {
+= protowire.SizeVarint(uint64())
}
return .tagsize + protowire.SizeBytes()
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Int32Slice()
if len() == 0 {
return , nil
}
= protowire.AppendVarint(, .wiretag)
:= 0
for , := range {
+= protowire.SizeVarint(uint64())
}
= protowire.AppendVarint(, uint64())
for , := range {
= protowire.AppendVarint(, uint64())
}
return , nil
}
var coderInt32PackedSlice = pointerCoderFuncs{
size: sizeInt32PackedSlice,
marshal: appendInt32PackedSlice,
unmarshal: consumeInt32Slice,
merge: mergeInt32Slice,
}
func ( protoreflect.Value, int, marshalOptions) int {
return + protowire.SizeVarint(uint64(int32(.Int())))
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
= protowire.AppendVarint(, )
= protowire.AppendVarint(, uint64(int32(.Int())))
return , nil
}
func ( []byte, protoreflect.Value, protowire.Number, protowire.Type, unmarshalOptions) ( protoreflect.Value, unmarshalOutput, error) {
if != protowire.VarintType {
return protoreflect.Value{}, , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return protoreflect.Value{}, , errDecode
}
.n =
return protoreflect.ValueOfInt32(int32()), , nil
}
var coderInt32Value = valueCoderFuncs{
size: sizeInt32Value,
marshal: appendInt32Value,
unmarshal: consumeInt32Value,
merge: mergeScalarValue,
}
func ( protoreflect.Value, int, marshalOptions) ( int) {
:= .List()
for , := 0, .Len(); < ; ++ {
:= .Get()
+= + protowire.SizeVarint(uint64(int32(.Int())))
}
return
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
:= .List()
for , := 0, .Len(); < ; ++ {
:= .Get()
= protowire.AppendVarint(, )
= protowire.AppendVarint(, uint64(int32(.Int())))
}
return , nil
}
func ( []byte, protoreflect.Value, protowire.Number, protowire.Type, unmarshalOptions) ( protoreflect.Value, unmarshalOutput, error) {
:= .List()
if == protowire.BytesType {
, := protowire.ConsumeBytes()
if < 0 {
return protoreflect.Value{}, , errDecode
}
for len() > 0 {
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return protoreflect.Value{}, , errDecode
}
.Append(protoreflect.ValueOfInt32(int32()))
= [:]
}
.n =
return , , nil
}
if != protowire.VarintType {
return protoreflect.Value{}, , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return protoreflect.Value{}, , errDecode
}
.Append(protoreflect.ValueOfInt32(int32()))
.n =
return , , nil
}
var coderInt32SliceValue = valueCoderFuncs{
size: sizeInt32SliceValue,
marshal: appendInt32SliceValue,
unmarshal: consumeInt32SliceValue,
merge: mergeListValue,
}
func ( protoreflect.Value, int, marshalOptions) ( int) {
:= .List()
:= .Len()
if == 0 {
return 0
}
:= 0
for , := 0, ; < ; ++ {
:= .Get()
+= protowire.SizeVarint(uint64(int32(.Int())))
}
return + protowire.SizeBytes()
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
:= .List()
:= .Len()
if == 0 {
return , nil
}
= protowire.AppendVarint(, )
:= 0
for := 0; < ; ++ {
:= .Get()
+= protowire.SizeVarint(uint64(int32(.Int())))
}
= protowire.AppendVarint(, uint64())
for := 0; < ; ++ {
:= .Get()
= protowire.AppendVarint(, uint64(int32(.Int())))
}
return , nil
}
var coderInt32PackedSliceValue = valueCoderFuncs{
size: sizeInt32PackedSliceValue,
marshal: appendInt32PackedSliceValue,
unmarshal: consumeInt32SliceValue,
merge: mergeListValue,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Int32()
return .tagsize + protowire.SizeVarint(protowire.EncodeZigZag(int64()))
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Int32()
= protowire.AppendVarint(, .wiretag)
= protowire.AppendVarint(, protowire.EncodeZigZag(int64()))
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.VarintType {
return , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return , errDecode
}
*.Int32() = int32(protowire.DecodeZigZag( & math.MaxUint32))
.n =
return , nil
}
var coderSint32 = pointerCoderFuncs{
size: sizeSint32,
marshal: appendSint32,
unmarshal: consumeSint32,
merge: mergeInt32,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Int32()
if == 0 {
return 0
}
return .tagsize + protowire.SizeVarint(protowire.EncodeZigZag(int64()))
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Int32()
if == 0 {
return , nil
}
= protowire.AppendVarint(, .wiretag)
= protowire.AppendVarint(, protowire.EncodeZigZag(int64()))
return , nil
}
var coderSint32NoZero = pointerCoderFuncs{
size: sizeSint32NoZero,
marshal: appendSint32NoZero,
unmarshal: consumeSint32,
merge: mergeInt32NoZero,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= **.Int32Ptr()
return .tagsize + protowire.SizeVarint(protowire.EncodeZigZag(int64()))
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= **.Int32Ptr()
= protowire.AppendVarint(, .wiretag)
= protowire.AppendVarint(, protowire.EncodeZigZag(int64()))
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.VarintType {
return , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return , errDecode
}
:= .Int32Ptr()
if * == nil {
* = new(int32)
}
** = int32(protowire.DecodeZigZag( & math.MaxUint32))
.n =
return , nil
}
var coderSint32Ptr = pointerCoderFuncs{
size: sizeSint32Ptr,
marshal: appendSint32Ptr,
unmarshal: consumeSint32Ptr,
merge: mergeInt32Ptr,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Int32Slice()
for , := range {
+= .tagsize + protowire.SizeVarint(protowire.EncodeZigZag(int64()))
}
return
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Int32Slice()
for , := range {
= protowire.AppendVarint(, .wiretag)
= protowire.AppendVarint(, protowire.EncodeZigZag(int64()))
}
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
:= .Int32Slice()
if == protowire.BytesType {
:= *
, := protowire.ConsumeBytes()
if < 0 {
return , errDecode
}
for len() > 0 {
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return , errDecode
}
= append(, int32(protowire.DecodeZigZag(&math.MaxUint32)))
= [:]
}
* =
.n =
return , nil
}
if != protowire.VarintType {
return , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return , errDecode
}
* = append(*, int32(protowire.DecodeZigZag(&math.MaxUint32)))
.n =
return , nil
}
var coderSint32Slice = pointerCoderFuncs{
size: sizeSint32Slice,
marshal: appendSint32Slice,
unmarshal: consumeSint32Slice,
merge: mergeInt32Slice,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Int32Slice()
if len() == 0 {
return 0
}
:= 0
for , := range {
+= protowire.SizeVarint(protowire.EncodeZigZag(int64()))
}
return .tagsize + protowire.SizeBytes()
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Int32Slice()
if len() == 0 {
return , nil
}
= protowire.AppendVarint(, .wiretag)
:= 0
for , := range {
+= protowire.SizeVarint(protowire.EncodeZigZag(int64()))
}
= protowire.AppendVarint(, uint64())
for , := range {
= protowire.AppendVarint(, protowire.EncodeZigZag(int64()))
}
return , nil
}
var coderSint32PackedSlice = pointerCoderFuncs{
size: sizeSint32PackedSlice,
marshal: appendSint32PackedSlice,
unmarshal: consumeSint32Slice,
merge: mergeInt32Slice,
}
func ( protoreflect.Value, int, marshalOptions) int {
return + protowire.SizeVarint(protowire.EncodeZigZag(int64(int32(.Int()))))
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
= protowire.AppendVarint(, )
= protowire.AppendVarint(, protowire.EncodeZigZag(int64(int32(.Int()))))
return , nil
}
func ( []byte, protoreflect.Value, protowire.Number, protowire.Type, unmarshalOptions) ( protoreflect.Value, unmarshalOutput, error) {
if != protowire.VarintType {
return protoreflect.Value{}, , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return protoreflect.Value{}, , errDecode
}
.n =
return protoreflect.ValueOfInt32(int32(protowire.DecodeZigZag( & math.MaxUint32))), , nil
}
var coderSint32Value = valueCoderFuncs{
size: sizeSint32Value,
marshal: appendSint32Value,
unmarshal: consumeSint32Value,
merge: mergeScalarValue,
}
func ( protoreflect.Value, int, marshalOptions) ( int) {
:= .List()
for , := 0, .Len(); < ; ++ {
:= .Get()
+= + protowire.SizeVarint(protowire.EncodeZigZag(int64(int32(.Int()))))
}
return
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
:= .List()
for , := 0, .Len(); < ; ++ {
:= .Get()
= protowire.AppendVarint(, )
= protowire.AppendVarint(, protowire.EncodeZigZag(int64(int32(.Int()))))
}
return , nil
}
func ( []byte, protoreflect.Value, protowire.Number, protowire.Type, unmarshalOptions) ( protoreflect.Value, unmarshalOutput, error) {
:= .List()
if == protowire.BytesType {
, := protowire.ConsumeBytes()
if < 0 {
return protoreflect.Value{}, , errDecode
}
for len() > 0 {
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return protoreflect.Value{}, , errDecode
}
.Append(protoreflect.ValueOfInt32(int32(protowire.DecodeZigZag( & math.MaxUint32))))
= [:]
}
.n =
return , , nil
}
if != protowire.VarintType {
return protoreflect.Value{}, , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return protoreflect.Value{}, , errDecode
}
.Append(protoreflect.ValueOfInt32(int32(protowire.DecodeZigZag( & math.MaxUint32))))
.n =
return , , nil
}
var coderSint32SliceValue = valueCoderFuncs{
size: sizeSint32SliceValue,
marshal: appendSint32SliceValue,
unmarshal: consumeSint32SliceValue,
merge: mergeListValue,
}
func ( protoreflect.Value, int, marshalOptions) ( int) {
:= .List()
:= .Len()
if == 0 {
return 0
}
:= 0
for , := 0, ; < ; ++ {
:= .Get()
+= protowire.SizeVarint(protowire.EncodeZigZag(int64(int32(.Int()))))
}
return + protowire.SizeBytes()
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
:= .List()
:= .Len()
if == 0 {
return , nil
}
= protowire.AppendVarint(, )
:= 0
for := 0; < ; ++ {
:= .Get()
+= protowire.SizeVarint(protowire.EncodeZigZag(int64(int32(.Int()))))
}
= protowire.AppendVarint(, uint64())
for := 0; < ; ++ {
:= .Get()
= protowire.AppendVarint(, protowire.EncodeZigZag(int64(int32(.Int()))))
}
return , nil
}
var coderSint32PackedSliceValue = valueCoderFuncs{
size: sizeSint32PackedSliceValue,
marshal: appendSint32PackedSliceValue,
unmarshal: consumeSint32SliceValue,
merge: mergeListValue,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Uint32()
return .tagsize + protowire.SizeVarint(uint64())
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Uint32()
= protowire.AppendVarint(, .wiretag)
= protowire.AppendVarint(, uint64())
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.VarintType {
return , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return , errDecode
}
*.Uint32() = uint32()
.n =
return , nil
}
var coderUint32 = pointerCoderFuncs{
size: sizeUint32,
marshal: appendUint32,
unmarshal: consumeUint32,
merge: mergeUint32,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Uint32()
if == 0 {
return 0
}
return .tagsize + protowire.SizeVarint(uint64())
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Uint32()
if == 0 {
return , nil
}
= protowire.AppendVarint(, .wiretag)
= protowire.AppendVarint(, uint64())
return , nil
}
var coderUint32NoZero = pointerCoderFuncs{
size: sizeUint32NoZero,
marshal: appendUint32NoZero,
unmarshal: consumeUint32,
merge: mergeUint32NoZero,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= **.Uint32Ptr()
return .tagsize + protowire.SizeVarint(uint64())
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= **.Uint32Ptr()
= protowire.AppendVarint(, .wiretag)
= protowire.AppendVarint(, uint64())
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.VarintType {
return , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return , errDecode
}
:= .Uint32Ptr()
if * == nil {
* = new(uint32)
}
** = uint32()
.n =
return , nil
}
var coderUint32Ptr = pointerCoderFuncs{
size: sizeUint32Ptr,
marshal: appendUint32Ptr,
unmarshal: consumeUint32Ptr,
merge: mergeUint32Ptr,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Uint32Slice()
for , := range {
+= .tagsize + protowire.SizeVarint(uint64())
}
return
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Uint32Slice()
for , := range {
= protowire.AppendVarint(, .wiretag)
= protowire.AppendVarint(, uint64())
}
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
:= .Uint32Slice()
if == protowire.BytesType {
:= *
, := protowire.ConsumeBytes()
if < 0 {
return , errDecode
}
for len() > 0 {
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return , errDecode
}
= append(, uint32())
= [:]
}
* =
.n =
return , nil
}
if != protowire.VarintType {
return , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return , errDecode
}
* = append(*, uint32())
.n =
return , nil
}
var coderUint32Slice = pointerCoderFuncs{
size: sizeUint32Slice,
marshal: appendUint32Slice,
unmarshal: consumeUint32Slice,
merge: mergeUint32Slice,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Uint32Slice()
if len() == 0 {
return 0
}
:= 0
for , := range {
+= protowire.SizeVarint(uint64())
}
return .tagsize + protowire.SizeBytes()
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Uint32Slice()
if len() == 0 {
return , nil
}
= protowire.AppendVarint(, .wiretag)
:= 0
for , := range {
+= protowire.SizeVarint(uint64())
}
= protowire.AppendVarint(, uint64())
for , := range {
= protowire.AppendVarint(, uint64())
}
return , nil
}
var coderUint32PackedSlice = pointerCoderFuncs{
size: sizeUint32PackedSlice,
marshal: appendUint32PackedSlice,
unmarshal: consumeUint32Slice,
merge: mergeUint32Slice,
}
func ( protoreflect.Value, int, marshalOptions) int {
return + protowire.SizeVarint(uint64(uint32(.Uint())))
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
= protowire.AppendVarint(, )
= protowire.AppendVarint(, uint64(uint32(.Uint())))
return , nil
}
func ( []byte, protoreflect.Value, protowire.Number, protowire.Type, unmarshalOptions) ( protoreflect.Value, unmarshalOutput, error) {
if != protowire.VarintType {
return protoreflect.Value{}, , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return protoreflect.Value{}, , errDecode
}
.n =
return protoreflect.ValueOfUint32(uint32()), , nil
}
var coderUint32Value = valueCoderFuncs{
size: sizeUint32Value,
marshal: appendUint32Value,
unmarshal: consumeUint32Value,
merge: mergeScalarValue,
}
func ( protoreflect.Value, int, marshalOptions) ( int) {
:= .List()
for , := 0, .Len(); < ; ++ {
:= .Get()
+= + protowire.SizeVarint(uint64(uint32(.Uint())))
}
return
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
:= .List()
for , := 0, .Len(); < ; ++ {
:= .Get()
= protowire.AppendVarint(, )
= protowire.AppendVarint(, uint64(uint32(.Uint())))
}
return , nil
}
func ( []byte, protoreflect.Value, protowire.Number, protowire.Type, unmarshalOptions) ( protoreflect.Value, unmarshalOutput, error) {
:= .List()
if == protowire.BytesType {
, := protowire.ConsumeBytes()
if < 0 {
return protoreflect.Value{}, , errDecode
}
for len() > 0 {
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return protoreflect.Value{}, , errDecode
}
.Append(protoreflect.ValueOfUint32(uint32()))
= [:]
}
.n =
return , , nil
}
if != protowire.VarintType {
return protoreflect.Value{}, , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return protoreflect.Value{}, , errDecode
}
.Append(protoreflect.ValueOfUint32(uint32()))
.n =
return , , nil
}
var coderUint32SliceValue = valueCoderFuncs{
size: sizeUint32SliceValue,
marshal: appendUint32SliceValue,
unmarshal: consumeUint32SliceValue,
merge: mergeListValue,
}
func ( protoreflect.Value, int, marshalOptions) ( int) {
:= .List()
:= .Len()
if == 0 {
return 0
}
:= 0
for , := 0, ; < ; ++ {
:= .Get()
+= protowire.SizeVarint(uint64(uint32(.Uint())))
}
return + protowire.SizeBytes()
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
:= .List()
:= .Len()
if == 0 {
return , nil
}
= protowire.AppendVarint(, )
:= 0
for := 0; < ; ++ {
:= .Get()
+= protowire.SizeVarint(uint64(uint32(.Uint())))
}
= protowire.AppendVarint(, uint64())
for := 0; < ; ++ {
:= .Get()
= protowire.AppendVarint(, uint64(uint32(.Uint())))
}
return , nil
}
var coderUint32PackedSliceValue = valueCoderFuncs{
size: sizeUint32PackedSliceValue,
marshal: appendUint32PackedSliceValue,
unmarshal: consumeUint32SliceValue,
merge: mergeListValue,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Int64()
return .tagsize + protowire.SizeVarint(uint64())
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Int64()
= protowire.AppendVarint(, .wiretag)
= protowire.AppendVarint(, uint64())
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.VarintType {
return , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return , errDecode
}
*.Int64() = int64()
.n =
return , nil
}
var coderInt64 = pointerCoderFuncs{
size: sizeInt64,
marshal: appendInt64,
unmarshal: consumeInt64,
merge: mergeInt64,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Int64()
if == 0 {
return 0
}
return .tagsize + protowire.SizeVarint(uint64())
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Int64()
if == 0 {
return , nil
}
= protowire.AppendVarint(, .wiretag)
= protowire.AppendVarint(, uint64())
return , nil
}
var coderInt64NoZero = pointerCoderFuncs{
size: sizeInt64NoZero,
marshal: appendInt64NoZero,
unmarshal: consumeInt64,
merge: mergeInt64NoZero,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= **.Int64Ptr()
return .tagsize + protowire.SizeVarint(uint64())
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= **.Int64Ptr()
= protowire.AppendVarint(, .wiretag)
= protowire.AppendVarint(, uint64())
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.VarintType {
return , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return , errDecode
}
:= .Int64Ptr()
if * == nil {
* = new(int64)
}
** = int64()
.n =
return , nil
}
var coderInt64Ptr = pointerCoderFuncs{
size: sizeInt64Ptr,
marshal: appendInt64Ptr,
unmarshal: consumeInt64Ptr,
merge: mergeInt64Ptr,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Int64Slice()
for , := range {
+= .tagsize + protowire.SizeVarint(uint64())
}
return
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Int64Slice()
for , := range {
= protowire.AppendVarint(, .wiretag)
= protowire.AppendVarint(, uint64())
}
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
:= .Int64Slice()
if == protowire.BytesType {
:= *
, := protowire.ConsumeBytes()
if < 0 {
return , errDecode
}
for len() > 0 {
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return , errDecode
}
= append(, int64())
= [:]
}
* =
.n =
return , nil
}
if != protowire.VarintType {
return , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return , errDecode
}
* = append(*, int64())
.n =
return , nil
}
var coderInt64Slice = pointerCoderFuncs{
size: sizeInt64Slice,
marshal: appendInt64Slice,
unmarshal: consumeInt64Slice,
merge: mergeInt64Slice,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Int64Slice()
if len() == 0 {
return 0
}
:= 0
for , := range {
+= protowire.SizeVarint(uint64())
}
return .tagsize + protowire.SizeBytes()
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Int64Slice()
if len() == 0 {
return , nil
}
= protowire.AppendVarint(, .wiretag)
:= 0
for , := range {
+= protowire.SizeVarint(uint64())
}
= protowire.AppendVarint(, uint64())
for , := range {
= protowire.AppendVarint(, uint64())
}
return , nil
}
var coderInt64PackedSlice = pointerCoderFuncs{
size: sizeInt64PackedSlice,
marshal: appendInt64PackedSlice,
unmarshal: consumeInt64Slice,
merge: mergeInt64Slice,
}
func ( protoreflect.Value, int, marshalOptions) int {
return + protowire.SizeVarint(uint64(.Int()))
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
= protowire.AppendVarint(, )
= protowire.AppendVarint(, uint64(.Int()))
return , nil
}
func ( []byte, protoreflect.Value, protowire.Number, protowire.Type, unmarshalOptions) ( protoreflect.Value, unmarshalOutput, error) {
if != protowire.VarintType {
return protoreflect.Value{}, , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return protoreflect.Value{}, , errDecode
}
.n =
return protoreflect.ValueOfInt64(int64()), , nil
}
var coderInt64Value = valueCoderFuncs{
size: sizeInt64Value,
marshal: appendInt64Value,
unmarshal: consumeInt64Value,
merge: mergeScalarValue,
}
func ( protoreflect.Value, int, marshalOptions) ( int) {
:= .List()
for , := 0, .Len(); < ; ++ {
:= .Get()
+= + protowire.SizeVarint(uint64(.Int()))
}
return
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
:= .List()
for , := 0, .Len(); < ; ++ {
:= .Get()
= protowire.AppendVarint(, )
= protowire.AppendVarint(, uint64(.Int()))
}
return , nil
}
func ( []byte, protoreflect.Value, protowire.Number, protowire.Type, unmarshalOptions) ( protoreflect.Value, unmarshalOutput, error) {
:= .List()
if == protowire.BytesType {
, := protowire.ConsumeBytes()
if < 0 {
return protoreflect.Value{}, , errDecode
}
for len() > 0 {
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return protoreflect.Value{}, , errDecode
}
.Append(protoreflect.ValueOfInt64(int64()))
= [:]
}
.n =
return , , nil
}
if != protowire.VarintType {
return protoreflect.Value{}, , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return protoreflect.Value{}, , errDecode
}
.Append(protoreflect.ValueOfInt64(int64()))
.n =
return , , nil
}
var coderInt64SliceValue = valueCoderFuncs{
size: sizeInt64SliceValue,
marshal: appendInt64SliceValue,
unmarshal: consumeInt64SliceValue,
merge: mergeListValue,
}
func ( protoreflect.Value, int, marshalOptions) ( int) {
:= .List()
:= .Len()
if == 0 {
return 0
}
:= 0
for , := 0, ; < ; ++ {
:= .Get()
+= protowire.SizeVarint(uint64(.Int()))
}
return + protowire.SizeBytes()
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
:= .List()
:= .Len()
if == 0 {
return , nil
}
= protowire.AppendVarint(, )
:= 0
for := 0; < ; ++ {
:= .Get()
+= protowire.SizeVarint(uint64(.Int()))
}
= protowire.AppendVarint(, uint64())
for := 0; < ; ++ {
:= .Get()
= protowire.AppendVarint(, uint64(.Int()))
}
return , nil
}
var coderInt64PackedSliceValue = valueCoderFuncs{
size: sizeInt64PackedSliceValue,
marshal: appendInt64PackedSliceValue,
unmarshal: consumeInt64SliceValue,
merge: mergeListValue,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Int64()
return .tagsize + protowire.SizeVarint(protowire.EncodeZigZag())
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Int64()
= protowire.AppendVarint(, .wiretag)
= protowire.AppendVarint(, protowire.EncodeZigZag())
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.VarintType {
return , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return , errDecode
}
*.Int64() = protowire.DecodeZigZag()
.n =
return , nil
}
var coderSint64 = pointerCoderFuncs{
size: sizeSint64,
marshal: appendSint64,
unmarshal: consumeSint64,
merge: mergeInt64,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Int64()
if == 0 {
return 0
}
return .tagsize + protowire.SizeVarint(protowire.EncodeZigZag())
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Int64()
if == 0 {
return , nil
}
= protowire.AppendVarint(, .wiretag)
= protowire.AppendVarint(, protowire.EncodeZigZag())
return , nil
}
var coderSint64NoZero = pointerCoderFuncs{
size: sizeSint64NoZero,
marshal: appendSint64NoZero,
unmarshal: consumeSint64,
merge: mergeInt64NoZero,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= **.Int64Ptr()
return .tagsize + protowire.SizeVarint(protowire.EncodeZigZag())
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= **.Int64Ptr()
= protowire.AppendVarint(, .wiretag)
= protowire.AppendVarint(, protowire.EncodeZigZag())
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.VarintType {
return , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return , errDecode
}
:= .Int64Ptr()
if * == nil {
* = new(int64)
}
** = protowire.DecodeZigZag()
.n =
return , nil
}
var coderSint64Ptr = pointerCoderFuncs{
size: sizeSint64Ptr,
marshal: appendSint64Ptr,
unmarshal: consumeSint64Ptr,
merge: mergeInt64Ptr,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Int64Slice()
for , := range {
+= .tagsize + protowire.SizeVarint(protowire.EncodeZigZag())
}
return
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Int64Slice()
for , := range {
= protowire.AppendVarint(, .wiretag)
= protowire.AppendVarint(, protowire.EncodeZigZag())
}
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
:= .Int64Slice()
if == protowire.BytesType {
:= *
, := protowire.ConsumeBytes()
if < 0 {
return , errDecode
}
for len() > 0 {
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return , errDecode
}
= append(, protowire.DecodeZigZag())
= [:]
}
* =
.n =
return , nil
}
if != protowire.VarintType {
return , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return , errDecode
}
* = append(*, protowire.DecodeZigZag())
.n =
return , nil
}
var coderSint64Slice = pointerCoderFuncs{
size: sizeSint64Slice,
marshal: appendSint64Slice,
unmarshal: consumeSint64Slice,
merge: mergeInt64Slice,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Int64Slice()
if len() == 0 {
return 0
}
:= 0
for , := range {
+= protowire.SizeVarint(protowire.EncodeZigZag())
}
return .tagsize + protowire.SizeBytes()
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Int64Slice()
if len() == 0 {
return , nil
}
= protowire.AppendVarint(, .wiretag)
:= 0
for , := range {
+= protowire.SizeVarint(protowire.EncodeZigZag())
}
= protowire.AppendVarint(, uint64())
for , := range {
= protowire.AppendVarint(, protowire.EncodeZigZag())
}
return , nil
}
var coderSint64PackedSlice = pointerCoderFuncs{
size: sizeSint64PackedSlice,
marshal: appendSint64PackedSlice,
unmarshal: consumeSint64Slice,
merge: mergeInt64Slice,
}
func ( protoreflect.Value, int, marshalOptions) int {
return + protowire.SizeVarint(protowire.EncodeZigZag(.Int()))
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
= protowire.AppendVarint(, )
= protowire.AppendVarint(, protowire.EncodeZigZag(.Int()))
return , nil
}
func ( []byte, protoreflect.Value, protowire.Number, protowire.Type, unmarshalOptions) ( protoreflect.Value, unmarshalOutput, error) {
if != protowire.VarintType {
return protoreflect.Value{}, , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return protoreflect.Value{}, , errDecode
}
.n =
return protoreflect.ValueOfInt64(protowire.DecodeZigZag()), , nil
}
var coderSint64Value = valueCoderFuncs{
size: sizeSint64Value,
marshal: appendSint64Value,
unmarshal: consumeSint64Value,
merge: mergeScalarValue,
}
func ( protoreflect.Value, int, marshalOptions) ( int) {
:= .List()
for , := 0, .Len(); < ; ++ {
:= .Get()
+= + protowire.SizeVarint(protowire.EncodeZigZag(.Int()))
}
return
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
:= .List()
for , := 0, .Len(); < ; ++ {
:= .Get()
= protowire.AppendVarint(, )
= protowire.AppendVarint(, protowire.EncodeZigZag(.Int()))
}
return , nil
}
func ( []byte, protoreflect.Value, protowire.Number, protowire.Type, unmarshalOptions) ( protoreflect.Value, unmarshalOutput, error) {
:= .List()
if == protowire.BytesType {
, := protowire.ConsumeBytes()
if < 0 {
return protoreflect.Value{}, , errDecode
}
for len() > 0 {
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return protoreflect.Value{}, , errDecode
}
.Append(protoreflect.ValueOfInt64(protowire.DecodeZigZag()))
= [:]
}
.n =
return , , nil
}
if != protowire.VarintType {
return protoreflect.Value{}, , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return protoreflect.Value{}, , errDecode
}
.Append(protoreflect.ValueOfInt64(protowire.DecodeZigZag()))
.n =
return , , nil
}
var coderSint64SliceValue = valueCoderFuncs{
size: sizeSint64SliceValue,
marshal: appendSint64SliceValue,
unmarshal: consumeSint64SliceValue,
merge: mergeListValue,
}
func ( protoreflect.Value, int, marshalOptions) ( int) {
:= .List()
:= .Len()
if == 0 {
return 0
}
:= 0
for , := 0, ; < ; ++ {
:= .Get()
+= protowire.SizeVarint(protowire.EncodeZigZag(.Int()))
}
return + protowire.SizeBytes()
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
:= .List()
:= .Len()
if == 0 {
return , nil
}
= protowire.AppendVarint(, )
:= 0
for := 0; < ; ++ {
:= .Get()
+= protowire.SizeVarint(protowire.EncodeZigZag(.Int()))
}
= protowire.AppendVarint(, uint64())
for := 0; < ; ++ {
:= .Get()
= protowire.AppendVarint(, protowire.EncodeZigZag(.Int()))
}
return , nil
}
var coderSint64PackedSliceValue = valueCoderFuncs{
size: sizeSint64PackedSliceValue,
marshal: appendSint64PackedSliceValue,
unmarshal: consumeSint64SliceValue,
merge: mergeListValue,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Uint64()
return .tagsize + protowire.SizeVarint()
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Uint64()
= protowire.AppendVarint(, .wiretag)
= protowire.AppendVarint(, )
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.VarintType {
return , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return , errDecode
}
*.Uint64() =
.n =
return , nil
}
var coderUint64 = pointerCoderFuncs{
size: sizeUint64,
marshal: appendUint64,
unmarshal: consumeUint64,
merge: mergeUint64,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Uint64()
if == 0 {
return 0
}
return .tagsize + protowire.SizeVarint()
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Uint64()
if == 0 {
return , nil
}
= protowire.AppendVarint(, .wiretag)
= protowire.AppendVarint(, )
return , nil
}
var coderUint64NoZero = pointerCoderFuncs{
size: sizeUint64NoZero,
marshal: appendUint64NoZero,
unmarshal: consumeUint64,
merge: mergeUint64NoZero,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= **.Uint64Ptr()
return .tagsize + protowire.SizeVarint()
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= **.Uint64Ptr()
= protowire.AppendVarint(, .wiretag)
= protowire.AppendVarint(, )
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.VarintType {
return , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return , errDecode
}
:= .Uint64Ptr()
if * == nil {
* = new(uint64)
}
** =
.n =
return , nil
}
var coderUint64Ptr = pointerCoderFuncs{
size: sizeUint64Ptr,
marshal: appendUint64Ptr,
unmarshal: consumeUint64Ptr,
merge: mergeUint64Ptr,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Uint64Slice()
for , := range {
+= .tagsize + protowire.SizeVarint()
}
return
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Uint64Slice()
for , := range {
= protowire.AppendVarint(, .wiretag)
= protowire.AppendVarint(, )
}
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
:= .Uint64Slice()
if == protowire.BytesType {
:= *
, := protowire.ConsumeBytes()
if < 0 {
return , errDecode
}
for len() > 0 {
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return , errDecode
}
= append(, )
= [:]
}
* =
.n =
return , nil
}
if != protowire.VarintType {
return , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return , errDecode
}
* = append(*, )
.n =
return , nil
}
var coderUint64Slice = pointerCoderFuncs{
size: sizeUint64Slice,
marshal: appendUint64Slice,
unmarshal: consumeUint64Slice,
merge: mergeUint64Slice,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Uint64Slice()
if len() == 0 {
return 0
}
:= 0
for , := range {
+= protowire.SizeVarint()
}
return .tagsize + protowire.SizeBytes()
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Uint64Slice()
if len() == 0 {
return , nil
}
= protowire.AppendVarint(, .wiretag)
:= 0
for , := range {
+= protowire.SizeVarint()
}
= protowire.AppendVarint(, uint64())
for , := range {
= protowire.AppendVarint(, )
}
return , nil
}
var coderUint64PackedSlice = pointerCoderFuncs{
size: sizeUint64PackedSlice,
marshal: appendUint64PackedSlice,
unmarshal: consumeUint64Slice,
merge: mergeUint64Slice,
}
func ( protoreflect.Value, int, marshalOptions) int {
return + protowire.SizeVarint(.Uint())
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
= protowire.AppendVarint(, )
= protowire.AppendVarint(, .Uint())
return , nil
}
func ( []byte, protoreflect.Value, protowire.Number, protowire.Type, unmarshalOptions) ( protoreflect.Value, unmarshalOutput, error) {
if != protowire.VarintType {
return protoreflect.Value{}, , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return protoreflect.Value{}, , errDecode
}
.n =
return protoreflect.ValueOfUint64(), , nil
}
var coderUint64Value = valueCoderFuncs{
size: sizeUint64Value,
marshal: appendUint64Value,
unmarshal: consumeUint64Value,
merge: mergeScalarValue,
}
func ( protoreflect.Value, int, marshalOptions) ( int) {
:= .List()
for , := 0, .Len(); < ; ++ {
:= .Get()
+= + protowire.SizeVarint(.Uint())
}
return
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
:= .List()
for , := 0, .Len(); < ; ++ {
:= .Get()
= protowire.AppendVarint(, )
= protowire.AppendVarint(, .Uint())
}
return , nil
}
func ( []byte, protoreflect.Value, protowire.Number, protowire.Type, unmarshalOptions) ( protoreflect.Value, unmarshalOutput, error) {
:= .List()
if == protowire.BytesType {
, := protowire.ConsumeBytes()
if < 0 {
return protoreflect.Value{}, , errDecode
}
for len() > 0 {
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return protoreflect.Value{}, , errDecode
}
.Append(protoreflect.ValueOfUint64())
= [:]
}
.n =
return , , nil
}
if != protowire.VarintType {
return protoreflect.Value{}, , errUnknown
}
var uint64
var int
if len() >= 1 && [0] < 0x80 {
= uint64([0])
= 1
} else if len() >= 2 && [1] < 128 {
= uint64([0]&0x7f) + uint64([1])<<7
= 2
} else {
, = protowire.ConsumeVarint()
}
if < 0 {
return protoreflect.Value{}, , errDecode
}
.Append(protoreflect.ValueOfUint64())
.n =
return , , nil
}
var coderUint64SliceValue = valueCoderFuncs{
size: sizeUint64SliceValue,
marshal: appendUint64SliceValue,
unmarshal: consumeUint64SliceValue,
merge: mergeListValue,
}
func ( protoreflect.Value, int, marshalOptions) ( int) {
:= .List()
:= .Len()
if == 0 {
return 0
}
:= 0
for , := 0, ; < ; ++ {
:= .Get()
+= protowire.SizeVarint(.Uint())
}
return + protowire.SizeBytes()
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
:= .List()
:= .Len()
if == 0 {
return , nil
}
= protowire.AppendVarint(, )
:= 0
for := 0; < ; ++ {
:= .Get()
+= protowire.SizeVarint(.Uint())
}
= protowire.AppendVarint(, uint64())
for := 0; < ; ++ {
:= .Get()
= protowire.AppendVarint(, .Uint())
}
return , nil
}
var coderUint64PackedSliceValue = valueCoderFuncs{
size: sizeUint64PackedSliceValue,
marshal: appendUint64PackedSliceValue,
unmarshal: consumeUint64SliceValue,
merge: mergeListValue,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
return .tagsize + protowire.SizeFixed32()
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Int32()
= protowire.AppendVarint(, .wiretag)
= protowire.AppendFixed32(, uint32())
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.Fixed32Type {
return , errUnknown
}
, := protowire.ConsumeFixed32()
if < 0 {
return , errDecode
}
*.Int32() = int32()
.n =
return , nil
}
var coderSfixed32 = pointerCoderFuncs{
size: sizeSfixed32,
marshal: appendSfixed32,
unmarshal: consumeSfixed32,
merge: mergeInt32,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Int32()
if == 0 {
return 0
}
return .tagsize + protowire.SizeFixed32()
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Int32()
if == 0 {
return , nil
}
= protowire.AppendVarint(, .wiretag)
= protowire.AppendFixed32(, uint32())
return , nil
}
var coderSfixed32NoZero = pointerCoderFuncs{
size: sizeSfixed32NoZero,
marshal: appendSfixed32NoZero,
unmarshal: consumeSfixed32,
merge: mergeInt32NoZero,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
return .tagsize + protowire.SizeFixed32()
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= **.Int32Ptr()
= protowire.AppendVarint(, .wiretag)
= protowire.AppendFixed32(, uint32())
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.Fixed32Type {
return , errUnknown
}
, := protowire.ConsumeFixed32()
if < 0 {
return , errDecode
}
:= .Int32Ptr()
if * == nil {
* = new(int32)
}
** = int32()
.n =
return , nil
}
var coderSfixed32Ptr = pointerCoderFuncs{
size: sizeSfixed32Ptr,
marshal: appendSfixed32Ptr,
unmarshal: consumeSfixed32Ptr,
merge: mergeInt32Ptr,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Int32Slice()
= len() * (.tagsize + protowire.SizeFixed32())
return
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Int32Slice()
for , := range {
= protowire.AppendVarint(, .wiretag)
= protowire.AppendFixed32(, uint32())
}
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
:= .Int32Slice()
if == protowire.BytesType {
:= *
, := protowire.ConsumeBytes()
if < 0 {
return , errDecode
}
for len() > 0 {
, := protowire.ConsumeFixed32()
if < 0 {
return , errDecode
}
= append(, int32())
= [:]
}
* =
.n =
return , nil
}
if != protowire.Fixed32Type {
return , errUnknown
}
, := protowire.ConsumeFixed32()
if < 0 {
return , errDecode
}
* = append(*, int32())
.n =
return , nil
}
var coderSfixed32Slice = pointerCoderFuncs{
size: sizeSfixed32Slice,
marshal: appendSfixed32Slice,
unmarshal: consumeSfixed32Slice,
merge: mergeInt32Slice,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Int32Slice()
if len() == 0 {
return 0
}
:= len() * protowire.SizeFixed32()
return .tagsize + protowire.SizeBytes()
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Int32Slice()
if len() == 0 {
return , nil
}
= protowire.AppendVarint(, .wiretag)
:= len() * protowire.SizeFixed32()
= protowire.AppendVarint(, uint64())
for , := range {
= protowire.AppendFixed32(, uint32())
}
return , nil
}
var coderSfixed32PackedSlice = pointerCoderFuncs{
size: sizeSfixed32PackedSlice,
marshal: appendSfixed32PackedSlice,
unmarshal: consumeSfixed32Slice,
merge: mergeInt32Slice,
}
func ( protoreflect.Value, int, marshalOptions) int {
return + protowire.SizeFixed32()
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
= protowire.AppendVarint(, )
= protowire.AppendFixed32(, uint32(.Int()))
return , nil
}
func ( []byte, protoreflect.Value, protowire.Number, protowire.Type, unmarshalOptions) ( protoreflect.Value, unmarshalOutput, error) {
if != protowire.Fixed32Type {
return protoreflect.Value{}, , errUnknown
}
, := protowire.ConsumeFixed32()
if < 0 {
return protoreflect.Value{}, , errDecode
}
.n =
return protoreflect.ValueOfInt32(int32()), , nil
}
var coderSfixed32Value = valueCoderFuncs{
size: sizeSfixed32Value,
marshal: appendSfixed32Value,
unmarshal: consumeSfixed32Value,
merge: mergeScalarValue,
}
func ( protoreflect.Value, int, marshalOptions) ( int) {
:= .List()
= .Len() * ( + protowire.SizeFixed32())
return
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
:= .List()
for , := 0, .Len(); < ; ++ {
:= .Get()
= protowire.AppendVarint(, )
= protowire.AppendFixed32(, uint32(.Int()))
}
return , nil
}
func ( []byte, protoreflect.Value, protowire.Number, protowire.Type, unmarshalOptions) ( protoreflect.Value, unmarshalOutput, error) {
:= .List()
if == protowire.BytesType {
, := protowire.ConsumeBytes()
if < 0 {
return protoreflect.Value{}, , errDecode
}
for len() > 0 {
, := protowire.ConsumeFixed32()
if < 0 {
return protoreflect.Value{}, , errDecode
}
.Append(protoreflect.ValueOfInt32(int32()))
= [:]
}
.n =
return , , nil
}
if != protowire.Fixed32Type {
return protoreflect.Value{}, , errUnknown
}
, := protowire.ConsumeFixed32()
if < 0 {
return protoreflect.Value{}, , errDecode
}
.Append(protoreflect.ValueOfInt32(int32()))
.n =
return , , nil
}
var coderSfixed32SliceValue = valueCoderFuncs{
size: sizeSfixed32SliceValue,
marshal: appendSfixed32SliceValue,
unmarshal: consumeSfixed32SliceValue,
merge: mergeListValue,
}
func ( protoreflect.Value, int, marshalOptions) ( int) {
:= .List()
:= .Len()
if == 0 {
return 0
}
:= * protowire.SizeFixed32()
return + protowire.SizeBytes()
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
:= .List()
:= .Len()
if == 0 {
return , nil
}
= protowire.AppendVarint(, )
:= * protowire.SizeFixed32()
= protowire.AppendVarint(, uint64())
for := 0; < ; ++ {
:= .Get()
= protowire.AppendFixed32(, uint32(.Int()))
}
return , nil
}
var coderSfixed32PackedSliceValue = valueCoderFuncs{
size: sizeSfixed32PackedSliceValue,
marshal: appendSfixed32PackedSliceValue,
unmarshal: consumeSfixed32SliceValue,
merge: mergeListValue,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
return .tagsize + protowire.SizeFixed32()
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Uint32()
= protowire.AppendVarint(, .wiretag)
= protowire.AppendFixed32(, )
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.Fixed32Type {
return , errUnknown
}
, := protowire.ConsumeFixed32()
if < 0 {
return , errDecode
}
*.Uint32() =
.n =
return , nil
}
var coderFixed32 = pointerCoderFuncs{
size: sizeFixed32,
marshal: appendFixed32,
unmarshal: consumeFixed32,
merge: mergeUint32,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Uint32()
if == 0 {
return 0
}
return .tagsize + protowire.SizeFixed32()
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Uint32()
if == 0 {
return , nil
}
= protowire.AppendVarint(, .wiretag)
= protowire.AppendFixed32(, )
return , nil
}
var coderFixed32NoZero = pointerCoderFuncs{
size: sizeFixed32NoZero,
marshal: appendFixed32NoZero,
unmarshal: consumeFixed32,
merge: mergeUint32NoZero,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
return .tagsize + protowire.SizeFixed32()
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= **.Uint32Ptr()
= protowire.AppendVarint(, .wiretag)
= protowire.AppendFixed32(, )
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.Fixed32Type {
return , errUnknown
}
, := protowire.ConsumeFixed32()
if < 0 {
return , errDecode
}
:= .Uint32Ptr()
if * == nil {
* = new(uint32)
}
** =
.n =
return , nil
}
var coderFixed32Ptr = pointerCoderFuncs{
size: sizeFixed32Ptr,
marshal: appendFixed32Ptr,
unmarshal: consumeFixed32Ptr,
merge: mergeUint32Ptr,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Uint32Slice()
= len() * (.tagsize + protowire.SizeFixed32())
return
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Uint32Slice()
for , := range {
= protowire.AppendVarint(, .wiretag)
= protowire.AppendFixed32(, )
}
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
:= .Uint32Slice()
if == protowire.BytesType {
:= *
, := protowire.ConsumeBytes()
if < 0 {
return , errDecode
}
for len() > 0 {
, := protowire.ConsumeFixed32()
if < 0 {
return , errDecode
}
= append(, )
= [:]
}
* =
.n =
return , nil
}
if != protowire.Fixed32Type {
return , errUnknown
}
, := protowire.ConsumeFixed32()
if < 0 {
return , errDecode
}
* = append(*, )
.n =
return , nil
}
var coderFixed32Slice = pointerCoderFuncs{
size: sizeFixed32Slice,
marshal: appendFixed32Slice,
unmarshal: consumeFixed32Slice,
merge: mergeUint32Slice,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Uint32Slice()
if len() == 0 {
return 0
}
:= len() * protowire.SizeFixed32()
return .tagsize + protowire.SizeBytes()
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Uint32Slice()
if len() == 0 {
return , nil
}
= protowire.AppendVarint(, .wiretag)
:= len() * protowire.SizeFixed32()
= protowire.AppendVarint(, uint64())
for , := range {
= protowire.AppendFixed32(, )
}
return , nil
}
var coderFixed32PackedSlice = pointerCoderFuncs{
size: sizeFixed32PackedSlice,
marshal: appendFixed32PackedSlice,
unmarshal: consumeFixed32Slice,
merge: mergeUint32Slice,
}
func ( protoreflect.Value, int, marshalOptions) int {
return + protowire.SizeFixed32()
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
= protowire.AppendVarint(, )
= protowire.AppendFixed32(, uint32(.Uint()))
return , nil
}
func ( []byte, protoreflect.Value, protowire.Number, protowire.Type, unmarshalOptions) ( protoreflect.Value, unmarshalOutput, error) {
if != protowire.Fixed32Type {
return protoreflect.Value{}, , errUnknown
}
, := protowire.ConsumeFixed32()
if < 0 {
return protoreflect.Value{}, , errDecode
}
.n =
return protoreflect.ValueOfUint32(uint32()), , nil
}
var coderFixed32Value = valueCoderFuncs{
size: sizeFixed32Value,
marshal: appendFixed32Value,
unmarshal: consumeFixed32Value,
merge: mergeScalarValue,
}
func ( protoreflect.Value, int, marshalOptions) ( int) {
:= .List()
= .Len() * ( + protowire.SizeFixed32())
return
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
:= .List()
for , := 0, .Len(); < ; ++ {
:= .Get()
= protowire.AppendVarint(, )
= protowire.AppendFixed32(, uint32(.Uint()))
}
return , nil
}
func ( []byte, protoreflect.Value, protowire.Number, protowire.Type, unmarshalOptions) ( protoreflect.Value, unmarshalOutput, error) {
:= .List()
if == protowire.BytesType {
, := protowire.ConsumeBytes()
if < 0 {
return protoreflect.Value{}, , errDecode
}
for len() > 0 {
, := protowire.ConsumeFixed32()
if < 0 {
return protoreflect.Value{}, , errDecode
}
.Append(protoreflect.ValueOfUint32(uint32()))
= [:]
}
.n =
return , , nil
}
if != protowire.Fixed32Type {
return protoreflect.Value{}, , errUnknown
}
, := protowire.ConsumeFixed32()
if < 0 {
return protoreflect.Value{}, , errDecode
}
.Append(protoreflect.ValueOfUint32(uint32()))
.n =
return , , nil
}
var coderFixed32SliceValue = valueCoderFuncs{
size: sizeFixed32SliceValue,
marshal: appendFixed32SliceValue,
unmarshal: consumeFixed32SliceValue,
merge: mergeListValue,
}
func ( protoreflect.Value, int, marshalOptions) ( int) {
:= .List()
:= .Len()
if == 0 {
return 0
}
:= * protowire.SizeFixed32()
return + protowire.SizeBytes()
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
:= .List()
:= .Len()
if == 0 {
return , nil
}
= protowire.AppendVarint(, )
:= * protowire.SizeFixed32()
= protowire.AppendVarint(, uint64())
for := 0; < ; ++ {
:= .Get()
= protowire.AppendFixed32(, uint32(.Uint()))
}
return , nil
}
var coderFixed32PackedSliceValue = valueCoderFuncs{
size: sizeFixed32PackedSliceValue,
marshal: appendFixed32PackedSliceValue,
unmarshal: consumeFixed32SliceValue,
merge: mergeListValue,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
return .tagsize + protowire.SizeFixed32()
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Float32()
= protowire.AppendVarint(, .wiretag)
= protowire.AppendFixed32(, math.Float32bits())
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.Fixed32Type {
return , errUnknown
}
, := protowire.ConsumeFixed32()
if < 0 {
return , errDecode
}
*.Float32() = math.Float32frombits()
.n =
return , nil
}
var coderFloat = pointerCoderFuncs{
size: sizeFloat,
marshal: appendFloat,
unmarshal: consumeFloat,
merge: mergeFloat32,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Float32()
if == 0 && !math.Signbit(float64()) {
return 0
}
return .tagsize + protowire.SizeFixed32()
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Float32()
if == 0 && !math.Signbit(float64()) {
return , nil
}
= protowire.AppendVarint(, .wiretag)
= protowire.AppendFixed32(, math.Float32bits())
return , nil
}
var coderFloatNoZero = pointerCoderFuncs{
size: sizeFloatNoZero,
marshal: appendFloatNoZero,
unmarshal: consumeFloat,
merge: mergeFloat32NoZero,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
return .tagsize + protowire.SizeFixed32()
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= **.Float32Ptr()
= protowire.AppendVarint(, .wiretag)
= protowire.AppendFixed32(, math.Float32bits())
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.Fixed32Type {
return , errUnknown
}
, := protowire.ConsumeFixed32()
if < 0 {
return , errDecode
}
:= .Float32Ptr()
if * == nil {
* = new(float32)
}
** = math.Float32frombits()
.n =
return , nil
}
var coderFloatPtr = pointerCoderFuncs{
size: sizeFloatPtr,
marshal: appendFloatPtr,
unmarshal: consumeFloatPtr,
merge: mergeFloat32Ptr,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Float32Slice()
= len() * (.tagsize + protowire.SizeFixed32())
return
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Float32Slice()
for , := range {
= protowire.AppendVarint(, .wiretag)
= protowire.AppendFixed32(, math.Float32bits())
}
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
:= .Float32Slice()
if == protowire.BytesType {
:= *
, := protowire.ConsumeBytes()
if < 0 {
return , errDecode
}
for len() > 0 {
, := protowire.ConsumeFixed32()
if < 0 {
return , errDecode
}
= append(, math.Float32frombits())
= [:]
}
* =
.n =
return , nil
}
if != protowire.Fixed32Type {
return , errUnknown
}
, := protowire.ConsumeFixed32()
if < 0 {
return , errDecode
}
* = append(*, math.Float32frombits())
.n =
return , nil
}
var coderFloatSlice = pointerCoderFuncs{
size: sizeFloatSlice,
marshal: appendFloatSlice,
unmarshal: consumeFloatSlice,
merge: mergeFloat32Slice,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Float32Slice()
if len() == 0 {
return 0
}
:= len() * protowire.SizeFixed32()
return .tagsize + protowire.SizeBytes()
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Float32Slice()
if len() == 0 {
return , nil
}
= protowire.AppendVarint(, .wiretag)
:= len() * protowire.SizeFixed32()
= protowire.AppendVarint(, uint64())
for , := range {
= protowire.AppendFixed32(, math.Float32bits())
}
return , nil
}
var coderFloatPackedSlice = pointerCoderFuncs{
size: sizeFloatPackedSlice,
marshal: appendFloatPackedSlice,
unmarshal: consumeFloatSlice,
merge: mergeFloat32Slice,
}
func ( protoreflect.Value, int, marshalOptions) int {
return + protowire.SizeFixed32()
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
= protowire.AppendVarint(, )
= protowire.AppendFixed32(, math.Float32bits(float32(.Float())))
return , nil
}
func ( []byte, protoreflect.Value, protowire.Number, protowire.Type, unmarshalOptions) ( protoreflect.Value, unmarshalOutput, error) {
if != protowire.Fixed32Type {
return protoreflect.Value{}, , errUnknown
}
, := protowire.ConsumeFixed32()
if < 0 {
return protoreflect.Value{}, , errDecode
}
.n =
return protoreflect.ValueOfFloat32(math.Float32frombits(uint32())), , nil
}
var coderFloatValue = valueCoderFuncs{
size: sizeFloatValue,
marshal: appendFloatValue,
unmarshal: consumeFloatValue,
merge: mergeScalarValue,
}
func ( protoreflect.Value, int, marshalOptions) ( int) {
:= .List()
= .Len() * ( + protowire.SizeFixed32())
return
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
:= .List()
for , := 0, .Len(); < ; ++ {
:= .Get()
= protowire.AppendVarint(, )
= protowire.AppendFixed32(, math.Float32bits(float32(.Float())))
}
return , nil
}
func ( []byte, protoreflect.Value, protowire.Number, protowire.Type, unmarshalOptions) ( protoreflect.Value, unmarshalOutput, error) {
:= .List()
if == protowire.BytesType {
, := protowire.ConsumeBytes()
if < 0 {
return protoreflect.Value{}, , errDecode
}
for len() > 0 {
, := protowire.ConsumeFixed32()
if < 0 {
return protoreflect.Value{}, , errDecode
}
.Append(protoreflect.ValueOfFloat32(math.Float32frombits(uint32())))
= [:]
}
.n =
return , , nil
}
if != protowire.Fixed32Type {
return protoreflect.Value{}, , errUnknown
}
, := protowire.ConsumeFixed32()
if < 0 {
return protoreflect.Value{}, , errDecode
}
.Append(protoreflect.ValueOfFloat32(math.Float32frombits(uint32())))
.n =
return , , nil
}
var coderFloatSliceValue = valueCoderFuncs{
size: sizeFloatSliceValue,
marshal: appendFloatSliceValue,
unmarshal: consumeFloatSliceValue,
merge: mergeListValue,
}
func ( protoreflect.Value, int, marshalOptions) ( int) {
:= .List()
:= .Len()
if == 0 {
return 0
}
:= * protowire.SizeFixed32()
return + protowire.SizeBytes()
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
:= .List()
:= .Len()
if == 0 {
return , nil
}
= protowire.AppendVarint(, )
:= * protowire.SizeFixed32()
= protowire.AppendVarint(, uint64())
for := 0; < ; ++ {
:= .Get()
= protowire.AppendFixed32(, math.Float32bits(float32(.Float())))
}
return , nil
}
var coderFloatPackedSliceValue = valueCoderFuncs{
size: sizeFloatPackedSliceValue,
marshal: appendFloatPackedSliceValue,
unmarshal: consumeFloatSliceValue,
merge: mergeListValue,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
return .tagsize + protowire.SizeFixed64()
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Int64()
= protowire.AppendVarint(, .wiretag)
= protowire.AppendFixed64(, uint64())
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.Fixed64Type {
return , errUnknown
}
, := protowire.ConsumeFixed64()
if < 0 {
return , errDecode
}
*.Int64() = int64()
.n =
return , nil
}
var coderSfixed64 = pointerCoderFuncs{
size: sizeSfixed64,
marshal: appendSfixed64,
unmarshal: consumeSfixed64,
merge: mergeInt64,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Int64()
if == 0 {
return 0
}
return .tagsize + protowire.SizeFixed64()
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Int64()
if == 0 {
return , nil
}
= protowire.AppendVarint(, .wiretag)
= protowire.AppendFixed64(, uint64())
return , nil
}
var coderSfixed64NoZero = pointerCoderFuncs{
size: sizeSfixed64NoZero,
marshal: appendSfixed64NoZero,
unmarshal: consumeSfixed64,
merge: mergeInt64NoZero,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
return .tagsize + protowire.SizeFixed64()
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= **.Int64Ptr()
= protowire.AppendVarint(, .wiretag)
= protowire.AppendFixed64(, uint64())
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.Fixed64Type {
return , errUnknown
}
, := protowire.ConsumeFixed64()
if < 0 {
return , errDecode
}
:= .Int64Ptr()
if * == nil {
* = new(int64)
}
** = int64()
.n =
return , nil
}
var coderSfixed64Ptr = pointerCoderFuncs{
size: sizeSfixed64Ptr,
marshal: appendSfixed64Ptr,
unmarshal: consumeSfixed64Ptr,
merge: mergeInt64Ptr,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Int64Slice()
= len() * (.tagsize + protowire.SizeFixed64())
return
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Int64Slice()
for , := range {
= protowire.AppendVarint(, .wiretag)
= protowire.AppendFixed64(, uint64())
}
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
:= .Int64Slice()
if == protowire.BytesType {
:= *
, := protowire.ConsumeBytes()
if < 0 {
return , errDecode
}
for len() > 0 {
, := protowire.ConsumeFixed64()
if < 0 {
return , errDecode
}
= append(, int64())
= [:]
}
* =
.n =
return , nil
}
if != protowire.Fixed64Type {
return , errUnknown
}
, := protowire.ConsumeFixed64()
if < 0 {
return , errDecode
}
* = append(*, int64())
.n =
return , nil
}
var coderSfixed64Slice = pointerCoderFuncs{
size: sizeSfixed64Slice,
marshal: appendSfixed64Slice,
unmarshal: consumeSfixed64Slice,
merge: mergeInt64Slice,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Int64Slice()
if len() == 0 {
return 0
}
:= len() * protowire.SizeFixed64()
return .tagsize + protowire.SizeBytes()
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Int64Slice()
if len() == 0 {
return , nil
}
= protowire.AppendVarint(, .wiretag)
:= len() * protowire.SizeFixed64()
= protowire.AppendVarint(, uint64())
for , := range {
= protowire.AppendFixed64(, uint64())
}
return , nil
}
var coderSfixed64PackedSlice = pointerCoderFuncs{
size: sizeSfixed64PackedSlice,
marshal: appendSfixed64PackedSlice,
unmarshal: consumeSfixed64Slice,
merge: mergeInt64Slice,
}
func ( protoreflect.Value, int, marshalOptions) int {
return + protowire.SizeFixed64()
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
= protowire.AppendVarint(, )
= protowire.AppendFixed64(, uint64(.Int()))
return , nil
}
func ( []byte, protoreflect.Value, protowire.Number, protowire.Type, unmarshalOptions) ( protoreflect.Value, unmarshalOutput, error) {
if != protowire.Fixed64Type {
return protoreflect.Value{}, , errUnknown
}
, := protowire.ConsumeFixed64()
if < 0 {
return protoreflect.Value{}, , errDecode
}
.n =
return protoreflect.ValueOfInt64(int64()), , nil
}
var coderSfixed64Value = valueCoderFuncs{
size: sizeSfixed64Value,
marshal: appendSfixed64Value,
unmarshal: consumeSfixed64Value,
merge: mergeScalarValue,
}
func ( protoreflect.Value, int, marshalOptions) ( int) {
:= .List()
= .Len() * ( + protowire.SizeFixed64())
return
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
:= .List()
for , := 0, .Len(); < ; ++ {
:= .Get()
= protowire.AppendVarint(, )
= protowire.AppendFixed64(, uint64(.Int()))
}
return , nil
}
func ( []byte, protoreflect.Value, protowire.Number, protowire.Type, unmarshalOptions) ( protoreflect.Value, unmarshalOutput, error) {
:= .List()
if == protowire.BytesType {
, := protowire.ConsumeBytes()
if < 0 {
return protoreflect.Value{}, , errDecode
}
for len() > 0 {
, := protowire.ConsumeFixed64()
if < 0 {
return protoreflect.Value{}, , errDecode
}
.Append(protoreflect.ValueOfInt64(int64()))
= [:]
}
.n =
return , , nil
}
if != protowire.Fixed64Type {
return protoreflect.Value{}, , errUnknown
}
, := protowire.ConsumeFixed64()
if < 0 {
return protoreflect.Value{}, , errDecode
}
.Append(protoreflect.ValueOfInt64(int64()))
.n =
return , , nil
}
var coderSfixed64SliceValue = valueCoderFuncs{
size: sizeSfixed64SliceValue,
marshal: appendSfixed64SliceValue,
unmarshal: consumeSfixed64SliceValue,
merge: mergeListValue,
}
func ( protoreflect.Value, int, marshalOptions) ( int) {
:= .List()
:= .Len()
if == 0 {
return 0
}
:= * protowire.SizeFixed64()
return + protowire.SizeBytes()
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
:= .List()
:= .Len()
if == 0 {
return , nil
}
= protowire.AppendVarint(, )
:= * protowire.SizeFixed64()
= protowire.AppendVarint(, uint64())
for := 0; < ; ++ {
:= .Get()
= protowire.AppendFixed64(, uint64(.Int()))
}
return , nil
}
var coderSfixed64PackedSliceValue = valueCoderFuncs{
size: sizeSfixed64PackedSliceValue,
marshal: appendSfixed64PackedSliceValue,
unmarshal: consumeSfixed64SliceValue,
merge: mergeListValue,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
return .tagsize + protowire.SizeFixed64()
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Uint64()
= protowire.AppendVarint(, .wiretag)
= protowire.AppendFixed64(, )
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.Fixed64Type {
return , errUnknown
}
, := protowire.ConsumeFixed64()
if < 0 {
return , errDecode
}
*.Uint64() =
.n =
return , nil
}
var coderFixed64 = pointerCoderFuncs{
size: sizeFixed64,
marshal: appendFixed64,
unmarshal: consumeFixed64,
merge: mergeUint64,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Uint64()
if == 0 {
return 0
}
return .tagsize + protowire.SizeFixed64()
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Uint64()
if == 0 {
return , nil
}
= protowire.AppendVarint(, .wiretag)
= protowire.AppendFixed64(, )
return , nil
}
var coderFixed64NoZero = pointerCoderFuncs{
size: sizeFixed64NoZero,
marshal: appendFixed64NoZero,
unmarshal: consumeFixed64,
merge: mergeUint64NoZero,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
return .tagsize + protowire.SizeFixed64()
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= **.Uint64Ptr()
= protowire.AppendVarint(, .wiretag)
= protowire.AppendFixed64(, )
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.Fixed64Type {
return , errUnknown
}
, := protowire.ConsumeFixed64()
if < 0 {
return , errDecode
}
:= .Uint64Ptr()
if * == nil {
* = new(uint64)
}
** =
.n =
return , nil
}
var coderFixed64Ptr = pointerCoderFuncs{
size: sizeFixed64Ptr,
marshal: appendFixed64Ptr,
unmarshal: consumeFixed64Ptr,
merge: mergeUint64Ptr,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Uint64Slice()
= len() * (.tagsize + protowire.SizeFixed64())
return
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Uint64Slice()
for , := range {
= protowire.AppendVarint(, .wiretag)
= protowire.AppendFixed64(, )
}
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
:= .Uint64Slice()
if == protowire.BytesType {
:= *
, := protowire.ConsumeBytes()
if < 0 {
return , errDecode
}
for len() > 0 {
, := protowire.ConsumeFixed64()
if < 0 {
return , errDecode
}
= append(, )
= [:]
}
* =
.n =
return , nil
}
if != protowire.Fixed64Type {
return , errUnknown
}
, := protowire.ConsumeFixed64()
if < 0 {
return , errDecode
}
* = append(*, )
.n =
return , nil
}
var coderFixed64Slice = pointerCoderFuncs{
size: sizeFixed64Slice,
marshal: appendFixed64Slice,
unmarshal: consumeFixed64Slice,
merge: mergeUint64Slice,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Uint64Slice()
if len() == 0 {
return 0
}
:= len() * protowire.SizeFixed64()
return .tagsize + protowire.SizeBytes()
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Uint64Slice()
if len() == 0 {
return , nil
}
= protowire.AppendVarint(, .wiretag)
:= len() * protowire.SizeFixed64()
= protowire.AppendVarint(, uint64())
for , := range {
= protowire.AppendFixed64(, )
}
return , nil
}
var coderFixed64PackedSlice = pointerCoderFuncs{
size: sizeFixed64PackedSlice,
marshal: appendFixed64PackedSlice,
unmarshal: consumeFixed64Slice,
merge: mergeUint64Slice,
}
func ( protoreflect.Value, int, marshalOptions) int {
return + protowire.SizeFixed64()
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
= protowire.AppendVarint(, )
= protowire.AppendFixed64(, .Uint())
return , nil
}
func ( []byte, protoreflect.Value, protowire.Number, protowire.Type, unmarshalOptions) ( protoreflect.Value, unmarshalOutput, error) {
if != protowire.Fixed64Type {
return protoreflect.Value{}, , errUnknown
}
, := protowire.ConsumeFixed64()
if < 0 {
return protoreflect.Value{}, , errDecode
}
.n =
return protoreflect.ValueOfUint64(), , nil
}
var coderFixed64Value = valueCoderFuncs{
size: sizeFixed64Value,
marshal: appendFixed64Value,
unmarshal: consumeFixed64Value,
merge: mergeScalarValue,
}
func ( protoreflect.Value, int, marshalOptions) ( int) {
:= .List()
= .Len() * ( + protowire.SizeFixed64())
return
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
:= .List()
for , := 0, .Len(); < ; ++ {
:= .Get()
= protowire.AppendVarint(, )
= protowire.AppendFixed64(, .Uint())
}
return , nil
}
func ( []byte, protoreflect.Value, protowire.Number, protowire.Type, unmarshalOptions) ( protoreflect.Value, unmarshalOutput, error) {
:= .List()
if == protowire.BytesType {
, := protowire.ConsumeBytes()
if < 0 {
return protoreflect.Value{}, , errDecode
}
for len() > 0 {
, := protowire.ConsumeFixed64()
if < 0 {
return protoreflect.Value{}, , errDecode
}
.Append(protoreflect.ValueOfUint64())
= [:]
}
.n =
return , , nil
}
if != protowire.Fixed64Type {
return protoreflect.Value{}, , errUnknown
}
, := protowire.ConsumeFixed64()
if < 0 {
return protoreflect.Value{}, , errDecode
}
.Append(protoreflect.ValueOfUint64())
.n =
return , , nil
}
var coderFixed64SliceValue = valueCoderFuncs{
size: sizeFixed64SliceValue,
marshal: appendFixed64SliceValue,
unmarshal: consumeFixed64SliceValue,
merge: mergeListValue,
}
func ( protoreflect.Value, int, marshalOptions) ( int) {
:= .List()
:= .Len()
if == 0 {
return 0
}
:= * protowire.SizeFixed64()
return + protowire.SizeBytes()
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
:= .List()
:= .Len()
if == 0 {
return , nil
}
= protowire.AppendVarint(, )
:= * protowire.SizeFixed64()
= protowire.AppendVarint(, uint64())
for := 0; < ; ++ {
:= .Get()
= protowire.AppendFixed64(, .Uint())
}
return , nil
}
var coderFixed64PackedSliceValue = valueCoderFuncs{
size: sizeFixed64PackedSliceValue,
marshal: appendFixed64PackedSliceValue,
unmarshal: consumeFixed64SliceValue,
merge: mergeListValue,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
return .tagsize + protowire.SizeFixed64()
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Float64()
= protowire.AppendVarint(, .wiretag)
= protowire.AppendFixed64(, math.Float64bits())
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.Fixed64Type {
return , errUnknown
}
, := protowire.ConsumeFixed64()
if < 0 {
return , errDecode
}
*.Float64() = math.Float64frombits()
.n =
return , nil
}
var coderDouble = pointerCoderFuncs{
size: sizeDouble,
marshal: appendDouble,
unmarshal: consumeDouble,
merge: mergeFloat64,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Float64()
if == 0 && !math.Signbit(float64()) {
return 0
}
return .tagsize + protowire.SizeFixed64()
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Float64()
if == 0 && !math.Signbit(float64()) {
return , nil
}
= protowire.AppendVarint(, .wiretag)
= protowire.AppendFixed64(, math.Float64bits())
return , nil
}
var coderDoubleNoZero = pointerCoderFuncs{
size: sizeDoubleNoZero,
marshal: appendDoubleNoZero,
unmarshal: consumeDouble,
merge: mergeFloat64NoZero,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
return .tagsize + protowire.SizeFixed64()
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= **.Float64Ptr()
= protowire.AppendVarint(, .wiretag)
= protowire.AppendFixed64(, math.Float64bits())
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.Fixed64Type {
return , errUnknown
}
, := protowire.ConsumeFixed64()
if < 0 {
return , errDecode
}
:= .Float64Ptr()
if * == nil {
* = new(float64)
}
** = math.Float64frombits()
.n =
return , nil
}
var coderDoublePtr = pointerCoderFuncs{
size: sizeDoublePtr,
marshal: appendDoublePtr,
unmarshal: consumeDoublePtr,
merge: mergeFloat64Ptr,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Float64Slice()
= len() * (.tagsize + protowire.SizeFixed64())
return
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Float64Slice()
for , := range {
= protowire.AppendVarint(, .wiretag)
= protowire.AppendFixed64(, math.Float64bits())
}
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
:= .Float64Slice()
if == protowire.BytesType {
:= *
, := protowire.ConsumeBytes()
if < 0 {
return , errDecode
}
for len() > 0 {
, := protowire.ConsumeFixed64()
if < 0 {
return , errDecode
}
= append(, math.Float64frombits())
= [:]
}
* =
.n =
return , nil
}
if != protowire.Fixed64Type {
return , errUnknown
}
, := protowire.ConsumeFixed64()
if < 0 {
return , errDecode
}
* = append(*, math.Float64frombits())
.n =
return , nil
}
var coderDoubleSlice = pointerCoderFuncs{
size: sizeDoubleSlice,
marshal: appendDoubleSlice,
unmarshal: consumeDoubleSlice,
merge: mergeFloat64Slice,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Float64Slice()
if len() == 0 {
return 0
}
:= len() * protowire.SizeFixed64()
return .tagsize + protowire.SizeBytes()
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Float64Slice()
if len() == 0 {
return , nil
}
= protowire.AppendVarint(, .wiretag)
:= len() * protowire.SizeFixed64()
= protowire.AppendVarint(, uint64())
for , := range {
= protowire.AppendFixed64(, math.Float64bits())
}
return , nil
}
var coderDoublePackedSlice = pointerCoderFuncs{
size: sizeDoublePackedSlice,
marshal: appendDoublePackedSlice,
unmarshal: consumeDoubleSlice,
merge: mergeFloat64Slice,
}
func ( protoreflect.Value, int, marshalOptions) int {
return + protowire.SizeFixed64()
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
= protowire.AppendVarint(, )
= protowire.AppendFixed64(, math.Float64bits(.Float()))
return , nil
}
func ( []byte, protoreflect.Value, protowire.Number, protowire.Type, unmarshalOptions) ( protoreflect.Value, unmarshalOutput, error) {
if != protowire.Fixed64Type {
return protoreflect.Value{}, , errUnknown
}
, := protowire.ConsumeFixed64()
if < 0 {
return protoreflect.Value{}, , errDecode
}
.n =
return protoreflect.ValueOfFloat64(math.Float64frombits()), , nil
}
var coderDoubleValue = valueCoderFuncs{
size: sizeDoubleValue,
marshal: appendDoubleValue,
unmarshal: consumeDoubleValue,
merge: mergeScalarValue,
}
func ( protoreflect.Value, int, marshalOptions) ( int) {
:= .List()
= .Len() * ( + protowire.SizeFixed64())
return
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
:= .List()
for , := 0, .Len(); < ; ++ {
:= .Get()
= protowire.AppendVarint(, )
= protowire.AppendFixed64(, math.Float64bits(.Float()))
}
return , nil
}
func ( []byte, protoreflect.Value, protowire.Number, protowire.Type, unmarshalOptions) ( protoreflect.Value, unmarshalOutput, error) {
:= .List()
if == protowire.BytesType {
, := protowire.ConsumeBytes()
if < 0 {
return protoreflect.Value{}, , errDecode
}
for len() > 0 {
, := protowire.ConsumeFixed64()
if < 0 {
return protoreflect.Value{}, , errDecode
}
.Append(protoreflect.ValueOfFloat64(math.Float64frombits()))
= [:]
}
.n =
return , , nil
}
if != protowire.Fixed64Type {
return protoreflect.Value{}, , errUnknown
}
, := protowire.ConsumeFixed64()
if < 0 {
return protoreflect.Value{}, , errDecode
}
.Append(protoreflect.ValueOfFloat64(math.Float64frombits()))
.n =
return , , nil
}
var coderDoubleSliceValue = valueCoderFuncs{
size: sizeDoubleSliceValue,
marshal: appendDoubleSliceValue,
unmarshal: consumeDoubleSliceValue,
merge: mergeListValue,
}
func ( protoreflect.Value, int, marshalOptions) ( int) {
:= .List()
:= .Len()
if == 0 {
return 0
}
:= * protowire.SizeFixed64()
return + protowire.SizeBytes()
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
:= .List()
:= .Len()
if == 0 {
return , nil
}
= protowire.AppendVarint(, )
:= * protowire.SizeFixed64()
= protowire.AppendVarint(, uint64())
for := 0; < ; ++ {
:= .Get()
= protowire.AppendFixed64(, math.Float64bits(.Float()))
}
return , nil
}
var coderDoublePackedSliceValue = valueCoderFuncs{
size: sizeDoublePackedSliceValue,
marshal: appendDoublePackedSliceValue,
unmarshal: consumeDoubleSliceValue,
merge: mergeListValue,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.String()
return .tagsize + protowire.SizeBytes(len())
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.String()
= protowire.AppendVarint(, .wiretag)
= protowire.AppendString(, )
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.BytesType {
return , errUnknown
}
, := protowire.ConsumeBytes()
if < 0 {
return , errDecode
}
*.String() = string()
.n =
return , nil
}
var coderString = pointerCoderFuncs{
size: sizeString,
marshal: appendString,
unmarshal: consumeString,
merge: mergeString,
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.String()
= protowire.AppendVarint(, .wiretag)
= protowire.AppendString(, )
if !utf8.ValidString() {
return , errInvalidUTF8{}
}
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.BytesType {
return , errUnknown
}
, := protowire.ConsumeBytes()
if < 0 {
return , errDecode
}
if !utf8.Valid() {
return , errInvalidUTF8{}
}
*.String() = string()
.n =
return , nil
}
var coderStringValidateUTF8 = pointerCoderFuncs{
size: sizeString,
marshal: appendStringValidateUTF8,
unmarshal: consumeStringValidateUTF8,
merge: mergeString,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.String()
if len() == 0 {
return 0
}
return .tagsize + protowire.SizeBytes(len())
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.String()
if len() == 0 {
return , nil
}
= protowire.AppendVarint(, .wiretag)
= protowire.AppendString(, )
return , nil
}
var coderStringNoZero = pointerCoderFuncs{
size: sizeStringNoZero,
marshal: appendStringNoZero,
unmarshal: consumeString,
merge: mergeStringNoZero,
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.String()
if len() == 0 {
return , nil
}
= protowire.AppendVarint(, .wiretag)
= protowire.AppendString(, )
if !utf8.ValidString() {
return , errInvalidUTF8{}
}
return , nil
}
var coderStringNoZeroValidateUTF8 = pointerCoderFuncs{
size: sizeStringNoZero,
marshal: appendStringNoZeroValidateUTF8,
unmarshal: consumeStringValidateUTF8,
merge: mergeStringNoZero,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= **.StringPtr()
return .tagsize + protowire.SizeBytes(len())
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= **.StringPtr()
= protowire.AppendVarint(, .wiretag)
= protowire.AppendString(, )
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.BytesType {
return , errUnknown
}
, := protowire.ConsumeBytes()
if < 0 {
return , errDecode
}
:= .StringPtr()
if * == nil {
* = new(string)
}
** = string()
.n =
return , nil
}
var coderStringPtr = pointerCoderFuncs{
size: sizeStringPtr,
marshal: appendStringPtr,
unmarshal: consumeStringPtr,
merge: mergeStringPtr,
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= **.StringPtr()
= protowire.AppendVarint(, .wiretag)
= protowire.AppendString(, )
if !utf8.ValidString() {
return , errInvalidUTF8{}
}
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.BytesType {
return , errUnknown
}
, := protowire.ConsumeBytes()
if < 0 {
return , errDecode
}
if !utf8.Valid() {
return , errInvalidUTF8{}
}
:= .StringPtr()
if * == nil {
* = new(string)
}
** = string()
.n =
return , nil
}
var coderStringPtrValidateUTF8 = pointerCoderFuncs{
size: sizeStringPtr,
marshal: appendStringPtrValidateUTF8,
unmarshal: consumeStringPtrValidateUTF8,
merge: mergeStringPtr,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.StringSlice()
for , := range {
+= .tagsize + protowire.SizeBytes(len())
}
return
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.StringSlice()
for , := range {
= protowire.AppendVarint(, .wiretag)
= protowire.AppendString(, )
}
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
:= .StringSlice()
if != protowire.BytesType {
return , errUnknown
}
, := protowire.ConsumeBytes()
if < 0 {
return , errDecode
}
* = append(*, string())
.n =
return , nil
}
var coderStringSlice = pointerCoderFuncs{
size: sizeStringSlice,
marshal: appendStringSlice,
unmarshal: consumeStringSlice,
merge: mergeStringSlice,
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.StringSlice()
for , := range {
= protowire.AppendVarint(, .wiretag)
= protowire.AppendString(, )
if !utf8.ValidString() {
return , errInvalidUTF8{}
}
}
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.BytesType {
return , errUnknown
}
, := protowire.ConsumeBytes()
if < 0 {
return , errDecode
}
if !utf8.Valid() {
return , errInvalidUTF8{}
}
:= .StringSlice()
* = append(*, string())
.n =
return , nil
}
var coderStringSliceValidateUTF8 = pointerCoderFuncs{
size: sizeStringSlice,
marshal: appendStringSliceValidateUTF8,
unmarshal: consumeStringSliceValidateUTF8,
merge: mergeStringSlice,
}
func ( protoreflect.Value, int, marshalOptions) int {
return + protowire.SizeBytes(len(.String()))
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
= protowire.AppendVarint(, )
= protowire.AppendString(, .String())
return , nil
}
func ( []byte, protoreflect.Value, protowire.Number, protowire.Type, unmarshalOptions) ( protoreflect.Value, unmarshalOutput, error) {
if != protowire.BytesType {
return protoreflect.Value{}, , errUnknown
}
, := protowire.ConsumeBytes()
if < 0 {
return protoreflect.Value{}, , errDecode
}
.n =
return protoreflect.ValueOfString(string()), , nil
}
var coderStringValue = valueCoderFuncs{
size: sizeStringValue,
marshal: appendStringValue,
unmarshal: consumeStringValue,
merge: mergeScalarValue,
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
= protowire.AppendVarint(, )
= protowire.AppendString(, .String())
if !utf8.ValidString(.String()) {
return , errInvalidUTF8{}
}
return , nil
}
func ( []byte, protoreflect.Value, protowire.Number, protowire.Type, unmarshalOptions) ( protoreflect.Value, unmarshalOutput, error) {
if != protowire.BytesType {
return protoreflect.Value{}, , errUnknown
}
, := protowire.ConsumeBytes()
if < 0 {
return protoreflect.Value{}, , errDecode
}
if !utf8.Valid() {
return protoreflect.Value{}, , errInvalidUTF8{}
}
.n =
return protoreflect.ValueOfString(string()), , nil
}
var coderStringValueValidateUTF8 = valueCoderFuncs{
size: sizeStringValue,
marshal: appendStringValueValidateUTF8,
unmarshal: consumeStringValueValidateUTF8,
merge: mergeScalarValue,
}
func ( protoreflect.Value, int, marshalOptions) ( int) {
:= .List()
for , := 0, .Len(); < ; ++ {
:= .Get()
+= + protowire.SizeBytes(len(.String()))
}
return
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
:= .List()
for , := 0, .Len(); < ; ++ {
:= .Get()
= protowire.AppendVarint(, )
= protowire.AppendString(, .String())
}
return , nil
}
func ( []byte, protoreflect.Value, protowire.Number, protowire.Type, unmarshalOptions) ( protoreflect.Value, unmarshalOutput, error) {
:= .List()
if != protowire.BytesType {
return protoreflect.Value{}, , errUnknown
}
, := protowire.ConsumeBytes()
if < 0 {
return protoreflect.Value{}, , errDecode
}
.Append(protoreflect.ValueOfString(string()))
.n =
return , , nil
}
var coderStringSliceValue = valueCoderFuncs{
size: sizeStringSliceValue,
marshal: appendStringSliceValue,
unmarshal: consumeStringSliceValue,
merge: mergeListValue,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Bytes()
return .tagsize + protowire.SizeBytes(len())
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Bytes()
= protowire.AppendVarint(, .wiretag)
= protowire.AppendBytes(, )
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.BytesType {
return , errUnknown
}
, := protowire.ConsumeBytes()
if < 0 {
return , errDecode
}
*.Bytes() = append(emptyBuf[:], ...)
.n =
return , nil
}
var coderBytes = pointerCoderFuncs{
size: sizeBytes,
marshal: appendBytes,
unmarshal: consumeBytes,
merge: mergeBytes,
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Bytes()
= protowire.AppendVarint(, .wiretag)
= protowire.AppendBytes(, )
if !utf8.Valid() {
return , errInvalidUTF8{}
}
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.BytesType {
return , errUnknown
}
, := protowire.ConsumeBytes()
if < 0 {
return , errDecode
}
if !utf8.Valid() {
return , errInvalidUTF8{}
}
*.Bytes() = append(emptyBuf[:], ...)
.n =
return , nil
}
var coderBytesValidateUTF8 = pointerCoderFuncs{
size: sizeBytes,
marshal: appendBytesValidateUTF8,
unmarshal: consumeBytesValidateUTF8,
merge: mergeBytes,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.Bytes()
if len() == 0 {
return 0
}
return .tagsize + protowire.SizeBytes(len())
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Bytes()
if len() == 0 {
return , nil
}
= protowire.AppendVarint(, .wiretag)
= protowire.AppendBytes(, )
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.BytesType {
return , errUnknown
}
, := protowire.ConsumeBytes()
if < 0 {
return , errDecode
}
*.Bytes() = append(([]byte)(nil), ...)
.n =
return , nil
}
var coderBytesNoZero = pointerCoderFuncs{
size: sizeBytesNoZero,
marshal: appendBytesNoZero,
unmarshal: consumeBytesNoZero,
merge: mergeBytesNoZero,
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.Bytes()
if len() == 0 {
return , nil
}
= protowire.AppendVarint(, .wiretag)
= protowire.AppendBytes(, )
if !utf8.Valid() {
return , errInvalidUTF8{}
}
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.BytesType {
return , errUnknown
}
, := protowire.ConsumeBytes()
if < 0 {
return , errDecode
}
if !utf8.Valid() {
return , errInvalidUTF8{}
}
*.Bytes() = append(([]byte)(nil), ...)
.n =
return , nil
}
var coderBytesNoZeroValidateUTF8 = pointerCoderFuncs{
size: sizeBytesNoZero,
marshal: appendBytesNoZeroValidateUTF8,
unmarshal: consumeBytesNoZeroValidateUTF8,
merge: mergeBytesNoZero,
}
func ( pointer, *coderFieldInfo, marshalOptions) ( int) {
:= *.BytesSlice()
for , := range {
+= .tagsize + protowire.SizeBytes(len())
}
return
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.BytesSlice()
for , := range {
= protowire.AppendVarint(, .wiretag)
= protowire.AppendBytes(, )
}
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
:= .BytesSlice()
if != protowire.BytesType {
return , errUnknown
}
, := protowire.ConsumeBytes()
if < 0 {
return , errDecode
}
* = append(*, append(emptyBuf[:], ...))
.n =
return , nil
}
var coderBytesSlice = pointerCoderFuncs{
size: sizeBytesSlice,
marshal: appendBytesSlice,
unmarshal: consumeBytesSlice,
merge: mergeBytesSlice,
}
func ( []byte, pointer, *coderFieldInfo, marshalOptions) ([]byte, error) {
:= *.BytesSlice()
for , := range {
= protowire.AppendVarint(, .wiretag)
= protowire.AppendBytes(, )
if !utf8.Valid() {
return , errInvalidUTF8{}
}
}
return , nil
}
func ( []byte, pointer, protowire.Type, *coderFieldInfo, unmarshalOptions) ( unmarshalOutput, error) {
if != protowire.BytesType {
return , errUnknown
}
, := protowire.ConsumeBytes()
if < 0 {
return , errDecode
}
if !utf8.Valid() {
return , errInvalidUTF8{}
}
:= .BytesSlice()
* = append(*, append(emptyBuf[:], ...))
.n =
return , nil
}
var coderBytesSliceValidateUTF8 = pointerCoderFuncs{
size: sizeBytesSlice,
marshal: appendBytesSliceValidateUTF8,
unmarshal: consumeBytesSliceValidateUTF8,
merge: mergeBytesSlice,
}
func ( protoreflect.Value, int, marshalOptions) int {
return + protowire.SizeBytes(len(.Bytes()))
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
= protowire.AppendVarint(, )
= protowire.AppendBytes(, .Bytes())
return , nil
}
func ( []byte, protoreflect.Value, protowire.Number, protowire.Type, unmarshalOptions) ( protoreflect.Value, unmarshalOutput, error) {
if != protowire.BytesType {
return protoreflect.Value{}, , errUnknown
}
, := protowire.ConsumeBytes()
if < 0 {
return protoreflect.Value{}, , errDecode
}
.n =
return protoreflect.ValueOfBytes(append(emptyBuf[:], ...)), , nil
}
var coderBytesValue = valueCoderFuncs{
size: sizeBytesValue,
marshal: appendBytesValue,
unmarshal: consumeBytesValue,
merge: mergeBytesValue,
}
func ( protoreflect.Value, int, marshalOptions) ( int) {
:= .List()
for , := 0, .Len(); < ; ++ {
:= .Get()
+= + protowire.SizeBytes(len(.Bytes()))
}
return
}
func ( []byte, protoreflect.Value, uint64, marshalOptions) ([]byte, error) {
:= .List()
for , := 0, .Len(); < ; ++ {
:= .Get()
= protowire.AppendVarint(, )
= protowire.AppendBytes(, .Bytes())
}
return , nil
}
func ( []byte, protoreflect.Value, protowire.Number, protowire.Type, unmarshalOptions) ( protoreflect.Value, unmarshalOutput, error) {
:= .List()
if != protowire.BytesType {
return protoreflect.Value{}, , errUnknown
}
, := protowire.ConsumeBytes()
if < 0 {
return protoreflect.Value{}, , errDecode
}
.Append(protoreflect.ValueOfBytes(append(emptyBuf[:], ...)))
.n =
return , , nil
}
var coderBytesSliceValue = valueCoderFuncs{
size: sizeBytesSliceValue,
marshal: appendBytesSliceValue,
unmarshal: consumeBytesSliceValue,
merge: mergeBytesListValue,
}
var emptyBuf [0]byte
var wireTypes = map[protoreflect.Kind]protowire.Type{
protoreflect.BoolKind: protowire.VarintType,
protoreflect.EnumKind: protowire.VarintType,
protoreflect.Int32Kind: protowire.VarintType,
protoreflect.Sint32Kind: protowire.VarintType,
protoreflect.Uint32Kind: protowire.VarintType,
protoreflect.Int64Kind: protowire.VarintType,
protoreflect.Sint64Kind: protowire.VarintType,
protoreflect.Uint64Kind: protowire.VarintType,
protoreflect.Sfixed32Kind: protowire.Fixed32Type,
protoreflect.Fixed32Kind: protowire.Fixed32Type,
protoreflect.FloatKind: protowire.Fixed32Type,
protoreflect.Sfixed64Kind: protowire.Fixed64Type,
protoreflect.Fixed64Kind: protowire.Fixed64Type,
protoreflect.DoubleKind: protowire.Fixed64Type,
protoreflect.StringKind: protowire.BytesType,
protoreflect.BytesKind: protowire.BytesType,
protoreflect.MessageKind: protowire.BytesType,
protoreflect.GroupKind: protowire.StartGroupType,
}