65 lines
1.6 KiB
Go
65 lines
1.6 KiB
Go
|
// Code generated by protoc-gen-liverpc v0.1, DO NOT EDIT.
|
||
|
// source: v1/Achv.proto
|
||
|
|
||
|
/*
|
||
|
Package v1 is a generated liverpc stub package.
|
||
|
This code was generated with go-common/app/tool/liverpc/protoc-gen-liverpc v0.1.
|
||
|
|
||
|
It is generated from these files:
|
||
|
v1/Achv.proto
|
||
|
v1/TitleStuff.proto
|
||
|
v1/UserTitle.proto
|
||
|
*/
|
||
|
package v1
|
||
|
|
||
|
import context "context"
|
||
|
|
||
|
import proto "github.com/golang/protobuf/proto"
|
||
|
import "go-common/library/net/rpc/liverpc"
|
||
|
|
||
|
var _ proto.Message // generate to suppress unused imports
|
||
|
// Imports only used by utility functions:
|
||
|
|
||
|
// ==============
|
||
|
// Achv Interface
|
||
|
// ==============
|
||
|
|
||
|
type AchvRPCClient interface {
|
||
|
// * 用户成就统计
|
||
|
// 用户成就统计
|
||
|
Userstatus(ctx context.Context, req *AchvUserstatusReq, opts ...liverpc.CallOption) (resp *AchvUserstatusResp, err error)
|
||
|
}
|
||
|
|
||
|
// ====================
|
||
|
// Achv Live Rpc Client
|
||
|
// ====================
|
||
|
|
||
|
type achvRPCClient struct {
|
||
|
client *liverpc.Client
|
||
|
}
|
||
|
|
||
|
// NewAchvRPCClient creates a client that implements the AchvRPCClient interface.
|
||
|
func NewAchvRPCClient(client *liverpc.Client) AchvRPCClient {
|
||
|
return &achvRPCClient{
|
||
|
client: client,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func (c *achvRPCClient) Userstatus(ctx context.Context, in *AchvUserstatusReq, opts ...liverpc.CallOption) (*AchvUserstatusResp, error) {
|
||
|
out := new(AchvUserstatusResp)
|
||
|
err := doRPCRequest(ctx, c.client, 1, "Achv.userstatus", in, out, opts)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
// =====
|
||
|
// Utils
|
||
|
// =====
|
||
|
|
||
|
func doRPCRequest(ctx context.Context, client *liverpc.Client, version int, method string, in, out proto.Message, opts []liverpc.CallOption) (err error) {
|
||
|
err = client.Call(ctx, version, method, in, out, opts...)
|
||
|
return
|
||
|
}
|