github.com/cosmos/cosmos-sdk@v0.50.10/x/authz/tx.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: cosmos/authz/v1beta1/tx.proto 3 4 package authz 5 6 import ( 7 context "context" 8 fmt "fmt" 9 _ "github.com/cosmos/cosmos-proto" 10 types "github.com/cosmos/cosmos-sdk/codec/types" 11 _ "github.com/cosmos/cosmos-sdk/types/msgservice" 12 _ "github.com/cosmos/cosmos-sdk/types/tx/amino" 13 _ "github.com/cosmos/gogoproto/gogoproto" 14 grpc1 "github.com/cosmos/gogoproto/grpc" 15 proto "github.com/cosmos/gogoproto/proto" 16 grpc "google.golang.org/grpc" 17 codes "google.golang.org/grpc/codes" 18 status "google.golang.org/grpc/status" 19 io "io" 20 math "math" 21 math_bits "math/bits" 22 ) 23 24 // Reference imports to suppress errors if they are not otherwise used. 25 var _ = proto.Marshal 26 var _ = fmt.Errorf 27 var _ = math.Inf 28 29 // This is a compile-time assertion to ensure that this generated file 30 // is compatible with the proto package it is being compiled against. 31 // A compilation error at this line likely means your copy of the 32 // proto package needs to be updated. 33 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 34 35 // MsgGrant is a request type for Grant method. It declares authorization to the grantee 36 // on behalf of the granter with the provided expiration time. 37 type MsgGrant struct { 38 Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` 39 Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` 40 Grant Grant `protobuf:"bytes,3,opt,name=grant,proto3" json:"grant"` 41 } 42 43 func (m *MsgGrant) Reset() { *m = MsgGrant{} } 44 func (m *MsgGrant) String() string { return proto.CompactTextString(m) } 45 func (*MsgGrant) ProtoMessage() {} 46 func (*MsgGrant) Descriptor() ([]byte, []int) { 47 return fileDescriptor_3ceddab7d8589ad1, []int{0} 48 } 49 func (m *MsgGrant) XXX_Unmarshal(b []byte) error { 50 return m.Unmarshal(b) 51 } 52 func (m *MsgGrant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 53 if deterministic { 54 return xxx_messageInfo_MsgGrant.Marshal(b, m, deterministic) 55 } else { 56 b = b[:cap(b)] 57 n, err := m.MarshalToSizedBuffer(b) 58 if err != nil { 59 return nil, err 60 } 61 return b[:n], nil 62 } 63 } 64 func (m *MsgGrant) XXX_Merge(src proto.Message) { 65 xxx_messageInfo_MsgGrant.Merge(m, src) 66 } 67 func (m *MsgGrant) XXX_Size() int { 68 return m.Size() 69 } 70 func (m *MsgGrant) XXX_DiscardUnknown() { 71 xxx_messageInfo_MsgGrant.DiscardUnknown(m) 72 } 73 74 var xxx_messageInfo_MsgGrant proto.InternalMessageInfo 75 76 // MsgGrantResponse defines the Msg/MsgGrant response type. 77 type MsgGrantResponse struct { 78 } 79 80 func (m *MsgGrantResponse) Reset() { *m = MsgGrantResponse{} } 81 func (m *MsgGrantResponse) String() string { return proto.CompactTextString(m) } 82 func (*MsgGrantResponse) ProtoMessage() {} 83 func (*MsgGrantResponse) Descriptor() ([]byte, []int) { 84 return fileDescriptor_3ceddab7d8589ad1, []int{1} 85 } 86 func (m *MsgGrantResponse) XXX_Unmarshal(b []byte) error { 87 return m.Unmarshal(b) 88 } 89 func (m *MsgGrantResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 90 if deterministic { 91 return xxx_messageInfo_MsgGrantResponse.Marshal(b, m, deterministic) 92 } else { 93 b = b[:cap(b)] 94 n, err := m.MarshalToSizedBuffer(b) 95 if err != nil { 96 return nil, err 97 } 98 return b[:n], nil 99 } 100 } 101 func (m *MsgGrantResponse) XXX_Merge(src proto.Message) { 102 xxx_messageInfo_MsgGrantResponse.Merge(m, src) 103 } 104 func (m *MsgGrantResponse) XXX_Size() int { 105 return m.Size() 106 } 107 func (m *MsgGrantResponse) XXX_DiscardUnknown() { 108 xxx_messageInfo_MsgGrantResponse.DiscardUnknown(m) 109 } 110 111 var xxx_messageInfo_MsgGrantResponse proto.InternalMessageInfo 112 113 // MsgExec attempts to execute the provided messages using 114 // authorizations granted to the grantee. Each message should have only 115 // one signer corresponding to the granter of the authorization. 116 type MsgExec struct { 117 Grantee string `protobuf:"bytes,1,opt,name=grantee,proto3" json:"grantee,omitempty"` 118 // Execute Msg. 119 // The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg)) 120 // triple and validate it. 121 Msgs []*types.Any `protobuf:"bytes,2,rep,name=msgs,proto3" json:"msgs,omitempty"` 122 } 123 124 func (m *MsgExec) Reset() { *m = MsgExec{} } 125 func (m *MsgExec) String() string { return proto.CompactTextString(m) } 126 func (*MsgExec) ProtoMessage() {} 127 func (*MsgExec) Descriptor() ([]byte, []int) { 128 return fileDescriptor_3ceddab7d8589ad1, []int{2} 129 } 130 func (m *MsgExec) XXX_Unmarshal(b []byte) error { 131 return m.Unmarshal(b) 132 } 133 func (m *MsgExec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 134 if deterministic { 135 return xxx_messageInfo_MsgExec.Marshal(b, m, deterministic) 136 } else { 137 b = b[:cap(b)] 138 n, err := m.MarshalToSizedBuffer(b) 139 if err != nil { 140 return nil, err 141 } 142 return b[:n], nil 143 } 144 } 145 func (m *MsgExec) XXX_Merge(src proto.Message) { 146 xxx_messageInfo_MsgExec.Merge(m, src) 147 } 148 func (m *MsgExec) XXX_Size() int { 149 return m.Size() 150 } 151 func (m *MsgExec) XXX_DiscardUnknown() { 152 xxx_messageInfo_MsgExec.DiscardUnknown(m) 153 } 154 155 var xxx_messageInfo_MsgExec proto.InternalMessageInfo 156 157 // MsgExecResponse defines the Msg/MsgExecResponse response type. 158 type MsgExecResponse struct { 159 Results [][]byte `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` 160 } 161 162 func (m *MsgExecResponse) Reset() { *m = MsgExecResponse{} } 163 func (m *MsgExecResponse) String() string { return proto.CompactTextString(m) } 164 func (*MsgExecResponse) ProtoMessage() {} 165 func (*MsgExecResponse) Descriptor() ([]byte, []int) { 166 return fileDescriptor_3ceddab7d8589ad1, []int{3} 167 } 168 func (m *MsgExecResponse) XXX_Unmarshal(b []byte) error { 169 return m.Unmarshal(b) 170 } 171 func (m *MsgExecResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 172 if deterministic { 173 return xxx_messageInfo_MsgExecResponse.Marshal(b, m, deterministic) 174 } else { 175 b = b[:cap(b)] 176 n, err := m.MarshalToSizedBuffer(b) 177 if err != nil { 178 return nil, err 179 } 180 return b[:n], nil 181 } 182 } 183 func (m *MsgExecResponse) XXX_Merge(src proto.Message) { 184 xxx_messageInfo_MsgExecResponse.Merge(m, src) 185 } 186 func (m *MsgExecResponse) XXX_Size() int { 187 return m.Size() 188 } 189 func (m *MsgExecResponse) XXX_DiscardUnknown() { 190 xxx_messageInfo_MsgExecResponse.DiscardUnknown(m) 191 } 192 193 var xxx_messageInfo_MsgExecResponse proto.InternalMessageInfo 194 195 // MsgRevoke revokes any authorization with the provided sdk.Msg type on the 196 // granter's account with that has been granted to the grantee. 197 type MsgRevoke struct { 198 Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` 199 Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` 200 MsgTypeUrl string `protobuf:"bytes,3,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` 201 } 202 203 func (m *MsgRevoke) Reset() { *m = MsgRevoke{} } 204 func (m *MsgRevoke) String() string { return proto.CompactTextString(m) } 205 func (*MsgRevoke) ProtoMessage() {} 206 func (*MsgRevoke) Descriptor() ([]byte, []int) { 207 return fileDescriptor_3ceddab7d8589ad1, []int{4} 208 } 209 func (m *MsgRevoke) XXX_Unmarshal(b []byte) error { 210 return m.Unmarshal(b) 211 } 212 func (m *MsgRevoke) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 213 if deterministic { 214 return xxx_messageInfo_MsgRevoke.Marshal(b, m, deterministic) 215 } else { 216 b = b[:cap(b)] 217 n, err := m.MarshalToSizedBuffer(b) 218 if err != nil { 219 return nil, err 220 } 221 return b[:n], nil 222 } 223 } 224 func (m *MsgRevoke) XXX_Merge(src proto.Message) { 225 xxx_messageInfo_MsgRevoke.Merge(m, src) 226 } 227 func (m *MsgRevoke) XXX_Size() int { 228 return m.Size() 229 } 230 func (m *MsgRevoke) XXX_DiscardUnknown() { 231 xxx_messageInfo_MsgRevoke.DiscardUnknown(m) 232 } 233 234 var xxx_messageInfo_MsgRevoke proto.InternalMessageInfo 235 236 // MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. 237 type MsgRevokeResponse struct { 238 } 239 240 func (m *MsgRevokeResponse) Reset() { *m = MsgRevokeResponse{} } 241 func (m *MsgRevokeResponse) String() string { return proto.CompactTextString(m) } 242 func (*MsgRevokeResponse) ProtoMessage() {} 243 func (*MsgRevokeResponse) Descriptor() ([]byte, []int) { 244 return fileDescriptor_3ceddab7d8589ad1, []int{5} 245 } 246 func (m *MsgRevokeResponse) XXX_Unmarshal(b []byte) error { 247 return m.Unmarshal(b) 248 } 249 func (m *MsgRevokeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 250 if deterministic { 251 return xxx_messageInfo_MsgRevokeResponse.Marshal(b, m, deterministic) 252 } else { 253 b = b[:cap(b)] 254 n, err := m.MarshalToSizedBuffer(b) 255 if err != nil { 256 return nil, err 257 } 258 return b[:n], nil 259 } 260 } 261 func (m *MsgRevokeResponse) XXX_Merge(src proto.Message) { 262 xxx_messageInfo_MsgRevokeResponse.Merge(m, src) 263 } 264 func (m *MsgRevokeResponse) XXX_Size() int { 265 return m.Size() 266 } 267 func (m *MsgRevokeResponse) XXX_DiscardUnknown() { 268 xxx_messageInfo_MsgRevokeResponse.DiscardUnknown(m) 269 } 270 271 var xxx_messageInfo_MsgRevokeResponse proto.InternalMessageInfo 272 273 func init() { 274 proto.RegisterType((*MsgGrant)(nil), "cosmos.authz.v1beta1.MsgGrant") 275 proto.RegisterType((*MsgGrantResponse)(nil), "cosmos.authz.v1beta1.MsgGrantResponse") 276 proto.RegisterType((*MsgExec)(nil), "cosmos.authz.v1beta1.MsgExec") 277 proto.RegisterType((*MsgExecResponse)(nil), "cosmos.authz.v1beta1.MsgExecResponse") 278 proto.RegisterType((*MsgRevoke)(nil), "cosmos.authz.v1beta1.MsgRevoke") 279 proto.RegisterType((*MsgRevokeResponse)(nil), "cosmos.authz.v1beta1.MsgRevokeResponse") 280 } 281 282 func init() { proto.RegisterFile("cosmos/authz/v1beta1/tx.proto", fileDescriptor_3ceddab7d8589ad1) } 283 284 var fileDescriptor_3ceddab7d8589ad1 = []byte{ 285 // 555 bytes of a gzipped FileDescriptorProto 286 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0xbf, 0x6e, 0x13, 0x4f, 287 0x10, 0xf6, 0xc6, 0x71, 0xfc, 0xf3, 0x26, 0xd2, 0x8f, 0x5c, 0x2c, 0x71, 0xb9, 0x28, 0x97, 0xd3, 288 0x91, 0x80, 0x65, 0xe4, 0x5d, 0xd9, 0x74, 0x16, 0x4d, 0x2c, 0x45, 0x34, 0x58, 0x48, 0x07, 0x34, 289 0x34, 0xd6, 0xd9, 0x5e, 0x36, 0x56, 0x7c, 0xb7, 0xd6, 0xed, 0xd9, 0xb2, 0xa9, 0x10, 0x25, 0x15, 290 0x8f, 0x01, 0x9d, 0x8b, 0x94, 0x3c, 0x80, 0x45, 0x15, 0x51, 0x20, 0x2a, 0x04, 0x76, 0xe1, 0xc7, 291 0x00, 0xdd, 0xfe, 0x31, 0x0e, 0x72, 0x42, 0x2a, 0x9a, 0xbb, 0x99, 0xf9, 0xbe, 0xd9, 0x9d, 0x6f, 292 0x66, 0xb4, 0x70, 0xbf, 0xc5, 0x78, 0xc0, 0x38, 0xf6, 0xfb, 0xf1, 0xe9, 0x2b, 0x3c, 0x28, 0x37, 293 0x49, 0xec, 0x97, 0x71, 0x3c, 0x44, 0xbd, 0x88, 0xc5, 0xcc, 0xc8, 0x4b, 0x18, 0x09, 0x18, 0x29, 294 0xd8, 0xda, 0x95, 0xd1, 0x86, 0xe0, 0x60, 0x45, 0x11, 0x8e, 0x95, 0xa7, 0x8c, 0x32, 0x19, 0x4f, 295 0x2c, 0x15, 0xdd, 0xa5, 0x8c, 0xd1, 0x2e, 0xc1, 0xc2, 0x6b, 0xf6, 0x5f, 0x62, 0x3f, 0x1c, 0x29, 296 0xc8, 0x59, 0x59, 0x80, 0xbc, 0x4f, 0x32, 0x6e, 0x2b, 0x46, 0xc0, 0x29, 0x1e, 0x94, 0x93, 0x9f, 297 0x02, 0xb6, 0xfd, 0xa0, 0x13, 0x32, 0x2c, 0xbe, 0x32, 0xe4, 0x7e, 0x01, 0xf0, 0xbf, 0x3a, 0xa7, 298 0x8f, 0x22, 0x3f, 0x8c, 0x8d, 0x0a, 0xcc, 0xd2, 0xc4, 0x20, 0x91, 0x09, 0x1c, 0x50, 0xc8, 0xd5, 299 0xcc, 0xcf, 0xe7, 0x25, 0xad, 0xe8, 0xb8, 0xdd, 0x8e, 0x08, 0xe7, 0x4f, 0xe3, 0xa8, 0x13, 0x52, 300 0x4f, 0x13, 0x7f, 0xe7, 0x10, 0x73, 0xed, 0x66, 0x39, 0xc4, 0x78, 0x08, 0x33, 0xc2, 0x34, 0xd3, 301 0x0e, 0x28, 0x6c, 0x56, 0xf6, 0xd0, 0xaa, 0xa6, 0x21, 0x51, 0x53, 0x2d, 0x37, 0xf9, 0x76, 0x90, 302 0x7a, 0x3f, 0x1f, 0x17, 0x81, 0x27, 0x93, 0xaa, 0x87, 0x6f, 0xe6, 0xe3, 0xa2, 0xbe, 0xff, 0xed, 303 0x7c, 0x5c, 0xdc, 0x91, 0xe9, 0x25, 0xde, 0x3e, 0xc3, 0x5a, 0x8b, 0x6b, 0xc0, 0x5b, 0xda, 0xf6, 304 0x08, 0xef, 0xb1, 0x90, 0x13, 0xf7, 0x03, 0x80, 0xd9, 0x3a, 0xa7, 0x27, 0x43, 0xd2, 0x5a, 0xae, 305 0x1b, 0xdc, 0xb4, 0xee, 0x13, 0xb8, 0x1e, 0x70, 0xca, 0xcd, 0x35, 0x27, 0x5d, 0xd8, 0xac, 0xe4, 306 0x91, 0x1c, 0x12, 0xd2, 0x43, 0x42, 0xc7, 0xe1, 0xa8, 0xb6, 0xf7, 0xe9, 0xbc, 0xa4, 0x06, 0x80, 307 0x9a, 0x3e, 0x27, 0x0b, 0x39, 0x75, 0x4e, 0x3d, 0x91, 0x5e, 0xbd, 0xb3, 0x24, 0x80, 0x24, 0x02, 308 0x8c, 0xcb, 0x02, 0x92, 0xfa, 0xdc, 0xfb, 0xf0, 0x7f, 0x65, 0xea, 0xf2, 0x0d, 0x13, 0x66, 0x23, 309 0xc2, 0xfb, 0xdd, 0x98, 0x9b, 0xc0, 0x49, 0x17, 0xb6, 0x3c, 0xed, 0xba, 0x1f, 0x01, 0xcc, 0x25, 310 0xe7, 0x93, 0x01, 0x3b, 0x23, 0xff, 0x6c, 0x8c, 0x0e, 0xdc, 0x0a, 0x38, 0x6d, 0xc4, 0xa3, 0x1e, 311 0x69, 0xf4, 0xa3, 0xae, 0x98, 0x66, 0xce, 0x83, 0x01, 0xa7, 0xcf, 0x46, 0x3d, 0xf2, 0x3c, 0xea, 312 0x56, 0x8f, 0xfe, 0x1c, 0x55, 0xfe, 0xb2, 0x52, 0x59, 0xb0, 0xbb, 0x03, 0xb7, 0x17, 0x8e, 0x56, 313 0x5b, 0xf9, 0x09, 0x60, 0xba, 0xce, 0xa9, 0xf1, 0x04, 0x66, 0xe4, 0x76, 0xda, 0xab, 0xd7, 0x44, 314 0x4f, 0xd9, 0xba, 0x7b, 0x3d, 0xbe, 0x68, 0xe3, 0x63, 0xb8, 0x2e, 0x36, 0x60, 0xff, 0x4a, 0x7e, 315 0x02, 0x5b, 0x47, 0xd7, 0xc2, 0x8b, 0xd3, 0x3c, 0xb8, 0xa1, 0xda, 0x7e, 0x70, 0x65, 0x82, 0x24, 316 0x58, 0xf7, 0xfe, 0x42, 0xd0, 0x67, 0x5a, 0x99, 0xd7, 0xc9, 0xbe, 0xd7, 0x6a, 0x93, 0x1f, 0x76, 317 0x6a, 0x32, 0xb5, 0xc1, 0xc5, 0xd4, 0x06, 0xdf, 0xa7, 0x36, 0x78, 0x37, 0xb3, 0x53, 0x17, 0x33, 318 0x3b, 0xf5, 0x75, 0x66, 0xa7, 0x5e, 0x1c, 0xd2, 0x4e, 0x7c, 0xda, 0x6f, 0xa2, 0x16, 0x0b, 0xd4, 319 0x8b, 0x82, 0x97, 0x9a, 0x3b, 0x94, 0x2f, 0x42, 0x73, 0x43, 0x2c, 0xe7, 0x83, 0x5f, 0x01, 0x00, 320 0x00, 0xff, 0xff, 0x13, 0x38, 0x6d, 0x34, 0xb7, 0x04, 0x00, 0x00, 321 } 322 323 // Reference imports to suppress errors if they are not otherwise used. 324 var _ context.Context 325 var _ grpc.ClientConn 326 327 // This is a compile-time assertion to ensure that this generated file 328 // is compatible with the grpc package it is being compiled against. 329 const _ = grpc.SupportPackageIsVersion4 330 331 // MsgClient is the client API for Msg service. 332 // 333 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 334 type MsgClient interface { 335 // Grant grants the provided authorization to the grantee on the granter's 336 // account with the provided expiration time. If there is already a grant 337 // for the given (granter, grantee, Authorization) triple, then the grant 338 // will be overwritten. 339 Grant(ctx context.Context, in *MsgGrant, opts ...grpc.CallOption) (*MsgGrantResponse, error) 340 // Exec attempts to execute the provided messages using 341 // authorizations granted to the grantee. Each message should have only 342 // one signer corresponding to the granter of the authorization. 343 Exec(ctx context.Context, in *MsgExec, opts ...grpc.CallOption) (*MsgExecResponse, error) 344 // Revoke revokes any authorization corresponding to the provided method name on the 345 // granter's account that has been granted to the grantee. 346 Revoke(ctx context.Context, in *MsgRevoke, opts ...grpc.CallOption) (*MsgRevokeResponse, error) 347 } 348 349 type msgClient struct { 350 cc grpc1.ClientConn 351 } 352 353 func NewMsgClient(cc grpc1.ClientConn) MsgClient { 354 return &msgClient{cc} 355 } 356 357 func (c *msgClient) Grant(ctx context.Context, in *MsgGrant, opts ...grpc.CallOption) (*MsgGrantResponse, error) { 358 out := new(MsgGrantResponse) 359 err := c.cc.Invoke(ctx, "/cosmos.authz.v1beta1.Msg/Grant", in, out, opts...) 360 if err != nil { 361 return nil, err 362 } 363 return out, nil 364 } 365 366 func (c *msgClient) Exec(ctx context.Context, in *MsgExec, opts ...grpc.CallOption) (*MsgExecResponse, error) { 367 out := new(MsgExecResponse) 368 err := c.cc.Invoke(ctx, "/cosmos.authz.v1beta1.Msg/Exec", in, out, opts...) 369 if err != nil { 370 return nil, err 371 } 372 return out, nil 373 } 374 375 func (c *msgClient) Revoke(ctx context.Context, in *MsgRevoke, opts ...grpc.CallOption) (*MsgRevokeResponse, error) { 376 out := new(MsgRevokeResponse) 377 err := c.cc.Invoke(ctx, "/cosmos.authz.v1beta1.Msg/Revoke", in, out, opts...) 378 if err != nil { 379 return nil, err 380 } 381 return out, nil 382 } 383 384 // MsgServer is the server API for Msg service. 385 type MsgServer interface { 386 // Grant grants the provided authorization to the grantee on the granter's 387 // account with the provided expiration time. If there is already a grant 388 // for the given (granter, grantee, Authorization) triple, then the grant 389 // will be overwritten. 390 Grant(context.Context, *MsgGrant) (*MsgGrantResponse, error) 391 // Exec attempts to execute the provided messages using 392 // authorizations granted to the grantee. Each message should have only 393 // one signer corresponding to the granter of the authorization. 394 Exec(context.Context, *MsgExec) (*MsgExecResponse, error) 395 // Revoke revokes any authorization corresponding to the provided method name on the 396 // granter's account that has been granted to the grantee. 397 Revoke(context.Context, *MsgRevoke) (*MsgRevokeResponse, error) 398 } 399 400 // UnimplementedMsgServer can be embedded to have forward compatible implementations. 401 type UnimplementedMsgServer struct { 402 } 403 404 func (*UnimplementedMsgServer) Grant(ctx context.Context, req *MsgGrant) (*MsgGrantResponse, error) { 405 return nil, status.Errorf(codes.Unimplemented, "method Grant not implemented") 406 } 407 func (*UnimplementedMsgServer) Exec(ctx context.Context, req *MsgExec) (*MsgExecResponse, error) { 408 return nil, status.Errorf(codes.Unimplemented, "method Exec not implemented") 409 } 410 func (*UnimplementedMsgServer) Revoke(ctx context.Context, req *MsgRevoke) (*MsgRevokeResponse, error) { 411 return nil, status.Errorf(codes.Unimplemented, "method Revoke not implemented") 412 } 413 414 func RegisterMsgServer(s grpc1.Server, srv MsgServer) { 415 s.RegisterService(&_Msg_serviceDesc, srv) 416 } 417 418 func _Msg_Grant_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 419 in := new(MsgGrant) 420 if err := dec(in); err != nil { 421 return nil, err 422 } 423 if interceptor == nil { 424 return srv.(MsgServer).Grant(ctx, in) 425 } 426 info := &grpc.UnaryServerInfo{ 427 Server: srv, 428 FullMethod: "/cosmos.authz.v1beta1.Msg/Grant", 429 } 430 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 431 return srv.(MsgServer).Grant(ctx, req.(*MsgGrant)) 432 } 433 return interceptor(ctx, in, info, handler) 434 } 435 436 func _Msg_Exec_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 437 in := new(MsgExec) 438 if err := dec(in); err != nil { 439 return nil, err 440 } 441 if interceptor == nil { 442 return srv.(MsgServer).Exec(ctx, in) 443 } 444 info := &grpc.UnaryServerInfo{ 445 Server: srv, 446 FullMethod: "/cosmos.authz.v1beta1.Msg/Exec", 447 } 448 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 449 return srv.(MsgServer).Exec(ctx, req.(*MsgExec)) 450 } 451 return interceptor(ctx, in, info, handler) 452 } 453 454 func _Msg_Revoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 455 in := new(MsgRevoke) 456 if err := dec(in); err != nil { 457 return nil, err 458 } 459 if interceptor == nil { 460 return srv.(MsgServer).Revoke(ctx, in) 461 } 462 info := &grpc.UnaryServerInfo{ 463 Server: srv, 464 FullMethod: "/cosmos.authz.v1beta1.Msg/Revoke", 465 } 466 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 467 return srv.(MsgServer).Revoke(ctx, req.(*MsgRevoke)) 468 } 469 return interceptor(ctx, in, info, handler) 470 } 471 472 var _Msg_serviceDesc = grpc.ServiceDesc{ 473 ServiceName: "cosmos.authz.v1beta1.Msg", 474 HandlerType: (*MsgServer)(nil), 475 Methods: []grpc.MethodDesc{ 476 { 477 MethodName: "Grant", 478 Handler: _Msg_Grant_Handler, 479 }, 480 { 481 MethodName: "Exec", 482 Handler: _Msg_Exec_Handler, 483 }, 484 { 485 MethodName: "Revoke", 486 Handler: _Msg_Revoke_Handler, 487 }, 488 }, 489 Streams: []grpc.StreamDesc{}, 490 Metadata: "cosmos/authz/v1beta1/tx.proto", 491 } 492 493 func (m *MsgGrant) Marshal() (dAtA []byte, err error) { 494 size := m.Size() 495 dAtA = make([]byte, size) 496 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 497 if err != nil { 498 return nil, err 499 } 500 return dAtA[:n], nil 501 } 502 503 func (m *MsgGrant) MarshalTo(dAtA []byte) (int, error) { 504 size := m.Size() 505 return m.MarshalToSizedBuffer(dAtA[:size]) 506 } 507 508 func (m *MsgGrant) MarshalToSizedBuffer(dAtA []byte) (int, error) { 509 i := len(dAtA) 510 _ = i 511 var l int 512 _ = l 513 { 514 size, err := m.Grant.MarshalToSizedBuffer(dAtA[:i]) 515 if err != nil { 516 return 0, err 517 } 518 i -= size 519 i = encodeVarintTx(dAtA, i, uint64(size)) 520 } 521 i-- 522 dAtA[i] = 0x1a 523 if len(m.Grantee) > 0 { 524 i -= len(m.Grantee) 525 copy(dAtA[i:], m.Grantee) 526 i = encodeVarintTx(dAtA, i, uint64(len(m.Grantee))) 527 i-- 528 dAtA[i] = 0x12 529 } 530 if len(m.Granter) > 0 { 531 i -= len(m.Granter) 532 copy(dAtA[i:], m.Granter) 533 i = encodeVarintTx(dAtA, i, uint64(len(m.Granter))) 534 i-- 535 dAtA[i] = 0xa 536 } 537 return len(dAtA) - i, nil 538 } 539 540 func (m *MsgGrantResponse) Marshal() (dAtA []byte, err error) { 541 size := m.Size() 542 dAtA = make([]byte, size) 543 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 544 if err != nil { 545 return nil, err 546 } 547 return dAtA[:n], nil 548 } 549 550 func (m *MsgGrantResponse) MarshalTo(dAtA []byte) (int, error) { 551 size := m.Size() 552 return m.MarshalToSizedBuffer(dAtA[:size]) 553 } 554 555 func (m *MsgGrantResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 556 i := len(dAtA) 557 _ = i 558 var l int 559 _ = l 560 return len(dAtA) - i, nil 561 } 562 563 func (m *MsgExec) Marshal() (dAtA []byte, err error) { 564 size := m.Size() 565 dAtA = make([]byte, size) 566 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 567 if err != nil { 568 return nil, err 569 } 570 return dAtA[:n], nil 571 } 572 573 func (m *MsgExec) MarshalTo(dAtA []byte) (int, error) { 574 size := m.Size() 575 return m.MarshalToSizedBuffer(dAtA[:size]) 576 } 577 578 func (m *MsgExec) MarshalToSizedBuffer(dAtA []byte) (int, error) { 579 i := len(dAtA) 580 _ = i 581 var l int 582 _ = l 583 if len(m.Msgs) > 0 { 584 for iNdEx := len(m.Msgs) - 1; iNdEx >= 0; iNdEx-- { 585 { 586 size, err := m.Msgs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 587 if err != nil { 588 return 0, err 589 } 590 i -= size 591 i = encodeVarintTx(dAtA, i, uint64(size)) 592 } 593 i-- 594 dAtA[i] = 0x12 595 } 596 } 597 if len(m.Grantee) > 0 { 598 i -= len(m.Grantee) 599 copy(dAtA[i:], m.Grantee) 600 i = encodeVarintTx(dAtA, i, uint64(len(m.Grantee))) 601 i-- 602 dAtA[i] = 0xa 603 } 604 return len(dAtA) - i, nil 605 } 606 607 func (m *MsgExecResponse) Marshal() (dAtA []byte, err error) { 608 size := m.Size() 609 dAtA = make([]byte, size) 610 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 611 if err != nil { 612 return nil, err 613 } 614 return dAtA[:n], nil 615 } 616 617 func (m *MsgExecResponse) MarshalTo(dAtA []byte) (int, error) { 618 size := m.Size() 619 return m.MarshalToSizedBuffer(dAtA[:size]) 620 } 621 622 func (m *MsgExecResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 623 i := len(dAtA) 624 _ = i 625 var l int 626 _ = l 627 if len(m.Results) > 0 { 628 for iNdEx := len(m.Results) - 1; iNdEx >= 0; iNdEx-- { 629 i -= len(m.Results[iNdEx]) 630 copy(dAtA[i:], m.Results[iNdEx]) 631 i = encodeVarintTx(dAtA, i, uint64(len(m.Results[iNdEx]))) 632 i-- 633 dAtA[i] = 0xa 634 } 635 } 636 return len(dAtA) - i, nil 637 } 638 639 func (m *MsgRevoke) Marshal() (dAtA []byte, err error) { 640 size := m.Size() 641 dAtA = make([]byte, size) 642 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 643 if err != nil { 644 return nil, err 645 } 646 return dAtA[:n], nil 647 } 648 649 func (m *MsgRevoke) MarshalTo(dAtA []byte) (int, error) { 650 size := m.Size() 651 return m.MarshalToSizedBuffer(dAtA[:size]) 652 } 653 654 func (m *MsgRevoke) MarshalToSizedBuffer(dAtA []byte) (int, error) { 655 i := len(dAtA) 656 _ = i 657 var l int 658 _ = l 659 if len(m.MsgTypeUrl) > 0 { 660 i -= len(m.MsgTypeUrl) 661 copy(dAtA[i:], m.MsgTypeUrl) 662 i = encodeVarintTx(dAtA, i, uint64(len(m.MsgTypeUrl))) 663 i-- 664 dAtA[i] = 0x1a 665 } 666 if len(m.Grantee) > 0 { 667 i -= len(m.Grantee) 668 copy(dAtA[i:], m.Grantee) 669 i = encodeVarintTx(dAtA, i, uint64(len(m.Grantee))) 670 i-- 671 dAtA[i] = 0x12 672 } 673 if len(m.Granter) > 0 { 674 i -= len(m.Granter) 675 copy(dAtA[i:], m.Granter) 676 i = encodeVarintTx(dAtA, i, uint64(len(m.Granter))) 677 i-- 678 dAtA[i] = 0xa 679 } 680 return len(dAtA) - i, nil 681 } 682 683 func (m *MsgRevokeResponse) Marshal() (dAtA []byte, err error) { 684 size := m.Size() 685 dAtA = make([]byte, size) 686 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 687 if err != nil { 688 return nil, err 689 } 690 return dAtA[:n], nil 691 } 692 693 func (m *MsgRevokeResponse) MarshalTo(dAtA []byte) (int, error) { 694 size := m.Size() 695 return m.MarshalToSizedBuffer(dAtA[:size]) 696 } 697 698 func (m *MsgRevokeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 699 i := len(dAtA) 700 _ = i 701 var l int 702 _ = l 703 return len(dAtA) - i, nil 704 } 705 706 func encodeVarintTx(dAtA []byte, offset int, v uint64) int { 707 offset -= sovTx(v) 708 base := offset 709 for v >= 1<<7 { 710 dAtA[offset] = uint8(v&0x7f | 0x80) 711 v >>= 7 712 offset++ 713 } 714 dAtA[offset] = uint8(v) 715 return base 716 } 717 func (m *MsgGrant) Size() (n int) { 718 if m == nil { 719 return 0 720 } 721 var l int 722 _ = l 723 l = len(m.Granter) 724 if l > 0 { 725 n += 1 + l + sovTx(uint64(l)) 726 } 727 l = len(m.Grantee) 728 if l > 0 { 729 n += 1 + l + sovTx(uint64(l)) 730 } 731 l = m.Grant.Size() 732 n += 1 + l + sovTx(uint64(l)) 733 return n 734 } 735 736 func (m *MsgGrantResponse) Size() (n int) { 737 if m == nil { 738 return 0 739 } 740 var l int 741 _ = l 742 return n 743 } 744 745 func (m *MsgExec) Size() (n int) { 746 if m == nil { 747 return 0 748 } 749 var l int 750 _ = l 751 l = len(m.Grantee) 752 if l > 0 { 753 n += 1 + l + sovTx(uint64(l)) 754 } 755 if len(m.Msgs) > 0 { 756 for _, e := range m.Msgs { 757 l = e.Size() 758 n += 1 + l + sovTx(uint64(l)) 759 } 760 } 761 return n 762 } 763 764 func (m *MsgExecResponse) Size() (n int) { 765 if m == nil { 766 return 0 767 } 768 var l int 769 _ = l 770 if len(m.Results) > 0 { 771 for _, b := range m.Results { 772 l = len(b) 773 n += 1 + l + sovTx(uint64(l)) 774 } 775 } 776 return n 777 } 778 779 func (m *MsgRevoke) Size() (n int) { 780 if m == nil { 781 return 0 782 } 783 var l int 784 _ = l 785 l = len(m.Granter) 786 if l > 0 { 787 n += 1 + l + sovTx(uint64(l)) 788 } 789 l = len(m.Grantee) 790 if l > 0 { 791 n += 1 + l + sovTx(uint64(l)) 792 } 793 l = len(m.MsgTypeUrl) 794 if l > 0 { 795 n += 1 + l + sovTx(uint64(l)) 796 } 797 return n 798 } 799 800 func (m *MsgRevokeResponse) Size() (n int) { 801 if m == nil { 802 return 0 803 } 804 var l int 805 _ = l 806 return n 807 } 808 809 func sovTx(x uint64) (n int) { 810 return (math_bits.Len64(x|1) + 6) / 7 811 } 812 func sozTx(x uint64) (n int) { 813 return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 814 } 815 func (m *MsgGrant) Unmarshal(dAtA []byte) error { 816 l := len(dAtA) 817 iNdEx := 0 818 for iNdEx < l { 819 preIndex := iNdEx 820 var wire uint64 821 for shift := uint(0); ; shift += 7 { 822 if shift >= 64 { 823 return ErrIntOverflowTx 824 } 825 if iNdEx >= l { 826 return io.ErrUnexpectedEOF 827 } 828 b := dAtA[iNdEx] 829 iNdEx++ 830 wire |= uint64(b&0x7F) << shift 831 if b < 0x80 { 832 break 833 } 834 } 835 fieldNum := int32(wire >> 3) 836 wireType := int(wire & 0x7) 837 if wireType == 4 { 838 return fmt.Errorf("proto: MsgGrant: wiretype end group for non-group") 839 } 840 if fieldNum <= 0 { 841 return fmt.Errorf("proto: MsgGrant: illegal tag %d (wire type %d)", fieldNum, wire) 842 } 843 switch fieldNum { 844 case 1: 845 if wireType != 2 { 846 return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) 847 } 848 var stringLen uint64 849 for shift := uint(0); ; shift += 7 { 850 if shift >= 64 { 851 return ErrIntOverflowTx 852 } 853 if iNdEx >= l { 854 return io.ErrUnexpectedEOF 855 } 856 b := dAtA[iNdEx] 857 iNdEx++ 858 stringLen |= uint64(b&0x7F) << shift 859 if b < 0x80 { 860 break 861 } 862 } 863 intStringLen := int(stringLen) 864 if intStringLen < 0 { 865 return ErrInvalidLengthTx 866 } 867 postIndex := iNdEx + intStringLen 868 if postIndex < 0 { 869 return ErrInvalidLengthTx 870 } 871 if postIndex > l { 872 return io.ErrUnexpectedEOF 873 } 874 m.Granter = string(dAtA[iNdEx:postIndex]) 875 iNdEx = postIndex 876 case 2: 877 if wireType != 2 { 878 return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) 879 } 880 var stringLen uint64 881 for shift := uint(0); ; shift += 7 { 882 if shift >= 64 { 883 return ErrIntOverflowTx 884 } 885 if iNdEx >= l { 886 return io.ErrUnexpectedEOF 887 } 888 b := dAtA[iNdEx] 889 iNdEx++ 890 stringLen |= uint64(b&0x7F) << shift 891 if b < 0x80 { 892 break 893 } 894 } 895 intStringLen := int(stringLen) 896 if intStringLen < 0 { 897 return ErrInvalidLengthTx 898 } 899 postIndex := iNdEx + intStringLen 900 if postIndex < 0 { 901 return ErrInvalidLengthTx 902 } 903 if postIndex > l { 904 return io.ErrUnexpectedEOF 905 } 906 m.Grantee = string(dAtA[iNdEx:postIndex]) 907 iNdEx = postIndex 908 case 3: 909 if wireType != 2 { 910 return fmt.Errorf("proto: wrong wireType = %d for field Grant", wireType) 911 } 912 var msglen int 913 for shift := uint(0); ; shift += 7 { 914 if shift >= 64 { 915 return ErrIntOverflowTx 916 } 917 if iNdEx >= l { 918 return io.ErrUnexpectedEOF 919 } 920 b := dAtA[iNdEx] 921 iNdEx++ 922 msglen |= int(b&0x7F) << shift 923 if b < 0x80 { 924 break 925 } 926 } 927 if msglen < 0 { 928 return ErrInvalidLengthTx 929 } 930 postIndex := iNdEx + msglen 931 if postIndex < 0 { 932 return ErrInvalidLengthTx 933 } 934 if postIndex > l { 935 return io.ErrUnexpectedEOF 936 } 937 if err := m.Grant.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 938 return err 939 } 940 iNdEx = postIndex 941 default: 942 iNdEx = preIndex 943 skippy, err := skipTx(dAtA[iNdEx:]) 944 if err != nil { 945 return err 946 } 947 if (skippy < 0) || (iNdEx+skippy) < 0 { 948 return ErrInvalidLengthTx 949 } 950 if (iNdEx + skippy) > l { 951 return io.ErrUnexpectedEOF 952 } 953 iNdEx += skippy 954 } 955 } 956 957 if iNdEx > l { 958 return io.ErrUnexpectedEOF 959 } 960 return nil 961 } 962 func (m *MsgGrantResponse) Unmarshal(dAtA []byte) error { 963 l := len(dAtA) 964 iNdEx := 0 965 for iNdEx < l { 966 preIndex := iNdEx 967 var wire uint64 968 for shift := uint(0); ; shift += 7 { 969 if shift >= 64 { 970 return ErrIntOverflowTx 971 } 972 if iNdEx >= l { 973 return io.ErrUnexpectedEOF 974 } 975 b := dAtA[iNdEx] 976 iNdEx++ 977 wire |= uint64(b&0x7F) << shift 978 if b < 0x80 { 979 break 980 } 981 } 982 fieldNum := int32(wire >> 3) 983 wireType := int(wire & 0x7) 984 if wireType == 4 { 985 return fmt.Errorf("proto: MsgGrantResponse: wiretype end group for non-group") 986 } 987 if fieldNum <= 0 { 988 return fmt.Errorf("proto: MsgGrantResponse: illegal tag %d (wire type %d)", fieldNum, wire) 989 } 990 switch fieldNum { 991 default: 992 iNdEx = preIndex 993 skippy, err := skipTx(dAtA[iNdEx:]) 994 if err != nil { 995 return err 996 } 997 if (skippy < 0) || (iNdEx+skippy) < 0 { 998 return ErrInvalidLengthTx 999 } 1000 if (iNdEx + skippy) > l { 1001 return io.ErrUnexpectedEOF 1002 } 1003 iNdEx += skippy 1004 } 1005 } 1006 1007 if iNdEx > l { 1008 return io.ErrUnexpectedEOF 1009 } 1010 return nil 1011 } 1012 func (m *MsgExec) Unmarshal(dAtA []byte) error { 1013 l := len(dAtA) 1014 iNdEx := 0 1015 for iNdEx < l { 1016 preIndex := iNdEx 1017 var wire uint64 1018 for shift := uint(0); ; shift += 7 { 1019 if shift >= 64 { 1020 return ErrIntOverflowTx 1021 } 1022 if iNdEx >= l { 1023 return io.ErrUnexpectedEOF 1024 } 1025 b := dAtA[iNdEx] 1026 iNdEx++ 1027 wire |= uint64(b&0x7F) << shift 1028 if b < 0x80 { 1029 break 1030 } 1031 } 1032 fieldNum := int32(wire >> 3) 1033 wireType := int(wire & 0x7) 1034 if wireType == 4 { 1035 return fmt.Errorf("proto: MsgExec: wiretype end group for non-group") 1036 } 1037 if fieldNum <= 0 { 1038 return fmt.Errorf("proto: MsgExec: illegal tag %d (wire type %d)", fieldNum, wire) 1039 } 1040 switch fieldNum { 1041 case 1: 1042 if wireType != 2 { 1043 return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) 1044 } 1045 var stringLen uint64 1046 for shift := uint(0); ; shift += 7 { 1047 if shift >= 64 { 1048 return ErrIntOverflowTx 1049 } 1050 if iNdEx >= l { 1051 return io.ErrUnexpectedEOF 1052 } 1053 b := dAtA[iNdEx] 1054 iNdEx++ 1055 stringLen |= uint64(b&0x7F) << shift 1056 if b < 0x80 { 1057 break 1058 } 1059 } 1060 intStringLen := int(stringLen) 1061 if intStringLen < 0 { 1062 return ErrInvalidLengthTx 1063 } 1064 postIndex := iNdEx + intStringLen 1065 if postIndex < 0 { 1066 return ErrInvalidLengthTx 1067 } 1068 if postIndex > l { 1069 return io.ErrUnexpectedEOF 1070 } 1071 m.Grantee = string(dAtA[iNdEx:postIndex]) 1072 iNdEx = postIndex 1073 case 2: 1074 if wireType != 2 { 1075 return fmt.Errorf("proto: wrong wireType = %d for field Msgs", wireType) 1076 } 1077 var msglen int 1078 for shift := uint(0); ; shift += 7 { 1079 if shift >= 64 { 1080 return ErrIntOverflowTx 1081 } 1082 if iNdEx >= l { 1083 return io.ErrUnexpectedEOF 1084 } 1085 b := dAtA[iNdEx] 1086 iNdEx++ 1087 msglen |= int(b&0x7F) << shift 1088 if b < 0x80 { 1089 break 1090 } 1091 } 1092 if msglen < 0 { 1093 return ErrInvalidLengthTx 1094 } 1095 postIndex := iNdEx + msglen 1096 if postIndex < 0 { 1097 return ErrInvalidLengthTx 1098 } 1099 if postIndex > l { 1100 return io.ErrUnexpectedEOF 1101 } 1102 m.Msgs = append(m.Msgs, &types.Any{}) 1103 if err := m.Msgs[len(m.Msgs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1104 return err 1105 } 1106 iNdEx = postIndex 1107 default: 1108 iNdEx = preIndex 1109 skippy, err := skipTx(dAtA[iNdEx:]) 1110 if err != nil { 1111 return err 1112 } 1113 if (skippy < 0) || (iNdEx+skippy) < 0 { 1114 return ErrInvalidLengthTx 1115 } 1116 if (iNdEx + skippy) > l { 1117 return io.ErrUnexpectedEOF 1118 } 1119 iNdEx += skippy 1120 } 1121 } 1122 1123 if iNdEx > l { 1124 return io.ErrUnexpectedEOF 1125 } 1126 return nil 1127 } 1128 func (m *MsgExecResponse) Unmarshal(dAtA []byte) error { 1129 l := len(dAtA) 1130 iNdEx := 0 1131 for iNdEx < l { 1132 preIndex := iNdEx 1133 var wire uint64 1134 for shift := uint(0); ; shift += 7 { 1135 if shift >= 64 { 1136 return ErrIntOverflowTx 1137 } 1138 if iNdEx >= l { 1139 return io.ErrUnexpectedEOF 1140 } 1141 b := dAtA[iNdEx] 1142 iNdEx++ 1143 wire |= uint64(b&0x7F) << shift 1144 if b < 0x80 { 1145 break 1146 } 1147 } 1148 fieldNum := int32(wire >> 3) 1149 wireType := int(wire & 0x7) 1150 if wireType == 4 { 1151 return fmt.Errorf("proto: MsgExecResponse: wiretype end group for non-group") 1152 } 1153 if fieldNum <= 0 { 1154 return fmt.Errorf("proto: MsgExecResponse: illegal tag %d (wire type %d)", fieldNum, wire) 1155 } 1156 switch fieldNum { 1157 case 1: 1158 if wireType != 2 { 1159 return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType) 1160 } 1161 var byteLen int 1162 for shift := uint(0); ; shift += 7 { 1163 if shift >= 64 { 1164 return ErrIntOverflowTx 1165 } 1166 if iNdEx >= l { 1167 return io.ErrUnexpectedEOF 1168 } 1169 b := dAtA[iNdEx] 1170 iNdEx++ 1171 byteLen |= int(b&0x7F) << shift 1172 if b < 0x80 { 1173 break 1174 } 1175 } 1176 if byteLen < 0 { 1177 return ErrInvalidLengthTx 1178 } 1179 postIndex := iNdEx + byteLen 1180 if postIndex < 0 { 1181 return ErrInvalidLengthTx 1182 } 1183 if postIndex > l { 1184 return io.ErrUnexpectedEOF 1185 } 1186 m.Results = append(m.Results, make([]byte, postIndex-iNdEx)) 1187 copy(m.Results[len(m.Results)-1], dAtA[iNdEx:postIndex]) 1188 iNdEx = postIndex 1189 default: 1190 iNdEx = preIndex 1191 skippy, err := skipTx(dAtA[iNdEx:]) 1192 if err != nil { 1193 return err 1194 } 1195 if (skippy < 0) || (iNdEx+skippy) < 0 { 1196 return ErrInvalidLengthTx 1197 } 1198 if (iNdEx + skippy) > l { 1199 return io.ErrUnexpectedEOF 1200 } 1201 iNdEx += skippy 1202 } 1203 } 1204 1205 if iNdEx > l { 1206 return io.ErrUnexpectedEOF 1207 } 1208 return nil 1209 } 1210 func (m *MsgRevoke) Unmarshal(dAtA []byte) error { 1211 l := len(dAtA) 1212 iNdEx := 0 1213 for iNdEx < l { 1214 preIndex := iNdEx 1215 var wire uint64 1216 for shift := uint(0); ; shift += 7 { 1217 if shift >= 64 { 1218 return ErrIntOverflowTx 1219 } 1220 if iNdEx >= l { 1221 return io.ErrUnexpectedEOF 1222 } 1223 b := dAtA[iNdEx] 1224 iNdEx++ 1225 wire |= uint64(b&0x7F) << shift 1226 if b < 0x80 { 1227 break 1228 } 1229 } 1230 fieldNum := int32(wire >> 3) 1231 wireType := int(wire & 0x7) 1232 if wireType == 4 { 1233 return fmt.Errorf("proto: MsgRevoke: wiretype end group for non-group") 1234 } 1235 if fieldNum <= 0 { 1236 return fmt.Errorf("proto: MsgRevoke: illegal tag %d (wire type %d)", fieldNum, wire) 1237 } 1238 switch fieldNum { 1239 case 1: 1240 if wireType != 2 { 1241 return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType) 1242 } 1243 var stringLen uint64 1244 for shift := uint(0); ; shift += 7 { 1245 if shift >= 64 { 1246 return ErrIntOverflowTx 1247 } 1248 if iNdEx >= l { 1249 return io.ErrUnexpectedEOF 1250 } 1251 b := dAtA[iNdEx] 1252 iNdEx++ 1253 stringLen |= uint64(b&0x7F) << shift 1254 if b < 0x80 { 1255 break 1256 } 1257 } 1258 intStringLen := int(stringLen) 1259 if intStringLen < 0 { 1260 return ErrInvalidLengthTx 1261 } 1262 postIndex := iNdEx + intStringLen 1263 if postIndex < 0 { 1264 return ErrInvalidLengthTx 1265 } 1266 if postIndex > l { 1267 return io.ErrUnexpectedEOF 1268 } 1269 m.Granter = string(dAtA[iNdEx:postIndex]) 1270 iNdEx = postIndex 1271 case 2: 1272 if wireType != 2 { 1273 return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) 1274 } 1275 var stringLen uint64 1276 for shift := uint(0); ; shift += 7 { 1277 if shift >= 64 { 1278 return ErrIntOverflowTx 1279 } 1280 if iNdEx >= l { 1281 return io.ErrUnexpectedEOF 1282 } 1283 b := dAtA[iNdEx] 1284 iNdEx++ 1285 stringLen |= uint64(b&0x7F) << shift 1286 if b < 0x80 { 1287 break 1288 } 1289 } 1290 intStringLen := int(stringLen) 1291 if intStringLen < 0 { 1292 return ErrInvalidLengthTx 1293 } 1294 postIndex := iNdEx + intStringLen 1295 if postIndex < 0 { 1296 return ErrInvalidLengthTx 1297 } 1298 if postIndex > l { 1299 return io.ErrUnexpectedEOF 1300 } 1301 m.Grantee = string(dAtA[iNdEx:postIndex]) 1302 iNdEx = postIndex 1303 case 3: 1304 if wireType != 2 { 1305 return fmt.Errorf("proto: wrong wireType = %d for field MsgTypeUrl", wireType) 1306 } 1307 var stringLen uint64 1308 for shift := uint(0); ; shift += 7 { 1309 if shift >= 64 { 1310 return ErrIntOverflowTx 1311 } 1312 if iNdEx >= l { 1313 return io.ErrUnexpectedEOF 1314 } 1315 b := dAtA[iNdEx] 1316 iNdEx++ 1317 stringLen |= uint64(b&0x7F) << shift 1318 if b < 0x80 { 1319 break 1320 } 1321 } 1322 intStringLen := int(stringLen) 1323 if intStringLen < 0 { 1324 return ErrInvalidLengthTx 1325 } 1326 postIndex := iNdEx + intStringLen 1327 if postIndex < 0 { 1328 return ErrInvalidLengthTx 1329 } 1330 if postIndex > l { 1331 return io.ErrUnexpectedEOF 1332 } 1333 m.MsgTypeUrl = string(dAtA[iNdEx:postIndex]) 1334 iNdEx = postIndex 1335 default: 1336 iNdEx = preIndex 1337 skippy, err := skipTx(dAtA[iNdEx:]) 1338 if err != nil { 1339 return err 1340 } 1341 if (skippy < 0) || (iNdEx+skippy) < 0 { 1342 return ErrInvalidLengthTx 1343 } 1344 if (iNdEx + skippy) > l { 1345 return io.ErrUnexpectedEOF 1346 } 1347 iNdEx += skippy 1348 } 1349 } 1350 1351 if iNdEx > l { 1352 return io.ErrUnexpectedEOF 1353 } 1354 return nil 1355 } 1356 func (m *MsgRevokeResponse) Unmarshal(dAtA []byte) error { 1357 l := len(dAtA) 1358 iNdEx := 0 1359 for iNdEx < l { 1360 preIndex := iNdEx 1361 var wire uint64 1362 for shift := uint(0); ; shift += 7 { 1363 if shift >= 64 { 1364 return ErrIntOverflowTx 1365 } 1366 if iNdEx >= l { 1367 return io.ErrUnexpectedEOF 1368 } 1369 b := dAtA[iNdEx] 1370 iNdEx++ 1371 wire |= uint64(b&0x7F) << shift 1372 if b < 0x80 { 1373 break 1374 } 1375 } 1376 fieldNum := int32(wire >> 3) 1377 wireType := int(wire & 0x7) 1378 if wireType == 4 { 1379 return fmt.Errorf("proto: MsgRevokeResponse: wiretype end group for non-group") 1380 } 1381 if fieldNum <= 0 { 1382 return fmt.Errorf("proto: MsgRevokeResponse: illegal tag %d (wire type %d)", fieldNum, wire) 1383 } 1384 switch fieldNum { 1385 default: 1386 iNdEx = preIndex 1387 skippy, err := skipTx(dAtA[iNdEx:]) 1388 if err != nil { 1389 return err 1390 } 1391 if (skippy < 0) || (iNdEx+skippy) < 0 { 1392 return ErrInvalidLengthTx 1393 } 1394 if (iNdEx + skippy) > l { 1395 return io.ErrUnexpectedEOF 1396 } 1397 iNdEx += skippy 1398 } 1399 } 1400 1401 if iNdEx > l { 1402 return io.ErrUnexpectedEOF 1403 } 1404 return nil 1405 } 1406 func skipTx(dAtA []byte) (n int, err error) { 1407 l := len(dAtA) 1408 iNdEx := 0 1409 depth := 0 1410 for iNdEx < l { 1411 var wire uint64 1412 for shift := uint(0); ; shift += 7 { 1413 if shift >= 64 { 1414 return 0, ErrIntOverflowTx 1415 } 1416 if iNdEx >= l { 1417 return 0, io.ErrUnexpectedEOF 1418 } 1419 b := dAtA[iNdEx] 1420 iNdEx++ 1421 wire |= (uint64(b) & 0x7F) << shift 1422 if b < 0x80 { 1423 break 1424 } 1425 } 1426 wireType := int(wire & 0x7) 1427 switch wireType { 1428 case 0: 1429 for shift := uint(0); ; shift += 7 { 1430 if shift >= 64 { 1431 return 0, ErrIntOverflowTx 1432 } 1433 if iNdEx >= l { 1434 return 0, io.ErrUnexpectedEOF 1435 } 1436 iNdEx++ 1437 if dAtA[iNdEx-1] < 0x80 { 1438 break 1439 } 1440 } 1441 case 1: 1442 iNdEx += 8 1443 case 2: 1444 var length int 1445 for shift := uint(0); ; shift += 7 { 1446 if shift >= 64 { 1447 return 0, ErrIntOverflowTx 1448 } 1449 if iNdEx >= l { 1450 return 0, io.ErrUnexpectedEOF 1451 } 1452 b := dAtA[iNdEx] 1453 iNdEx++ 1454 length |= (int(b) & 0x7F) << shift 1455 if b < 0x80 { 1456 break 1457 } 1458 } 1459 if length < 0 { 1460 return 0, ErrInvalidLengthTx 1461 } 1462 iNdEx += length 1463 case 3: 1464 depth++ 1465 case 4: 1466 if depth == 0 { 1467 return 0, ErrUnexpectedEndOfGroupTx 1468 } 1469 depth-- 1470 case 5: 1471 iNdEx += 4 1472 default: 1473 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1474 } 1475 if iNdEx < 0 { 1476 return 0, ErrInvalidLengthTx 1477 } 1478 if depth == 0 { 1479 return iNdEx, nil 1480 } 1481 } 1482 return 0, io.ErrUnexpectedEOF 1483 } 1484 1485 var ( 1486 ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") 1487 ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") 1488 ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") 1489 )