// Code generated by protoc-gen-micro. DO NOT EDIT.
|
// source: statistic.proto
|
|
package shop
|
|
import (
|
fmt "fmt"
|
proto "github.com/golang/protobuf/proto"
|
math "math"
|
)
|
|
import (
|
context "context"
|
client "github.com/micro/go-micro/client"
|
server "github.com/micro/go-micro/server"
|
)
|
|
// 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.ProtoPackageIsVersion3 // please upgrade the proto package
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
var _ context.Context
|
var _ client.Option
|
var _ server.Option
|
|
// Client API for StatisticService service
|
|
type StatisticService interface {
|
StatisticByUser(ctx context.Context, in *StatisticByUserReq, opts ...client.CallOption) (*StatisticByUserReply, error)
|
}
|
|
type statisticService struct {
|
c client.Client
|
name string
|
}
|
|
func NewStatisticService(name string, c client.Client) StatisticService {
|
if c == nil {
|
c = client.NewClient()
|
}
|
if len(name) == 0 {
|
name = "shop"
|
}
|
return &statisticService{
|
c: c,
|
name: name,
|
}
|
}
|
|
func (c *statisticService) StatisticByUser(ctx context.Context, in *StatisticByUserReq, opts ...client.CallOption) (*StatisticByUserReply, error) {
|
req := c.c.NewRequest(c.name, "StatisticService.StatisticByUser", in)
|
out := new(StatisticByUserReply)
|
err := c.c.Call(ctx, req, out, opts...)
|
if err != nil {
|
return nil, err
|
}
|
return out, nil
|
}
|
|
// Server API for StatisticService service
|
|
type StatisticServiceHandler interface {
|
StatisticByUser(context.Context, *StatisticByUserReq, *StatisticByUserReply) error
|
}
|
|
func RegisterStatisticServiceHandler(s server.Server, hdlr StatisticServiceHandler, opts ...server.HandlerOption) error {
|
type statisticService interface {
|
StatisticByUser(ctx context.Context, in *StatisticByUserReq, out *StatisticByUserReply) error
|
}
|
type StatisticService struct {
|
statisticService
|
}
|
h := &statisticServiceHandler{hdlr}
|
return s.Handle(s.NewHandler(&StatisticService{h}, opts...))
|
}
|
|
type statisticServiceHandler struct {
|
StatisticServiceHandler
|
}
|
|
func (h *statisticServiceHandler) StatisticByUser(ctx context.Context, in *StatisticByUserReq, out *StatisticByUserReply) error {
|
return h.StatisticServiceHandler.StatisticByUser(ctx, in, out)
|
}
|