Debian Codegraph @

envoy/config/core/v3/proxy_protocol_vtproto.pb.go

raw
1 //go:build vtprotobuf
2 // +build vtprotobuf
3
4 // Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
5 // source: envoy/config/core/v3/proxy_protocol.proto
6
7 package corev3
8
9 import (
10 protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
11 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
12 )
13
14 const (
15 // Verify that this generated code is sufficiently up-to-date.
16 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
17 // Verify that runtime/protoimpl is sufficiently up-to-date.
18 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
19 )
20
21 func (m *ProxyProtocolPassThroughTLVs) MarshalVTStrict() (dAtA []byte, err error) {
22 if m == nil {
23 return nil, nil
24 }
25 size := m.SizeVT()
26 dAtA = make([]byte, size)
27 n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
28 if err != nil {
29 return nil, err
30 }
31 return dAtA[:n], nil
32 }
33
34 func (m *ProxyProtocolPassThroughTLVs) MarshalToVTStrict(dAtA []byte) (int, error) {
35 size := m.SizeVT()
36 return m.MarshalToSizedBufferVTStrict(dAtA[:size])
37 }
38
39 func (m *ProxyProtocolPassThroughTLVs) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
40 if m == nil {
41 return 0, nil
42 }
43 i := len(dAtA)
44 _ = i
45 var l int
46 _ = l
47 if m.unknownFields != nil {
48 i -= len(m.unknownFields)
49 copy(dAtA[i:], m.unknownFields)
50 }
51 if len(m.TlvType) > 0 {
52 var pksize2 int
53 for _, num := range m.TlvType {
54 pksize2 += protohelpers.SizeOfVarint(uint64(num))
55 }
56 i -= pksize2
57 j1 := i
58 for _, num := range m.TlvType {
59 for num >= 1<<7 {
60 dAtA[j1] = uint8(uint64(num)&0x7f | 0x80)
61 num >>= 7
62 j1++
63 }
64 dAtA[j1] = uint8(num)
65 j1++
66 }
67 i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize2))
68 i--
69 dAtA[i] = 0x12
70 }
71 if m.MatchType != 0 {
72 i = protohelpers.EncodeVarint(dAtA, i, uint64(m.MatchType))
73 i--
74 dAtA[i] = 0x8
75 }
76 return len(dAtA) - i, nil
77 }
78
79 func (m *ProxyProtocolConfig) MarshalVTStrict() (dAtA []byte, err error) {
80 if m == nil {
81 return nil, nil
82 }
83 size := m.SizeVT()
84 dAtA = make([]byte, size)
85 n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
86 if err != nil {
87 return nil, err
88 }
89 return dAtA[:n], nil
90 }
91
92 func (m *ProxyProtocolConfig) MarshalToVTStrict(dAtA []byte) (int, error) {
93 size := m.SizeVT()
94 return m.MarshalToSizedBufferVTStrict(dAtA[:size])
95 }
96
97 func (m *ProxyProtocolConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
98 if m == nil {
99 return 0, nil
100 }
101 i := len(dAtA)
102 _ = i
103 var l int
104 _ = l
105 if m.unknownFields != nil {
106 i -= len(m.unknownFields)
107 copy(dAtA[i:], m.unknownFields)
108 }
109 if m.PassThroughTlvs != nil {
110 size, err := m.PassThroughTlvs.MarshalToSizedBufferVTStrict(dAtA[:i])
111 if err != nil {
112 return 0, err
113 }
114 i -= size
115 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
116 i--
117 dAtA[i] = 0x12
118 }
119 if m.Version != 0 {
120 i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Version))
121 i--
122 dAtA[i] = 0x8
123 }
124 return len(dAtA) - i, nil
125 }
126
127 func (m *ProxyProtocolPassThroughTLVs) SizeVT() (n int) {
128 if m == nil {
129 return 0
130 }
131 var l int
132 _ = l
133 if m.MatchType != 0 {
134 n += 1 + protohelpers.SizeOfVarint(uint64(m.MatchType))
135 }
136 if len(m.TlvType) > 0 {
137 l = 0
138 for _, e := range m.TlvType {
139 l += protohelpers.SizeOfVarint(uint64(e))
140 }
141 n += 1 + protohelpers.SizeOfVarint(uint64(l)) + l
142 }
143 n += len(m.unknownFields)
144 return n
145 }
146
147 func (m *ProxyProtocolConfig) SizeVT() (n int) {
148 if m == nil {
149 return 0
150 }
151 var l int
152 _ = l
153 if m.Version != 0 {
154 n += 1 + protohelpers.SizeOfVarint(uint64(m.Version))
155 }
156 if m.PassThroughTlvs != nil {
157 l = m.PassThroughTlvs.SizeVT()
158 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
159 }
160 n += len(m.unknownFields)
161 return n
162 }