You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
109 lines
2.5 KiB
Go
109 lines
2.5 KiB
Go
// Code generated by protoc-gen-micro. DO NOT EDIT.
|
|
// source: w_coin.proto
|
|
|
|
package w_coinpb
|
|
|
|
import (
|
|
fmt "fmt"
|
|
proto "google.golang.org/protobuf/proto"
|
|
math "math"
|
|
)
|
|
|
|
import (
|
|
context "context"
|
|
api "go-micro.dev/v4/api"
|
|
client "go-micro.dev/v4/client"
|
|
server "go-micro.dev/v4/server"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ api.Endpoint
|
|
var _ context.Context
|
|
var _ client.Option
|
|
var _ server.Option
|
|
|
|
// Api Endpoints for WCoin service
|
|
|
|
func NewWCoinEndpoints() []*api.Endpoint {
|
|
return []*api.Endpoint{}
|
|
}
|
|
|
|
// Client API for WCoin service
|
|
|
|
type WCoinService interface {
|
|
// Save 积分配置保存
|
|
Save(ctx context.Context, in *SaveReq, opts ...client.CallOption) (*SaveRes, error)
|
|
// Show 积分配置展示
|
|
Show(ctx context.Context, in *ShowReq, opts ...client.CallOption) (*ShowRes, error)
|
|
}
|
|
|
|
type wCoinService struct {
|
|
c client.Client
|
|
name string
|
|
}
|
|
|
|
func NewWCoinService(name string, c client.Client) WCoinService {
|
|
return &wCoinService{
|
|
c: c,
|
|
name: name,
|
|
}
|
|
}
|
|
|
|
func (c *wCoinService) Save(ctx context.Context, in *SaveReq, opts ...client.CallOption) (*SaveRes, error) {
|
|
req := c.c.NewRequest(c.name, "WCoin.Save", in)
|
|
out := new(SaveRes)
|
|
err := c.c.Call(ctx, req, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *wCoinService) Show(ctx context.Context, in *ShowReq, opts ...client.CallOption) (*ShowRes, error) {
|
|
req := c.c.NewRequest(c.name, "WCoin.Show", in)
|
|
out := new(ShowRes)
|
|
err := c.c.Call(ctx, req, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// Server API for WCoin service
|
|
|
|
type WCoinHandler interface {
|
|
// Save 积分配置保存
|
|
Save(context.Context, *SaveReq, *SaveRes) error
|
|
// Show 积分配置展示
|
|
Show(context.Context, *ShowReq, *ShowRes) error
|
|
}
|
|
|
|
func RegisterWCoinHandler(s server.Server, hdlr WCoinHandler, opts ...server.HandlerOption) error {
|
|
type wCoin interface {
|
|
Save(ctx context.Context, in *SaveReq, out *SaveRes) error
|
|
Show(ctx context.Context, in *ShowReq, out *ShowRes) error
|
|
}
|
|
type WCoin struct {
|
|
wCoin
|
|
}
|
|
h := &wCoinHandler{hdlr}
|
|
return s.Handle(s.NewHandler(&WCoin{h}, opts...))
|
|
}
|
|
|
|
type wCoinHandler struct {
|
|
WCoinHandler
|
|
}
|
|
|
|
func (h *wCoinHandler) Save(ctx context.Context, in *SaveReq, out *SaveRes) error {
|
|
return h.WCoinHandler.Save(ctx, in, out)
|
|
}
|
|
|
|
func (h *wCoinHandler) Show(ctx context.Context, in *ShowReq, out *ShowRes) error {
|
|
return h.WCoinHandler.Show(ctx, in, out)
|
|
}
|