| 1 |
//go:build vtprotobuf |
| 2 |
// +build vtprotobuf |
| 3 |
|
| 4 |
// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. |
| 5 |
// source: envoy/extensions/access_loggers/grpc/v3/als.proto |
| 6 |
|
| 7 |
package grpcv3 |
| 8 |
|
| 9 |
import ( |
| 10 |
protohelpers "github.com/planetscale/vtprotobuf/protohelpers" |
| 11 |
durationpb "github.com/planetscale/vtprotobuf/types/known/durationpb" |
| 12 |
wrapperspb "github.com/planetscale/vtprotobuf/types/known/wrapperspb" |
| 13 |
proto "google.golang.org/protobuf/proto" |
| 14 |
protoimpl "google.golang.org/protobuf/runtime/protoimpl" |
| 15 |
) |
| 16 |
|
| 17 |
const ( |
| 18 |
// Verify that this generated code is sufficiently up-to-date. |
| 19 |
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) |
| 20 |
// Verify that runtime/protoimpl is sufficiently up-to-date. |
| 21 |
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) |
| 22 |
) |
| 23 |
|
| 24 |
func (m *HttpGrpcAccessLogConfig) MarshalVTStrict() (dAtA []byte, err error) { |
| 25 |
if m == nil { |
| 26 |
return nil, nil |
| 27 |
} |
| 28 |
size := m.SizeVT() |
| 29 |
dAtA = make([]byte, size) |
| 30 |
n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) |
| 31 |
if err != nil { |
| 32 |
return nil, err |
| 33 |
} |
| 34 |
return dAtA[:n], nil |
| 35 |
} |
| 36 |
|
| 37 |
func (m *HttpGrpcAccessLogConfig) MarshalToVTStrict(dAtA []byte) (int, error) { |
| 38 |
size := m.SizeVT() |
| 39 |
return m.MarshalToSizedBufferVTStrict(dAtA[:size]) |
| 40 |
} |
| 41 |
|
| 42 |
func (m *HttpGrpcAccessLogConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { |
| 43 |
if m == nil { |
| 44 |
return 0, nil |
| 45 |
} |
| 46 |
i := len(dAtA) |
| 47 |
_ = i |
| 48 |
var l int |
| 49 |
_ = l |
| 50 |
if m.unknownFields != nil { |
| 51 |
i -= len(m.unknownFields) |
| 52 |
copy(dAtA[i:], m.unknownFields) |
| 53 |
} |
| 54 |
if len(m.AdditionalResponseTrailersToLog) > 0 { |
| 55 |
for iNdEx := len(m.AdditionalResponseTrailersToLog) - 1; iNdEx >= 0; iNdEx-- { |
| 56 |
i -= len(m.AdditionalResponseTrailersToLog[iNdEx]) |
| 57 |
copy(dAtA[i:], m.AdditionalResponseTrailersToLog[iNdEx]) |
| 58 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AdditionalResponseTrailersToLog[iNdEx]))) |
| 59 |
i-- |
| 60 |
dAtA[i] = 0x22 |
| 61 |
} |
| 62 |
} |
| 63 |
if len(m.AdditionalResponseHeadersToLog) > 0 { |
| 64 |
for iNdEx := len(m.AdditionalResponseHeadersToLog) - 1; iNdEx >= 0; iNdEx-- { |
| 65 |
i -= len(m.AdditionalResponseHeadersToLog[iNdEx]) |
| 66 |
copy(dAtA[i:], m.AdditionalResponseHeadersToLog[iNdEx]) |
| 67 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AdditionalResponseHeadersToLog[iNdEx]))) |
| 68 |
i-- |
| 69 |
dAtA[i] = 0x1a |
| 70 |
} |
| 71 |
} |
| 72 |
if len(m.AdditionalRequestHeadersToLog) > 0 { |
| 73 |
for iNdEx := len(m.AdditionalRequestHeadersToLog) - 1; iNdEx >= 0; iNdEx-- { |
| 74 |
i -= len(m.AdditionalRequestHeadersToLog[iNdEx]) |
| 75 |
copy(dAtA[i:], m.AdditionalRequestHeadersToLog[iNdEx]) |
| 76 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AdditionalRequestHeadersToLog[iNdEx]))) |
| 77 |
i-- |
| 78 |
dAtA[i] = 0x12 |
| 79 |
} |
| 80 |
} |
| 81 |
if m.CommonConfig != nil { |
| 82 |
size, err := m.CommonConfig.MarshalToSizedBufferVTStrict(dAtA[:i]) |
| 83 |
if err != nil { |
| 84 |
return 0, err |
| 85 |
} |
| 86 |
i -= size |
| 87 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) |
| 88 |
i-- |
| 89 |
dAtA[i] = 0xa |
| 90 |
} |
| 91 |
return len(dAtA) - i, nil |
| 92 |
} |
| 93 |
|
| 94 |
func (m *TcpGrpcAccessLogConfig) MarshalVTStrict() (dAtA []byte, err error) { |
| 95 |
if m == nil { |
| 96 |
return nil, nil |
| 97 |
} |
| 98 |
size := m.SizeVT() |
| 99 |
dAtA = make([]byte, size) |
| 100 |
n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) |
| 101 |
if err != nil { |
| 102 |
return nil, err |
| 103 |
} |
| 104 |
return dAtA[:n], nil |
| 105 |
} |
| 106 |
|
| 107 |
func (m *TcpGrpcAccessLogConfig) MarshalToVTStrict(dAtA []byte) (int, error) { |
| 108 |
size := m.SizeVT() |
| 109 |
return m.MarshalToSizedBufferVTStrict(dAtA[:size]) |
| 110 |
} |
| 111 |
|
| 112 |
func (m *TcpGrpcAccessLogConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { |
| 113 |
if m == nil { |
| 114 |
return 0, nil |
| 115 |
} |
| 116 |
i := len(dAtA) |
| 117 |
_ = i |
| 118 |
var l int |
| 119 |
_ = l |
| 120 |
if m.unknownFields != nil { |
| 121 |
i -= len(m.unknownFields) |
| 122 |
copy(dAtA[i:], m.unknownFields) |
| 123 |
} |
| 124 |
if m.CommonConfig != nil { |
| 125 |
size, err := m.CommonConfig.MarshalToSizedBufferVTStrict(dAtA[:i]) |
| 126 |
if err != nil { |
| 127 |
return 0, err |
| 128 |
} |
| 129 |
i -= size |
| 130 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) |
| 131 |
i-- |
| 132 |
dAtA[i] = 0xa |
| 133 |
} |
| 134 |
return len(dAtA) - i, nil |
| 135 |
} |
| 136 |
|
| 137 |
func (m *CommonGrpcAccessLogConfig) MarshalVTStrict() (dAtA []byte, err error) { |
| 138 |
if m == nil { |
| 139 |
return nil, nil |
| 140 |
} |
| 141 |
size := m.SizeVT() |
| 142 |
dAtA = make([]byte, size) |
| 143 |
n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) |
| 144 |
if err != nil { |
| 145 |
return nil, err |
| 146 |
} |
| 147 |
return dAtA[:n], nil |
| 148 |
} |
| 149 |
|
| 150 |
func (m *CommonGrpcAccessLogConfig) MarshalToVTStrict(dAtA []byte) (int, error) { |
| 151 |
size := m.SizeVT() |
| 152 |
return m.MarshalToSizedBufferVTStrict(dAtA[:size]) |
| 153 |
} |
| 154 |
|
| 155 |
func (m *CommonGrpcAccessLogConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { |
| 156 |
if m == nil { |
| 157 |
return 0, nil |
| 158 |
} |
| 159 |
i := len(dAtA) |
| 160 |
_ = i |
| 161 |
var l int |
| 162 |
_ = l |
| 163 |
if m.unknownFields != nil { |
| 164 |
i -= len(m.unknownFields) |
| 165 |
copy(dAtA[i:], m.unknownFields) |
| 166 |
} |
| 167 |
if len(m.CustomTags) > 0 { |
| 168 |
for iNdEx := len(m.CustomTags) - 1; iNdEx >= 0; iNdEx-- { |
| 169 |
if vtmsg, ok := interface{}(m.CustomTags[iNdEx]).(interface { |
| 170 |
MarshalToSizedBufferVTStrict([]byte) (int, error) |
| 171 |
}); ok { |
| 172 |
size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i]) |
| 173 |
if err != nil { |
| 174 |
return 0, err |
| 175 |
} |
| 176 |
i -= size |
| 177 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) |
| 178 |
} else { |
| 179 |
encoded, err := proto.Marshal(m.CustomTags[iNdEx]) |
| 180 |
if err != nil { |
| 181 |
return 0, err |
| 182 |
} |
| 183 |
i -= len(encoded) |
| 184 |
copy(dAtA[i:], encoded) |
| 185 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) |
| 186 |
} |
| 187 |
i-- |
| 188 |
dAtA[i] = 0x42 |
| 189 |
} |
| 190 |
} |
| 191 |
if m.GrpcStreamRetryPolicy != nil { |
| 192 |
if vtmsg, ok := interface{}(m.GrpcStreamRetryPolicy).(interface { |
| 193 |
MarshalToSizedBufferVTStrict([]byte) (int, error) |
| 194 |
}); ok { |
| 195 |
size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i]) |
| 196 |
if err != nil { |
| 197 |
return 0, err |
| 198 |
} |
| 199 |
i -= size |
| 200 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) |
| 201 |
} else { |
| 202 |
encoded, err := proto.Marshal(m.GrpcStreamRetryPolicy) |
| 203 |
if err != nil { |
| 204 |
return 0, err |
| 205 |
} |
| 206 |
i -= len(encoded) |
| 207 |
copy(dAtA[i:], encoded) |
| 208 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) |
| 209 |
} |
| 210 |
i-- |
| 211 |
dAtA[i] = 0x3a |
| 212 |
} |
| 213 |
if m.TransportApiVersion != 0 { |
| 214 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(m.TransportApiVersion)) |
| 215 |
i-- |
| 216 |
dAtA[i] = 0x30 |
| 217 |
} |
| 218 |
if len(m.FilterStateObjectsToLog) > 0 { |
| 219 |
for iNdEx := len(m.FilterStateObjectsToLog) - 1; iNdEx >= 0; iNdEx-- { |
| 220 |
i -= len(m.FilterStateObjectsToLog[iNdEx]) |
| 221 |
copy(dAtA[i:], m.FilterStateObjectsToLog[iNdEx]) |
| 222 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FilterStateObjectsToLog[iNdEx]))) |
| 223 |
i-- |
| 224 |
dAtA[i] = 0x2a |
| 225 |
} |
| 226 |
} |
| 227 |
if m.BufferSizeBytes != nil { |
| 228 |
size, err := (*wrapperspb.UInt32Value)(m.BufferSizeBytes).MarshalToSizedBufferVTStrict(dAtA[:i]) |
| 229 |
if err != nil { |
| 230 |
return 0, err |
| 231 |
} |
| 232 |
i -= size |
| 233 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) |
| 234 |
i-- |
| 235 |
dAtA[i] = 0x22 |
| 236 |
} |
| 237 |
if m.BufferFlushInterval != nil { |
| 238 |
size, err := (*durationpb.Duration)(m.BufferFlushInterval).MarshalToSizedBufferVTStrict(dAtA[:i]) |
| 239 |
if err != nil { |
| 240 |
return 0, err |
| 241 |
} |
| 242 |
i -= size |
| 243 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) |
| 244 |
i-- |
| 245 |
dAtA[i] = 0x1a |
| 246 |
} |
| 247 |
if m.GrpcService != nil { |
| 248 |
if vtmsg, ok := interface{}(m.GrpcService).(interface { |
| 249 |
MarshalToSizedBufferVTStrict([]byte) (int, error) |
| 250 |
}); ok { |
| 251 |
size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i]) |
| 252 |
if err != nil { |
| 253 |
return 0, err |
| 254 |
} |
| 255 |
i -= size |
| 256 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) |
| 257 |
} else { |
| 258 |
encoded, err := proto.Marshal(m.GrpcService) |
| 259 |
if err != nil { |
| 260 |
return 0, err |
| 261 |
} |
| 262 |
i -= len(encoded) |
| 263 |
copy(dAtA[i:], encoded) |
| 264 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) |
| 265 |
} |
| 266 |
i-- |
| 267 |
dAtA[i] = 0x12 |
| 268 |
} |
| 269 |
if len(m.LogName) > 0 { |
| 270 |
i -= len(m.LogName) |
| 271 |
copy(dAtA[i:], m.LogName) |
| 272 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.LogName))) |
| 273 |
i-- |
| 274 |
dAtA[i] = 0xa |
| 275 |
} |
| 276 |
return len(dAtA) - i, nil |
| 277 |
} |
| 278 |
|
| 279 |
func (m *HttpGrpcAccessLogConfig) SizeVT() (n int) { |
| 280 |
if m == nil { |
| 281 |
return 0 |
| 282 |
} |
| 283 |
var l int |
| 284 |
_ = l |
| 285 |
if m.CommonConfig != nil { |
| 286 |
l = m.CommonConfig.SizeVT() |
| 287 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 288 |
} |
| 289 |
if len(m.AdditionalRequestHeadersToLog) > 0 { |
| 290 |
for _, s := range m.AdditionalRequestHeadersToLog { |
| 291 |
l = len(s) |
| 292 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 293 |
} |
| 294 |
} |
| 295 |
if len(m.AdditionalResponseHeadersToLog) > 0 { |
| 296 |
for _, s := range m.AdditionalResponseHeadersToLog { |
| 297 |
l = len(s) |
| 298 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 299 |
} |
| 300 |
} |
| 301 |
if len(m.AdditionalResponseTrailersToLog) > 0 { |
| 302 |
for _, s := range m.AdditionalResponseTrailersToLog { |
| 303 |
l = len(s) |
| 304 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 305 |
} |
| 306 |
} |
| 307 |
n += len(m.unknownFields) |
| 308 |
return n |
| 309 |
} |
| 310 |
|
| 311 |
func (m *TcpGrpcAccessLogConfig) SizeVT() (n int) { |
| 312 |
if m == nil { |
| 313 |
return 0 |
| 314 |
} |
| 315 |
var l int |
| 316 |
_ = l |
| 317 |
if m.CommonConfig != nil { |
| 318 |
l = m.CommonConfig.SizeVT() |
| 319 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 320 |
} |
| 321 |
n += len(m.unknownFields) |
| 322 |
return n |
| 323 |
} |
| 324 |
|
| 325 |
func (m *CommonGrpcAccessLogConfig) SizeVT() (n int) { |
| 326 |
if m == nil { |
| 327 |
return 0 |
| 328 |
} |
| 329 |
var l int |
| 330 |
_ = l |
| 331 |
l = len(m.LogName) |
| 332 |
if l > 0 { |
| 333 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 334 |
} |
| 335 |
if m.GrpcService != nil { |
| 336 |
if size, ok := interface{}(m.GrpcService).(interface { |
| 337 |
SizeVT() int |
| 338 |
}); ok { |
| 339 |
l = size.SizeVT() |
| 340 |
} else { |
| 341 |
l = proto.Size(m.GrpcService) |
| 342 |
} |
| 343 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 344 |
} |
| 345 |
if m.BufferFlushInterval != nil { |
| 346 |
l = (*durationpb.Duration)(m.BufferFlushInterval).SizeVT() |
| 347 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 348 |
} |
| 349 |
if m.BufferSizeBytes != nil { |
| 350 |
l = (*wrapperspb.UInt32Value)(m.BufferSizeBytes).SizeVT() |
| 351 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 352 |
} |
| 353 |
if len(m.FilterStateObjectsToLog) > 0 { |
| 354 |
for _, s := range m.FilterStateObjectsToLog { |
| 355 |
l = len(s) |
| 356 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 357 |
} |
| 358 |
} |
| 359 |
if m.TransportApiVersion != 0 { |
| 360 |
n += 1 + protohelpers.SizeOfVarint(uint64(m.TransportApiVersion)) |
| 361 |
} |
| 362 |
if m.GrpcStreamRetryPolicy != nil { |
| 363 |
if size, ok := interface{}(m.GrpcStreamRetryPolicy).(interface { |
| 364 |
SizeVT() int |
| 365 |
}); ok { |
| 366 |
l = size.SizeVT() |
| 367 |
} else { |
| 368 |
l = proto.Size(m.GrpcStreamRetryPolicy) |
| 369 |
} |
| 370 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 371 |
} |
| 372 |
if len(m.CustomTags) > 0 { |
| 373 |
for _, e := range m.CustomTags { |
| 374 |
if size, ok := interface{}(e).(interface { |
| 375 |
SizeVT() int |
| 376 |
}); ok { |
| 377 |
l = size.SizeVT() |
| 378 |
} else { |
| 379 |
l = proto.Size(e) |
| 380 |
} |
| 381 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 382 |
} |
| 383 |
} |
| 384 |
n += len(m.unknownFields) |
| 385 |
return n |
| 386 |
} |