Debian Codegraph @

envoy/extensions/transport_sockets/internal_upstream/v3/internal_upstream_vtproto.pb.go

raw symbols SCIP
1 //go:build vtprotobuf
2 // +build vtprotobuf
3
4 // Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
5 // source: envoy/extensions/transport_sockets/internal_upstream/v3/internal_upstream.proto
6
7 package internal_upstreamv3
8
9 import (
10 protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
11 proto "google.golang.org/protobuf/proto"
12 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
13 )
14
15 const (
16 // Verify that this generated code is sufficiently up-to-date.
17 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
18 // Verify that runtime/protoimpl is sufficiently up-to-date.
19 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
20 )
21
22 func (m *InternalUpstreamTransport_MetadataValueSource) MarshalVTStrict() (dAtA []byte, err error) {
23 if m == nil {
24 return nil, nil
25 }
26 size := m.SizeVT()
27 dAtA = make([]byte, size)
28 n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
29 if err != nil {
30 return nil, err
31 }
32 return dAtA[:n], nil
33 }
34
35 func (m *InternalUpstreamTransport_MetadataValueSource) MarshalToVTStrict(dAtA []byte) (int, error) {
36 size := m.SizeVT()
37 return m.MarshalToSizedBufferVTStrict(dAtA[:size])
38 }
39
40 func (m *InternalUpstreamTransport_MetadataValueSource) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
41 if m == nil {
42 return 0, nil
43 }
44 i := len(dAtA)
45 _ = i
46 var l int
47 _ = l
48 if m.unknownFields != nil {
49 i -= len(m.unknownFields)
50 copy(dAtA[i:], m.unknownFields)
51 }
52 if len(m.Name) > 0 {
53 i -= len(m.Name)
54 copy(dAtA[i:], m.Name)
55 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
56 i--
57 dAtA[i] = 0x12
58 }
59 if m.Kind != nil {
60 if vtmsg, ok := interface{}(m.Kind).(interface {
61 MarshalToSizedBufferVTStrict([]byte) (int, error)
62 }); ok {
63 size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
64 if err != nil {
65 return 0, err
66 }
67 i -= size
68 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
69 } else {
70 encoded, err := proto.Marshal(m.Kind)
71 if err != nil {
72 return 0, err
73 }
74 i -= len(encoded)
75 copy(dAtA[i:], encoded)
76 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
77 }
78 i--
79 dAtA[i] = 0xa
80 }
81 return len(dAtA) - i, nil
82 }
83
84 func (m *InternalUpstreamTransport) MarshalVTStrict() (dAtA []byte, err error) {
85 if m == nil {
86 return nil, nil
87 }
88 size := m.SizeVT()
89 dAtA = make([]byte, size)
90 n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
91 if err != nil {
92 return nil, err
93 }
94 return dAtA[:n], nil
95 }
96
97 func (m *InternalUpstreamTransport) MarshalToVTStrict(dAtA []byte) (int, error) {
98 size := m.SizeVT()
99 return m.MarshalToSizedBufferVTStrict(dAtA[:size])
100 }
101
102 func (m *InternalUpstreamTransport) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
103 if m == nil {
104 return 0, nil
105 }
106 i := len(dAtA)
107 _ = i
108 var l int
109 _ = l
110 if m.unknownFields != nil {
111 i -= len(m.unknownFields)
112 copy(dAtA[i:], m.unknownFields)
113 }
114 if m.TransportSocket != nil {
115 if vtmsg, ok := interface{}(m.TransportSocket).(interface {
116 MarshalToSizedBufferVTStrict([]byte) (int, error)
117 }); ok {
118 size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
119 if err != nil {
120 return 0, err
121 }
122 i -= size
123 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
124 } else {
125 encoded, err := proto.Marshal(m.TransportSocket)
126 if err != nil {
127 return 0, err
128 }
129 i -= len(encoded)
130 copy(dAtA[i:], encoded)
131 i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
132 }
133 i--
134 dAtA[i] = 0x1a
135 }
136 if len(m.PassthroughMetadata) > 0 {
137 for iNdEx := len(m.PassthroughMetadata) - 1; iNdEx >= 0; iNdEx-- {
138 size, err := m.PassthroughMetadata[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i])
139 if err != nil {
140 return 0, err
141 }
142 i -= size
143 i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
144 i--
145 dAtA[i] = 0xa
146 }
147 }
148 return len(dAtA) - i, nil
149 }
150
151 func (m *InternalUpstreamTransport_MetadataValueSource) SizeVT() (n int) {
152 if m == nil {
153 return 0
154 }
155 var l int
156 _ = l
157 if m.Kind != nil {
158 if size, ok := interface{}(m.Kind).(interface {
159 SizeVT() int
160 }); ok {
161 l = size.SizeVT()
162 } else {
163 l = proto.Size(m.Kind)
164 }
165 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
166 }
167 l = len(m.Name)
168 if l > 0 {
169 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
170 }
171 n += len(m.unknownFields)
172 return n
173 }
174
175 func (m *InternalUpstreamTransport) SizeVT() (n int) {
176 if m == nil {
177 return 0
178 }
179 var l int
180 _ = l
181 if len(m.PassthroughMetadata) > 0 {
182 for _, e := range m.PassthroughMetadata {
183 l = e.SizeVT()
184 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
185 }
186 }
187 if m.TransportSocket != nil {
188 if size, ok := interface{}(m.TransportSocket).(interface {
189 SizeVT() int
190 }); ok {
191 l = size.SizeVT()
192 } else {
193 l = proto.Size(m.TransportSocket)
194 }
195 n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
196 }
197 n += len(m.unknownFields)
198 return n
199 }