package types
import (
context "context"
fmt "fmt"
io "io"
math "math"
math_bits "math/bits"
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
types "github.com/cosmos/cosmos-sdk/types"
query "github.com/cosmos/cosmos-sdk/types/query"
_ "github.com/cosmos/gogoproto/gogoproto"
grpc1 "github.com/cosmos/gogoproto/grpc"
proto "github.com/cosmos/gogoproto/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
var (
_ = proto.Marshal
_ = fmt.Errorf
_ = math.Inf
)
const _ = proto.GoGoProtoPackageIsVersion3
type QueryParamsRequest struct{}
func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} }
func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) }
func (*QueryParamsRequest) ProtoMessage() {}
func (*QueryParamsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_f6ec0dbd7f0bdd2b, []int{0}
}
func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_QueryParamsRequest.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 *QueryParamsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryParamsRequest.Merge(m, src)
}
func (m *QueryParamsRequest) XXX_Size() int {
return m.Size()
}
func (m *QueryParamsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo
type QueryParamsResponse struct {
Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}
func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} }
func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) }
func (*QueryParamsResponse) ProtoMessage() {}
func (*QueryParamsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_f6ec0dbd7f0bdd2b, []int{1}
}
func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_QueryParamsResponse.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 *QueryParamsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryParamsResponse.Merge(m, src)
}
func (m *QueryParamsResponse) XXX_Size() int {
return m.Size()
}
func (m *QueryParamsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m)
}
var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo
func (m *QueryParamsResponse) GetParams() Params {
if m != nil {
return m.Params
}
return Params{}
}
type QuerySourceRequest struct {
Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"`
}
func (m *QuerySourceRequest) Reset() { *m = QuerySourceRequest{} }
func (m *QuerySourceRequest) String() string { return proto.CompactTextString(m) }
func (*QuerySourceRequest) ProtoMessage() {}
func (*QuerySourceRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_f6ec0dbd7f0bdd2b, []int{2}
}
func (m *QuerySourceRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *QuerySourceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_QuerySourceRequest.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 *QuerySourceRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_QuerySourceRequest.Merge(m, src)
}
func (m *QuerySourceRequest) XXX_Size() int {
return m.Size()
}
func (m *QuerySourceRequest) XXX_DiscardUnknown() {
xxx_messageInfo_QuerySourceRequest.DiscardUnknown(m)
}
var xxx_messageInfo_QuerySourceRequest proto.InternalMessageInfo
func (m *QuerySourceRequest) GetSource() string {
if m != nil {
return m.Source
}
return ""
}
type QueryDestinationRequest struct {
Destination string `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"`
}
func (m *QueryDestinationRequest) Reset() { *m = QueryDestinationRequest{} }
func (m *QueryDestinationRequest) String() string { return proto.CompactTextString(m) }
func (*QueryDestinationRequest) ProtoMessage() {}
func (*QueryDestinationRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_f6ec0dbd7f0bdd2b, []int{3}
}
func (m *QueryDestinationRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *QueryDestinationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_QueryDestinationRequest.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 *QueryDestinationRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryDestinationRequest.Merge(m, src)
}
func (m *QueryDestinationRequest) XXX_Size() int {
return m.Size()
}
func (m *QueryDestinationRequest) XXX_DiscardUnknown() {
xxx_messageInfo_QueryDestinationRequest.DiscardUnknown(m)
}
var xxx_messageInfo_QueryDestinationRequest proto.InternalMessageInfo
func (m *QueryDestinationRequest) GetDestination() string {
if m != nil {
return m.Destination
}
return ""
}
type QueryRoutedEnergyResponse struct {
Value github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=value,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"value"`
}
func (m *QueryRoutedEnergyResponse) Reset() { *m = QueryRoutedEnergyResponse{} }
func (m *QueryRoutedEnergyResponse) String() string { return proto.CompactTextString(m) }
func (*QueryRoutedEnergyResponse) ProtoMessage() {}
func (*QueryRoutedEnergyResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_f6ec0dbd7f0bdd2b, []int{4}
}
func (m *QueryRoutedEnergyResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *QueryRoutedEnergyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_QueryRoutedEnergyResponse.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 *QueryRoutedEnergyResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryRoutedEnergyResponse.Merge(m, src)
}
func (m *QueryRoutedEnergyResponse) XXX_Size() int {
return m.Size()
}
func (m *QueryRoutedEnergyResponse) XXX_DiscardUnknown() {
xxx_messageInfo_QueryRoutedEnergyResponse.DiscardUnknown(m)
}
var xxx_messageInfo_QueryRoutedEnergyResponse proto.InternalMessageInfo
func (m *QueryRoutedEnergyResponse) GetValue() github_com_cosmos_cosmos_sdk_types.Coins {
if m != nil {
return m.Value
}
return nil
}
type QueryRouteRequest struct {
Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"`
Destination string `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"`
}
func (m *QueryRouteRequest) Reset() { *m = QueryRouteRequest{} }
func (m *QueryRouteRequest) String() string { return proto.CompactTextString(m) }
func (*QueryRouteRequest) ProtoMessage() {}
func (*QueryRouteRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_f6ec0dbd7f0bdd2b, []int{5}
}
func (m *QueryRouteRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *QueryRouteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_QueryRouteRequest.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 *QueryRouteRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryRouteRequest.Merge(m, src)
}
func (m *QueryRouteRequest) XXX_Size() int {
return m.Size()
}
func (m *QueryRouteRequest) XXX_DiscardUnknown() {
xxx_messageInfo_QueryRouteRequest.DiscardUnknown(m)
}
var xxx_messageInfo_QueryRouteRequest proto.InternalMessageInfo
func (m *QueryRouteRequest) GetSource() string {
if m != nil {
return m.Source
}
return ""
}
func (m *QueryRouteRequest) GetDestination() string {
if m != nil {
return m.Destination
}
return ""
}
type QueryRouteResponse struct {
Route Route `protobuf:"bytes,1,opt,name=route,proto3" json:"route"`
}
func (m *QueryRouteResponse) Reset() { *m = QueryRouteResponse{} }
func (m *QueryRouteResponse) String() string { return proto.CompactTextString(m) }
func (*QueryRouteResponse) ProtoMessage() {}
func (*QueryRouteResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_f6ec0dbd7f0bdd2b, []int{6}
}
func (m *QueryRouteResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *QueryRouteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_QueryRouteResponse.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 *QueryRouteResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryRouteResponse.Merge(m, src)
}
func (m *QueryRouteResponse) XXX_Size() int {
return m.Size()
}
func (m *QueryRouteResponse) XXX_DiscardUnknown() {
xxx_messageInfo_QueryRouteResponse.DiscardUnknown(m)
}
var xxx_messageInfo_QueryRouteResponse proto.InternalMessageInfo
func (m *QueryRouteResponse) GetRoute() Route {
if m != nil {
return m.Route
}
return Route{}
}
type QueryRoutesRequest struct {
Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}
func (m *QueryRoutesRequest) Reset() { *m = QueryRoutesRequest{} }
func (m *QueryRoutesRequest) String() string { return proto.CompactTextString(m) }
func (*QueryRoutesRequest) ProtoMessage() {}
func (*QueryRoutesRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_f6ec0dbd7f0bdd2b, []int{7}
}
func (m *QueryRoutesRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *QueryRoutesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_QueryRoutesRequest.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 *QueryRoutesRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryRoutesRequest.Merge(m, src)
}
func (m *QueryRoutesRequest) XXX_Size() int {
return m.Size()
}
func (m *QueryRoutesRequest) XXX_DiscardUnknown() {
xxx_messageInfo_QueryRoutesRequest.DiscardUnknown(m)
}
var xxx_messageInfo_QueryRoutesRequest proto.InternalMessageInfo
func (m *QueryRoutesRequest) GetPagination() *query.PageRequest {
if m != nil {
return m.Pagination
}
return nil
}
type QueryRoutesResponse struct {
Routes Routes `protobuf:"bytes,1,rep,name=routes,proto3,castrepeated=Routes" json:"routes"`
Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}
func (m *QueryRoutesResponse) Reset() { *m = QueryRoutesResponse{} }
func (m *QueryRoutesResponse) String() string { return proto.CompactTextString(m) }
func (*QueryRoutesResponse) ProtoMessage() {}
func (*QueryRoutesResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_f6ec0dbd7f0bdd2b, []int{8}
}
func (m *QueryRoutesResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *QueryRoutesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_QueryRoutesResponse.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 *QueryRoutesResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryRoutesResponse.Merge(m, src)
}
func (m *QueryRoutesResponse) XXX_Size() int {
return m.Size()
}
func (m *QueryRoutesResponse) XXX_DiscardUnknown() {
xxx_messageInfo_QueryRoutesResponse.DiscardUnknown(m)
}
var xxx_messageInfo_QueryRoutesResponse proto.InternalMessageInfo
func (m *QueryRoutesResponse) GetRoutes() Routes {
if m != nil {
return m.Routes
}
return nil
}
func (m *QueryRoutesResponse) GetPagination() *query.PageResponse {
if m != nil {
return m.Pagination
}
return nil
}
func init() {
proto.RegisterType((*QueryParamsRequest)(nil), "cyber.grid.v1beta1.QueryParamsRequest")
proto.RegisterType((*QueryParamsResponse)(nil), "cyber.grid.v1beta1.QueryParamsResponse")
proto.RegisterType((*QuerySourceRequest)(nil), "cyber.grid.v1beta1.QuerySourceRequest")
proto.RegisterType((*QueryDestinationRequest)(nil), "cyber.grid.v1beta1.QueryDestinationRequest")
proto.RegisterType((*QueryRoutedEnergyResponse)(nil), "cyber.grid.v1beta1.QueryRoutedEnergyResponse")
proto.RegisterType((*QueryRouteRequest)(nil), "cyber.grid.v1beta1.QueryRouteRequest")
proto.RegisterType((*QueryRouteResponse)(nil), "cyber.grid.v1beta1.QueryRouteResponse")
proto.RegisterType((*QueryRoutesRequest)(nil), "cyber.grid.v1beta1.QueryRoutesRequest")
proto.RegisterType((*QueryRoutesResponse)(nil), "cyber.grid.v1beta1.QueryRoutesResponse")
}
func init() { proto.RegisterFile("cyber/grid/v1beta1/query.proto", fileDescriptor_f6ec0dbd7f0bdd2b) }
var fileDescriptor_f6ec0dbd7f0bdd2b = []byte{
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x95, 0x5d, 0x6b, 0xd3, 0x5e,
0x18, 0xc0, 0x9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0xd0, 0xcc, 0x98,
0x13, 0xdc, 0x59, 0x87, 0x7d, 0x4a, 0xd2, 0x2d, 0x20, 0x35, 0x69, 0x73, 0xa6, 0x91, 0x0f, 0x21,
0x0f, 0x49, 0x15, 0xc2, 0xd1, 0xab, 0xd3, 0xd3, 0x25, 0x54, 0xf5, 0x32, 0x33, 0xc4, 0xa9, 0x03,
0xce, 0x2a, 0xd5, 0x0a, 0x71, 0x80, 0x03, 0x0e, 0xb2, 0xf4, 0x0a, 0x72, 0x6f, 0xae, 0xd9, 0x37,
0xad, 0xfc, 0x20, 0xe5, 0x76, 0x6d, 0x3f, 0x3e, 0xee, 0x6b, 0xca, 0x49, 0x5f, 0x53, 0xfe, 0xf4,
0x35, 0xe5, 0xc3, 0x40, 0xab, 0x9c, 0x0c, 0xb4, 0xca, 0xcf, 0x81, 0x56, 0x79, 0x65, 0x64, 0x3f,
0x04, 0x71, 0x90, 0x0e, 0xf7, 0x9c, 0x80, 0x09, 0x61, 0x3a, 0xbc, 0x29, 0xa3, 0xbe, 0x93, 0xa1,
0xe0, 0xa3, 0xd0, 0x56, 0xe1, 0x03, 0xbb, 0xf9, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xc5, 0xea, 0x02,
0xd4, 0x36, 0x08, 0x00, 0x00,
}
var (
_ context.Context
_ grpc.ClientConn
)
const _ = grpc.SupportPackageIsVersion4
type QueryClient interface {
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
SourceRoutes(ctx context.Context, in *QuerySourceRequest, opts ...grpc.CallOption) (*QueryRoutesResponse, error)
DestinationRoutes(ctx context.Context, in *QueryDestinationRequest, opts ...grpc.CallOption) (*QueryRoutesResponse, error)
DestinationRoutedEnergy(ctx context.Context, in *QueryDestinationRequest, opts ...grpc.CallOption) (*QueryRoutedEnergyResponse, error)
SourceRoutedEnergy(ctx context.Context, in *QuerySourceRequest, opts ...grpc.CallOption) (*QueryRoutedEnergyResponse, error)
Route(ctx context.Context, in *QueryRouteRequest, opts ...grpc.CallOption) (*QueryRouteResponse, error)
Routes(ctx context.Context, in *QueryRoutesRequest, opts ...grpc.CallOption) (*QueryRoutesResponse, error)
}
type queryClient struct {
cc grpc1.ClientConn
}
func NewQueryClient(cc grpc1.ClientConn) QueryClient {
return &queryClient{cc}
}
func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) {
out := new(QueryParamsResponse)
err := c.cc.Invoke(ctx, "/cyber.grid.v1beta1.Query/Params", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) SourceRoutes(ctx context.Context, in *QuerySourceRequest, opts ...grpc.CallOption) (*QueryRoutesResponse, error) {
out := new(QueryRoutesResponse)
err := c.cc.Invoke(ctx, "/cyber.grid.v1beta1.Query/SourceRoutes", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) DestinationRoutes(ctx context.Context, in *QueryDestinationRequest, opts ...grpc.CallOption) (*QueryRoutesResponse, error) {
out := new(QueryRoutesResponse)
err := c.cc.Invoke(ctx, "/cyber.grid.v1beta1.Query/DestinationRoutes", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) DestinationRoutedEnergy(ctx context.Context, in *QueryDestinationRequest, opts ...grpc.CallOption) (*QueryRoutedEnergyResponse, error) {
out := new(QueryRoutedEnergyResponse)
err := c.cc.Invoke(ctx, "/cyber.grid.v1beta1.Query/DestinationRoutedEnergy", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) SourceRoutedEnergy(ctx context.Context, in *QuerySourceRequest, opts ...grpc.CallOption) (*QueryRoutedEnergyResponse, error) {
out := new(QueryRoutedEnergyResponse)
err := c.cc.Invoke(ctx, "/cyber.grid.v1beta1.Query/SourceRoutedEnergy", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) Route(ctx context.Context, in *QueryRouteRequest, opts ...grpc.CallOption) (*QueryRouteResponse, error) {
out := new(QueryRouteResponse)
err := c.cc.Invoke(ctx, "/cyber.grid.v1beta1.Query/Route", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) Routes(ctx context.Context, in *QueryRoutesRequest, opts ...grpc.CallOption) (*QueryRoutesResponse, error) {
out := new(QueryRoutesResponse)
err := c.cc.Invoke(ctx, "/cyber.grid.v1beta1.Query/Routes", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
type QueryServer interface {
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
SourceRoutes(context.Context, *QuerySourceRequest) (*QueryRoutesResponse, error)
DestinationRoutes(context.Context, *QueryDestinationRequest) (*QueryRoutesResponse, error)
DestinationRoutedEnergy(context.Context, *QueryDestinationRequest) (*QueryRoutedEnergyResponse, error)
SourceRoutedEnergy(context.Context, *QuerySourceRequest) (*QueryRoutedEnergyResponse, error)
Route(context.Context, *QueryRouteRequest) (*QueryRouteResponse, error)
Routes(context.Context, *QueryRoutesRequest) (*QueryRoutesResponse, error)
}
type UnimplementedQueryServer struct{}
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
}
func (*UnimplementedQueryServer) SourceRoutes(ctx context.Context, req *QuerySourceRequest) (*QueryRoutesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SourceRoutes not implemented")
}
func (*UnimplementedQueryServer) DestinationRoutes(ctx context.Context, req *QueryDestinationRequest) (*QueryRoutesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DestinationRoutes not implemented")
}
func (*UnimplementedQueryServer) DestinationRoutedEnergy(ctx context.Context, req *QueryDestinationRequest) (*QueryRoutedEnergyResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DestinationRoutedEnergy not implemented")
}
func (*UnimplementedQueryServer) SourceRoutedEnergy(ctx context.Context, req *QuerySourceRequest) (*QueryRoutedEnergyResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SourceRoutedEnergy not implemented")
}
func (*UnimplementedQueryServer) Route(ctx context.Context, req *QueryRouteRequest) (*QueryRouteResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Route not implemented")
}
func (*UnimplementedQueryServer) Routes(ctx context.Context, req *QueryRoutesRequest) (*QueryRoutesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Routes not implemented")
}
func RegisterQueryServer(s grpc1.Server, srv QueryServer) {
s.RegisterService(&_Query_serviceDesc, srv)
}
func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryParamsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).Params(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/cyber.grid.v1beta1.Query/Params",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_SourceRoutes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QuerySourceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).SourceRoutes(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/cyber.grid.v1beta1.Query/SourceRoutes",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).SourceRoutes(ctx, req.(*QuerySourceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_DestinationRoutes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryDestinationRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).DestinationRoutes(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/cyber.grid.v1beta1.Query/DestinationRoutes",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).DestinationRoutes(ctx, req.(*QueryDestinationRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_DestinationRoutedEnergy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryDestinationRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).DestinationRoutedEnergy(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/cyber.grid.v1beta1.Query/DestinationRoutedEnergy",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).DestinationRoutedEnergy(ctx, req.(*QueryDestinationRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_SourceRoutedEnergy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QuerySourceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).SourceRoutedEnergy(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/cyber.grid.v1beta1.Query/SourceRoutedEnergy",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).SourceRoutedEnergy(ctx, req.(*QuerySourceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_Route_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryRouteRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).Route(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/cyber.grid.v1beta1.Query/Route",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Route(ctx, req.(*QueryRouteRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_Routes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryRoutesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).Routes(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/cyber.grid.v1beta1.Query/Routes",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Routes(ctx, req.(*QueryRoutesRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Query_serviceDesc = grpc.ServiceDesc{
ServiceName: "cyber.grid.v1beta1.Query",
HandlerType: (*QueryServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Params",
Handler: _Query_Params_Handler,
},
{
MethodName: "SourceRoutes",
Handler: _Query_SourceRoutes_Handler,
},
{
MethodName: "DestinationRoutes",
Handler: _Query_DestinationRoutes_Handler,
},
{
MethodName: "DestinationRoutedEnergy",
Handler: _Query_DestinationRoutedEnergy_Handler,
},
{
MethodName: "SourceRoutedEnergy",
Handler: _Query_SourceRoutedEnergy_Handler,
},
{
MethodName: "Route",
Handler: _Query_Route_Handler,
},
{
MethodName: "Routes",
Handler: _Query_Routes_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "cyber/grid/v1beta1/query.proto",
}
func (m *QueryParamsRequest) 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 *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
return len(dAtA) - i, nil
}
func (m *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
{
size, err := m.Params.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintQuery(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
return len(dAtA) - i, nil
}
func (m *QuerySourceRequest) 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 *QuerySourceRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *QuerySourceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Source) > 0 {
i -= len(m.Source)
copy(dAtA[i:], m.Source)
i = encodeVarintQuery(dAtA, i, uint64(len(m.Source)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *QueryDestinationRequest) 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 *QueryDestinationRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *QueryDestinationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Destination) > 0 {
i -= len(m.Destination)
copy(dAtA[i:], m.Destination)
i = encodeVarintQuery(dAtA, i, uint64(len(m.Destination)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *QueryRoutedEnergyResponse) 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 *QueryRoutedEnergyResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *QueryRoutedEnergyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Value) > 0 {
for iNdEx := len(m.Value) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Value[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintQuery(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
}
func (m *QueryRouteRequest) 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 *QueryRouteRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *QueryRouteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Destination) > 0 {
i -= len(m.Destination)
copy(dAtA[i:], m.Destination)
i = encodeVarintQuery(dAtA, i, uint64(len(m.Destination)))
i--
dAtA[i] = 0x12
}
if len(m.Source) > 0 {
i -= len(m.Source)
copy(dAtA[i:], m.Source)
i = encodeVarintQuery(dAtA, i, uint64(len(m.Source)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *QueryRouteResponse) 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 *QueryRouteResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *QueryRouteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
{
size, err := m.Route.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintQuery(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
return len(dAtA) - i, nil
}
func (m *QueryRoutesRequest) 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 *QueryRoutesRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *QueryRoutesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.Pagination != nil {
{
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintQuery(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *QueryRoutesResponse) 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 *QueryRoutesResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *QueryRoutesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.Pagination != nil {
{
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintQuery(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
if len(m.Routes) > 0 {
for iNdEx := len(m.Routes) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Routes[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintQuery(dAtA, i, uint64(size))
}
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 *QueryParamsRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
return n
}
func (m *QueryParamsResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = m.Params.Size()
n += 1 + l + sovQuery(uint64(l))
return n
}
func (m *QuerySourceRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Source)
if l > 0 {
n += 1 + l + sovQuery(uint64(l))
}
return n
}
func (m *QueryDestinationRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Destination)
if l > 0 {
n += 1 + l + sovQuery(uint64(l))
}
return n
}
func (m *QueryRoutedEnergyResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.Value) > 0 {
for _, e := range m.Value {
l = e.Size()
n += 1 + l + sovQuery(uint64(l))
}
}
return n
}
func (m *QueryRouteRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Source)
if l > 0 {
n += 1 + l + sovQuery(uint64(l))
}
l = len(m.Destination)
if l > 0 {
n += 1 + l + sovQuery(uint64(l))
}
return n
}
func (m *QueryRouteResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = m.Route.Size()
n += 1 + l + sovQuery(uint64(l))
return n
}
func (m *QueryRoutesRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Pagination != nil {
l = m.Pagination.Size()
n += 1 + l + sovQuery(uint64(l))
}
return n
}
func (m *QueryRoutesResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.Routes) > 0 {
for _, e := range m.Routes {
l = e.Size()
n += 1 + l + sovQuery(uint64(l))
}
}
if m.Pagination != nil {
l = m.Pagination.Size()
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 *QueryParamsRequest) 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: QueryParamsRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
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 *QueryParamsResponse) 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: QueryParamsResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthQuery
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthQuery
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
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 *QuerySourceRequest) 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: QuerySourceRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: QuerySourceRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Source", 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.Source = string(dAtA[iNdEx:postIndex])
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 *QueryDestinationRequest) 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: QueryDestinationRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: QueryDestinationRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Destination", 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.Destination = string(dAtA[iNdEx:postIndex])
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 *QueryRoutedEnergyResponse) 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: QueryRoutedEnergyResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: QueryRoutedEnergyResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthQuery
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthQuery
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Value = append(m.Value, types.Coin{})
if err := m.Value[len(m.Value)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
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 *QueryRouteRequest) 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: QueryRouteRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: QueryRouteRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Source", 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.Source = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Destination", 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.Destination = string(dAtA[iNdEx:postIndex])
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 *QueryRouteResponse) 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: QueryRouteResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: QueryRouteResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Route", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthQuery
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthQuery
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.Route.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
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 *QueryRoutesRequest) 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: QueryRoutesRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: QueryRoutesRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthQuery
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthQuery
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Pagination == nil {
m.Pagination = &query.PageRequest{}
}
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
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 *QueryRoutesResponse) 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: QueryRoutesResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: QueryRoutesResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Routes", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthQuery
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthQuery
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Routes = append(m.Routes, Route{})
if err := m.Routes[len(m.Routes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthQuery
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthQuery
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Pagination == nil {
m.Pagination = &query.PageResponse{}
}
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
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")
)