github.com/Finschia/finschia-sdk@v0.49.1/x/authz/query.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: cosmos/authz/v1beta1/query.proto 3 4 package authz 5 6 import ( 7 context "context" 8 fmt "fmt" 9 query "github.com/Finschia/finschia-sdk/types/query" 10 grpc1 "github.com/gogo/protobuf/grpc" 11 proto "github.com/gogo/protobuf/proto" 12 _ "google.golang.org/genproto/googleapis/api/annotations" 13 grpc "google.golang.org/grpc" 14 codes "google.golang.org/grpc/codes" 15 status "google.golang.org/grpc/status" 16 io "io" 17 math "math" 18 math_bits "math/bits" 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 26 // This is a compile-time assertion to ensure that this generated file 27 // is compatible with the proto package it is being compiled against. 28 // A compilation error at this line likely means your copy of the 29 // proto package needs to be updated. 30 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 31 32 // QueryGrantsRequest is the request type for the Query/Grants RPC method. 33 type QueryGrantsRequest struct { 34 Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` 35 Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` 36 // Optional, msg_type_url, when set, will query only grants matching given msg type. 37 MsgTypeUrl string `protobuf:"bytes,3,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` 38 // pagination defines an pagination for the request. 39 Pagination *query.PageRequest `protobuf:"bytes,4,opt,name=pagination,proto3" json:"pagination,omitempty"` 40 } 41 42 func (m *QueryGrantsRequest) Reset() { *m = QueryGrantsRequest{} } 43 func (m *QueryGrantsRequest) String() string { return proto.CompactTextString(m) } 44 func (*QueryGrantsRequest) ProtoMessage() {} 45 func (*QueryGrantsRequest) Descriptor() ([]byte, []int) { 46 return fileDescriptor_376d714ffdeb1545, []int{0} 47 } 48 func (m *QueryGrantsRequest) XXX_Unmarshal(b []byte) error { 49 return m.Unmarshal(b) 50 } 51 func (m *QueryGrantsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 52 if deterministic { 53 return xxx_messageInfo_QueryGrantsRequest.Marshal(b, m, deterministic) 54 } else { 55 b = b[:cap(b)] 56 n, err := m.MarshalToSizedBuffer(b) 57 if err != nil { 58 return nil, err 59 } 60 return b[:n], nil 61 } 62 } 63 func (m *QueryGrantsRequest) XXX_Merge(src proto.Message) { 64 xxx_messageInfo_QueryGrantsRequest.Merge(m, src) 65 } 66 func (m *QueryGrantsRequest) XXX_Size() int { 67 return m.Size() 68 } 69 func (m *QueryGrantsRequest) XXX_DiscardUnknown() { 70 xxx_messageInfo_QueryGrantsRequest.DiscardUnknown(m) 71 } 72 73 var xxx_messageInfo_QueryGrantsRequest proto.InternalMessageInfo 74 75 func (m *QueryGrantsRequest) GetGranter() string { 76 if m != nil { 77 return m.Granter 78 } 79 return "" 80 } 81 82 func (m *QueryGrantsRequest) GetGrantee() string { 83 if m != nil { 84 return m.Grantee 85 } 86 return "" 87 } 88 89 func (m *QueryGrantsRequest) GetMsgTypeUrl() string { 90 if m != nil { 91 return m.MsgTypeUrl 92 } 93 return "" 94 } 95 96 func (m *QueryGrantsRequest) GetPagination() *query.PageRequest { 97 if m != nil { 98 return m.Pagination 99 } 100 return nil 101 } 102 103 // QueryGrantsResponse is the response type for the Query/Authorizations RPC method. 104 type QueryGrantsResponse struct { 105 // authorizations is a list of grants granted for grantee by granter. 106 Grants []*Grant `protobuf:"bytes,1,rep,name=grants,proto3" json:"grants,omitempty"` 107 // pagination defines an pagination for the response. 108 Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` 109 } 110 111 func (m *QueryGrantsResponse) Reset() { *m = QueryGrantsResponse{} } 112 func (m *QueryGrantsResponse) String() string { return proto.CompactTextString(m) } 113 func (*QueryGrantsResponse) ProtoMessage() {} 114 func (*QueryGrantsResponse) Descriptor() ([]byte, []int) { 115 return fileDescriptor_376d714ffdeb1545, []int{1} 116 } 117 func (m *QueryGrantsResponse) XXX_Unmarshal(b []byte) error { 118 return m.Unmarshal(b) 119 } 120 func (m *QueryGrantsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 121 if deterministic { 122 return xxx_messageInfo_QueryGrantsResponse.Marshal(b, m, deterministic) 123 } else { 124 b = b[:cap(b)] 125 n, err := m.MarshalToSizedBuffer(b) 126 if err != nil { 127 return nil, err 128 } 129 return b[:n], nil 130 } 131 } 132 func (m *QueryGrantsResponse) XXX_Merge(src proto.Message) { 133 xxx_messageInfo_QueryGrantsResponse.Merge(m, src) 134 } 135 func (m *QueryGrantsResponse) XXX_Size() int { 136 return m.Size() 137 } 138 func (m *QueryGrantsResponse) XXX_DiscardUnknown() { 139 xxx_messageInfo_QueryGrantsResponse.DiscardUnknown(m) 140 } 141 142 var xxx_messageInfo_QueryGrantsResponse proto.InternalMessageInfo 143 144 func (m *QueryGrantsResponse) GetGrants() []*Grant { 145 if m != nil { 146 return m.Grants 147 } 148 return nil 149 } 150 151 func (m *QueryGrantsResponse) GetPagination() *query.PageResponse { 152 if m != nil { 153 return m.Pagination 154 } 155 return nil 156 } 157 158 // QueryGranterGrantsRequest is the request type for the Query/GranterGrants RPC method. 159 type QueryGranterGrantsRequest struct { 160 Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` 161 // pagination defines an pagination for the request. 162 Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` 163 } 164 165 func (m *QueryGranterGrantsRequest) Reset() { *m = QueryGranterGrantsRequest{} } 166 func (m *QueryGranterGrantsRequest) String() string { return proto.CompactTextString(m) } 167 func (*QueryGranterGrantsRequest) ProtoMessage() {} 168 func (*QueryGranterGrantsRequest) Descriptor() ([]byte, []int) { 169 return fileDescriptor_376d714ffdeb1545, []int{2} 170 } 171 func (m *QueryGranterGrantsRequest) XXX_Unmarshal(b []byte) error { 172 return m.Unmarshal(b) 173 } 174 func (m *QueryGranterGrantsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 175 if deterministic { 176 return xxx_messageInfo_QueryGranterGrantsRequest.Marshal(b, m, deterministic) 177 } else { 178 b = b[:cap(b)] 179 n, err := m.MarshalToSizedBuffer(b) 180 if err != nil { 181 return nil, err 182 } 183 return b[:n], nil 184 } 185 } 186 func (m *QueryGranterGrantsRequest) XXX_Merge(src proto.Message) { 187 xxx_messageInfo_QueryGranterGrantsRequest.Merge(m, src) 188 } 189 func (m *QueryGranterGrantsRequest) XXX_Size() int { 190 return m.Size() 191 } 192 func (m *QueryGranterGrantsRequest) XXX_DiscardUnknown() { 193 xxx_messageInfo_QueryGranterGrantsRequest.DiscardUnknown(m) 194 } 195 196 var xxx_messageInfo_QueryGranterGrantsRequest proto.InternalMessageInfo 197 198 func (m *QueryGranterGrantsRequest) GetGranter() string { 199 if m != nil { 200 return m.Granter 201 } 202 return "" 203 } 204 205 func (m *QueryGranterGrantsRequest) GetPagination() *query.PageRequest { 206 if m != nil { 207 return m.Pagination 208 } 209 return nil 210 } 211 212 // QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method. 213 type QueryGranterGrantsResponse struct { 214 // grants is a list of grants granted by the granter. 215 Grants []*GrantAuthorization `protobuf:"bytes,1,rep,name=grants,proto3" json:"grants,omitempty"` 216 // pagination defines an pagination for the response. 217 Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` 218 } 219 220 func (m *QueryGranterGrantsResponse) Reset() { *m = QueryGranterGrantsResponse{} } 221 func (m *QueryGranterGrantsResponse) String() string { return proto.CompactTextString(m) } 222 func (*QueryGranterGrantsResponse) ProtoMessage() {} 223 func (*QueryGranterGrantsResponse) Descriptor() ([]byte, []int) { 224 return fileDescriptor_376d714ffdeb1545, []int{3} 225 } 226 func (m *QueryGranterGrantsResponse) XXX_Unmarshal(b []byte) error { 227 return m.Unmarshal(b) 228 } 229 func (m *QueryGranterGrantsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 230 if deterministic { 231 return xxx_messageInfo_QueryGranterGrantsResponse.Marshal(b, m, deterministic) 232 } else { 233 b = b[:cap(b)] 234 n, err := m.MarshalToSizedBuffer(b) 235 if err != nil { 236 return nil, err 237 } 238 return b[:n], nil 239 } 240 } 241 func (m *QueryGranterGrantsResponse) XXX_Merge(src proto.Message) { 242 xxx_messageInfo_QueryGranterGrantsResponse.Merge(m, src) 243 } 244 func (m *QueryGranterGrantsResponse) XXX_Size() int { 245 return m.Size() 246 } 247 func (m *QueryGranterGrantsResponse) XXX_DiscardUnknown() { 248 xxx_messageInfo_QueryGranterGrantsResponse.DiscardUnknown(m) 249 } 250 251 var xxx_messageInfo_QueryGranterGrantsResponse proto.InternalMessageInfo 252 253 func (m *QueryGranterGrantsResponse) GetGrants() []*GrantAuthorization { 254 if m != nil { 255 return m.Grants 256 } 257 return nil 258 } 259 260 func (m *QueryGranterGrantsResponse) GetPagination() *query.PageResponse { 261 if m != nil { 262 return m.Pagination 263 } 264 return nil 265 } 266 267 // QueryGranteeGrantsRequest is the request type for the Query/IssuedGrants RPC method. 268 type QueryGranteeGrantsRequest struct { 269 Grantee string `protobuf:"bytes,1,opt,name=grantee,proto3" json:"grantee,omitempty"` 270 // pagination defines an pagination for the request. 271 Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` 272 } 273 274 func (m *QueryGranteeGrantsRequest) Reset() { *m = QueryGranteeGrantsRequest{} } 275 func (m *QueryGranteeGrantsRequest) String() string { return proto.CompactTextString(m) } 276 func (*QueryGranteeGrantsRequest) ProtoMessage() {} 277 func (*QueryGranteeGrantsRequest) Descriptor() ([]byte, []int) { 278 return fileDescriptor_376d714ffdeb1545, []int{4} 279 } 280 func (m *QueryGranteeGrantsRequest) XXX_Unmarshal(b []byte) error { 281 return m.Unmarshal(b) 282 } 283 func (m *QueryGranteeGrantsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 284 if deterministic { 285 return xxx_messageInfo_QueryGranteeGrantsRequest.Marshal(b, m, deterministic) 286 } else { 287 b = b[:cap(b)] 288 n, err := m.MarshalToSizedBuffer(b) 289 if err != nil { 290 return nil, err 291 } 292 return b[:n], nil 293 } 294 } 295 func (m *QueryGranteeGrantsRequest) XXX_Merge(src proto.Message) { 296 xxx_messageInfo_QueryGranteeGrantsRequest.Merge(m, src) 297 } 298 func (m *QueryGranteeGrantsRequest) XXX_Size() int { 299 return m.Size() 300 } 301 func (m *QueryGranteeGrantsRequest) XXX_DiscardUnknown() { 302 xxx_messageInfo_QueryGranteeGrantsRequest.DiscardUnknown(m) 303 } 304 305 var xxx_messageInfo_QueryGranteeGrantsRequest proto.InternalMessageInfo 306 307 func (m *QueryGranteeGrantsRequest) GetGrantee() string { 308 if m != nil { 309 return m.Grantee 310 } 311 return "" 312 } 313 314 func (m *QueryGranteeGrantsRequest) GetPagination() *query.PageRequest { 315 if m != nil { 316 return m.Pagination 317 } 318 return nil 319 } 320 321 // QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. 322 type QueryGranteeGrantsResponse struct { 323 // grants is a list of grants granted to the grantee. 324 Grants []*GrantAuthorization `protobuf:"bytes,1,rep,name=grants,proto3" json:"grants,omitempty"` 325 // pagination defines an pagination for the response. 326 Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` 327 } 328 329 func (m *QueryGranteeGrantsResponse) Reset() { *m = QueryGranteeGrantsResponse{} } 330 func (m *QueryGranteeGrantsResponse) String() string { return proto.CompactTextString(m) } 331 func (*QueryGranteeGrantsResponse) ProtoMessage() {} 332 func (*QueryGranteeGrantsResponse) Descriptor() ([]byte, []int) { 333 return fileDescriptor_376d714ffdeb1545, []int{5} 334 } 335 func (m *QueryGranteeGrantsResponse) XXX_Unmarshal(b []byte) error { 336 return m.Unmarshal(b) 337 } 338 func (m *QueryGranteeGrantsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 339 if deterministic { 340 return xxx_messageInfo_QueryGranteeGrantsResponse.Marshal(b, m, deterministic) 341 } else { 342 b = b[:cap(b)] 343 n, err := m.MarshalToSizedBuffer(b) 344 if err != nil { 345 return nil, err 346 } 347 return b[:n], nil 348 } 349 } 350 func (m *QueryGranteeGrantsResponse) XXX_Merge(src proto.Message) { 351 xxx_messageInfo_QueryGranteeGrantsResponse.Merge(m, src) 352 } 353 func (m *QueryGranteeGrantsResponse) XXX_Size() int { 354 return m.Size() 355 } 356 func (m *QueryGranteeGrantsResponse) XXX_DiscardUnknown() { 357 xxx_messageInfo_QueryGranteeGrantsResponse.DiscardUnknown(m) 358 } 359 360 var xxx_messageInfo_QueryGranteeGrantsResponse proto.InternalMessageInfo 361 362 func (m *QueryGranteeGrantsResponse) GetGrants() []*GrantAuthorization { 363 if m != nil { 364 return m.Grants 365 } 366 return nil 367 } 368 369 func (m *QueryGranteeGrantsResponse) GetPagination() *query.PageResponse { 370 if m != nil { 371 return m.Pagination 372 } 373 return nil 374 } 375 376 func init() { 377 proto.RegisterType((*QueryGrantsRequest)(nil), "cosmos.authz.v1beta1.QueryGrantsRequest") 378 proto.RegisterType((*QueryGrantsResponse)(nil), "cosmos.authz.v1beta1.QueryGrantsResponse") 379 proto.RegisterType((*QueryGranterGrantsRequest)(nil), "cosmos.authz.v1beta1.QueryGranterGrantsRequest") 380 proto.RegisterType((*QueryGranterGrantsResponse)(nil), "cosmos.authz.v1beta1.QueryGranterGrantsResponse") 381 proto.RegisterType((*QueryGranteeGrantsRequest)(nil), "cosmos.authz.v1beta1.QueryGranteeGrantsRequest") 382 proto.RegisterType((*QueryGranteeGrantsResponse)(nil), "cosmos.authz.v1beta1.QueryGranteeGrantsResponse") 383 } 384 385 func init() { proto.RegisterFile("cosmos/authz/v1beta1/query.proto", fileDescriptor_376d714ffdeb1545) } 386 387 var fileDescriptor_376d714ffdeb1545 = []byte{ 388 // 500 bytes of a gzipped FileDescriptorProto 389 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x94, 0xc1, 0x6e, 0xd3, 0x30, 390 0x18, 0xc7, 0xeb, 0x16, 0x8a, 0xf0, 0xe0, 0x62, 0x38, 0x84, 0x30, 0x45, 0x51, 0x85, 0x20, 0x20, 391 0x61, 0x6f, 0x9d, 0xc4, 0x19, 0x76, 0xe8, 0xae, 0x50, 0xc1, 0x85, 0xcb, 0xe4, 0x96, 0x8f, 0x34, 392 0xa2, 0x8d, 0x33, 0xdb, 0x41, 0x74, 0xa8, 0x17, 0x78, 0x01, 0xa4, 0x3d, 0x04, 0x12, 0x47, 0x9e, 393 0x82, 0xe3, 0x24, 0x2e, 0x1c, 0x51, 0x8b, 0xc4, 0x6b, 0xa0, 0xda, 0x1e, 0x6d, 0x46, 0xb6, 0x05, 394 0x50, 0xa5, 0xdd, 0xdc, 0xfa, 0xff, 0x7d, 0xdf, 0xcf, 0x3f, 0xc5, 0xc6, 0x61, 0x5f, 0xa8, 0x91, 395 0x50, 0x8c, 0xe7, 0x7a, 0xb0, 0xcf, 0x5e, 0x6f, 0xf6, 0x40, 0xf3, 0x4d, 0xb6, 0x97, 0x83, 0x1c, 396 0xd3, 0x4c, 0x0a, 0x2d, 0xc8, 0x75, 0x9b, 0xa0, 0x26, 0x41, 0x5d, 0xc2, 0x5f, 0x8f, 0x85, 0x88, 397 0x87, 0xc0, 0x78, 0x96, 0x30, 0x9e, 0xa6, 0x42, 0x73, 0x9d, 0x88, 0x54, 0xd9, 0x1a, 0xff, 0x9e, 398 0xeb, 0xda, 0xe3, 0x0a, 0x6c, 0xb3, 0xdf, 0xad, 0x33, 0x1e, 0x27, 0xa9, 0x09, 0xbb, 0x6c, 0x39, 399 0x81, 0x9d, 0x66, 0x12, 0xad, 0xcf, 0x08, 0x93, 0x27, 0xf3, 0x26, 0x3b, 0x92, 0xa7, 0x5a, 0x75, 400 0x61, 0x2f, 0x07, 0xa5, 0x89, 0x87, 0x2f, 0xc5, 0xf3, 0x3f, 0x40, 0x7a, 0x28, 0x44, 0xd1, 0xe5, 401 0xee, 0xd1, 0xcf, 0xc5, 0x0e, 0x78, 0xf5, 0xe5, 0x1d, 0x20, 0x21, 0xbe, 0x32, 0x52, 0xf1, 0xae, 402 0x1e, 0x67, 0xb0, 0x9b, 0xcb, 0xa1, 0xd7, 0x30, 0xdb, 0x78, 0xa4, 0xe2, 0xa7, 0xe3, 0x0c, 0x9e, 403 0xc9, 0x21, 0xe9, 0x60, 0xbc, 0x40, 0xf4, 0x2e, 0x84, 0x28, 0x5a, 0x6b, 0xdf, 0xa6, 0xce, 0xc1, 404 0xfc, 0x3c, 0xd4, 0xca, 0x71, 0xa0, 0xf4, 0x31, 0x8f, 0xc1, 0x11, 0x75, 0x97, 0x2a, 0x5b, 0x07, 405 0x08, 0x5f, 0x2b, 0x40, 0xab, 0x4c, 0xa4, 0x0a, 0xc8, 0x16, 0x6e, 0x1a, 0x18, 0xe5, 0xa1, 0xb0, 406 0x11, 0xad, 0xb5, 0x6f, 0xd2, 0x32, 0xbf, 0xd4, 0x54, 0x75, 0x5d, 0x94, 0xec, 0x14, 0xa0, 0xea, 407 0x06, 0xea, 0xce, 0x99, 0x50, 0x76, 0x62, 0x81, 0x6a, 0x82, 0x6f, 0x2c, 0xa0, 0x40, 0x56, 0x15, 408 0xda, 0x29, 0x99, 0xff, 0x2f, 0x52, 0x3e, 0x22, 0xec, 0x97, 0xcd, 0x77, 0x6e, 0x1e, 0x1e, 0x73, 409 0x13, 0x9d, 0xe2, 0xe6, 0x51, 0xae, 0x07, 0x42, 0x26, 0xfb, 0xa6, 0xf1, 0xaa, 0x45, 0xc1, 0x09, 410 0xa2, 0xa0, 0x28, 0x0a, 0x56, 0x25, 0x0a, 0xce, 0xad, 0xa8, 0xf6, 0xcf, 0x06, 0xbe, 0x68, 0x48, 411 0xc9, 0x7b, 0x84, 0x9b, 0x96, 0x93, 0x9c, 0xc0, 0xf3, 0xe7, 0x25, 0xf6, 0xef, 0x56, 0x48, 0xda, 412 0xa9, 0xad, 0x5b, 0xef, 0xbe, 0xfe, 0x38, 0xa8, 0x07, 0x64, 0x9d, 0x95, 0xbe, 0x18, 0xee, 0x60, 413 0x9f, 0x10, 0xbe, 0x5a, 0xf8, 0xba, 0x08, 0x3b, 0x6b, 0xc4, 0xb1, 0x7b, 0xe0, 0x6f, 0x54, 0x2f, 414 0x70, 0x68, 0x0f, 0x0c, 0xda, 0x06, 0xa1, 0xa7, 0xa1, 0x31, 0x77, 0x9b, 0xd8, 0x5b, 0xb7, 0x98, 415 0x2c, 0xc1, 0x42, 0x65, 0x58, 0xf8, 0x5b, 0x58, 0xf8, 0x0f, 0x58, 0x38, 0x82, 0x85, 0xc9, 0xf6, 416 0xf6, 0x97, 0x69, 0x80, 0x0e, 0xa7, 0x01, 0xfa, 0x3e, 0x0d, 0xd0, 0x87, 0x59, 0x50, 0x3b, 0x9c, 417 0x05, 0xb5, 0x6f, 0xb3, 0xa0, 0xf6, 0x3c, 0x8a, 0x13, 0x3d, 0xc8, 0x7b, 0xb4, 0x2f, 0x46, 0xac, 418 0x93, 0xa4, 0xaa, 0x3f, 0x48, 0x38, 0x7b, 0xe9, 0x16, 0xf7, 0xd5, 0x8b, 0x57, 0xec, 0x8d, 0x1d, 419 0xd2, 0x6b, 0x9a, 0x17, 0x7d, 0xeb, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd9, 0x61, 0xed, 0x64, 420 0x77, 0x06, 0x00, 0x00, 421 } 422 423 // Reference imports to suppress errors if they are not otherwise used. 424 var _ context.Context 425 var _ grpc.ClientConn 426 427 // This is a compile-time assertion to ensure that this generated file 428 // is compatible with the grpc package it is being compiled against. 429 const _ = grpc.SupportPackageIsVersion4 430 431 // QueryClient is the client API for Query service. 432 // 433 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 434 type QueryClient interface { 435 // Returns list of `Authorization`, granted to the grantee by the granter. 436 Grants(ctx context.Context, in *QueryGrantsRequest, opts ...grpc.CallOption) (*QueryGrantsResponse, error) 437 // GranterGrants returns list of `GrantAuthorization`, granted by granter. 438 // 439 // Since: cosmos-sdk 0.45.2 440 GranterGrants(ctx context.Context, in *QueryGranterGrantsRequest, opts ...grpc.CallOption) (*QueryGranterGrantsResponse, error) 441 // GranteeGrants returns a list of `GrantAuthorization` by grantee. 442 // 443 // Since: cosmos-sdk 0.45.2 444 GranteeGrants(ctx context.Context, in *QueryGranteeGrantsRequest, opts ...grpc.CallOption) (*QueryGranteeGrantsResponse, error) 445 } 446 447 type queryClient struct { 448 cc grpc1.ClientConn 449 } 450 451 func NewQueryClient(cc grpc1.ClientConn) QueryClient { 452 return &queryClient{cc} 453 } 454 455 func (c *queryClient) Grants(ctx context.Context, in *QueryGrantsRequest, opts ...grpc.CallOption) (*QueryGrantsResponse, error) { 456 out := new(QueryGrantsResponse) 457 err := c.cc.Invoke(ctx, "/cosmos.authz.v1beta1.Query/Grants", in, out, opts...) 458 if err != nil { 459 return nil, err 460 } 461 return out, nil 462 } 463 464 func (c *queryClient) GranterGrants(ctx context.Context, in *QueryGranterGrantsRequest, opts ...grpc.CallOption) (*QueryGranterGrantsResponse, error) { 465 out := new(QueryGranterGrantsResponse) 466 err := c.cc.Invoke(ctx, "/cosmos.authz.v1beta1.Query/GranterGrants", in, out, opts...) 467 if err != nil { 468 return nil, err 469 } 470 return out, nil 471 } 472 473 func (c *queryClient) GranteeGrants(ctx context.Context, in *QueryGranteeGrantsRequest, opts ...grpc.CallOption) (*QueryGranteeGrantsResponse, error) { 474 out := new(QueryGranteeGrantsResponse) 475 err := c.cc.Invoke(ctx, "/cosmos.authz.v1beta1.Query/GranteeGrants", in, out, opts...) 476 if err != nil { 477 return nil, err 478 } 479 return out, nil 480 } 481 482 // QueryServer is the server API for Query service. 483 type QueryServer interface { 484 // Returns list of `Authorization`, granted to the grantee by the granter. 485 Grants(context.Context, *QueryGrantsRequest) (*QueryGrantsResponse, error) 486 // GranterGrants returns list of `GrantAuthorization`, granted by granter. 487 // 488 // Since: cosmos-sdk 0.45.2 489 GranterGrants(context.Context, *QueryGranterGrantsRequest) (*QueryGranterGrantsResponse, error) 490 // GranteeGrants returns a list of `GrantAuthorization` by grantee. 491 // 492 // Since: cosmos-sdk 0.45.2 493 GranteeGrants(context.Context, *QueryGranteeGrantsRequest) (*QueryGranteeGrantsResponse, error) 494 } 495 496 // UnimplementedQueryServer can be embedded to have forward compatible implementations. 497 type UnimplementedQueryServer struct { 498 } 499 500 func (*UnimplementedQueryServer) Grants(ctx context.Context, req *QueryGrantsRequest) (*QueryGrantsResponse, error) { 501 return nil, status.Errorf(codes.Unimplemented, "method Grants not implemented") 502 } 503 func (*UnimplementedQueryServer) GranterGrants(ctx context.Context, req *QueryGranterGrantsRequest) (*QueryGranterGrantsResponse, error) { 504 return nil, status.Errorf(codes.Unimplemented, "method GranterGrants not implemented") 505 } 506 func (*UnimplementedQueryServer) GranteeGrants(ctx context.Context, req *QueryGranteeGrantsRequest) (*QueryGranteeGrantsResponse, error) { 507 return nil, status.Errorf(codes.Unimplemented, "method GranteeGrants not implemented") 508 } 509 510 func RegisterQueryServer(s grpc1.Server, srv QueryServer) { 511 s.RegisterService(&_Query_serviceDesc, srv) 512 } 513 514 func _Query_Grants_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 515 in := new(QueryGrantsRequest) 516 if err := dec(in); err != nil { 517 return nil, err 518 } 519 if interceptor == nil { 520 return srv.(QueryServer).Grants(ctx, in) 521 } 522 info := &grpc.UnaryServerInfo{ 523 Server: srv, 524 FullMethod: "/cosmos.authz.v1beta1.Query/Grants", 525 } 526 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 527 return srv.(QueryServer).Grants(ctx, req.(*QueryGrantsRequest)) 528 } 529 return interceptor(ctx, in, info, handler) 530 } 531 532 func _Query_GranterGrants_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 533 in := new(QueryGranterGrantsRequest) 534 if err := dec(in); err != nil { 535 return nil, err 536 } 537 if interceptor == nil { 538 return srv.(QueryServer).GranterGrants(ctx, in) 539 } 540 info := &grpc.UnaryServerInfo{ 541 Server: srv, 542 FullMethod: "/cosmos.authz.v1beta1.Query/GranterGrants", 543 } 544 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 545 return srv.(QueryServer).GranterGrants(ctx, req.(*QueryGranterGrantsRequest)) 546 } 547 return interceptor(ctx, in, info, handler) 548 } 549 550 func _Query_GranteeGrants_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 551 in := new(QueryGranteeGrantsRequest) 552 if err := dec(in); err != nil { 553 return nil, err 554 } 555 if interceptor == nil { 556 return srv.(QueryServer).GranteeGrants(ctx, in) 557 } 558 info := &grpc.UnaryServerInfo{ 559 Server: srv, 560 FullMethod: "/cosmos.authz.v1beta1.Query/GranteeGrants", 561 } 562 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 563 return srv.(QueryServer).GranteeGrants(ctx, req.(*QueryGranteeGrantsRequest)) 564 } 565 return interceptor(ctx, in, info, handler) 566 } 567 568 var _Query_serviceDesc = grpc.ServiceDesc{ 569 ServiceName: "cosmos.authz.v1beta1.Query", 570 HandlerType: (*QueryServer)(nil), 571 Methods: []grpc.MethodDesc{ 572 { 573 MethodName: "Grants", 574 Handler: _Query_Grants_Handler, 575 }, 576 { 577 MethodName: "GranterGrants", 578 Handler: _Query_GranterGrants_Handler, 579 }, 580 { 581 MethodName: "GranteeGrants", 582 Handler: _Query_GranteeGrants_Handler, 583 }, 584 }, 585 Streams: []grpc.StreamDesc{}, 586 Metadata: "cosmos/authz/v1beta1/query.proto", 587 } 588 589 func (m *QueryGrantsRequest) Marshal() (dAtA []byte, err error) { 590 size := m.Size() 591 dAtA = make([]byte, size) 592 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 593 if err != nil { 594 return nil, err 595 } 596 return dAtA[:n], nil 597 } 598 599 func (m *QueryGrantsRequest) MarshalTo(dAtA []byte) (int, error) { 600 size := m.Size() 601 return m.MarshalToSizedBuffer(dAtA[:size]) 602 } 603 604 func (m *QueryGrantsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 605 i := len(dAtA) 606 _ = i 607 var l int 608 _ = l 609 if m.Pagination != nil { 610 { 611 size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) 612 if err != nil { 613 return 0, err 614 } 615 i -= size 616 i = encodeVarintQuery(dAtA, i, uint64(size)) 617 } 618 i-- 619 dAtA[i] = 0x22 620 } 621 if len(m.MsgTypeUrl) > 0 { 622 i -= len(m.MsgTypeUrl) 623 copy(dAtA[i:], m.MsgTypeUrl) 624 i = encodeVarintQuery(dAtA, i, uint64(len(m.MsgTypeUrl))) 625 i-- 626 dAtA[i] = 0x1a 627 } 628 if len(m.Grantee) > 0 { 629 i -= len(m.Grantee) 630 copy(dAtA[i:], m.Grantee) 631 i = encodeVarintQuery(dAtA, i, uint64(len(m.Grantee))) 632 i-- 633 dAtA[i] = 0x12 634 } 635 if len(m.Granter) > 0 { 636 i -= len(m.Granter) 637 copy(dAtA[i:], m.Granter) 638 i = encodeVarintQuery(dAtA, i, uint64(len(m.Granter))) 639 i-- 640 dAtA[i] = 0xa 641 } 642 return len(dAtA) - i, nil 643 } 644 645 func (m *QueryGrantsResponse) Marshal() (dAtA []byte, err error) { 646 size := m.Size() 647 dAtA = make([]byte, size) 648 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 649 if err != nil { 650 return nil, err 651 } 652 return dAtA[:n], nil 653 } 654 655 func (m *QueryGrantsResponse) MarshalTo(dAtA []byte) (int, error) { 656 size := m.Size() 657 return m.MarshalToSizedBuffer(dAtA[:size]) 658 } 659 660 func (m *QueryGrantsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 661 i := len(dAtA) 662 _ = i 663 var l int 664 _ = l 665 if m.Pagination != nil { 666 { 667 size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) 668 if err != nil { 669 return 0, err 670 } 671 i -= size 672 i = encodeVarintQuery(dAtA, i, uint64(size)) 673 } 674 i-- 675 dAtA[i] = 0x12 676 } 677 if len(m.Grants) > 0 { 678 for iNdEx := len(m.Grants) - 1; iNdEx >= 0; iNdEx-- { 679 { 680 size, err := m.Grants[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 681 if err != nil { 682 return 0, err 683 } 684 i -= size 685 i = encodeVarintQuery(dAtA, i, uint64(size)) 686 } 687 i-- 688 dAtA[i] = 0xa 689 } 690 } 691 return len(dAtA) - i, nil 692 } 693 694 func (m *QueryGranterGrantsRequest) Marshal() (dAtA []byte, err error) { 695 size := m.Size() 696 dAtA = make([]byte, size) 697 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 698 if err != nil { 699 return nil, err 700 } 701 return dAtA[:n], nil 702 } 703 704 func (m *QueryGranterGrantsRequest) MarshalTo(dAtA []byte) (int, error) { 705 size := m.Size() 706 return m.MarshalToSizedBuffer(dAtA[:size]) 707 } 708 709 func (m *QueryGranterGrantsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 710 i := len(dAtA) 711 _ = i 712 var l int 713 _ = l 714 if m.Pagination != nil { 715 { 716 size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) 717 if err != nil { 718 return 0, err 719 } 720 i -= size 721 i = encodeVarintQuery(dAtA, i, uint64(size)) 722 } 723 i-- 724 dAtA[i] = 0x12 725 } 726 if len(m.Granter) > 0 { 727 i -= len(m.Granter) 728 copy(dAtA[i:], m.Granter) 729 i = encodeVarintQuery(dAtA, i, uint64(len(m.Granter))) 730 i-- 731 dAtA[i] = 0xa 732 } 733 return len(dAtA) - i, nil 734 } 735 736 func (m *QueryGranterGrantsResponse) Marshal() (dAtA []byte, err error) { 737 size := m.Size() 738 dAtA = make([]byte, size) 739 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 740 if err != nil { 741 return nil, err 742 } 743 return dAtA[:n], nil 744 } 745 746 func (m *QueryGranterGrantsResponse) MarshalTo(dAtA []byte) (int, error) { 747 size := m.Size() 748 return m.MarshalToSizedBuffer(dAtA[:size]) 749 } 750 751 func (m *QueryGranterGrantsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 752 i := len(dAtA) 753 _ = i 754 var l int 755 _ = l 756 if m.Pagination != nil { 757 { 758 size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) 759 if err != nil { 760 return 0, err 761 } 762 i -= size 763 i = encodeVarintQuery(dAtA, i, uint64(size)) 764 } 765 i-- 766 dAtA[i] = 0x12 767 } 768 if len(m.Grants) > 0 { 769 for iNdEx := len(m.Grants) - 1; iNdEx >= 0; iNdEx-- { 770 { 771 size, err := m.Grants[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 772 if err != nil { 773 return 0, err 774 } 775 i -= size 776 i = encodeVarintQuery(dAtA, i, uint64(size)) 777 } 778 i-- 779 dAtA[i] = 0xa 780 } 781 } 782 return len(dAtA) - i, nil 783 } 784 785 func (m *QueryGranteeGrantsRequest) Marshal() (dAtA []byte, err error) { 786 size := m.Size() 787 dAtA = make([]byte, size) 788 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 789 if err != nil { 790 return nil, err 791 } 792 return dAtA[:n], nil 793 } 794 795 func (m *QueryGranteeGrantsRequest) MarshalTo(dAtA []byte) (int, error) { 796 size := m.Size() 797 return m.MarshalToSizedBuffer(dAtA[:size]) 798 } 799 800 func (m *QueryGranteeGrantsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 801 i := len(dAtA) 802 _ = i 803 var l int 804 _ = l 805 if m.Pagination != nil { 806 { 807 size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) 808 if err != nil { 809 return 0, err 810 } 811 i -= size 812 i = encodeVarintQuery(dAtA, i, uint64(size)) 813 } 814 i-- 815 dAtA[i] = 0x12 816 } 817 if len(m.Grantee) > 0 { 818 i -= len(m.Grantee) 819 copy(dAtA[i:], m.Grantee) 820 i = encodeVarintQuery(dAtA, i, uint64(len(m.Grantee))) 821 i-- 822 dAtA[i] = 0xa 823 } 824 return len(dAtA) - i, nil 825 } 826 827 func (m *QueryGranteeGrantsResponse) Marshal() (dAtA []byte, err error) { 828 size := m.Size() 829 dAtA = make([]byte, size) 830 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 831 if err != nil { 832 return nil, err 833 } 834 return dAtA[:n], nil 835 } 836 837 func (m *QueryGranteeGrantsResponse) MarshalTo(dAtA []byte) (int, error) { 838 size := m.Size() 839 return m.MarshalToSizedBuffer(dAtA[:size]) 840 } 841 842 func (m *QueryGranteeGrantsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 843 i := len(dAtA) 844 _ = i 845 var l int 846 _ = l 847 if m.Pagination != nil { 848 { 849 size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) 850 if err != nil { 851 return 0, err 852 } 853 i -= size 854 i = encodeVarintQuery(dAtA, i, uint64(size)) 855 } 856 i-- 857 dAtA[i] = 0x12 858 } 859 if len(m.Grants) > 0 { 860 for iNdEx := len(m.Grants) - 1; iNdEx >= 0; iNdEx-- { 861 { 862 size, err := m.Grants[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 863 if err != nil { 864 return 0, err 865 } 866 i -= size 867 i = encodeVarintQuery(dAtA, i, uint64(size)) 868 } 869 i-- 870 dAtA[i] = 0xa 871 } 872 } 873 return len(dAtA) - i, nil 874 } 875 876 func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { 877 offset -= sovQuery(v) 878 base := offset 879 for v >= 1<<7 { 880 dAtA[offset] = uint8(v&0x7f | 0x80) 881 v >>= 7 882 offset++ 883 } 884 dAtA[offset] = uint8(v) 885 return base 886 } 887 func (m *QueryGrantsRequest) Size() (n int) { 888 if m == nil { 889 return 0 890 } 891 var l int 892 _ = l 893 l = len(m.Granter) 894 if l > 0 { 895 n += 1 + l + sovQuery(uint64(l)) 896 } 897 l = len(m.Grantee) 898 if l > 0 { 899 n += 1 + l + sovQuery(uint64(l)) 900 } 901 l = len(m.MsgTypeUrl) 902 if l > 0 { 903 n += 1 + l + sovQuery(uint64(l)) 904 } 905 if m.Pagination != nil { 906 l = m.Pagination.Size() 907 n += 1 + l + sovQuery(uint64(l)) 908 } 909 return n 910 } 911 912 func (m *QueryGrantsResponse) Size() (n int) { 913 if m == nil { 914 return 0 915 } 916 var l int 917 _ = l 918 if len(m.Grants) > 0 { 919 for _, e := range m.Grants { 920 l = e.Size() 921 n += 1 + l + sovQuery(uint64(l)) 922 } 923 } 924 if m.Pagination != nil { 925 l = m.Pagination.Size() 926 n += 1 + l + sovQuery(uint64(l)) 927 } 928 return n 929 } 930 931 func (m *QueryGranterGrantsRequest) Size() (n int) { 932 if m == nil { 933 return 0 934 } 935 var l int 936 _ = l 937 l = len(m.Granter) 938 if l > 0 { 939 n += 1 + l + sovQuery(uint64(l)) 940 } 941 if m.Pagination != nil { 942 l = m.Pagination.Size() 943 n += 1 + l + sovQuery(uint64(l)) 944 } 945 return n 946 } 947 948 func (m *QueryGranterGrantsResponse) Size() (n int) { 949 if m == nil { 950 return 0 951 } 952 var l int 953 _ = l 954 if len(m.Grants) > 0 { 955 for _, e := range m.Grants { 956 l = e.Size() 957 n += 1 + l + sovQuery(uint64(l)) 958 } 959 } 960 if m.Pagination != nil { 961 l = m.Pagination.Size() 962 n += 1 + l + sovQuery(uint64(l)) 963 } 964 return n 965 } 966 967 func (m *QueryGranteeGrantsRequest) Size() (n int) { 968 if m == nil { 969 return 0 970 } 971 var l int 972 _ = l 973 l = len(m.Grantee) 974 if l > 0 { 975 n += 1 + l + sovQuery(uint64(l)) 976 } 977 if m.Pagination != nil { 978 l = m.Pagination.Size() 979 n += 1 + l + sovQuery(uint64(l)) 980 } 981 return n 982 } 983 984 func (m *QueryGranteeGrantsResponse) Size() (n int) { 985 if m == nil { 986 return 0 987 } 988 var l int 989 _ = l 990 if len(m.Grants) > 0 { 991 for _, e := range m.Grants { 992 l = e.Size() 993 n += 1 + l + sovQuery(uint64(l)) 994 } 995 } 996 if m.Pagination != nil { 997 l = m.Pagination.Size() 998 n += 1 + l + sovQuery(uint64(l)) 999 } 1000 return n 1001 } 1002 1003 func sovQuery(x uint64) (n int) { 1004 return (math_bits.Len64(x|1) + 6) / 7 1005 } 1006 func sozQuery(x uint64) (n int) { 1007 return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 1008 } 1009 func (m *QueryGrantsRequest) Unmarshal(dAtA []byte) error { 1010 l := len(dAtA) 1011 iNdEx := 0 1012 for iNdEx < l { 1013 preIndex := iNdEx 1014 var wire uint64 1015 for shift := uint(0); ; shift += 7 { 1016 if shift >= 64 { 1017 return ErrIntOverflowQuery 1018 } 1019 if iNdEx >= l { 1020 return io.ErrUnexpectedEOF 1021 } 1022 b := dAtA[iNdEx] 1023 iNdEx++ 1024 wire |= uint64(b&0x7F) << shift 1025 if b < 0x80 { 1026 break 1027 } 1028 } 1029 fieldNum := int32(wire >> 3) 1030 wireType := int(wire & 0x7) 1031 if wireType == 4 { 1032 return fmt.Errorf("proto: QueryGrantsRequest: wiretype end group for non-group") 1033 } 1034 if fieldNum <= 0 { 1035 return fmt.Errorf("proto: QueryGrantsRequest: illegal tag %d (wire type %d)", fieldNum, wire) 1036 } 1037 switch fieldNum { 1038 case 1: 1039 if wireType != 2 { 1040 return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) 1041 } 1042 var stringLen uint64 1043 for shift := uint(0); ; shift += 7 { 1044 if shift >= 64 { 1045 return ErrIntOverflowQuery 1046 } 1047 if iNdEx >= l { 1048 return io.ErrUnexpectedEOF 1049 } 1050 b := dAtA[iNdEx] 1051 iNdEx++ 1052 stringLen |= uint64(b&0x7F) << shift 1053 if b < 0x80 { 1054 break 1055 } 1056 } 1057 intStringLen := int(stringLen) 1058 if intStringLen < 0 { 1059 return ErrInvalidLengthQuery 1060 } 1061 postIndex := iNdEx + intStringLen 1062 if postIndex < 0 { 1063 return ErrInvalidLengthQuery 1064 } 1065 if postIndex > l { 1066 return io.ErrUnexpectedEOF 1067 } 1068 m.Granter = string(dAtA[iNdEx:postIndex]) 1069 iNdEx = postIndex 1070 case 2: 1071 if wireType != 2 { 1072 return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) 1073 } 1074 var stringLen uint64 1075 for shift := uint(0); ; shift += 7 { 1076 if shift >= 64 { 1077 return ErrIntOverflowQuery 1078 } 1079 if iNdEx >= l { 1080 return io.ErrUnexpectedEOF 1081 } 1082 b := dAtA[iNdEx] 1083 iNdEx++ 1084 stringLen |= uint64(b&0x7F) << shift 1085 if b < 0x80 { 1086 break 1087 } 1088 } 1089 intStringLen := int(stringLen) 1090 if intStringLen < 0 { 1091 return ErrInvalidLengthQuery 1092 } 1093 postIndex := iNdEx + intStringLen 1094 if postIndex < 0 { 1095 return ErrInvalidLengthQuery 1096 } 1097 if postIndex > l { 1098 return io.ErrUnexpectedEOF 1099 } 1100 m.Grantee = string(dAtA[iNdEx:postIndex]) 1101 iNdEx = postIndex 1102 case 3: 1103 if wireType != 2 { 1104 return fmt.Errorf("proto: wrong wireType = %d for field MsgTypeUrl", wireType) 1105 } 1106 var stringLen uint64 1107 for shift := uint(0); ; shift += 7 { 1108 if shift >= 64 { 1109 return ErrIntOverflowQuery 1110 } 1111 if iNdEx >= l { 1112 return io.ErrUnexpectedEOF 1113 } 1114 b := dAtA[iNdEx] 1115 iNdEx++ 1116 stringLen |= uint64(b&0x7F) << shift 1117 if b < 0x80 { 1118 break 1119 } 1120 } 1121 intStringLen := int(stringLen) 1122 if intStringLen < 0 { 1123 return ErrInvalidLengthQuery 1124 } 1125 postIndex := iNdEx + intStringLen 1126 if postIndex < 0 { 1127 return ErrInvalidLengthQuery 1128 } 1129 if postIndex > l { 1130 return io.ErrUnexpectedEOF 1131 } 1132 m.MsgTypeUrl = string(dAtA[iNdEx:postIndex]) 1133 iNdEx = postIndex 1134 case 4: 1135 if wireType != 2 { 1136 return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) 1137 } 1138 var msglen int 1139 for shift := uint(0); ; shift += 7 { 1140 if shift >= 64 { 1141 return ErrIntOverflowQuery 1142 } 1143 if iNdEx >= l { 1144 return io.ErrUnexpectedEOF 1145 } 1146 b := dAtA[iNdEx] 1147 iNdEx++ 1148 msglen |= int(b&0x7F) << shift 1149 if b < 0x80 { 1150 break 1151 } 1152 } 1153 if msglen < 0 { 1154 return ErrInvalidLengthQuery 1155 } 1156 postIndex := iNdEx + msglen 1157 if postIndex < 0 { 1158 return ErrInvalidLengthQuery 1159 } 1160 if postIndex > l { 1161 return io.ErrUnexpectedEOF 1162 } 1163 if m.Pagination == nil { 1164 m.Pagination = &query.PageRequest{} 1165 } 1166 if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1167 return err 1168 } 1169 iNdEx = postIndex 1170 default: 1171 iNdEx = preIndex 1172 skippy, err := skipQuery(dAtA[iNdEx:]) 1173 if err != nil { 1174 return err 1175 } 1176 if (skippy < 0) || (iNdEx+skippy) < 0 { 1177 return ErrInvalidLengthQuery 1178 } 1179 if (iNdEx + skippy) > l { 1180 return io.ErrUnexpectedEOF 1181 } 1182 iNdEx += skippy 1183 } 1184 } 1185 1186 if iNdEx > l { 1187 return io.ErrUnexpectedEOF 1188 } 1189 return nil 1190 } 1191 func (m *QueryGrantsResponse) Unmarshal(dAtA []byte) error { 1192 l := len(dAtA) 1193 iNdEx := 0 1194 for iNdEx < l { 1195 preIndex := iNdEx 1196 var wire uint64 1197 for shift := uint(0); ; shift += 7 { 1198 if shift >= 64 { 1199 return ErrIntOverflowQuery 1200 } 1201 if iNdEx >= l { 1202 return io.ErrUnexpectedEOF 1203 } 1204 b := dAtA[iNdEx] 1205 iNdEx++ 1206 wire |= uint64(b&0x7F) << shift 1207 if b < 0x80 { 1208 break 1209 } 1210 } 1211 fieldNum := int32(wire >> 3) 1212 wireType := int(wire & 0x7) 1213 if wireType == 4 { 1214 return fmt.Errorf("proto: QueryGrantsResponse: wiretype end group for non-group") 1215 } 1216 if fieldNum <= 0 { 1217 return fmt.Errorf("proto: QueryGrantsResponse: illegal tag %d (wire type %d)", fieldNum, wire) 1218 } 1219 switch fieldNum { 1220 case 1: 1221 if wireType != 2 { 1222 return fmt.Errorf("proto: wrong wireType = %d for field Grants", wireType) 1223 } 1224 var msglen int 1225 for shift := uint(0); ; shift += 7 { 1226 if shift >= 64 { 1227 return ErrIntOverflowQuery 1228 } 1229 if iNdEx >= l { 1230 return io.ErrUnexpectedEOF 1231 } 1232 b := dAtA[iNdEx] 1233 iNdEx++ 1234 msglen |= int(b&0x7F) << shift 1235 if b < 0x80 { 1236 break 1237 } 1238 } 1239 if msglen < 0 { 1240 return ErrInvalidLengthQuery 1241 } 1242 postIndex := iNdEx + msglen 1243 if postIndex < 0 { 1244 return ErrInvalidLengthQuery 1245 } 1246 if postIndex > l { 1247 return io.ErrUnexpectedEOF 1248 } 1249 m.Grants = append(m.Grants, &Grant{}) 1250 if err := m.Grants[len(m.Grants)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1251 return err 1252 } 1253 iNdEx = postIndex 1254 case 2: 1255 if wireType != 2 { 1256 return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) 1257 } 1258 var msglen int 1259 for shift := uint(0); ; shift += 7 { 1260 if shift >= 64 { 1261 return ErrIntOverflowQuery 1262 } 1263 if iNdEx >= l { 1264 return io.ErrUnexpectedEOF 1265 } 1266 b := dAtA[iNdEx] 1267 iNdEx++ 1268 msglen |= int(b&0x7F) << shift 1269 if b < 0x80 { 1270 break 1271 } 1272 } 1273 if msglen < 0 { 1274 return ErrInvalidLengthQuery 1275 } 1276 postIndex := iNdEx + msglen 1277 if postIndex < 0 { 1278 return ErrInvalidLengthQuery 1279 } 1280 if postIndex > l { 1281 return io.ErrUnexpectedEOF 1282 } 1283 if m.Pagination == nil { 1284 m.Pagination = &query.PageResponse{} 1285 } 1286 if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1287 return err 1288 } 1289 iNdEx = postIndex 1290 default: 1291 iNdEx = preIndex 1292 skippy, err := skipQuery(dAtA[iNdEx:]) 1293 if err != nil { 1294 return err 1295 } 1296 if (skippy < 0) || (iNdEx+skippy) < 0 { 1297 return ErrInvalidLengthQuery 1298 } 1299 if (iNdEx + skippy) > l { 1300 return io.ErrUnexpectedEOF 1301 } 1302 iNdEx += skippy 1303 } 1304 } 1305 1306 if iNdEx > l { 1307 return io.ErrUnexpectedEOF 1308 } 1309 return nil 1310 } 1311 func (m *QueryGranterGrantsRequest) Unmarshal(dAtA []byte) error { 1312 l := len(dAtA) 1313 iNdEx := 0 1314 for iNdEx < l { 1315 preIndex := iNdEx 1316 var wire uint64 1317 for shift := uint(0); ; shift += 7 { 1318 if shift >= 64 { 1319 return ErrIntOverflowQuery 1320 } 1321 if iNdEx >= l { 1322 return io.ErrUnexpectedEOF 1323 } 1324 b := dAtA[iNdEx] 1325 iNdEx++ 1326 wire |= uint64(b&0x7F) << shift 1327 if b < 0x80 { 1328 break 1329 } 1330 } 1331 fieldNum := int32(wire >> 3) 1332 wireType := int(wire & 0x7) 1333 if wireType == 4 { 1334 return fmt.Errorf("proto: QueryGranterGrantsRequest: wiretype end group for non-group") 1335 } 1336 if fieldNum <= 0 { 1337 return fmt.Errorf("proto: QueryGranterGrantsRequest: illegal tag %d (wire type %d)", fieldNum, wire) 1338 } 1339 switch fieldNum { 1340 case 1: 1341 if wireType != 2 { 1342 return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) 1343 } 1344 var stringLen uint64 1345 for shift := uint(0); ; shift += 7 { 1346 if shift >= 64 { 1347 return ErrIntOverflowQuery 1348 } 1349 if iNdEx >= l { 1350 return io.ErrUnexpectedEOF 1351 } 1352 b := dAtA[iNdEx] 1353 iNdEx++ 1354 stringLen |= uint64(b&0x7F) << shift 1355 if b < 0x80 { 1356 break 1357 } 1358 } 1359 intStringLen := int(stringLen) 1360 if intStringLen < 0 { 1361 return ErrInvalidLengthQuery 1362 } 1363 postIndex := iNdEx + intStringLen 1364 if postIndex < 0 { 1365 return ErrInvalidLengthQuery 1366 } 1367 if postIndex > l { 1368 return io.ErrUnexpectedEOF 1369 } 1370 m.Granter = string(dAtA[iNdEx:postIndex]) 1371 iNdEx = postIndex 1372 case 2: 1373 if wireType != 2 { 1374 return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) 1375 } 1376 var msglen int 1377 for shift := uint(0); ; shift += 7 { 1378 if shift >= 64 { 1379 return ErrIntOverflowQuery 1380 } 1381 if iNdEx >= l { 1382 return io.ErrUnexpectedEOF 1383 } 1384 b := dAtA[iNdEx] 1385 iNdEx++ 1386 msglen |= int(b&0x7F) << shift 1387 if b < 0x80 { 1388 break 1389 } 1390 } 1391 if msglen < 0 { 1392 return ErrInvalidLengthQuery 1393 } 1394 postIndex := iNdEx + msglen 1395 if postIndex < 0 { 1396 return ErrInvalidLengthQuery 1397 } 1398 if postIndex > l { 1399 return io.ErrUnexpectedEOF 1400 } 1401 if m.Pagination == nil { 1402 m.Pagination = &query.PageRequest{} 1403 } 1404 if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1405 return err 1406 } 1407 iNdEx = postIndex 1408 default: 1409 iNdEx = preIndex 1410 skippy, err := skipQuery(dAtA[iNdEx:]) 1411 if err != nil { 1412 return err 1413 } 1414 if (skippy < 0) || (iNdEx+skippy) < 0 { 1415 return ErrInvalidLengthQuery 1416 } 1417 if (iNdEx + skippy) > l { 1418 return io.ErrUnexpectedEOF 1419 } 1420 iNdEx += skippy 1421 } 1422 } 1423 1424 if iNdEx > l { 1425 return io.ErrUnexpectedEOF 1426 } 1427 return nil 1428 } 1429 func (m *QueryGranterGrantsResponse) Unmarshal(dAtA []byte) error { 1430 l := len(dAtA) 1431 iNdEx := 0 1432 for iNdEx < l { 1433 preIndex := iNdEx 1434 var wire uint64 1435 for shift := uint(0); ; shift += 7 { 1436 if shift >= 64 { 1437 return ErrIntOverflowQuery 1438 } 1439 if iNdEx >= l { 1440 return io.ErrUnexpectedEOF 1441 } 1442 b := dAtA[iNdEx] 1443 iNdEx++ 1444 wire |= uint64(b&0x7F) << shift 1445 if b < 0x80 { 1446 break 1447 } 1448 } 1449 fieldNum := int32(wire >> 3) 1450 wireType := int(wire & 0x7) 1451 if wireType == 4 { 1452 return fmt.Errorf("proto: QueryGranterGrantsResponse: wiretype end group for non-group") 1453 } 1454 if fieldNum <= 0 { 1455 return fmt.Errorf("proto: QueryGranterGrantsResponse: illegal tag %d (wire type %d)", fieldNum, wire) 1456 } 1457 switch fieldNum { 1458 case 1: 1459 if wireType != 2 { 1460 return fmt.Errorf("proto: wrong wireType = %d for field Grants", wireType) 1461 } 1462 var msglen int 1463 for shift := uint(0); ; shift += 7 { 1464 if shift >= 64 { 1465 return ErrIntOverflowQuery 1466 } 1467 if iNdEx >= l { 1468 return io.ErrUnexpectedEOF 1469 } 1470 b := dAtA[iNdEx] 1471 iNdEx++ 1472 msglen |= int(b&0x7F) << shift 1473 if b < 0x80 { 1474 break 1475 } 1476 } 1477 if msglen < 0 { 1478 return ErrInvalidLengthQuery 1479 } 1480 postIndex := iNdEx + msglen 1481 if postIndex < 0 { 1482 return ErrInvalidLengthQuery 1483 } 1484 if postIndex > l { 1485 return io.ErrUnexpectedEOF 1486 } 1487 m.Grants = append(m.Grants, &GrantAuthorization{}) 1488 if err := m.Grants[len(m.Grants)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1489 return err 1490 } 1491 iNdEx = postIndex 1492 case 2: 1493 if wireType != 2 { 1494 return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) 1495 } 1496 var msglen int 1497 for shift := uint(0); ; shift += 7 { 1498 if shift >= 64 { 1499 return ErrIntOverflowQuery 1500 } 1501 if iNdEx >= l { 1502 return io.ErrUnexpectedEOF 1503 } 1504 b := dAtA[iNdEx] 1505 iNdEx++ 1506 msglen |= int(b&0x7F) << shift 1507 if b < 0x80 { 1508 break 1509 } 1510 } 1511 if msglen < 0 { 1512 return ErrInvalidLengthQuery 1513 } 1514 postIndex := iNdEx + msglen 1515 if postIndex < 0 { 1516 return ErrInvalidLengthQuery 1517 } 1518 if postIndex > l { 1519 return io.ErrUnexpectedEOF 1520 } 1521 if m.Pagination == nil { 1522 m.Pagination = &query.PageResponse{} 1523 } 1524 if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1525 return err 1526 } 1527 iNdEx = postIndex 1528 default: 1529 iNdEx = preIndex 1530 skippy, err := skipQuery(dAtA[iNdEx:]) 1531 if err != nil { 1532 return err 1533 } 1534 if (skippy < 0) || (iNdEx+skippy) < 0 { 1535 return ErrInvalidLengthQuery 1536 } 1537 if (iNdEx + skippy) > l { 1538 return io.ErrUnexpectedEOF 1539 } 1540 iNdEx += skippy 1541 } 1542 } 1543 1544 if iNdEx > l { 1545 return io.ErrUnexpectedEOF 1546 } 1547 return nil 1548 } 1549 func (m *QueryGranteeGrantsRequest) Unmarshal(dAtA []byte) error { 1550 l := len(dAtA) 1551 iNdEx := 0 1552 for iNdEx < l { 1553 preIndex := iNdEx 1554 var wire uint64 1555 for shift := uint(0); ; shift += 7 { 1556 if shift >= 64 { 1557 return ErrIntOverflowQuery 1558 } 1559 if iNdEx >= l { 1560 return io.ErrUnexpectedEOF 1561 } 1562 b := dAtA[iNdEx] 1563 iNdEx++ 1564 wire |= uint64(b&0x7F) << shift 1565 if b < 0x80 { 1566 break 1567 } 1568 } 1569 fieldNum := int32(wire >> 3) 1570 wireType := int(wire & 0x7) 1571 if wireType == 4 { 1572 return fmt.Errorf("proto: QueryGranteeGrantsRequest: wiretype end group for non-group") 1573 } 1574 if fieldNum <= 0 { 1575 return fmt.Errorf("proto: QueryGranteeGrantsRequest: illegal tag %d (wire type %d)", fieldNum, wire) 1576 } 1577 switch fieldNum { 1578 case 1: 1579 if wireType != 2 { 1580 return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) 1581 } 1582 var stringLen uint64 1583 for shift := uint(0); ; shift += 7 { 1584 if shift >= 64 { 1585 return ErrIntOverflowQuery 1586 } 1587 if iNdEx >= l { 1588 return io.ErrUnexpectedEOF 1589 } 1590 b := dAtA[iNdEx] 1591 iNdEx++ 1592 stringLen |= uint64(b&0x7F) << shift 1593 if b < 0x80 { 1594 break 1595 } 1596 } 1597 intStringLen := int(stringLen) 1598 if intStringLen < 0 { 1599 return ErrInvalidLengthQuery 1600 } 1601 postIndex := iNdEx + intStringLen 1602 if postIndex < 0 { 1603 return ErrInvalidLengthQuery 1604 } 1605 if postIndex > l { 1606 return io.ErrUnexpectedEOF 1607 } 1608 m.Grantee = string(dAtA[iNdEx:postIndex]) 1609 iNdEx = postIndex 1610 case 2: 1611 if wireType != 2 { 1612 return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) 1613 } 1614 var msglen int 1615 for shift := uint(0); ; shift += 7 { 1616 if shift >= 64 { 1617 return ErrIntOverflowQuery 1618 } 1619 if iNdEx >= l { 1620 return io.ErrUnexpectedEOF 1621 } 1622 b := dAtA[iNdEx] 1623 iNdEx++ 1624 msglen |= int(b&0x7F) << shift 1625 if b < 0x80 { 1626 break 1627 } 1628 } 1629 if msglen < 0 { 1630 return ErrInvalidLengthQuery 1631 } 1632 postIndex := iNdEx + msglen 1633 if postIndex < 0 { 1634 return ErrInvalidLengthQuery 1635 } 1636 if postIndex > l { 1637 return io.ErrUnexpectedEOF 1638 } 1639 if m.Pagination == nil { 1640 m.Pagination = &query.PageRequest{} 1641 } 1642 if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1643 return err 1644 } 1645 iNdEx = postIndex 1646 default: 1647 iNdEx = preIndex 1648 skippy, err := skipQuery(dAtA[iNdEx:]) 1649 if err != nil { 1650 return err 1651 } 1652 if (skippy < 0) || (iNdEx+skippy) < 0 { 1653 return ErrInvalidLengthQuery 1654 } 1655 if (iNdEx + skippy) > l { 1656 return io.ErrUnexpectedEOF 1657 } 1658 iNdEx += skippy 1659 } 1660 } 1661 1662 if iNdEx > l { 1663 return io.ErrUnexpectedEOF 1664 } 1665 return nil 1666 } 1667 func (m *QueryGranteeGrantsResponse) Unmarshal(dAtA []byte) error { 1668 l := len(dAtA) 1669 iNdEx := 0 1670 for iNdEx < l { 1671 preIndex := iNdEx 1672 var wire uint64 1673 for shift := uint(0); ; shift += 7 { 1674 if shift >= 64 { 1675 return ErrIntOverflowQuery 1676 } 1677 if iNdEx >= l { 1678 return io.ErrUnexpectedEOF 1679 } 1680 b := dAtA[iNdEx] 1681 iNdEx++ 1682 wire |= uint64(b&0x7F) << shift 1683 if b < 0x80 { 1684 break 1685 } 1686 } 1687 fieldNum := int32(wire >> 3) 1688 wireType := int(wire & 0x7) 1689 if wireType == 4 { 1690 return fmt.Errorf("proto: QueryGranteeGrantsResponse: wiretype end group for non-group") 1691 } 1692 if fieldNum <= 0 { 1693 return fmt.Errorf("proto: QueryGranteeGrantsResponse: illegal tag %d (wire type %d)", fieldNum, wire) 1694 } 1695 switch fieldNum { 1696 case 1: 1697 if wireType != 2 { 1698 return fmt.Errorf("proto: wrong wireType = %d for field Grants", wireType) 1699 } 1700 var msglen int 1701 for shift := uint(0); ; shift += 7 { 1702 if shift >= 64 { 1703 return ErrIntOverflowQuery 1704 } 1705 if iNdEx >= l { 1706 return io.ErrUnexpectedEOF 1707 } 1708 b := dAtA[iNdEx] 1709 iNdEx++ 1710 msglen |= int(b&0x7F) << shift 1711 if b < 0x80 { 1712 break 1713 } 1714 } 1715 if msglen < 0 { 1716 return ErrInvalidLengthQuery 1717 } 1718 postIndex := iNdEx + msglen 1719 if postIndex < 0 { 1720 return ErrInvalidLengthQuery 1721 } 1722 if postIndex > l { 1723 return io.ErrUnexpectedEOF 1724 } 1725 m.Grants = append(m.Grants, &GrantAuthorization{}) 1726 if err := m.Grants[len(m.Grants)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1727 return err 1728 } 1729 iNdEx = postIndex 1730 case 2: 1731 if wireType != 2 { 1732 return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) 1733 } 1734 var msglen int 1735 for shift := uint(0); ; shift += 7 { 1736 if shift >= 64 { 1737 return ErrIntOverflowQuery 1738 } 1739 if iNdEx >= l { 1740 return io.ErrUnexpectedEOF 1741 } 1742 b := dAtA[iNdEx] 1743 iNdEx++ 1744 msglen |= int(b&0x7F) << shift 1745 if b < 0x80 { 1746 break 1747 } 1748 } 1749 if msglen < 0 { 1750 return ErrInvalidLengthQuery 1751 } 1752 postIndex := iNdEx + msglen 1753 if postIndex < 0 { 1754 return ErrInvalidLengthQuery 1755 } 1756 if postIndex > l { 1757 return io.ErrUnexpectedEOF 1758 } 1759 if m.Pagination == nil { 1760 m.Pagination = &query.PageResponse{} 1761 } 1762 if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1763 return err 1764 } 1765 iNdEx = postIndex 1766 default: 1767 iNdEx = preIndex 1768 skippy, err := skipQuery(dAtA[iNdEx:]) 1769 if err != nil { 1770 return err 1771 } 1772 if (skippy < 0) || (iNdEx+skippy) < 0 { 1773 return ErrInvalidLengthQuery 1774 } 1775 if (iNdEx + skippy) > l { 1776 return io.ErrUnexpectedEOF 1777 } 1778 iNdEx += skippy 1779 } 1780 } 1781 1782 if iNdEx > l { 1783 return io.ErrUnexpectedEOF 1784 } 1785 return nil 1786 } 1787 func skipQuery(dAtA []byte) (n int, err error) { 1788 l := len(dAtA) 1789 iNdEx := 0 1790 depth := 0 1791 for iNdEx < l { 1792 var wire uint64 1793 for shift := uint(0); ; shift += 7 { 1794 if shift >= 64 { 1795 return 0, ErrIntOverflowQuery 1796 } 1797 if iNdEx >= l { 1798 return 0, io.ErrUnexpectedEOF 1799 } 1800 b := dAtA[iNdEx] 1801 iNdEx++ 1802 wire |= (uint64(b) & 0x7F) << shift 1803 if b < 0x80 { 1804 break 1805 } 1806 } 1807 wireType := int(wire & 0x7) 1808 switch wireType { 1809 case 0: 1810 for shift := uint(0); ; shift += 7 { 1811 if shift >= 64 { 1812 return 0, ErrIntOverflowQuery 1813 } 1814 if iNdEx >= l { 1815 return 0, io.ErrUnexpectedEOF 1816 } 1817 iNdEx++ 1818 if dAtA[iNdEx-1] < 0x80 { 1819 break 1820 } 1821 } 1822 case 1: 1823 iNdEx += 8 1824 case 2: 1825 var length int 1826 for shift := uint(0); ; shift += 7 { 1827 if shift >= 64 { 1828 return 0, ErrIntOverflowQuery 1829 } 1830 if iNdEx >= l { 1831 return 0, io.ErrUnexpectedEOF 1832 } 1833 b := dAtA[iNdEx] 1834 iNdEx++ 1835 length |= (int(b) & 0x7F) << shift 1836 if b < 0x80 { 1837 break 1838 } 1839 } 1840 if length < 0 { 1841 return 0, ErrInvalidLengthQuery 1842 } 1843 iNdEx += length 1844 case 3: 1845 depth++ 1846 case 4: 1847 if depth == 0 { 1848 return 0, ErrUnexpectedEndOfGroupQuery 1849 } 1850 depth-- 1851 case 5: 1852 iNdEx += 4 1853 default: 1854 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1855 } 1856 if iNdEx < 0 { 1857 return 0, ErrInvalidLengthQuery 1858 } 1859 if depth == 0 { 1860 return iNdEx, nil 1861 } 1862 } 1863 return 0, io.ErrUnexpectedEOF 1864 } 1865 1866 var ( 1867 ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") 1868 ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") 1869 ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") 1870 )