cosmos-sdk/x/accounts/v1/query.pb.go
testinginprod c60283b91a
feat(accounts): Add message server and query server logic. (#17614)
Co-authored-by: unknown unknown <unknown@unknown>
Co-authored-by: samricotta <37125168+samricotta@users.noreply.github.com>
2023-09-07 07:42:23 +00:00

636 lines
16 KiB
Go

// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: cosmos/accounts/v1/query.proto
package v1
import (
context "context"
fmt "fmt"
grpc1 "github.com/cosmos/gogoproto/grpc"
proto "github.com/cosmos/gogoproto/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
io "io"
math "math"
math_bits "math/bits"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
// AccountQueryRequest is the request type for the Query/AccountQuery RPC
type AccountQueryRequest struct {
// target defines the account to be queried.
Target string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"`
// request defines the query message being sent to the account.
Request []byte `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"`
}
func (m *AccountQueryRequest) Reset() { *m = AccountQueryRequest{} }
func (m *AccountQueryRequest) String() string { return proto.CompactTextString(m) }
func (*AccountQueryRequest) ProtoMessage() {}
func (*AccountQueryRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_16ad14c22e3080d2, []int{0}
}
func (m *AccountQueryRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *AccountQueryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_AccountQueryRequest.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *AccountQueryRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_AccountQueryRequest.Merge(m, src)
}
func (m *AccountQueryRequest) XXX_Size() int {
return m.Size()
}
func (m *AccountQueryRequest) XXX_DiscardUnknown() {
xxx_messageInfo_AccountQueryRequest.DiscardUnknown(m)
}
var xxx_messageInfo_AccountQueryRequest proto.InternalMessageInfo
func (m *AccountQueryRequest) GetTarget() string {
if m != nil {
return m.Target
}
return ""
}
func (m *AccountQueryRequest) GetRequest() []byte {
if m != nil {
return m.Request
}
return nil
}
// AccountQueryResponse is the response type for the Query/AccountQuery RPC method.
type AccountQueryResponse struct {
// response defines the query response of the account.
Response []byte `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
}
func (m *AccountQueryResponse) Reset() { *m = AccountQueryResponse{} }
func (m *AccountQueryResponse) String() string { return proto.CompactTextString(m) }
func (*AccountQueryResponse) ProtoMessage() {}
func (*AccountQueryResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_16ad14c22e3080d2, []int{1}
}
func (m *AccountQueryResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *AccountQueryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_AccountQueryResponse.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *AccountQueryResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_AccountQueryResponse.Merge(m, src)
}
func (m *AccountQueryResponse) XXX_Size() int {
return m.Size()
}
func (m *AccountQueryResponse) XXX_DiscardUnknown() {
xxx_messageInfo_AccountQueryResponse.DiscardUnknown(m)
}
var xxx_messageInfo_AccountQueryResponse proto.InternalMessageInfo
func (m *AccountQueryResponse) GetResponse() []byte {
if m != nil {
return m.Response
}
return nil
}
func init() {
proto.RegisterType((*AccountQueryRequest)(nil), "cosmos.accounts.v1.AccountQueryRequest")
proto.RegisterType((*AccountQueryResponse)(nil), "cosmos.accounts.v1.AccountQueryResponse")
}
func init() { proto.RegisterFile("cosmos/accounts/v1/query.proto", fileDescriptor_16ad14c22e3080d2) }
var fileDescriptor_16ad14c22e3080d2 = []byte{
// 219 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0xce, 0x2f, 0xce,
0xcd, 0x2f, 0xd6, 0x4f, 0x4c, 0x4e, 0xce, 0x2f, 0xcd, 0x2b, 0x29, 0xd6, 0x2f, 0x33, 0xd4, 0x2f,
0x2c, 0x4d, 0x2d, 0xaa, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x82, 0xc8, 0xeb, 0xc1,
0xe4, 0xf5, 0xca, 0x0c, 0x95, 0xdc, 0xb9, 0x84, 0x1d, 0x21, 0xdc, 0x40, 0x90, 0xca, 0xa0, 0xd4,
0xc2, 0xd2, 0xd4, 0xe2, 0x12, 0x21, 0x31, 0x2e, 0xb6, 0x92, 0xc4, 0xa2, 0xf4, 0xd4, 0x12, 0x09,
0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x28, 0x4f, 0x48, 0x82, 0x8b, 0xbd, 0x08, 0xa2, 0x44, 0x82,
0x49, 0x81, 0x51, 0x83, 0x27, 0x08, 0xc6, 0x55, 0x32, 0xe2, 0x12, 0x41, 0x35, 0xa8, 0xb8, 0x20,
0x3f, 0xaf, 0x38, 0x55, 0x48, 0x8a, 0x8b, 0xa3, 0x08, 0xca, 0x06, 0x9b, 0xc5, 0x13, 0x04, 0xe7,
0x1b, 0xe5, 0x70, 0xb1, 0x82, 0x15, 0x0b, 0x25, 0x73, 0xf1, 0x20, 0x6b, 0x16, 0x52, 0xd7, 0xc3,
0x74, 0xaa, 0x1e, 0x16, 0x77, 0x4a, 0x69, 0x10, 0x56, 0x08, 0xb1, 0x4b, 0x89, 0xc1, 0xc9, 0xe4,
0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e,
0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0xa4, 0x20, 0x86, 0x14, 0xa7, 0x64,
0xeb, 0x65, 0xe6, 0xeb, 0x57, 0x20, 0x07, 0x60, 0x12, 0x1b, 0x38, 0xec, 0x8c, 0x01, 0x01, 0x00,
0x00, 0xff, 0xff, 0xdf, 0xce, 0x73, 0x6a, 0x5d, 0x01, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// QueryClient is the client API for Query service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type QueryClient interface {
// AccountQuery runs an account query.
AccountQuery(ctx context.Context, in *AccountQueryRequest, opts ...grpc.CallOption) (*AccountQueryResponse, error)
}
type queryClient struct {
cc grpc1.ClientConn
}
func NewQueryClient(cc grpc1.ClientConn) QueryClient {
return &queryClient{cc}
}
func (c *queryClient) AccountQuery(ctx context.Context, in *AccountQueryRequest, opts ...grpc.CallOption) (*AccountQueryResponse, error) {
out := new(AccountQueryResponse)
err := c.cc.Invoke(ctx, "/cosmos.accounts.v1.Query/AccountQuery", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// QueryServer is the server API for Query service.
type QueryServer interface {
// AccountQuery runs an account query.
AccountQuery(context.Context, *AccountQueryRequest) (*AccountQueryResponse, error)
}
// UnimplementedQueryServer can be embedded to have forward compatible implementations.
type UnimplementedQueryServer struct {
}
func (*UnimplementedQueryServer) AccountQuery(ctx context.Context, req *AccountQueryRequest) (*AccountQueryResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AccountQuery not implemented")
}
func RegisterQueryServer(s grpc1.Server, srv QueryServer) {
s.RegisterService(&_Query_serviceDesc, srv)
}
func _Query_AccountQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AccountQueryRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).AccountQuery(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/cosmos.accounts.v1.Query/AccountQuery",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).AccountQuery(ctx, req.(*AccountQueryRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Query_serviceDesc = grpc.ServiceDesc{
ServiceName: "cosmos.accounts.v1.Query",
HandlerType: (*QueryServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "AccountQuery",
Handler: _Query_AccountQuery_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "cosmos/accounts/v1/query.proto",
}
func (m *AccountQueryRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *AccountQueryRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *AccountQueryRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Request) > 0 {
i -= len(m.Request)
copy(dAtA[i:], m.Request)
i = encodeVarintQuery(dAtA, i, uint64(len(m.Request)))
i--
dAtA[i] = 0x12
}
if len(m.Target) > 0 {
i -= len(m.Target)
copy(dAtA[i:], m.Target)
i = encodeVarintQuery(dAtA, i, uint64(len(m.Target)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *AccountQueryResponse) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *AccountQueryResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *AccountQueryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Response) > 0 {
i -= len(m.Response)
copy(dAtA[i:], m.Response)
i = encodeVarintQuery(dAtA, i, uint64(len(m.Response)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func encodeVarintQuery(dAtA []byte, offset int, v uint64) int {
offset -= sovQuery(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *AccountQueryRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Target)
if l > 0 {
n += 1 + l + sovQuery(uint64(l))
}
l = len(m.Request)
if l > 0 {
n += 1 + l + sovQuery(uint64(l))
}
return n
}
func (m *AccountQueryResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Response)
if l > 0 {
n += 1 + l + sovQuery(uint64(l))
}
return n
}
func sovQuery(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozQuery(x uint64) (n int) {
return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *AccountQueryRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: AccountQueryRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: AccountQueryRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthQuery
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthQuery
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Target = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthQuery
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthQuery
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Request = append(m.Request[:0], dAtA[iNdEx:postIndex]...)
if m.Request == nil {
m.Request = []byte{}
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipQuery(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthQuery
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *AccountQueryResponse) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: AccountQueryResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: AccountQueryResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Response", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthQuery
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthQuery
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Response = append(m.Response[:0], dAtA[iNdEx:postIndex]...)
if m.Response == nil {
m.Response = []byte{}
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipQuery(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthQuery
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipQuery(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowQuery
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowQuery
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowQuery
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLengthQuery
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupQuery
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthQuery
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)