| 1 |
//go:build vtprotobuf |
| 2 |
// +build vtprotobuf |
| 3 |
|
| 4 |
// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. |
| 5 |
// source: envoy/config/accesslog/v2/als.proto |
| 6 |
|
| 7 |
package accesslogv2 |
| 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.FilterStateObjectsToLog) > 0 { |
| 168 |
for iNdEx := len(m.FilterStateObjectsToLog) - 1; iNdEx >= 0; iNdEx-- { |
| 169 |
i -= len(m.FilterStateObjectsToLog[iNdEx]) |
| 170 |
copy(dAtA[i:], m.FilterStateObjectsToLog[iNdEx]) |
| 171 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FilterStateObjectsToLog[iNdEx]))) |
| 172 |
i-- |
| 173 |
dAtA[i] = 0x2a |
| 174 |
} |
| 175 |
} |
| 176 |
if m.BufferSizeBytes != nil { |
| 177 |
size, err := (*wrapperspb.UInt32Value)(m.BufferSizeBytes).MarshalToSizedBufferVTStrict(dAtA[:i]) |
| 178 |
if err != nil { |
| 179 |
return 0, err |
| 180 |
} |
| 181 |
i -= size |
| 182 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) |
| 183 |
i-- |
| 184 |
dAtA[i] = 0x22 |
| 185 |
} |
| 186 |
if m.BufferFlushInterval != nil { |
| 187 |
size, err := (*durationpb.Duration)(m.BufferFlushInterval).MarshalToSizedBufferVTStrict(dAtA[:i]) |
| 188 |
if err != nil { |
| 189 |
return 0, err |
| 190 |
} |
| 191 |
i -= size |
| 192 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) |
| 193 |
i-- |
| 194 |
dAtA[i] = 0x1a |
| 195 |
} |
| 196 |
if m.GrpcService != nil { |
| 197 |
if vtmsg, ok := interface{}(m.GrpcService).(interface { |
| 198 |
MarshalToSizedBufferVTStrict([]byte) (int, error) |
| 199 |
}); ok { |
| 200 |
size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i]) |
| 201 |
if err != nil { |
| 202 |
return 0, err |
| 203 |
} |
| 204 |
i -= size |
| 205 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) |
| 206 |
} else { |
| 207 |
encoded, err := proto.Marshal(m.GrpcService) |
| 208 |
if err != nil { |
| 209 |
return 0, err |
| 210 |
} |
| 211 |
i -= len(encoded) |
| 212 |
copy(dAtA[i:], encoded) |
| 213 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) |
| 214 |
} |
| 215 |
i-- |
| 216 |
dAtA[i] = 0x12 |
| 217 |
} |
| 218 |
if len(m.LogName) > 0 { |
| 219 |
i -= len(m.LogName) |
| 220 |
copy(dAtA[i:], m.LogName) |
| 221 |
i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.LogName))) |
| 222 |
i-- |
| 223 |
dAtA[i] = 0xa |
| 224 |
} |
| 225 |
return len(dAtA) - i, nil |
| 226 |
} |
| 227 |
|
| 228 |
func (m *HttpGrpcAccessLogConfig) SizeVT() (n int) { |
| 229 |
if m == nil { |
| 230 |
return 0 |
| 231 |
} |
| 232 |
var l int |
| 233 |
_ = l |
| 234 |
if m.CommonConfig != nil { |
| 235 |
l = m.CommonConfig.SizeVT() |
| 236 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 237 |
} |
| 238 |
if len(m.AdditionalRequestHeadersToLog) > 0 { |
| 239 |
for _, s := range m.AdditionalRequestHeadersToLog { |
| 240 |
l = len(s) |
| 241 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 242 |
} |
| 243 |
} |
| 244 |
if len(m.AdditionalResponseHeadersToLog) > 0 { |
| 245 |
for _, s := range m.AdditionalResponseHeadersToLog { |
| 246 |
l = len(s) |
| 247 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 248 |
} |
| 249 |
} |
| 250 |
if len(m.AdditionalResponseTrailersToLog) > 0 { |
| 251 |
for _, s := range m.AdditionalResponseTrailersToLog { |
| 252 |
l = len(s) |
| 253 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 254 |
} |
| 255 |
} |
| 256 |
n += len(m.unknownFields) |
| 257 |
return n |
| 258 |
} |
| 259 |
|
| 260 |
func (m *TcpGrpcAccessLogConfig) SizeVT() (n int) { |
| 261 |
if m == nil { |
| 262 |
return 0 |
| 263 |
} |
| 264 |
var l int |
| 265 |
_ = l |
| 266 |
if m.CommonConfig != nil { |
| 267 |
l = m.CommonConfig.SizeVT() |
| 268 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 269 |
} |
| 270 |
n += len(m.unknownFields) |
| 271 |
return n |
| 272 |
} |
| 273 |
|
| 274 |
func (m *CommonGrpcAccessLogConfig) SizeVT() (n int) { |
| 275 |
if m == nil { |
| 276 |
return 0 |
| 277 |
} |
| 278 |
var l int |
| 279 |
_ = l |
| 280 |
l = len(m.LogName) |
| 281 |
if l > 0 { |
| 282 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 283 |
} |
| 284 |
if m.GrpcService != nil { |
| 285 |
if size, ok := interface{}(m.GrpcService).(interface { |
| 286 |
SizeVT() int |
| 287 |
}); ok { |
| 288 |
l = size.SizeVT() |
| 289 |
} else { |
| 290 |
l = proto.Size(m.GrpcService) |
| 291 |
} |
| 292 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 293 |
} |
| 294 |
if m.BufferFlushInterval != nil { |
| 295 |
l = (*durationpb.Duration)(m.BufferFlushInterval).SizeVT() |
| 296 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 297 |
} |
| 298 |
if m.BufferSizeBytes != nil { |
| 299 |
l = (*wrapperspb.UInt32Value)(m.BufferSizeBytes).SizeVT() |
| 300 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 301 |
} |
| 302 |
if len(m.FilterStateObjectsToLog) > 0 { |
| 303 |
for _, s := range m.FilterStateObjectsToLog { |
| 304 |
l = len(s) |
| 305 |
n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) |
| 306 |
} |
| 307 |
} |
| 308 |
n += len(m.unknownFields) |
| 309 |
return n |
| 310 |
} |