blob: c5faf00c6477bdec7b637369c51b2f8eb986f3ed [file] [log] [blame]
Girish Gowdra64503432020-01-07 10:59:10 +05301// Code generated by protoc-gen-gogo. DO NOT EDIT.
2// source: auth.proto
3
Girish Gowdra64503432020-01-07 10:59:10 +05304package authpb
5
6import (
Girish Gowdra390f12f2021-07-01 15:53:49 -07007 fmt "fmt"
8 io "io"
Girish Gowdra64503432020-01-07 10:59:10 +05309 math "math"
Girish Gowdra390f12f2021-07-01 15:53:49 -070010 math_bits "math/bits"
Girish Gowdra64503432020-01-07 10:59:10 +053011
12 _ "github.com/gogo/protobuf/gogoproto"
Girish Gowdra390f12f2021-07-01 15:53:49 -070013 proto "github.com/golang/protobuf/proto"
Girish Gowdra64503432020-01-07 10:59:10 +053014)
15
16// Reference imports to suppress errors if they are not otherwise used.
17var _ = proto.Marshal
18var _ = fmt.Errorf
19var _ = math.Inf
20
21// This is a compile-time assertion to ensure that this generated file
22// is compatible with the proto package it is being compiled against.
23// A compilation error at this line likely means your copy of the
24// proto package needs to be updated.
25const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
26
27type Permission_Type int32
28
29const (
30 READ Permission_Type = 0
31 WRITE Permission_Type = 1
32 READWRITE Permission_Type = 2
33)
34
35var Permission_Type_name = map[int32]string{
36 0: "READ",
37 1: "WRITE",
38 2: "READWRITE",
39}
Girish Gowdra390f12f2021-07-01 15:53:49 -070040
Girish Gowdra64503432020-01-07 10:59:10 +053041var Permission_Type_value = map[string]int32{
42 "READ": 0,
43 "WRITE": 1,
44 "READWRITE": 2,
45}
46
47func (x Permission_Type) String() string {
48 return proto.EnumName(Permission_Type_name, int32(x))
49}
Girish Gowdra64503432020-01-07 10:59:10 +053050
Girish Gowdra390f12f2021-07-01 15:53:49 -070051func (Permission_Type) EnumDescriptor() ([]byte, []int) {
52 return fileDescriptor_8bbd6f3875b0e874, []int{1, 0}
Girish Gowdra64503432020-01-07 10:59:10 +053053}
54
Girish Gowdra64503432020-01-07 10:59:10 +053055// User is a single entry in the bucket authUsers
56type User struct {
Girish Gowdra390f12f2021-07-01 15:53:49 -070057 Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
58 Password []byte `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
59 Roles []string `protobuf:"bytes,3,rep,name=roles,proto3" json:"roles,omitempty"`
60 XXX_NoUnkeyedLiteral struct{} `json:"-"`
61 XXX_unrecognized []byte `json:"-"`
62 XXX_sizecache int32 `json:"-"`
Girish Gowdra64503432020-01-07 10:59:10 +053063}
64
Girish Gowdra390f12f2021-07-01 15:53:49 -070065func (m *User) Reset() { *m = User{} }
66func (m *User) String() string { return proto.CompactTextString(m) }
67func (*User) ProtoMessage() {}
68func (*User) Descriptor() ([]byte, []int) {
69 return fileDescriptor_8bbd6f3875b0e874, []int{0}
70}
71func (m *User) XXX_Unmarshal(b []byte) error {
72 return m.Unmarshal(b)
73}
74func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
75 if deterministic {
76 return xxx_messageInfo_User.Marshal(b, m, deterministic)
77 } else {
78 b = b[:cap(b)]
79 n, err := m.MarshalToSizedBuffer(b)
80 if err != nil {
81 return nil, err
82 }
83 return b[:n], nil
84 }
85}
86func (m *User) XXX_Merge(src proto.Message) {
87 xxx_messageInfo_User.Merge(m, src)
88}
89func (m *User) XXX_Size() int {
90 return m.Size()
91}
92func (m *User) XXX_DiscardUnknown() {
93 xxx_messageInfo_User.DiscardUnknown(m)
94}
95
96var xxx_messageInfo_User proto.InternalMessageInfo
Girish Gowdra64503432020-01-07 10:59:10 +053097
98// Permission is a single entity
99type Permission struct {
Girish Gowdra390f12f2021-07-01 15:53:49 -0700100 PermType Permission_Type `protobuf:"varint,1,opt,name=permType,proto3,enum=authpb.Permission_Type" json:"permType,omitempty"`
101 Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
102 RangeEnd []byte `protobuf:"bytes,3,opt,name=range_end,json=rangeEnd,proto3" json:"range_end,omitempty"`
103 XXX_NoUnkeyedLiteral struct{} `json:"-"`
104 XXX_unrecognized []byte `json:"-"`
105 XXX_sizecache int32 `json:"-"`
Girish Gowdra64503432020-01-07 10:59:10 +0530106}
107
Girish Gowdra390f12f2021-07-01 15:53:49 -0700108func (m *Permission) Reset() { *m = Permission{} }
109func (m *Permission) String() string { return proto.CompactTextString(m) }
110func (*Permission) ProtoMessage() {}
111func (*Permission) Descriptor() ([]byte, []int) {
112 return fileDescriptor_8bbd6f3875b0e874, []int{1}
113}
114func (m *Permission) XXX_Unmarshal(b []byte) error {
115 return m.Unmarshal(b)
116}
117func (m *Permission) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
118 if deterministic {
119 return xxx_messageInfo_Permission.Marshal(b, m, deterministic)
120 } else {
121 b = b[:cap(b)]
122 n, err := m.MarshalToSizedBuffer(b)
123 if err != nil {
124 return nil, err
125 }
126 return b[:n], nil
127 }
128}
129func (m *Permission) XXX_Merge(src proto.Message) {
130 xxx_messageInfo_Permission.Merge(m, src)
131}
132func (m *Permission) XXX_Size() int {
133 return m.Size()
134}
135func (m *Permission) XXX_DiscardUnknown() {
136 xxx_messageInfo_Permission.DiscardUnknown(m)
137}
138
139var xxx_messageInfo_Permission proto.InternalMessageInfo
Girish Gowdra64503432020-01-07 10:59:10 +0530140
141// Role is a single entry in the bucket authRoles
142type Role struct {
Girish Gowdra390f12f2021-07-01 15:53:49 -0700143 Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
144 KeyPermission []*Permission `protobuf:"bytes,2,rep,name=keyPermission,proto3" json:"keyPermission,omitempty"`
145 XXX_NoUnkeyedLiteral struct{} `json:"-"`
146 XXX_unrecognized []byte `json:"-"`
147 XXX_sizecache int32 `json:"-"`
Girish Gowdra64503432020-01-07 10:59:10 +0530148}
149
Girish Gowdra390f12f2021-07-01 15:53:49 -0700150func (m *Role) Reset() { *m = Role{} }
151func (m *Role) String() string { return proto.CompactTextString(m) }
152func (*Role) ProtoMessage() {}
153func (*Role) Descriptor() ([]byte, []int) {
154 return fileDescriptor_8bbd6f3875b0e874, []int{2}
155}
156func (m *Role) XXX_Unmarshal(b []byte) error {
157 return m.Unmarshal(b)
158}
159func (m *Role) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
160 if deterministic {
161 return xxx_messageInfo_Role.Marshal(b, m, deterministic)
162 } else {
163 b = b[:cap(b)]
164 n, err := m.MarshalToSizedBuffer(b)
165 if err != nil {
166 return nil, err
167 }
168 return b[:n], nil
169 }
170}
171func (m *Role) XXX_Merge(src proto.Message) {
172 xxx_messageInfo_Role.Merge(m, src)
173}
174func (m *Role) XXX_Size() int {
175 return m.Size()
176}
177func (m *Role) XXX_DiscardUnknown() {
178 xxx_messageInfo_Role.DiscardUnknown(m)
179}
180
181var xxx_messageInfo_Role proto.InternalMessageInfo
Girish Gowdra64503432020-01-07 10:59:10 +0530182
183func init() {
Girish Gowdra390f12f2021-07-01 15:53:49 -0700184 proto.RegisterEnum("authpb.Permission_Type", Permission_Type_name, Permission_Type_value)
Girish Gowdra64503432020-01-07 10:59:10 +0530185 proto.RegisterType((*User)(nil), "authpb.User")
186 proto.RegisterType((*Permission)(nil), "authpb.Permission")
187 proto.RegisterType((*Role)(nil), "authpb.Role")
Girish Gowdra64503432020-01-07 10:59:10 +0530188}
189
Girish Gowdra390f12f2021-07-01 15:53:49 -0700190func init() { proto.RegisterFile("auth.proto", fileDescriptor_8bbd6f3875b0e874) }
191
192var fileDescriptor_8bbd6f3875b0e874 = []byte{
193 // 288 bytes of a gzipped FileDescriptorProto
194 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0xc1, 0x4a, 0xc3, 0x30,
195 0x1c, 0xc6, 0x9b, 0xb6, 0x1b, 0xed, 0x5f, 0x27, 0x25, 0x0c, 0x0c, 0x13, 0x42, 0xe9, 0xa9, 0x78,
196 0xa8, 0xb0, 0x5d, 0xbc, 0x2a, 0xf6, 0x20, 0x78, 0x90, 0x50, 0xf1, 0x28, 0x1d, 0x0d, 0x75, 0x6c,
197 0x6d, 0x4a, 0x32, 0x91, 0xbe, 0x89, 0x07, 0x1f, 0x68, 0xc7, 0x3d, 0x82, 0xab, 0x2f, 0x22, 0x4d,
198 0x64, 0x43, 0xdc, 0xed, 0xfb, 0xbe, 0xff, 0x97, 0xe4, 0x97, 0x3f, 0x40, 0xfe, 0xb6, 0x7e, 0x4d,
199 0x1a, 0x29, 0xd6, 0x02, 0x0f, 0x7b, 0xdd, 0xcc, 0x27, 0xe3, 0x52, 0x94, 0x42, 0x47, 0x57, 0xbd,
200 0x32, 0xd3, 0xe8, 0x01, 0xdc, 0x27, 0xc5, 0x25, 0xc6, 0xe0, 0xd6, 0x79, 0xc5, 0x09, 0x0a, 0x51,
201 0x7c, 0xca, 0xb4, 0xc6, 0x13, 0xf0, 0x9a, 0x5c, 0xa9, 0x77, 0x21, 0x0b, 0x62, 0xeb, 0x7c, 0xef,
202 0xf1, 0x18, 0x06, 0x52, 0xac, 0xb8, 0x22, 0x4e, 0xe8, 0xc4, 0x3e, 0x33, 0x26, 0xfa, 0x44, 0x00,
203 0x8f, 0x5c, 0x56, 0x0b, 0xa5, 0x16, 0xa2, 0xc6, 0x33, 0xf0, 0x1a, 0x2e, 0xab, 0xac, 0x6d, 0xcc,
204 0xc5, 0x67, 0xd3, 0xf3, 0xc4, 0xd0, 0x24, 0x87, 0x56, 0xd2, 0x8f, 0xd9, 0xbe, 0x88, 0x03, 0x70,
205 0x96, 0xbc, 0xfd, 0x7d, 0xb0, 0x97, 0xf8, 0x02, 0x7c, 0x99, 0xd7, 0x25, 0x7f, 0xe1, 0x75, 0x41,
206 0x1c, 0x03, 0xa2, 0x83, 0xb4, 0x2e, 0xa2, 0x4b, 0x70, 0xf5, 0x31, 0x0f, 0x5c, 0x96, 0xde, 0xdc,
207 0x05, 0x16, 0xf6, 0x61, 0xf0, 0xcc, 0xee, 0xb3, 0x34, 0x40, 0x78, 0x04, 0x7e, 0x1f, 0x1a, 0x6b,
208 0x47, 0x19, 0xb8, 0x4c, 0xac, 0xf8, 0xd1, 0xcf, 0x5e, 0xc3, 0x68, 0xc9, 0xdb, 0x03, 0x16, 0xb1,
209 0x43, 0x27, 0x3e, 0x99, 0xe2, 0xff, 0xc0, 0xec, 0x6f, 0xf1, 0x96, 0x6c, 0x76, 0xd4, 0xda, 0xee,
210 0xa8, 0xb5, 0xe9, 0x28, 0xda, 0x76, 0x14, 0x7d, 0x75, 0x14, 0x7d, 0x7c, 0x53, 0x6b, 0x3e, 0xd4,
211 0x3b, 0x9e, 0xfd, 0x04, 0x00, 0x00, 0xff, 0xff, 0xcc, 0x76, 0x8d, 0x4f, 0x8f, 0x01, 0x00, 0x00,
Girish Gowdra64503432020-01-07 10:59:10 +0530212}
213
214func (m *User) Marshal() (dAtA []byte, err error) {
215 size := m.Size()
216 dAtA = make([]byte, size)
Girish Gowdra390f12f2021-07-01 15:53:49 -0700217 n, err := m.MarshalToSizedBuffer(dAtA[:size])
Girish Gowdra64503432020-01-07 10:59:10 +0530218 if err != nil {
219 return nil, err
220 }
221 return dAtA[:n], nil
222}
223
224func (m *User) MarshalTo(dAtA []byte) (int, error) {
Girish Gowdra390f12f2021-07-01 15:53:49 -0700225 size := m.Size()
226 return m.MarshalToSizedBuffer(dAtA[:size])
227}
228
229func (m *User) MarshalToSizedBuffer(dAtA []byte) (int, error) {
230 i := len(dAtA)
Girish Gowdra64503432020-01-07 10:59:10 +0530231 _ = i
232 var l int
233 _ = l
Girish Gowdra390f12f2021-07-01 15:53:49 -0700234 if m.XXX_unrecognized != nil {
235 i -= len(m.XXX_unrecognized)
236 copy(dAtA[i:], m.XXX_unrecognized)
Girish Gowdra64503432020-01-07 10:59:10 +0530237 }
238 if len(m.Roles) > 0 {
Girish Gowdra390f12f2021-07-01 15:53:49 -0700239 for iNdEx := len(m.Roles) - 1; iNdEx >= 0; iNdEx-- {
240 i -= len(m.Roles[iNdEx])
241 copy(dAtA[i:], m.Roles[iNdEx])
242 i = encodeVarintAuth(dAtA, i, uint64(len(m.Roles[iNdEx])))
243 i--
Girish Gowdra64503432020-01-07 10:59:10 +0530244 dAtA[i] = 0x1a
Girish Gowdra64503432020-01-07 10:59:10 +0530245 }
246 }
Girish Gowdra390f12f2021-07-01 15:53:49 -0700247 if len(m.Password) > 0 {
248 i -= len(m.Password)
249 copy(dAtA[i:], m.Password)
250 i = encodeVarintAuth(dAtA, i, uint64(len(m.Password)))
251 i--
252 dAtA[i] = 0x12
Girish Gowdra64503432020-01-07 10:59:10 +0530253 }
Girish Gowdra390f12f2021-07-01 15:53:49 -0700254 if len(m.Name) > 0 {
255 i -= len(m.Name)
256 copy(dAtA[i:], m.Name)
257 i = encodeVarintAuth(dAtA, i, uint64(len(m.Name)))
258 i--
259 dAtA[i] = 0xa
260 }
261 return len(dAtA) - i, nil
Girish Gowdra64503432020-01-07 10:59:10 +0530262}
263
264func (m *Permission) Marshal() (dAtA []byte, err error) {
265 size := m.Size()
266 dAtA = make([]byte, size)
Girish Gowdra390f12f2021-07-01 15:53:49 -0700267 n, err := m.MarshalToSizedBuffer(dAtA[:size])
Girish Gowdra64503432020-01-07 10:59:10 +0530268 if err != nil {
269 return nil, err
270 }
271 return dAtA[:n], nil
272}
273
274func (m *Permission) MarshalTo(dAtA []byte) (int, error) {
Girish Gowdra390f12f2021-07-01 15:53:49 -0700275 size := m.Size()
276 return m.MarshalToSizedBuffer(dAtA[:size])
277}
278
279func (m *Permission) MarshalToSizedBuffer(dAtA []byte) (int, error) {
280 i := len(dAtA)
Girish Gowdra64503432020-01-07 10:59:10 +0530281 _ = i
282 var l int
283 _ = l
Girish Gowdra390f12f2021-07-01 15:53:49 -0700284 if m.XXX_unrecognized != nil {
285 i -= len(m.XXX_unrecognized)
286 copy(dAtA[i:], m.XXX_unrecognized)
Girish Gowdra64503432020-01-07 10:59:10 +0530287 }
288 if len(m.RangeEnd) > 0 {
Girish Gowdra390f12f2021-07-01 15:53:49 -0700289 i -= len(m.RangeEnd)
290 copy(dAtA[i:], m.RangeEnd)
Girish Gowdra64503432020-01-07 10:59:10 +0530291 i = encodeVarintAuth(dAtA, i, uint64(len(m.RangeEnd)))
Girish Gowdra390f12f2021-07-01 15:53:49 -0700292 i--
293 dAtA[i] = 0x1a
Girish Gowdra64503432020-01-07 10:59:10 +0530294 }
Girish Gowdra390f12f2021-07-01 15:53:49 -0700295 if len(m.Key) > 0 {
296 i -= len(m.Key)
297 copy(dAtA[i:], m.Key)
298 i = encodeVarintAuth(dAtA, i, uint64(len(m.Key)))
299 i--
300 dAtA[i] = 0x12
301 }
302 if m.PermType != 0 {
303 i = encodeVarintAuth(dAtA, i, uint64(m.PermType))
304 i--
305 dAtA[i] = 0x8
306 }
307 return len(dAtA) - i, nil
Girish Gowdra64503432020-01-07 10:59:10 +0530308}
309
310func (m *Role) Marshal() (dAtA []byte, err error) {
311 size := m.Size()
312 dAtA = make([]byte, size)
Girish Gowdra390f12f2021-07-01 15:53:49 -0700313 n, err := m.MarshalToSizedBuffer(dAtA[:size])
Girish Gowdra64503432020-01-07 10:59:10 +0530314 if err != nil {
315 return nil, err
316 }
317 return dAtA[:n], nil
318}
319
320func (m *Role) MarshalTo(dAtA []byte) (int, error) {
Girish Gowdra390f12f2021-07-01 15:53:49 -0700321 size := m.Size()
322 return m.MarshalToSizedBuffer(dAtA[:size])
323}
324
325func (m *Role) MarshalToSizedBuffer(dAtA []byte) (int, error) {
326 i := len(dAtA)
Girish Gowdra64503432020-01-07 10:59:10 +0530327 _ = i
328 var l int
329 _ = l
Girish Gowdra390f12f2021-07-01 15:53:49 -0700330 if m.XXX_unrecognized != nil {
331 i -= len(m.XXX_unrecognized)
332 copy(dAtA[i:], m.XXX_unrecognized)
Girish Gowdra64503432020-01-07 10:59:10 +0530333 }
334 if len(m.KeyPermission) > 0 {
Girish Gowdra390f12f2021-07-01 15:53:49 -0700335 for iNdEx := len(m.KeyPermission) - 1; iNdEx >= 0; iNdEx-- {
336 {
337 size, err := m.KeyPermission[iNdEx].MarshalToSizedBuffer(dAtA[:i])
338 if err != nil {
339 return 0, err
340 }
341 i -= size
342 i = encodeVarintAuth(dAtA, i, uint64(size))
Girish Gowdra64503432020-01-07 10:59:10 +0530343 }
Girish Gowdra390f12f2021-07-01 15:53:49 -0700344 i--
345 dAtA[i] = 0x12
Girish Gowdra64503432020-01-07 10:59:10 +0530346 }
347 }
Girish Gowdra390f12f2021-07-01 15:53:49 -0700348 if len(m.Name) > 0 {
349 i -= len(m.Name)
350 copy(dAtA[i:], m.Name)
351 i = encodeVarintAuth(dAtA, i, uint64(len(m.Name)))
352 i--
353 dAtA[i] = 0xa
354 }
355 return len(dAtA) - i, nil
Girish Gowdra64503432020-01-07 10:59:10 +0530356}
357
358func encodeVarintAuth(dAtA []byte, offset int, v uint64) int {
Girish Gowdra390f12f2021-07-01 15:53:49 -0700359 offset -= sovAuth(v)
360 base := offset
Girish Gowdra64503432020-01-07 10:59:10 +0530361 for v >= 1<<7 {
362 dAtA[offset] = uint8(v&0x7f | 0x80)
363 v >>= 7
364 offset++
365 }
366 dAtA[offset] = uint8(v)
Girish Gowdra390f12f2021-07-01 15:53:49 -0700367 return base
Girish Gowdra64503432020-01-07 10:59:10 +0530368}
Girish Gowdra64503432020-01-07 10:59:10 +0530369func (m *User) Size() (n int) {
Girish Gowdra390f12f2021-07-01 15:53:49 -0700370 if m == nil {
371 return 0
372 }
Girish Gowdra64503432020-01-07 10:59:10 +0530373 var l int
374 _ = l
375 l = len(m.Name)
376 if l > 0 {
377 n += 1 + l + sovAuth(uint64(l))
378 }
379 l = len(m.Password)
380 if l > 0 {
381 n += 1 + l + sovAuth(uint64(l))
382 }
383 if len(m.Roles) > 0 {
384 for _, s := range m.Roles {
385 l = len(s)
386 n += 1 + l + sovAuth(uint64(l))
387 }
388 }
Girish Gowdra390f12f2021-07-01 15:53:49 -0700389 if m.XXX_unrecognized != nil {
390 n += len(m.XXX_unrecognized)
Girish Gowdra64503432020-01-07 10:59:10 +0530391 }
392 return n
393}
394
395func (m *Permission) Size() (n int) {
Girish Gowdra390f12f2021-07-01 15:53:49 -0700396 if m == nil {
397 return 0
398 }
Girish Gowdra64503432020-01-07 10:59:10 +0530399 var l int
400 _ = l
401 if m.PermType != 0 {
402 n += 1 + sovAuth(uint64(m.PermType))
403 }
404 l = len(m.Key)
405 if l > 0 {
406 n += 1 + l + sovAuth(uint64(l))
407 }
408 l = len(m.RangeEnd)
409 if l > 0 {
410 n += 1 + l + sovAuth(uint64(l))
411 }
Girish Gowdra390f12f2021-07-01 15:53:49 -0700412 if m.XXX_unrecognized != nil {
413 n += len(m.XXX_unrecognized)
414 }
Girish Gowdra64503432020-01-07 10:59:10 +0530415 return n
416}
417
418func (m *Role) Size() (n int) {
Girish Gowdra390f12f2021-07-01 15:53:49 -0700419 if m == nil {
420 return 0
421 }
Girish Gowdra64503432020-01-07 10:59:10 +0530422 var l int
423 _ = l
424 l = len(m.Name)
425 if l > 0 {
426 n += 1 + l + sovAuth(uint64(l))
427 }
428 if len(m.KeyPermission) > 0 {
429 for _, e := range m.KeyPermission {
430 l = e.Size()
431 n += 1 + l + sovAuth(uint64(l))
432 }
433 }
Girish Gowdra390f12f2021-07-01 15:53:49 -0700434 if m.XXX_unrecognized != nil {
435 n += len(m.XXX_unrecognized)
436 }
Girish Gowdra64503432020-01-07 10:59:10 +0530437 return n
438}
439
440func sovAuth(x uint64) (n int) {
Girish Gowdra390f12f2021-07-01 15:53:49 -0700441 return (math_bits.Len64(x|1) + 6) / 7
Girish Gowdra64503432020-01-07 10:59:10 +0530442}
443func sozAuth(x uint64) (n int) {
444 return sovAuth(uint64((x << 1) ^ uint64((int64(x) >> 63))))
445}
Girish Gowdra64503432020-01-07 10:59:10 +0530446func (m *User) Unmarshal(dAtA []byte) error {
447 l := len(dAtA)
448 iNdEx := 0
449 for iNdEx < l {
450 preIndex := iNdEx
451 var wire uint64
452 for shift := uint(0); ; shift += 7 {
453 if shift >= 64 {
454 return ErrIntOverflowAuth
455 }
456 if iNdEx >= l {
457 return io.ErrUnexpectedEOF
458 }
459 b := dAtA[iNdEx]
460 iNdEx++
Girish Gowdra390f12f2021-07-01 15:53:49 -0700461 wire |= uint64(b&0x7F) << shift
Girish Gowdra64503432020-01-07 10:59:10 +0530462 if b < 0x80 {
463 break
464 }
465 }
466 fieldNum := int32(wire >> 3)
467 wireType := int(wire & 0x7)
468 if wireType == 4 {
469 return fmt.Errorf("proto: User: wiretype end group for non-group")
470 }
471 if fieldNum <= 0 {
472 return fmt.Errorf("proto: User: illegal tag %d (wire type %d)", fieldNum, wire)
473 }
474 switch fieldNum {
475 case 1:
476 if wireType != 2 {
477 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
478 }
479 var byteLen int
480 for shift := uint(0); ; shift += 7 {
481 if shift >= 64 {
482 return ErrIntOverflowAuth
483 }
484 if iNdEx >= l {
485 return io.ErrUnexpectedEOF
486 }
487 b := dAtA[iNdEx]
488 iNdEx++
Girish Gowdra390f12f2021-07-01 15:53:49 -0700489 byteLen |= int(b&0x7F) << shift
Girish Gowdra64503432020-01-07 10:59:10 +0530490 if b < 0x80 {
491 break
492 }
493 }
494 if byteLen < 0 {
495 return ErrInvalidLengthAuth
496 }
497 postIndex := iNdEx + byteLen
Girish Gowdra390f12f2021-07-01 15:53:49 -0700498 if postIndex < 0 {
499 return ErrInvalidLengthAuth
500 }
Girish Gowdra64503432020-01-07 10:59:10 +0530501 if postIndex > l {
502 return io.ErrUnexpectedEOF
503 }
504 m.Name = append(m.Name[:0], dAtA[iNdEx:postIndex]...)
505 if m.Name == nil {
506 m.Name = []byte{}
507 }
508 iNdEx = postIndex
509 case 2:
510 if wireType != 2 {
511 return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType)
512 }
513 var byteLen int
514 for shift := uint(0); ; shift += 7 {
515 if shift >= 64 {
516 return ErrIntOverflowAuth
517 }
518 if iNdEx >= l {
519 return io.ErrUnexpectedEOF
520 }
521 b := dAtA[iNdEx]
522 iNdEx++
Girish Gowdra390f12f2021-07-01 15:53:49 -0700523 byteLen |= int(b&0x7F) << shift
Girish Gowdra64503432020-01-07 10:59:10 +0530524 if b < 0x80 {
525 break
526 }
527 }
528 if byteLen < 0 {
529 return ErrInvalidLengthAuth
530 }
531 postIndex := iNdEx + byteLen
Girish Gowdra390f12f2021-07-01 15:53:49 -0700532 if postIndex < 0 {
533 return ErrInvalidLengthAuth
534 }
Girish Gowdra64503432020-01-07 10:59:10 +0530535 if postIndex > l {
536 return io.ErrUnexpectedEOF
537 }
538 m.Password = append(m.Password[:0], dAtA[iNdEx:postIndex]...)
539 if m.Password == nil {
540 m.Password = []byte{}
541 }
542 iNdEx = postIndex
543 case 3:
544 if wireType != 2 {
545 return fmt.Errorf("proto: wrong wireType = %d for field Roles", wireType)
546 }
547 var stringLen uint64
548 for shift := uint(0); ; shift += 7 {
549 if shift >= 64 {
550 return ErrIntOverflowAuth
551 }
552 if iNdEx >= l {
553 return io.ErrUnexpectedEOF
554 }
555 b := dAtA[iNdEx]
556 iNdEx++
Girish Gowdra390f12f2021-07-01 15:53:49 -0700557 stringLen |= uint64(b&0x7F) << shift
Girish Gowdra64503432020-01-07 10:59:10 +0530558 if b < 0x80 {
559 break
560 }
561 }
562 intStringLen := int(stringLen)
563 if intStringLen < 0 {
564 return ErrInvalidLengthAuth
565 }
566 postIndex := iNdEx + intStringLen
Girish Gowdra390f12f2021-07-01 15:53:49 -0700567 if postIndex < 0 {
568 return ErrInvalidLengthAuth
569 }
Girish Gowdra64503432020-01-07 10:59:10 +0530570 if postIndex > l {
571 return io.ErrUnexpectedEOF
572 }
573 m.Roles = append(m.Roles, string(dAtA[iNdEx:postIndex]))
574 iNdEx = postIndex
Girish Gowdra64503432020-01-07 10:59:10 +0530575 default:
576 iNdEx = preIndex
577 skippy, err := skipAuth(dAtA[iNdEx:])
578 if err != nil {
579 return err
580 }
581 if skippy < 0 {
582 return ErrInvalidLengthAuth
583 }
Girish Gowdra390f12f2021-07-01 15:53:49 -0700584 if (iNdEx + skippy) < 0 {
585 return ErrInvalidLengthAuth
586 }
Girish Gowdra64503432020-01-07 10:59:10 +0530587 if (iNdEx + skippy) > l {
588 return io.ErrUnexpectedEOF
589 }
Girish Gowdra390f12f2021-07-01 15:53:49 -0700590 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
Girish Gowdra64503432020-01-07 10:59:10 +0530591 iNdEx += skippy
592 }
593 }
594
595 if iNdEx > l {
596 return io.ErrUnexpectedEOF
597 }
598 return nil
599}
600func (m *Permission) Unmarshal(dAtA []byte) error {
601 l := len(dAtA)
602 iNdEx := 0
603 for iNdEx < l {
604 preIndex := iNdEx
605 var wire uint64
606 for shift := uint(0); ; shift += 7 {
607 if shift >= 64 {
608 return ErrIntOverflowAuth
609 }
610 if iNdEx >= l {
611 return io.ErrUnexpectedEOF
612 }
613 b := dAtA[iNdEx]
614 iNdEx++
Girish Gowdra390f12f2021-07-01 15:53:49 -0700615 wire |= uint64(b&0x7F) << shift
Girish Gowdra64503432020-01-07 10:59:10 +0530616 if b < 0x80 {
617 break
618 }
619 }
620 fieldNum := int32(wire >> 3)
621 wireType := int(wire & 0x7)
622 if wireType == 4 {
623 return fmt.Errorf("proto: Permission: wiretype end group for non-group")
624 }
625 if fieldNum <= 0 {
626 return fmt.Errorf("proto: Permission: illegal tag %d (wire type %d)", fieldNum, wire)
627 }
628 switch fieldNum {
629 case 1:
630 if wireType != 0 {
631 return fmt.Errorf("proto: wrong wireType = %d for field PermType", wireType)
632 }
633 m.PermType = 0
634 for shift := uint(0); ; shift += 7 {
635 if shift >= 64 {
636 return ErrIntOverflowAuth
637 }
638 if iNdEx >= l {
639 return io.ErrUnexpectedEOF
640 }
641 b := dAtA[iNdEx]
642 iNdEx++
Girish Gowdra390f12f2021-07-01 15:53:49 -0700643 m.PermType |= Permission_Type(b&0x7F) << shift
Girish Gowdra64503432020-01-07 10:59:10 +0530644 if b < 0x80 {
645 break
646 }
647 }
648 case 2:
649 if wireType != 2 {
650 return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
651 }
652 var byteLen int
653 for shift := uint(0); ; shift += 7 {
654 if shift >= 64 {
655 return ErrIntOverflowAuth
656 }
657 if iNdEx >= l {
658 return io.ErrUnexpectedEOF
659 }
660 b := dAtA[iNdEx]
661 iNdEx++
Girish Gowdra390f12f2021-07-01 15:53:49 -0700662 byteLen |= int(b&0x7F) << shift
Girish Gowdra64503432020-01-07 10:59:10 +0530663 if b < 0x80 {
664 break
665 }
666 }
667 if byteLen < 0 {
668 return ErrInvalidLengthAuth
669 }
670 postIndex := iNdEx + byteLen
Girish Gowdra390f12f2021-07-01 15:53:49 -0700671 if postIndex < 0 {
672 return ErrInvalidLengthAuth
673 }
Girish Gowdra64503432020-01-07 10:59:10 +0530674 if postIndex > l {
675 return io.ErrUnexpectedEOF
676 }
677 m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
678 if m.Key == nil {
679 m.Key = []byte{}
680 }
681 iNdEx = postIndex
682 case 3:
683 if wireType != 2 {
684 return fmt.Errorf("proto: wrong wireType = %d for field RangeEnd", wireType)
685 }
686 var byteLen int
687 for shift := uint(0); ; shift += 7 {
688 if shift >= 64 {
689 return ErrIntOverflowAuth
690 }
691 if iNdEx >= l {
692 return io.ErrUnexpectedEOF
693 }
694 b := dAtA[iNdEx]
695 iNdEx++
Girish Gowdra390f12f2021-07-01 15:53:49 -0700696 byteLen |= int(b&0x7F) << shift
Girish Gowdra64503432020-01-07 10:59:10 +0530697 if b < 0x80 {
698 break
699 }
700 }
701 if byteLen < 0 {
702 return ErrInvalidLengthAuth
703 }
704 postIndex := iNdEx + byteLen
Girish Gowdra390f12f2021-07-01 15:53:49 -0700705 if postIndex < 0 {
706 return ErrInvalidLengthAuth
707 }
Girish Gowdra64503432020-01-07 10:59:10 +0530708 if postIndex > l {
709 return io.ErrUnexpectedEOF
710 }
711 m.RangeEnd = append(m.RangeEnd[:0], dAtA[iNdEx:postIndex]...)
712 if m.RangeEnd == nil {
713 m.RangeEnd = []byte{}
714 }
715 iNdEx = postIndex
716 default:
717 iNdEx = preIndex
718 skippy, err := skipAuth(dAtA[iNdEx:])
719 if err != nil {
720 return err
721 }
722 if skippy < 0 {
723 return ErrInvalidLengthAuth
724 }
Girish Gowdra390f12f2021-07-01 15:53:49 -0700725 if (iNdEx + skippy) < 0 {
726 return ErrInvalidLengthAuth
727 }
Girish Gowdra64503432020-01-07 10:59:10 +0530728 if (iNdEx + skippy) > l {
729 return io.ErrUnexpectedEOF
730 }
Girish Gowdra390f12f2021-07-01 15:53:49 -0700731 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
Girish Gowdra64503432020-01-07 10:59:10 +0530732 iNdEx += skippy
733 }
734 }
735
736 if iNdEx > l {
737 return io.ErrUnexpectedEOF
738 }
739 return nil
740}
741func (m *Role) Unmarshal(dAtA []byte) error {
742 l := len(dAtA)
743 iNdEx := 0
744 for iNdEx < l {
745 preIndex := iNdEx
746 var wire uint64
747 for shift := uint(0); ; shift += 7 {
748 if shift >= 64 {
749 return ErrIntOverflowAuth
750 }
751 if iNdEx >= l {
752 return io.ErrUnexpectedEOF
753 }
754 b := dAtA[iNdEx]
755 iNdEx++
Girish Gowdra390f12f2021-07-01 15:53:49 -0700756 wire |= uint64(b&0x7F) << shift
Girish Gowdra64503432020-01-07 10:59:10 +0530757 if b < 0x80 {
758 break
759 }
760 }
761 fieldNum := int32(wire >> 3)
762 wireType := int(wire & 0x7)
763 if wireType == 4 {
764 return fmt.Errorf("proto: Role: wiretype end group for non-group")
765 }
766 if fieldNum <= 0 {
767 return fmt.Errorf("proto: Role: illegal tag %d (wire type %d)", fieldNum, wire)
768 }
769 switch fieldNum {
770 case 1:
771 if wireType != 2 {
772 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
773 }
774 var byteLen int
775 for shift := uint(0); ; shift += 7 {
776 if shift >= 64 {
777 return ErrIntOverflowAuth
778 }
779 if iNdEx >= l {
780 return io.ErrUnexpectedEOF
781 }
782 b := dAtA[iNdEx]
783 iNdEx++
Girish Gowdra390f12f2021-07-01 15:53:49 -0700784 byteLen |= int(b&0x7F) << shift
Girish Gowdra64503432020-01-07 10:59:10 +0530785 if b < 0x80 {
786 break
787 }
788 }
789 if byteLen < 0 {
790 return ErrInvalidLengthAuth
791 }
792 postIndex := iNdEx + byteLen
Girish Gowdra390f12f2021-07-01 15:53:49 -0700793 if postIndex < 0 {
794 return ErrInvalidLengthAuth
795 }
Girish Gowdra64503432020-01-07 10:59:10 +0530796 if postIndex > l {
797 return io.ErrUnexpectedEOF
798 }
799 m.Name = append(m.Name[:0], dAtA[iNdEx:postIndex]...)
800 if m.Name == nil {
801 m.Name = []byte{}
802 }
803 iNdEx = postIndex
804 case 2:
805 if wireType != 2 {
806 return fmt.Errorf("proto: wrong wireType = %d for field KeyPermission", wireType)
807 }
808 var msglen int
809 for shift := uint(0); ; shift += 7 {
810 if shift >= 64 {
811 return ErrIntOverflowAuth
812 }
813 if iNdEx >= l {
814 return io.ErrUnexpectedEOF
815 }
816 b := dAtA[iNdEx]
817 iNdEx++
Girish Gowdra390f12f2021-07-01 15:53:49 -0700818 msglen |= int(b&0x7F) << shift
Girish Gowdra64503432020-01-07 10:59:10 +0530819 if b < 0x80 {
820 break
821 }
822 }
823 if msglen < 0 {
824 return ErrInvalidLengthAuth
825 }
826 postIndex := iNdEx + msglen
Girish Gowdra390f12f2021-07-01 15:53:49 -0700827 if postIndex < 0 {
828 return ErrInvalidLengthAuth
829 }
Girish Gowdra64503432020-01-07 10:59:10 +0530830 if postIndex > l {
831 return io.ErrUnexpectedEOF
832 }
833 m.KeyPermission = append(m.KeyPermission, &Permission{})
834 if err := m.KeyPermission[len(m.KeyPermission)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
835 return err
836 }
837 iNdEx = postIndex
838 default:
839 iNdEx = preIndex
840 skippy, err := skipAuth(dAtA[iNdEx:])
841 if err != nil {
842 return err
843 }
844 if skippy < 0 {
845 return ErrInvalidLengthAuth
846 }
Girish Gowdra390f12f2021-07-01 15:53:49 -0700847 if (iNdEx + skippy) < 0 {
848 return ErrInvalidLengthAuth
849 }
Girish Gowdra64503432020-01-07 10:59:10 +0530850 if (iNdEx + skippy) > l {
851 return io.ErrUnexpectedEOF
852 }
Girish Gowdra390f12f2021-07-01 15:53:49 -0700853 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
Girish Gowdra64503432020-01-07 10:59:10 +0530854 iNdEx += skippy
855 }
856 }
857
858 if iNdEx > l {
859 return io.ErrUnexpectedEOF
860 }
861 return nil
862}
863func skipAuth(dAtA []byte) (n int, err error) {
864 l := len(dAtA)
865 iNdEx := 0
866 for iNdEx < l {
867 var wire uint64
868 for shift := uint(0); ; shift += 7 {
869 if shift >= 64 {
870 return 0, ErrIntOverflowAuth
871 }
872 if iNdEx >= l {
873 return 0, io.ErrUnexpectedEOF
874 }
875 b := dAtA[iNdEx]
876 iNdEx++
877 wire |= (uint64(b) & 0x7F) << shift
878 if b < 0x80 {
879 break
880 }
881 }
882 wireType := int(wire & 0x7)
883 switch wireType {
884 case 0:
885 for shift := uint(0); ; shift += 7 {
886 if shift >= 64 {
887 return 0, ErrIntOverflowAuth
888 }
889 if iNdEx >= l {
890 return 0, io.ErrUnexpectedEOF
891 }
892 iNdEx++
893 if dAtA[iNdEx-1] < 0x80 {
894 break
895 }
896 }
897 return iNdEx, nil
898 case 1:
899 iNdEx += 8
900 return iNdEx, nil
901 case 2:
902 var length int
903 for shift := uint(0); ; shift += 7 {
904 if shift >= 64 {
905 return 0, ErrIntOverflowAuth
906 }
907 if iNdEx >= l {
908 return 0, io.ErrUnexpectedEOF
909 }
910 b := dAtA[iNdEx]
911 iNdEx++
912 length |= (int(b) & 0x7F) << shift
913 if b < 0x80 {
914 break
915 }
916 }
Girish Gowdra64503432020-01-07 10:59:10 +0530917 if length < 0 {
918 return 0, ErrInvalidLengthAuth
919 }
Girish Gowdra390f12f2021-07-01 15:53:49 -0700920 iNdEx += length
921 if iNdEx < 0 {
922 return 0, ErrInvalidLengthAuth
923 }
Girish Gowdra64503432020-01-07 10:59:10 +0530924 return iNdEx, nil
925 case 3:
926 for {
927 var innerWire uint64
928 var start int = iNdEx
929 for shift := uint(0); ; shift += 7 {
930 if shift >= 64 {
931 return 0, ErrIntOverflowAuth
932 }
933 if iNdEx >= l {
934 return 0, io.ErrUnexpectedEOF
935 }
936 b := dAtA[iNdEx]
937 iNdEx++
938 innerWire |= (uint64(b) & 0x7F) << shift
939 if b < 0x80 {
940 break
941 }
942 }
943 innerWireType := int(innerWire & 0x7)
944 if innerWireType == 4 {
945 break
946 }
947 next, err := skipAuth(dAtA[start:])
948 if err != nil {
949 return 0, err
950 }
951 iNdEx = start + next
Girish Gowdra390f12f2021-07-01 15:53:49 -0700952 if iNdEx < 0 {
953 return 0, ErrInvalidLengthAuth
954 }
Girish Gowdra64503432020-01-07 10:59:10 +0530955 }
956 return iNdEx, nil
957 case 4:
958 return iNdEx, nil
959 case 5:
960 iNdEx += 4
961 return iNdEx, nil
962 default:
963 return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
964 }
965 }
966 panic("unreachable")
967}
968
969var (
970 ErrInvalidLengthAuth = fmt.Errorf("proto: negative length found during unmarshaling")
971 ErrIntOverflowAuth = fmt.Errorf("proto: integer overflow")
972)