// Code generated by protoc-gen-liverpc v0.1, DO NOT EDIT. // source: v1/UnionFans.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/UnionFans.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: // =================== // UnionFans Interface // =================== type UnionFans interface { // * 获取友爱社礼包提示 // GetSendGift(context.Context, *UnionFansGetSendGiftReq) (*UnionFansGetSendGiftResp, error) // * 查询用户特殊勋章样式 // GetSpecialMedal(context.Context, *UnionFansGetSpecialMedalReq) (*UnionFansGetSpecialMedalResp, error) } // ========================= // UnionFans Live Rpc Client // ========================= type unionFansRpcClient struct { client *liverpc.Client } // NewUnionFansRpcClient creates a Rpc client that implements the UnionFans interface. // It communicates using Rpc and can be configured with a custom HTTPClient. func NewUnionFansRpcClient(client *liverpc.Client) UnionFans { return &unionFansRpcClient{ client: client, } } func (c *unionFansRpcClient) GetSendGift(ctx context.Context, in *UnionFansGetSendGiftReq) (*UnionFansGetSendGiftResp, error) { out := new(UnionFansGetSendGiftResp) err := doRpcRequest(ctx, c.client, 1, "UnionFans.getSendGift", in, out) if err != nil { return nil, err } return out, nil } func (c *unionFansRpcClient) GetSpecialMedal(ctx context.Context, in *UnionFansGetSpecialMedalReq) (*UnionFansGetSpecialMedalResp, error) { out := new(UnionFansGetSpecialMedalResp) err := doRpcRequest(ctx, c.client, 1, "UnionFans.getSpecialMedal", in, out) 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) (err error) { err = client.Call(ctx, version, method, in, out) return }