// Code generated by protoc-gen-liverpc v0.1, DO NOT EDIT. // source: v0/Captcha.proto /* Package v0 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: v0/Captcha.proto */ package v0 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: // ================= // Captcha Interface // ================= type CaptchaRPCClient interface { // * 校验验证码 // Check(ctx context.Context, req *CaptchaCheckReq, opts ...liverpc.CallOption) (resp *CaptchaCheckResp, err error) } // ======================= // Captcha Live Rpc Client // ======================= type captchaRPCClient struct { client *liverpc.Client } // NewCaptchaRPCClient creates a client that implements the CaptchaRPCClient interface. func NewCaptchaRPCClient(client *liverpc.Client) CaptchaRPCClient { return &captchaRPCClient{ client: client, } } func (c *captchaRPCClient) Check(ctx context.Context, in *CaptchaCheckReq, opts ...liverpc.CallOption) (*CaptchaCheckResp, error) { out := new(CaptchaCheckResp) err := doRPCRequest(ctx, c.client, 0, "Captcha.check", 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 }