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