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.
280 lines
9.7 KiB
Go
280 lines
9.7 KiB
Go
// Code generated by protoc-gen-micro. DO NOT EDIT.
|
|
// source: w_script.proto
|
|
|
|
package w_scriptpb
|
|
|
|
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 WScript service
|
|
|
|
func NewWScriptEndpoints() []*api.Endpoint {
|
|
return []*api.Endpoint{}
|
|
}
|
|
|
|
// Client API for WScript service
|
|
|
|
type WScriptService interface {
|
|
// Boot 运行脚本
|
|
Boot(ctx context.Context, in *BootReq, opts ...client.CallOption) (*BootRes, error)
|
|
// RefreshDayLimit 刷新每日限制
|
|
RefreshDayLimit(ctx context.Context, in *RefreshDayLimitReq, opts ...client.CallOption) (*RefreshDayLimitRes, error)
|
|
// NotifyList 奖品回调列表
|
|
NotifyList(ctx context.Context, in *NotifyListReq, opts ...client.CallOption) (*NotifyListRes, error)
|
|
// EtcdKey 查看etcd的key
|
|
EtcdKey(ctx context.Context, in *EtcdKeyReq, opts ...client.CallOption) (*EtcdKeyRes, error)
|
|
// EventFlow 查看事件记录
|
|
EventFlow(ctx context.Context, in *EventFlowReq, opts ...client.CallOption) (*EventFlowRes, error)
|
|
// ClearDevice 清除设备信息
|
|
ClearDevice(ctx context.Context, in *ClearDeviceReq, opts ...client.CallOption) (*ClearDeviceRes, error)
|
|
// RefreshView 重新体验玩法
|
|
RefreshView(ctx context.Context, in *RefreshViewReq, opts ...client.CallOption) (*RefreshViewRes, error)
|
|
// ErrLog 错误日志记录
|
|
ErrLog(ctx context.Context, in *ErrLogReq, opts ...client.CallOption) (*ErrLogRes, error)
|
|
// PointsLog 领扣积分请求
|
|
PointsLog(ctx context.Context, in *PointsLogReq, opts ...client.CallOption) (*PointsLogRes, error)
|
|
// UserBehavior 用户行为日志
|
|
UserBehavior(ctx context.Context, in *UserBehaviorReq, opts ...client.CallOption) (*UserBehaviorRes, error)
|
|
// RewardPushLog 奖品推送日志
|
|
RewardPushLog(ctx context.Context, in *RewardPushLogReq, opts ...client.CallOption) (*RewardPushLogRes, error)
|
|
}
|
|
|
|
type wScriptService struct {
|
|
c client.Client
|
|
name string
|
|
}
|
|
|
|
func NewWScriptService(name string, c client.Client) WScriptService {
|
|
return &wScriptService{
|
|
c: c,
|
|
name: name,
|
|
}
|
|
}
|
|
|
|
func (c *wScriptService) Boot(ctx context.Context, in *BootReq, opts ...client.CallOption) (*BootRes, error) {
|
|
req := c.c.NewRequest(c.name, "WScript.Boot", in)
|
|
out := new(BootRes)
|
|
err := c.c.Call(ctx, req, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *wScriptService) RefreshDayLimit(ctx context.Context, in *RefreshDayLimitReq, opts ...client.CallOption) (*RefreshDayLimitRes, error) {
|
|
req := c.c.NewRequest(c.name, "WScript.RefreshDayLimit", in)
|
|
out := new(RefreshDayLimitRes)
|
|
err := c.c.Call(ctx, req, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *wScriptService) NotifyList(ctx context.Context, in *NotifyListReq, opts ...client.CallOption) (*NotifyListRes, error) {
|
|
req := c.c.NewRequest(c.name, "WScript.NotifyList", in)
|
|
out := new(NotifyListRes)
|
|
err := c.c.Call(ctx, req, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *wScriptService) EtcdKey(ctx context.Context, in *EtcdKeyReq, opts ...client.CallOption) (*EtcdKeyRes, error) {
|
|
req := c.c.NewRequest(c.name, "WScript.EtcdKey", in)
|
|
out := new(EtcdKeyRes)
|
|
err := c.c.Call(ctx, req, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *wScriptService) EventFlow(ctx context.Context, in *EventFlowReq, opts ...client.CallOption) (*EventFlowRes, error) {
|
|
req := c.c.NewRequest(c.name, "WScript.EventFlow", in)
|
|
out := new(EventFlowRes)
|
|
err := c.c.Call(ctx, req, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *wScriptService) ClearDevice(ctx context.Context, in *ClearDeviceReq, opts ...client.CallOption) (*ClearDeviceRes, error) {
|
|
req := c.c.NewRequest(c.name, "WScript.ClearDevice", in)
|
|
out := new(ClearDeviceRes)
|
|
err := c.c.Call(ctx, req, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *wScriptService) RefreshView(ctx context.Context, in *RefreshViewReq, opts ...client.CallOption) (*RefreshViewRes, error) {
|
|
req := c.c.NewRequest(c.name, "WScript.RefreshView", in)
|
|
out := new(RefreshViewRes)
|
|
err := c.c.Call(ctx, req, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *wScriptService) ErrLog(ctx context.Context, in *ErrLogReq, opts ...client.CallOption) (*ErrLogRes, error) {
|
|
req := c.c.NewRequest(c.name, "WScript.ErrLog", in)
|
|
out := new(ErrLogRes)
|
|
err := c.c.Call(ctx, req, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *wScriptService) PointsLog(ctx context.Context, in *PointsLogReq, opts ...client.CallOption) (*PointsLogRes, error) {
|
|
req := c.c.NewRequest(c.name, "WScript.PointsLog", in)
|
|
out := new(PointsLogRes)
|
|
err := c.c.Call(ctx, req, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *wScriptService) UserBehavior(ctx context.Context, in *UserBehaviorReq, opts ...client.CallOption) (*UserBehaviorRes, error) {
|
|
req := c.c.NewRequest(c.name, "WScript.UserBehavior", in)
|
|
out := new(UserBehaviorRes)
|
|
err := c.c.Call(ctx, req, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *wScriptService) RewardPushLog(ctx context.Context, in *RewardPushLogReq, opts ...client.CallOption) (*RewardPushLogRes, error) {
|
|
req := c.c.NewRequest(c.name, "WScript.RewardPushLog", in)
|
|
out := new(RewardPushLogRes)
|
|
err := c.c.Call(ctx, req, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// Server API for WScript service
|
|
|
|
type WScriptHandler interface {
|
|
// Boot 运行脚本
|
|
Boot(context.Context, *BootReq, *BootRes) error
|
|
// RefreshDayLimit 刷新每日限制
|
|
RefreshDayLimit(context.Context, *RefreshDayLimitReq, *RefreshDayLimitRes) error
|
|
// NotifyList 奖品回调列表
|
|
NotifyList(context.Context, *NotifyListReq, *NotifyListRes) error
|
|
// EtcdKey 查看etcd的key
|
|
EtcdKey(context.Context, *EtcdKeyReq, *EtcdKeyRes) error
|
|
// EventFlow 查看事件记录
|
|
EventFlow(context.Context, *EventFlowReq, *EventFlowRes) error
|
|
// ClearDevice 清除设备信息
|
|
ClearDevice(context.Context, *ClearDeviceReq, *ClearDeviceRes) error
|
|
// RefreshView 重新体验玩法
|
|
RefreshView(context.Context, *RefreshViewReq, *RefreshViewRes) error
|
|
// ErrLog 错误日志记录
|
|
ErrLog(context.Context, *ErrLogReq, *ErrLogRes) error
|
|
// PointsLog 领扣积分请求
|
|
PointsLog(context.Context, *PointsLogReq, *PointsLogRes) error
|
|
// UserBehavior 用户行为日志
|
|
UserBehavior(context.Context, *UserBehaviorReq, *UserBehaviorRes) error
|
|
// RewardPushLog 奖品推送日志
|
|
RewardPushLog(context.Context, *RewardPushLogReq, *RewardPushLogRes) error
|
|
}
|
|
|
|
func RegisterWScriptHandler(s server.Server, hdlr WScriptHandler, opts ...server.HandlerOption) error {
|
|
type wScript interface {
|
|
Boot(ctx context.Context, in *BootReq, out *BootRes) error
|
|
RefreshDayLimit(ctx context.Context, in *RefreshDayLimitReq, out *RefreshDayLimitRes) error
|
|
NotifyList(ctx context.Context, in *NotifyListReq, out *NotifyListRes) error
|
|
EtcdKey(ctx context.Context, in *EtcdKeyReq, out *EtcdKeyRes) error
|
|
EventFlow(ctx context.Context, in *EventFlowReq, out *EventFlowRes) error
|
|
ClearDevice(ctx context.Context, in *ClearDeviceReq, out *ClearDeviceRes) error
|
|
RefreshView(ctx context.Context, in *RefreshViewReq, out *RefreshViewRes) error
|
|
ErrLog(ctx context.Context, in *ErrLogReq, out *ErrLogRes) error
|
|
PointsLog(ctx context.Context, in *PointsLogReq, out *PointsLogRes) error
|
|
UserBehavior(ctx context.Context, in *UserBehaviorReq, out *UserBehaviorRes) error
|
|
RewardPushLog(ctx context.Context, in *RewardPushLogReq, out *RewardPushLogRes) error
|
|
}
|
|
type WScript struct {
|
|
wScript
|
|
}
|
|
h := &wScriptHandler{hdlr}
|
|
return s.Handle(s.NewHandler(&WScript{h}, opts...))
|
|
}
|
|
|
|
type wScriptHandler struct {
|
|
WScriptHandler
|
|
}
|
|
|
|
func (h *wScriptHandler) Boot(ctx context.Context, in *BootReq, out *BootRes) error {
|
|
return h.WScriptHandler.Boot(ctx, in, out)
|
|
}
|
|
|
|
func (h *wScriptHandler) RefreshDayLimit(ctx context.Context, in *RefreshDayLimitReq, out *RefreshDayLimitRes) error {
|
|
return h.WScriptHandler.RefreshDayLimit(ctx, in, out)
|
|
}
|
|
|
|
func (h *wScriptHandler) NotifyList(ctx context.Context, in *NotifyListReq, out *NotifyListRes) error {
|
|
return h.WScriptHandler.NotifyList(ctx, in, out)
|
|
}
|
|
|
|
func (h *wScriptHandler) EtcdKey(ctx context.Context, in *EtcdKeyReq, out *EtcdKeyRes) error {
|
|
return h.WScriptHandler.EtcdKey(ctx, in, out)
|
|
}
|
|
|
|
func (h *wScriptHandler) EventFlow(ctx context.Context, in *EventFlowReq, out *EventFlowRes) error {
|
|
return h.WScriptHandler.EventFlow(ctx, in, out)
|
|
}
|
|
|
|
func (h *wScriptHandler) ClearDevice(ctx context.Context, in *ClearDeviceReq, out *ClearDeviceRes) error {
|
|
return h.WScriptHandler.ClearDevice(ctx, in, out)
|
|
}
|
|
|
|
func (h *wScriptHandler) RefreshView(ctx context.Context, in *RefreshViewReq, out *RefreshViewRes) error {
|
|
return h.WScriptHandler.RefreshView(ctx, in, out)
|
|
}
|
|
|
|
func (h *wScriptHandler) ErrLog(ctx context.Context, in *ErrLogReq, out *ErrLogRes) error {
|
|
return h.WScriptHandler.ErrLog(ctx, in, out)
|
|
}
|
|
|
|
func (h *wScriptHandler) PointsLog(ctx context.Context, in *PointsLogReq, out *PointsLogRes) error {
|
|
return h.WScriptHandler.PointsLog(ctx, in, out)
|
|
}
|
|
|
|
func (h *wScriptHandler) UserBehavior(ctx context.Context, in *UserBehaviorReq, out *UserBehaviorRes) error {
|
|
return h.WScriptHandler.UserBehavior(ctx, in, out)
|
|
}
|
|
|
|
func (h *wScriptHandler) RewardPushLog(ctx context.Context, in *RewardPushLogReq, out *RewardPushLogRes) error {
|
|
return h.WScriptHandler.RewardPushLog(ctx, in, out)
|
|
}
|