Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterAggregatorServer(s grpc.ServiceRegistrar, srv AggregatorServer)
- type AggregateReply
- type AggregateRequest
- func (*AggregateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AggregateRequest) GetObuID() int32
- func (x *AggregateRequest) GetUnix() int64
- func (x *AggregateRequest) GetValue() float64
- func (*AggregateRequest) ProtoMessage()
- func (x *AggregateRequest) ProtoReflect() protoreflect.Message
- func (x *AggregateRequest) Reset()
- func (x *AggregateRequest) String() string
- type AggregatorClient
- type AggregatorServer
- type GetInvoiceReply
- func (*GetInvoiceReply) Descriptor() ([]byte, []int)deprecated
- func (x *GetInvoiceReply) GetObuID() int32
- func (x *GetInvoiceReply) GetTotalAmount() float64
- func (x *GetInvoiceReply) GetTotalDistance() float64
- func (*GetInvoiceReply) ProtoMessage()
- func (x *GetInvoiceReply) ProtoReflect() protoreflect.Message
- func (x *GetInvoiceReply) Reset()
- func (x *GetInvoiceReply) String() string
- type GetInvoiceRequest
- type UnimplementedAggregatorServer
- type UnsafeAggregatorServer
Constants ¶
const ( Aggregator_Aggregate_FullMethodName = "/pb.Aggregator/Aggregate" Aggregator_GetInvoice_FullMethodName = "/pb.Aggregator/GetInvoice" )
Variables ¶
var Aggregator_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pb.Aggregator", HandlerType: (*AggregatorServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Aggregate", Handler: _Aggregator_Aggregate_Handler, }, { MethodName: "GetInvoice", Handler: _Aggregator_GetInvoice_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "gokitimp/aggsvc/pb/aggsvc.proto", }
Aggregator_ServiceDesc is the grpc.ServiceDesc for Aggregator service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_gokitimp_aggsvc_pb_aggsvc_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAggregatorServer ¶
func RegisterAggregatorServer(s grpc.ServiceRegistrar, srv AggregatorServer)
Types ¶
type AggregateReply ¶
type AggregateReply struct {
// contains filtered or unexported fields
}
func (*AggregateReply) Descriptor
deprecated
func (*AggregateReply) Descriptor() ([]byte, []int)
Deprecated: Use AggregateReply.ProtoReflect.Descriptor instead.
func (*AggregateReply) ProtoMessage ¶
func (*AggregateReply) ProtoMessage()
func (*AggregateReply) ProtoReflect ¶
func (x *AggregateReply) ProtoReflect() protoreflect.Message
func (*AggregateReply) Reset ¶
func (x *AggregateReply) Reset()
func (*AggregateReply) String ¶
func (x *AggregateReply) String() string
type AggregateRequest ¶
type AggregateRequest struct { ObuID int32 `protobuf:"varint,1,opt,name=ObuID,proto3" json:"ObuID,omitempty"` Value float64 `protobuf:"fixed64,2,opt,name=Value,proto3" json:"Value,omitempty"` Unix int64 `protobuf:"varint,3,opt,name=Unix,proto3" json:"Unix,omitempty"` // contains filtered or unexported fields }
func (*AggregateRequest) Descriptor
deprecated
func (*AggregateRequest) Descriptor() ([]byte, []int)
Deprecated: Use AggregateRequest.ProtoReflect.Descriptor instead.
func (*AggregateRequest) GetObuID ¶
func (x *AggregateRequest) GetObuID() int32
func (*AggregateRequest) GetUnix ¶
func (x *AggregateRequest) GetUnix() int64
func (*AggregateRequest) GetValue ¶
func (x *AggregateRequest) GetValue() float64
func (*AggregateRequest) ProtoMessage ¶
func (*AggregateRequest) ProtoMessage()
func (*AggregateRequest) ProtoReflect ¶
func (x *AggregateRequest) ProtoReflect() protoreflect.Message
func (*AggregateRequest) Reset ¶
func (x *AggregateRequest) Reset()
func (*AggregateRequest) String ¶
func (x *AggregateRequest) String() string
type AggregatorClient ¶
type AggregatorClient interface { Aggregate(ctx context.Context, in *AggregateRequest, opts ...grpc.CallOption) (*AggregateReply, error) GetInvoice(ctx context.Context, in *GetInvoiceRequest, opts ...grpc.CallOption) (*GetInvoiceReply, error) }
AggregatorClient is the client API for Aggregator service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewAggregatorClient ¶
func NewAggregatorClient(cc grpc.ClientConnInterface) AggregatorClient
type AggregatorServer ¶
type AggregatorServer interface { Aggregate(context.Context, *AggregateRequest) (*AggregateReply, error) GetInvoice(context.Context, *GetInvoiceRequest) (*GetInvoiceReply, error) // contains filtered or unexported methods }
AggregatorServer is the server API for Aggregator service. All implementations must embed UnimplementedAggregatorServer for forward compatibility
type GetInvoiceReply ¶
type GetInvoiceReply struct { ObuID int32 `protobuf:"varint,1,opt,name=ObuID,proto3" json:"ObuID,omitempty"` TotalDistance float64 `protobuf:"fixed64,2,opt,name=TotalDistance,proto3" json:"TotalDistance,omitempty"` TotalAmount float64 `protobuf:"fixed64,3,opt,name=TotalAmount,proto3" json:"TotalAmount,omitempty"` // contains filtered or unexported fields }
func (*GetInvoiceReply) Descriptor
deprecated
func (*GetInvoiceReply) Descriptor() ([]byte, []int)
Deprecated: Use GetInvoiceReply.ProtoReflect.Descriptor instead.
func (*GetInvoiceReply) GetObuID ¶
func (x *GetInvoiceReply) GetObuID() int32
func (*GetInvoiceReply) GetTotalAmount ¶
func (x *GetInvoiceReply) GetTotalAmount() float64
func (*GetInvoiceReply) GetTotalDistance ¶
func (x *GetInvoiceReply) GetTotalDistance() float64
func (*GetInvoiceReply) ProtoMessage ¶
func (*GetInvoiceReply) ProtoMessage()
func (*GetInvoiceReply) ProtoReflect ¶
func (x *GetInvoiceReply) ProtoReflect() protoreflect.Message
func (*GetInvoiceReply) Reset ¶
func (x *GetInvoiceReply) Reset()
func (*GetInvoiceReply) String ¶
func (x *GetInvoiceReply) String() string
type GetInvoiceRequest ¶
type GetInvoiceRequest struct { ObuID int32 `protobuf:"varint,1,opt,name=ObuID,proto3" json:"ObuID,omitempty"` // contains filtered or unexported fields }
func (*GetInvoiceRequest) Descriptor
deprecated
func (*GetInvoiceRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetInvoiceRequest.ProtoReflect.Descriptor instead.
func (*GetInvoiceRequest) GetObuID ¶
func (x *GetInvoiceRequest) GetObuID() int32
func (*GetInvoiceRequest) ProtoMessage ¶
func (*GetInvoiceRequest) ProtoMessage()
func (*GetInvoiceRequest) ProtoReflect ¶
func (x *GetInvoiceRequest) ProtoReflect() protoreflect.Message
func (*GetInvoiceRequest) Reset ¶
func (x *GetInvoiceRequest) Reset()
func (*GetInvoiceRequest) String ¶
func (x *GetInvoiceRequest) String() string
type UnimplementedAggregatorServer ¶
type UnimplementedAggregatorServer struct { }
UnimplementedAggregatorServer must be embedded to have forward compatible implementations.
func (UnimplementedAggregatorServer) Aggregate ¶
func (UnimplementedAggregatorServer) Aggregate(context.Context, *AggregateRequest) (*AggregateReply, error)
func (UnimplementedAggregatorServer) GetInvoice ¶
func (UnimplementedAggregatorServer) GetInvoice(context.Context, *GetInvoiceRequest) (*GetInvoiceReply, error)
type UnsafeAggregatorServer ¶
type UnsafeAggregatorServer interface {
// contains filtered or unexported methods
}
UnsafeAggregatorServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AggregatorServer will result in compilation errors.