github.com/cosmos/cosmos-sdk@v0.50.10/x/authz/authz.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: cosmos/authz/v1beta1/authz.proto 3 4 package authz 5 6 import ( 7 fmt "fmt" 8 _ "github.com/cosmos/cosmos-proto" 9 types "github.com/cosmos/cosmos-sdk/codec/types" 10 _ "github.com/cosmos/cosmos-sdk/types/tx/amino" 11 _ "github.com/cosmos/gogoproto/gogoproto" 12 proto "github.com/cosmos/gogoproto/proto" 13 github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" 14 _ "google.golang.org/protobuf/types/known/timestamppb" 15 io "io" 16 math "math" 17 math_bits "math/bits" 18 time "time" 19 ) 20 21 // Reference imports to suppress errors if they are not otherwise used. 22 var _ = proto.Marshal 23 var _ = fmt.Errorf 24 var _ = math.Inf 25 var _ = time.Kitchen 26 27 // This is a compile-time assertion to ensure that this generated file 28 // is compatible with the proto package it is being compiled against. 29 // A compilation error at this line likely means your copy of the 30 // proto package needs to be updated. 31 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 32 33 // GenericAuthorization gives the grantee unrestricted permissions to execute 34 // the provided method on behalf of the granter's account. 35 type GenericAuthorization struct { 36 // Msg, identified by it's type URL, to grant unrestricted permissions to execute 37 Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` 38 } 39 40 func (m *GenericAuthorization) Reset() { *m = GenericAuthorization{} } 41 func (m *GenericAuthorization) String() string { return proto.CompactTextString(m) } 42 func (*GenericAuthorization) ProtoMessage() {} 43 func (*GenericAuthorization) Descriptor() ([]byte, []int) { 44 return fileDescriptor_544dc2e84b61c637, []int{0} 45 } 46 func (m *GenericAuthorization) XXX_Unmarshal(b []byte) error { 47 return m.Unmarshal(b) 48 } 49 func (m *GenericAuthorization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 50 if deterministic { 51 return xxx_messageInfo_GenericAuthorization.Marshal(b, m, deterministic) 52 } else { 53 b = b[:cap(b)] 54 n, err := m.MarshalToSizedBuffer(b) 55 if err != nil { 56 return nil, err 57 } 58 return b[:n], nil 59 } 60 } 61 func (m *GenericAuthorization) XXX_Merge(src proto.Message) { 62 xxx_messageInfo_GenericAuthorization.Merge(m, src) 63 } 64 func (m *GenericAuthorization) XXX_Size() int { 65 return m.Size() 66 } 67 func (m *GenericAuthorization) XXX_DiscardUnknown() { 68 xxx_messageInfo_GenericAuthorization.DiscardUnknown(m) 69 } 70 71 var xxx_messageInfo_GenericAuthorization proto.InternalMessageInfo 72 73 // Grant gives permissions to execute 74 // the provide method with expiration time. 75 type Grant struct { 76 Authorization *types.Any `protobuf:"bytes,1,opt,name=authorization,proto3" json:"authorization,omitempty"` 77 // time when the grant will expire and will be pruned. If null, then the grant 78 // doesn't have a time expiration (other conditions in `authorization` 79 // may apply to invalidate the grant) 80 Expiration *time.Time `protobuf:"bytes,2,opt,name=expiration,proto3,stdtime" json:"expiration,omitempty"` 81 } 82 83 func (m *Grant) Reset() { *m = Grant{} } 84 func (m *Grant) String() string { return proto.CompactTextString(m) } 85 func (*Grant) ProtoMessage() {} 86 func (*Grant) Descriptor() ([]byte, []int) { 87 return fileDescriptor_544dc2e84b61c637, []int{1} 88 } 89 func (m *Grant) XXX_Unmarshal(b []byte) error { 90 return m.Unmarshal(b) 91 } 92 func (m *Grant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 93 if deterministic { 94 return xxx_messageInfo_Grant.Marshal(b, m, deterministic) 95 } else { 96 b = b[:cap(b)] 97 n, err := m.MarshalToSizedBuffer(b) 98 if err != nil { 99 return nil, err 100 } 101 return b[:n], nil 102 } 103 } 104 func (m *Grant) XXX_Merge(src proto.Message) { 105 xxx_messageInfo_Grant.Merge(m, src) 106 } 107 func (m *Grant) XXX_Size() int { 108 return m.Size() 109 } 110 func (m *Grant) XXX_DiscardUnknown() { 111 xxx_messageInfo_Grant.DiscardUnknown(m) 112 } 113 114 var xxx_messageInfo_Grant proto.InternalMessageInfo 115 116 // GrantAuthorization extends a grant with both the addresses of the grantee and granter. 117 // It is used in genesis.proto and query.proto 118 type GrantAuthorization struct { 119 Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` 120 Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` 121 Authorization *types.Any `protobuf:"bytes,3,opt,name=authorization,proto3" json:"authorization,omitempty"` 122 Expiration *time.Time `protobuf:"bytes,4,opt,name=expiration,proto3,stdtime" json:"expiration,omitempty"` 123 } 124 125 func (m *GrantAuthorization) Reset() { *m = GrantAuthorization{} } 126 func (m *GrantAuthorization) String() string { return proto.CompactTextString(m) } 127 func (*GrantAuthorization) ProtoMessage() {} 128 func (*GrantAuthorization) Descriptor() ([]byte, []int) { 129 return fileDescriptor_544dc2e84b61c637, []int{2} 130 } 131 func (m *GrantAuthorization) XXX_Unmarshal(b []byte) error { 132 return m.Unmarshal(b) 133 } 134 func (m *GrantAuthorization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 135 if deterministic { 136 return xxx_messageInfo_GrantAuthorization.Marshal(b, m, deterministic) 137 } else { 138 b = b[:cap(b)] 139 n, err := m.MarshalToSizedBuffer(b) 140 if err != nil { 141 return nil, err 142 } 143 return b[:n], nil 144 } 145 } 146 func (m *GrantAuthorization) XXX_Merge(src proto.Message) { 147 xxx_messageInfo_GrantAuthorization.Merge(m, src) 148 } 149 func (m *GrantAuthorization) XXX_Size() int { 150 return m.Size() 151 } 152 func (m *GrantAuthorization) XXX_DiscardUnknown() { 153 xxx_messageInfo_GrantAuthorization.DiscardUnknown(m) 154 } 155 156 var xxx_messageInfo_GrantAuthorization proto.InternalMessageInfo 157 158 // GrantQueueItem contains the list of TypeURL of a sdk.Msg. 159 type GrantQueueItem struct { 160 // msg_type_urls contains the list of TypeURL of a sdk.Msg. 161 MsgTypeUrls []string `protobuf:"bytes,1,rep,name=msg_type_urls,json=msgTypeUrls,proto3" json:"msg_type_urls,omitempty"` 162 } 163 164 func (m *GrantQueueItem) Reset() { *m = GrantQueueItem{} } 165 func (m *GrantQueueItem) String() string { return proto.CompactTextString(m) } 166 func (*GrantQueueItem) ProtoMessage() {} 167 func (*GrantQueueItem) Descriptor() ([]byte, []int) { 168 return fileDescriptor_544dc2e84b61c637, []int{3} 169 } 170 func (m *GrantQueueItem) XXX_Unmarshal(b []byte) error { 171 return m.Unmarshal(b) 172 } 173 func (m *GrantQueueItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 174 if deterministic { 175 return xxx_messageInfo_GrantQueueItem.Marshal(b, m, deterministic) 176 } else { 177 b = b[:cap(b)] 178 n, err := m.MarshalToSizedBuffer(b) 179 if err != nil { 180 return nil, err 181 } 182 return b[:n], nil 183 } 184 } 185 func (m *GrantQueueItem) XXX_Merge(src proto.Message) { 186 xxx_messageInfo_GrantQueueItem.Merge(m, src) 187 } 188 func (m *GrantQueueItem) XXX_Size() int { 189 return m.Size() 190 } 191 func (m *GrantQueueItem) XXX_DiscardUnknown() { 192 xxx_messageInfo_GrantQueueItem.DiscardUnknown(m) 193 } 194 195 var xxx_messageInfo_GrantQueueItem proto.InternalMessageInfo 196 197 func init() { 198 proto.RegisterType((*GenericAuthorization)(nil), "cosmos.authz.v1beta1.GenericAuthorization") 199 proto.RegisterType((*Grant)(nil), "cosmos.authz.v1beta1.Grant") 200 proto.RegisterType((*GrantAuthorization)(nil), "cosmos.authz.v1beta1.GrantAuthorization") 201 proto.RegisterType((*GrantQueueItem)(nil), "cosmos.authz.v1beta1.GrantQueueItem") 202 } 203 204 func init() { proto.RegisterFile("cosmos/authz/v1beta1/authz.proto", fileDescriptor_544dc2e84b61c637) } 205 206 var fileDescriptor_544dc2e84b61c637 = []byte{ 207 // 446 bytes of a gzipped FileDescriptorProto 208 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0x3f, 0x8f, 0xd3, 0x30, 209 0x18, 0xc6, 0xe3, 0xeb, 0xf1, 0xe7, 0x7c, 0x3a, 0x04, 0x51, 0x86, 0xd2, 0x21, 0xa9, 0x22, 0x84, 210 0x4e, 0x48, 0x8d, 0x75, 0x07, 0x13, 0x13, 0x8d, 0x90, 0x4e, 0xb0, 0x11, 0x8e, 0x85, 0xa5, 0x72, 211 0x5a, 0xe3, 0x5a, 0xd4, 0x71, 0x64, 0x3b, 0xe8, 0x72, 0x1f, 0x81, 0xe9, 0x3e, 0x03, 0x9f, 0x00, 212 0xa4, 0x7e, 0x88, 0x8a, 0xa9, 0x62, 0x62, 0xe2, 0x4f, 0x3b, 0xf0, 0x35, 0x50, 0xed, 0x44, 0x34, 213 0xb4, 0x12, 0x1d, 0x58, 0x22, 0xdb, 0xef, 0xf3, 0xbc, 0xef, 0x93, 0x5f, 0x62, 0xd8, 0x1d, 0x0a, 214 0xc5, 0x85, 0x42, 0xb8, 0xd0, 0xe3, 0x4b, 0xf4, 0xee, 0x24, 0x25, 0x1a, 0x9f, 0xd8, 0x5d, 0x94, 215 0x4b, 0xa1, 0x85, 0xeb, 0x59, 0x45, 0x64, 0xcf, 0x2a, 0x45, 0xe7, 0x0e, 0xe6, 0x2c, 0x13, 0xc8, 216 0x3c, 0xad, 0xb0, 0x73, 0xd7, 0x0a, 0x07, 0x66, 0x87, 0x2a, 0x97, 0x2d, 0x05, 0x54, 0x08, 0x3a, 217 0x21, 0xc8, 0xec, 0xd2, 0xe2, 0x0d, 0xd2, 0x8c, 0x13, 0xa5, 0x31, 0xcf, 0x2b, 0x81, 0x47, 0x05, 218 0x15, 0xd6, 0xb8, 0x5a, 0xd5, 0x1d, 0xff, 0xb6, 0xe1, 0xac, 0xb4, 0xa5, 0x50, 0x43, 0xef, 0x8c, 219 0x64, 0x44, 0xb2, 0x61, 0xbf, 0xd0, 0x63, 0x21, 0xd9, 0x25, 0xd6, 0x4c, 0x64, 0xee, 0x6d, 0xd8, 220 0xe2, 0x8a, 0xb6, 0x41, 0x17, 0x1c, 0x1f, 0x24, 0xab, 0xe5, 0xe3, 0xe7, 0x9f, 0xa7, 0xbd, 0x70, 221 0xdb, 0x3b, 0x44, 0x0d, 0xe7, 0xfb, 0x5f, 0x1f, 0x1f, 0x04, 0x56, 0xd6, 0x53, 0xa3, 0xb7, 0x68, 222 0x5b, 0xf7, 0xf0, 0x13, 0x80, 0xd7, 0xce, 0x24, 0xce, 0xb4, 0x9b, 0xc2, 0x23, 0xbc, 0x5e, 0x32, 223 0x13, 0x0f, 0x4f, 0xbd, 0xc8, 0x46, 0x8e, 0xea, 0xc8, 0x51, 0x3f, 0x2b, 0xe3, 0xfb, 0xbb, 0x45, 224 0x48, 0x9a, 0x2d, 0xdd, 0xa7, 0x10, 0x92, 0x8b, 0x9c, 0x49, 0x3b, 0x60, 0xcf, 0x0c, 0xe8, 0x6c, 225 0x0c, 0x38, 0xaf, 0x51, 0xc6, 0x37, 0x67, 0xdf, 0x02, 0x70, 0xf5, 0x3d, 0x00, 0xc9, 0x9a, 0x2f, 226 0xfc, 0xb0, 0x07, 0x5d, 0x93, 0xb9, 0x09, 0xea, 0x14, 0xde, 0xa0, 0xab, 0x53, 0x22, 0x2d, 0xac, 227 0xb8, 0xfd, 0x65, 0xda, 0xab, 0xbf, 0x75, 0x7f, 0x34, 0x92, 0x44, 0xa9, 0x97, 0x5a, 0xb2, 0x8c, 228 0x26, 0xb5, 0xf0, 0x8f, 0x87, 0x98, 0x34, 0x3b, 0x78, 0xc8, 0x26, 0xa8, 0xd6, 0xff, 0x07, 0xf5, 229 0xa4, 0x01, 0x6a, 0xff, 0x9f, 0xa0, 0xf6, 0x37, 0x20, 0x3d, 0x82, 0xb7, 0x0c, 0xa3, 0x17, 0x05, 230 0x29, 0xc8, 0x33, 0x4d, 0xb8, 0x1b, 0xc2, 0x23, 0xae, 0xe8, 0x40, 0x97, 0x39, 0x19, 0x14, 0x72, 231 0xa2, 0xda, 0xa0, 0xdb, 0x3a, 0x3e, 0x48, 0x0e, 0xb9, 0xa2, 0xe7, 0x65, 0x4e, 0x5e, 0xc9, 0x89, 232 0x8a, 0xe3, 0xd9, 0x4f, 0xdf, 0x99, 0x2d, 0x7c, 0x30, 0x5f, 0xf8, 0xe0, 0xc7, 0xc2, 0x07, 0x57, 233 0x4b, 0xdf, 0x99, 0x2f, 0x7d, 0xe7, 0xeb, 0xd2, 0x77, 0x5e, 0xdf, 0xa3, 0x4c, 0x8f, 0x8b, 0x34, 234 0x1a, 0x0a, 0x5e, 0xdd, 0x06, 0xb4, 0xf6, 0x7f, 0x5d, 0xd8, 0x4b, 0x96, 0x5e, 0x37, 0xf9, 0x1e, 235 0xfe, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x50, 0x89, 0xaf, 0x02, 0x89, 0x03, 0x00, 0x00, 236 } 237 238 func (m *GenericAuthorization) Marshal() (dAtA []byte, err error) { 239 size := m.Size() 240 dAtA = make([]byte, size) 241 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 242 if err != nil { 243 return nil, err 244 } 245 return dAtA[:n], nil 246 } 247 248 func (m *GenericAuthorization) MarshalTo(dAtA []byte) (int, error) { 249 size := m.Size() 250 return m.MarshalToSizedBuffer(dAtA[:size]) 251 } 252 253 func (m *GenericAuthorization) MarshalToSizedBuffer(dAtA []byte) (int, error) { 254 i := len(dAtA) 255 _ = i 256 var l int 257 _ = l 258 if len(m.Msg) > 0 { 259 i -= len(m.Msg) 260 copy(dAtA[i:], m.Msg) 261 i = encodeVarintAuthz(dAtA, i, uint64(len(m.Msg))) 262 i-- 263 dAtA[i] = 0xa 264 } 265 return len(dAtA) - i, nil 266 } 267 268 func (m *Grant) Marshal() (dAtA []byte, err error) { 269 size := m.Size() 270 dAtA = make([]byte, size) 271 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 272 if err != nil { 273 return nil, err 274 } 275 return dAtA[:n], nil 276 } 277 278 func (m *Grant) MarshalTo(dAtA []byte) (int, error) { 279 size := m.Size() 280 return m.MarshalToSizedBuffer(dAtA[:size]) 281 } 282 283 func (m *Grant) MarshalToSizedBuffer(dAtA []byte) (int, error) { 284 i := len(dAtA) 285 _ = i 286 var l int 287 _ = l 288 if m.Expiration != nil { 289 n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.Expiration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.Expiration):]) 290 if err1 != nil { 291 return 0, err1 292 } 293 i -= n1 294 i = encodeVarintAuthz(dAtA, i, uint64(n1)) 295 i-- 296 dAtA[i] = 0x12 297 } 298 if m.Authorization != nil { 299 { 300 size, err := m.Authorization.MarshalToSizedBuffer(dAtA[:i]) 301 if err != nil { 302 return 0, err 303 } 304 i -= size 305 i = encodeVarintAuthz(dAtA, i, uint64(size)) 306 } 307 i-- 308 dAtA[i] = 0xa 309 } 310 return len(dAtA) - i, nil 311 } 312 313 func (m *GrantAuthorization) Marshal() (dAtA []byte, err error) { 314 size := m.Size() 315 dAtA = make([]byte, size) 316 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 317 if err != nil { 318 return nil, err 319 } 320 return dAtA[:n], nil 321 } 322 323 func (m *GrantAuthorization) MarshalTo(dAtA []byte) (int, error) { 324 size := m.Size() 325 return m.MarshalToSizedBuffer(dAtA[:size]) 326 } 327 328 func (m *GrantAuthorization) MarshalToSizedBuffer(dAtA []byte) (int, error) { 329 i := len(dAtA) 330 _ = i 331 var l int 332 _ = l 333 if m.Expiration != nil { 334 n3, err3 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.Expiration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.Expiration):]) 335 if err3 != nil { 336 return 0, err3 337 } 338 i -= n3 339 i = encodeVarintAuthz(dAtA, i, uint64(n3)) 340 i-- 341 dAtA[i] = 0x22 342 } 343 if m.Authorization != nil { 344 { 345 size, err := m.Authorization.MarshalToSizedBuffer(dAtA[:i]) 346 if err != nil { 347 return 0, err 348 } 349 i -= size 350 i = encodeVarintAuthz(dAtA, i, uint64(size)) 351 } 352 i-- 353 dAtA[i] = 0x1a 354 } 355 if len(m.Grantee) > 0 { 356 i -= len(m.Grantee) 357 copy(dAtA[i:], m.Grantee) 358 i = encodeVarintAuthz(dAtA, i, uint64(len(m.Grantee))) 359 i-- 360 dAtA[i] = 0x12 361 } 362 if len(m.Granter) > 0 { 363 i -= len(m.Granter) 364 copy(dAtA[i:], m.Granter) 365 i = encodeVarintAuthz(dAtA, i, uint64(len(m.Granter))) 366 i-- 367 dAtA[i] = 0xa 368 } 369 return len(dAtA) - i, nil 370 } 371 372 func (m *GrantQueueItem) Marshal() (dAtA []byte, err error) { 373 size := m.Size() 374 dAtA = make([]byte, size) 375 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 376 if err != nil { 377 return nil, err 378 } 379 return dAtA[:n], nil 380 } 381 382 func (m *GrantQueueItem) MarshalTo(dAtA []byte) (int, error) { 383 size := m.Size() 384 return m.MarshalToSizedBuffer(dAtA[:size]) 385 } 386 387 func (m *GrantQueueItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { 388 i := len(dAtA) 389 _ = i 390 var l int 391 _ = l 392 if len(m.MsgTypeUrls) > 0 { 393 for iNdEx := len(m.MsgTypeUrls) - 1; iNdEx >= 0; iNdEx-- { 394 i -= len(m.MsgTypeUrls[iNdEx]) 395 copy(dAtA[i:], m.MsgTypeUrls[iNdEx]) 396 i = encodeVarintAuthz(dAtA, i, uint64(len(m.MsgTypeUrls[iNdEx]))) 397 i-- 398 dAtA[i] = 0xa 399 } 400 } 401 return len(dAtA) - i, nil 402 } 403 404 func encodeVarintAuthz(dAtA []byte, offset int, v uint64) int { 405 offset -= sovAuthz(v) 406 base := offset 407 for v >= 1<<7 { 408 dAtA[offset] = uint8(v&0x7f | 0x80) 409 v >>= 7 410 offset++ 411 } 412 dAtA[offset] = uint8(v) 413 return base 414 } 415 func (m *GenericAuthorization) Size() (n int) { 416 if m == nil { 417 return 0 418 } 419 var l int 420 _ = l 421 l = len(m.Msg) 422 if l > 0 { 423 n += 1 + l + sovAuthz(uint64(l)) 424 } 425 return n 426 } 427 428 func (m *Grant) Size() (n int) { 429 if m == nil { 430 return 0 431 } 432 var l int 433 _ = l 434 if m.Authorization != nil { 435 l = m.Authorization.Size() 436 n += 1 + l + sovAuthz(uint64(l)) 437 } 438 if m.Expiration != nil { 439 l = github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.Expiration) 440 n += 1 + l + sovAuthz(uint64(l)) 441 } 442 return n 443 } 444 445 func (m *GrantAuthorization) Size() (n int) { 446 if m == nil { 447 return 0 448 } 449 var l int 450 _ = l 451 l = len(m.Granter) 452 if l > 0 { 453 n += 1 + l + sovAuthz(uint64(l)) 454 } 455 l = len(m.Grantee) 456 if l > 0 { 457 n += 1 + l + sovAuthz(uint64(l)) 458 } 459 if m.Authorization != nil { 460 l = m.Authorization.Size() 461 n += 1 + l + sovAuthz(uint64(l)) 462 } 463 if m.Expiration != nil { 464 l = github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.Expiration) 465 n += 1 + l + sovAuthz(uint64(l)) 466 } 467 return n 468 } 469 470 func (m *GrantQueueItem) Size() (n int) { 471 if m == nil { 472 return 0 473 } 474 var l int 475 _ = l 476 if len(m.MsgTypeUrls) > 0 { 477 for _, s := range m.MsgTypeUrls { 478 l = len(s) 479 n += 1 + l + sovAuthz(uint64(l)) 480 } 481 } 482 return n 483 } 484 485 func sovAuthz(x uint64) (n int) { 486 return (math_bits.Len64(x|1) + 6) / 7 487 } 488 func sozAuthz(x uint64) (n int) { 489 return sovAuthz(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 490 } 491 func (m *GenericAuthorization) Unmarshal(dAtA []byte) error { 492 l := len(dAtA) 493 iNdEx := 0 494 for iNdEx < l { 495 preIndex := iNdEx 496 var wire uint64 497 for shift := uint(0); ; shift += 7 { 498 if shift >= 64 { 499 return ErrIntOverflowAuthz 500 } 501 if iNdEx >= l { 502 return io.ErrUnexpectedEOF 503 } 504 b := dAtA[iNdEx] 505 iNdEx++ 506 wire |= uint64(b&0x7F) << shift 507 if b < 0x80 { 508 break 509 } 510 } 511 fieldNum := int32(wire >> 3) 512 wireType := int(wire & 0x7) 513 if wireType == 4 { 514 return fmt.Errorf("proto: GenericAuthorization: wiretype end group for non-group") 515 } 516 if fieldNum <= 0 { 517 return fmt.Errorf("proto: GenericAuthorization: illegal tag %d (wire type %d)", fieldNum, wire) 518 } 519 switch fieldNum { 520 case 1: 521 if wireType != 2 { 522 return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) 523 } 524 var stringLen uint64 525 for shift := uint(0); ; shift += 7 { 526 if shift >= 64 { 527 return ErrIntOverflowAuthz 528 } 529 if iNdEx >= l { 530 return io.ErrUnexpectedEOF 531 } 532 b := dAtA[iNdEx] 533 iNdEx++ 534 stringLen |= uint64(b&0x7F) << shift 535 if b < 0x80 { 536 break 537 } 538 } 539 intStringLen := int(stringLen) 540 if intStringLen < 0 { 541 return ErrInvalidLengthAuthz 542 } 543 postIndex := iNdEx + intStringLen 544 if postIndex < 0 { 545 return ErrInvalidLengthAuthz 546 } 547 if postIndex > l { 548 return io.ErrUnexpectedEOF 549 } 550 m.Msg = string(dAtA[iNdEx:postIndex]) 551 iNdEx = postIndex 552 default: 553 iNdEx = preIndex 554 skippy, err := skipAuthz(dAtA[iNdEx:]) 555 if err != nil { 556 return err 557 } 558 if (skippy < 0) || (iNdEx+skippy) < 0 { 559 return ErrInvalidLengthAuthz 560 } 561 if (iNdEx + skippy) > l { 562 return io.ErrUnexpectedEOF 563 } 564 iNdEx += skippy 565 } 566 } 567 568 if iNdEx > l { 569 return io.ErrUnexpectedEOF 570 } 571 return nil 572 } 573 func (m *Grant) Unmarshal(dAtA []byte) error { 574 l := len(dAtA) 575 iNdEx := 0 576 for iNdEx < l { 577 preIndex := iNdEx 578 var wire uint64 579 for shift := uint(0); ; shift += 7 { 580 if shift >= 64 { 581 return ErrIntOverflowAuthz 582 } 583 if iNdEx >= l { 584 return io.ErrUnexpectedEOF 585 } 586 b := dAtA[iNdEx] 587 iNdEx++ 588 wire |= uint64(b&0x7F) << shift 589 if b < 0x80 { 590 break 591 } 592 } 593 fieldNum := int32(wire >> 3) 594 wireType := int(wire & 0x7) 595 if wireType == 4 { 596 return fmt.Errorf("proto: Grant: wiretype end group for non-group") 597 } 598 if fieldNum <= 0 { 599 return fmt.Errorf("proto: Grant: illegal tag %d (wire type %d)", fieldNum, wire) 600 } 601 switch fieldNum { 602 case 1: 603 if wireType != 2 { 604 return fmt.Errorf("proto: wrong wireType = %d for field Authorization", wireType) 605 } 606 var msglen int 607 for shift := uint(0); ; shift += 7 { 608 if shift >= 64 { 609 return ErrIntOverflowAuthz 610 } 611 if iNdEx >= l { 612 return io.ErrUnexpectedEOF 613 } 614 b := dAtA[iNdEx] 615 iNdEx++ 616 msglen |= int(b&0x7F) << shift 617 if b < 0x80 { 618 break 619 } 620 } 621 if msglen < 0 { 622 return ErrInvalidLengthAuthz 623 } 624 postIndex := iNdEx + msglen 625 if postIndex < 0 { 626 return ErrInvalidLengthAuthz 627 } 628 if postIndex > l { 629 return io.ErrUnexpectedEOF 630 } 631 if m.Authorization == nil { 632 m.Authorization = &types.Any{} 633 } 634 if err := m.Authorization.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 635 return err 636 } 637 iNdEx = postIndex 638 case 2: 639 if wireType != 2 { 640 return fmt.Errorf("proto: wrong wireType = %d for field Expiration", wireType) 641 } 642 var msglen int 643 for shift := uint(0); ; shift += 7 { 644 if shift >= 64 { 645 return ErrIntOverflowAuthz 646 } 647 if iNdEx >= l { 648 return io.ErrUnexpectedEOF 649 } 650 b := dAtA[iNdEx] 651 iNdEx++ 652 msglen |= int(b&0x7F) << shift 653 if b < 0x80 { 654 break 655 } 656 } 657 if msglen < 0 { 658 return ErrInvalidLengthAuthz 659 } 660 postIndex := iNdEx + msglen 661 if postIndex < 0 { 662 return ErrInvalidLengthAuthz 663 } 664 if postIndex > l { 665 return io.ErrUnexpectedEOF 666 } 667 if m.Expiration == nil { 668 m.Expiration = new(time.Time) 669 } 670 if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(m.Expiration, dAtA[iNdEx:postIndex]); err != nil { 671 return err 672 } 673 iNdEx = postIndex 674 default: 675 iNdEx = preIndex 676 skippy, err := skipAuthz(dAtA[iNdEx:]) 677 if err != nil { 678 return err 679 } 680 if (skippy < 0) || (iNdEx+skippy) < 0 { 681 return ErrInvalidLengthAuthz 682 } 683 if (iNdEx + skippy) > l { 684 return io.ErrUnexpectedEOF 685 } 686 iNdEx += skippy 687 } 688 } 689 690 if iNdEx > l { 691 return io.ErrUnexpectedEOF 692 } 693 return nil 694 } 695 func (m *GrantAuthorization) Unmarshal(dAtA []byte) error { 696 l := len(dAtA) 697 iNdEx := 0 698 for iNdEx < l { 699 preIndex := iNdEx 700 var wire uint64 701 for shift := uint(0); ; shift += 7 { 702 if shift >= 64 { 703 return ErrIntOverflowAuthz 704 } 705 if iNdEx >= l { 706 return io.ErrUnexpectedEOF 707 } 708 b := dAtA[iNdEx] 709 iNdEx++ 710 wire |= uint64(b&0x7F) << shift 711 if b < 0x80 { 712 break 713 } 714 } 715 fieldNum := int32(wire >> 3) 716 wireType := int(wire & 0x7) 717 if wireType == 4 { 718 return fmt.Errorf("proto: GrantAuthorization: wiretype end group for non-group") 719 } 720 if fieldNum <= 0 { 721 return fmt.Errorf("proto: GrantAuthorization: illegal tag %d (wire type %d)", fieldNum, wire) 722 } 723 switch fieldNum { 724 case 1: 725 if wireType != 2 { 726 return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) 727 } 728 var stringLen uint64 729 for shift := uint(0); ; shift += 7 { 730 if shift >= 64 { 731 return ErrIntOverflowAuthz 732 } 733 if iNdEx >= l { 734 return io.ErrUnexpectedEOF 735 } 736 b := dAtA[iNdEx] 737 iNdEx++ 738 stringLen |= uint64(b&0x7F) << shift 739 if b < 0x80 { 740 break 741 } 742 } 743 intStringLen := int(stringLen) 744 if intStringLen < 0 { 745 return ErrInvalidLengthAuthz 746 } 747 postIndex := iNdEx + intStringLen 748 if postIndex < 0 { 749 return ErrInvalidLengthAuthz 750 } 751 if postIndex > l { 752 return io.ErrUnexpectedEOF 753 } 754 m.Granter = string(dAtA[iNdEx:postIndex]) 755 iNdEx = postIndex 756 case 2: 757 if wireType != 2 { 758 return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) 759 } 760 var stringLen uint64 761 for shift := uint(0); ; shift += 7 { 762 if shift >= 64 { 763 return ErrIntOverflowAuthz 764 } 765 if iNdEx >= l { 766 return io.ErrUnexpectedEOF 767 } 768 b := dAtA[iNdEx] 769 iNdEx++ 770 stringLen |= uint64(b&0x7F) << shift 771 if b < 0x80 { 772 break 773 } 774 } 775 intStringLen := int(stringLen) 776 if intStringLen < 0 { 777 return ErrInvalidLengthAuthz 778 } 779 postIndex := iNdEx + intStringLen 780 if postIndex < 0 { 781 return ErrInvalidLengthAuthz 782 } 783 if postIndex > l { 784 return io.ErrUnexpectedEOF 785 } 786 m.Grantee = string(dAtA[iNdEx:postIndex]) 787 iNdEx = postIndex 788 case 3: 789 if wireType != 2 { 790 return fmt.Errorf("proto: wrong wireType = %d for field Authorization", wireType) 791 } 792 var msglen int 793 for shift := uint(0); ; shift += 7 { 794 if shift >= 64 { 795 return ErrIntOverflowAuthz 796 } 797 if iNdEx >= l { 798 return io.ErrUnexpectedEOF 799 } 800 b := dAtA[iNdEx] 801 iNdEx++ 802 msglen |= int(b&0x7F) << shift 803 if b < 0x80 { 804 break 805 } 806 } 807 if msglen < 0 { 808 return ErrInvalidLengthAuthz 809 } 810 postIndex := iNdEx + msglen 811 if postIndex < 0 { 812 return ErrInvalidLengthAuthz 813 } 814 if postIndex > l { 815 return io.ErrUnexpectedEOF 816 } 817 if m.Authorization == nil { 818 m.Authorization = &types.Any{} 819 } 820 if err := m.Authorization.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 821 return err 822 } 823 iNdEx = postIndex 824 case 4: 825 if wireType != 2 { 826 return fmt.Errorf("proto: wrong wireType = %d for field Expiration", wireType) 827 } 828 var msglen int 829 for shift := uint(0); ; shift += 7 { 830 if shift >= 64 { 831 return ErrIntOverflowAuthz 832 } 833 if iNdEx >= l { 834 return io.ErrUnexpectedEOF 835 } 836 b := dAtA[iNdEx] 837 iNdEx++ 838 msglen |= int(b&0x7F) << shift 839 if b < 0x80 { 840 break 841 } 842 } 843 if msglen < 0 { 844 return ErrInvalidLengthAuthz 845 } 846 postIndex := iNdEx + msglen 847 if postIndex < 0 { 848 return ErrInvalidLengthAuthz 849 } 850 if postIndex > l { 851 return io.ErrUnexpectedEOF 852 } 853 if m.Expiration == nil { 854 m.Expiration = new(time.Time) 855 } 856 if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(m.Expiration, dAtA[iNdEx:postIndex]); err != nil { 857 return err 858 } 859 iNdEx = postIndex 860 default: 861 iNdEx = preIndex 862 skippy, err := skipAuthz(dAtA[iNdEx:]) 863 if err != nil { 864 return err 865 } 866 if (skippy < 0) || (iNdEx+skippy) < 0 { 867 return ErrInvalidLengthAuthz 868 } 869 if (iNdEx + skippy) > l { 870 return io.ErrUnexpectedEOF 871 } 872 iNdEx += skippy 873 } 874 } 875 876 if iNdEx > l { 877 return io.ErrUnexpectedEOF 878 } 879 return nil 880 } 881 func (m *GrantQueueItem) Unmarshal(dAtA []byte) error { 882 l := len(dAtA) 883 iNdEx := 0 884 for iNdEx < l { 885 preIndex := iNdEx 886 var wire uint64 887 for shift := uint(0); ; shift += 7 { 888 if shift >= 64 { 889 return ErrIntOverflowAuthz 890 } 891 if iNdEx >= l { 892 return io.ErrUnexpectedEOF 893 } 894 b := dAtA[iNdEx] 895 iNdEx++ 896 wire |= uint64(b&0x7F) << shift 897 if b < 0x80 { 898 break 899 } 900 } 901 fieldNum := int32(wire >> 3) 902 wireType := int(wire & 0x7) 903 if wireType == 4 { 904 return fmt.Errorf("proto: GrantQueueItem: wiretype end group for non-group") 905 } 906 if fieldNum <= 0 { 907 return fmt.Errorf("proto: GrantQueueItem: illegal tag %d (wire type %d)", fieldNum, wire) 908 } 909 switch fieldNum { 910 case 1: 911 if wireType != 2 { 912 return fmt.Errorf("proto: wrong wireType = %d for field MsgTypeUrls", wireType) 913 } 914 var stringLen uint64 915 for shift := uint(0); ; shift += 7 { 916 if shift >= 64 { 917 return ErrIntOverflowAuthz 918 } 919 if iNdEx >= l { 920 return io.ErrUnexpectedEOF 921 } 922 b := dAtA[iNdEx] 923 iNdEx++ 924 stringLen |= uint64(b&0x7F) << shift 925 if b < 0x80 { 926 break 927 } 928 } 929 intStringLen := int(stringLen) 930 if intStringLen < 0 { 931 return ErrInvalidLengthAuthz 932 } 933 postIndex := iNdEx + intStringLen 934 if postIndex < 0 { 935 return ErrInvalidLengthAuthz 936 } 937 if postIndex > l { 938 return io.ErrUnexpectedEOF 939 } 940 m.MsgTypeUrls = append(m.MsgTypeUrls, string(dAtA[iNdEx:postIndex])) 941 iNdEx = postIndex 942 default: 943 iNdEx = preIndex 944 skippy, err := skipAuthz(dAtA[iNdEx:]) 945 if err != nil { 946 return err 947 } 948 if (skippy < 0) || (iNdEx+skippy) < 0 { 949 return ErrInvalidLengthAuthz 950 } 951 if (iNdEx + skippy) > l { 952 return io.ErrUnexpectedEOF 953 } 954 iNdEx += skippy 955 } 956 } 957 958 if iNdEx > l { 959 return io.ErrUnexpectedEOF 960 } 961 return nil 962 } 963 func skipAuthz(dAtA []byte) (n int, err error) { 964 l := len(dAtA) 965 iNdEx := 0 966 depth := 0 967 for iNdEx < l { 968 var wire uint64 969 for shift := uint(0); ; shift += 7 { 970 if shift >= 64 { 971 return 0, ErrIntOverflowAuthz 972 } 973 if iNdEx >= l { 974 return 0, io.ErrUnexpectedEOF 975 } 976 b := dAtA[iNdEx] 977 iNdEx++ 978 wire |= (uint64(b) & 0x7F) << shift 979 if b < 0x80 { 980 break 981 } 982 } 983 wireType := int(wire & 0x7) 984 switch wireType { 985 case 0: 986 for shift := uint(0); ; shift += 7 { 987 if shift >= 64 { 988 return 0, ErrIntOverflowAuthz 989 } 990 if iNdEx >= l { 991 return 0, io.ErrUnexpectedEOF 992 } 993 iNdEx++ 994 if dAtA[iNdEx-1] < 0x80 { 995 break 996 } 997 } 998 case 1: 999 iNdEx += 8 1000 case 2: 1001 var length int 1002 for shift := uint(0); ; shift += 7 { 1003 if shift >= 64 { 1004 return 0, ErrIntOverflowAuthz 1005 } 1006 if iNdEx >= l { 1007 return 0, io.ErrUnexpectedEOF 1008 } 1009 b := dAtA[iNdEx] 1010 iNdEx++ 1011 length |= (int(b) & 0x7F) << shift 1012 if b < 0x80 { 1013 break 1014 } 1015 } 1016 if length < 0 { 1017 return 0, ErrInvalidLengthAuthz 1018 } 1019 iNdEx += length 1020 case 3: 1021 depth++ 1022 case 4: 1023 if depth == 0 { 1024 return 0, ErrUnexpectedEndOfGroupAuthz 1025 } 1026 depth-- 1027 case 5: 1028 iNdEx += 4 1029 default: 1030 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1031 } 1032 if iNdEx < 0 { 1033 return 0, ErrInvalidLengthAuthz 1034 } 1035 if depth == 0 { 1036 return iNdEx, nil 1037 } 1038 } 1039 return 0, io.ErrUnexpectedEOF 1040 } 1041 1042 var ( 1043 ErrInvalidLengthAuthz = fmt.Errorf("proto: negative length found during unmarshaling") 1044 ErrIntOverflowAuthz = fmt.Errorf("proto: integer overflow") 1045 ErrUnexpectedEndOfGroupAuthz = fmt.Errorf("proto: unexpected end of group") 1046 )