代码拉取完成,页面将自动刷新
// Code generated by Kitex v0.4.4. DO NOT EDIT.
package favoriteservice
import (
"context"
favorite_rpc "gitee.com/derrickball/douyin/app/favorite/kitex_gen/favorite_rpc"
client "github.com/cloudwego/kitex/client"
callopt "github.com/cloudwego/kitex/client/callopt"
)
// Client is designed to provide IDL-compatible methods with call-option parameter for kitex framework.
type Client interface {
CreateFavorite(ctx context.Context, Req *favorite_rpc.RPCFavoriteCreateReq, callOptions ...callopt.Option) (r *favorite_rpc.RPCFavoriteCreateResp, err error)
DelFavorite(ctx context.Context, Req *favorite_rpc.RPCFavoriteDelReq, callOptions ...callopt.Option) (r *favorite_rpc.RPCFavoriteDelResp, err error)
FavoriteList(ctx context.Context, Req *favorite_rpc.RPCFavoriteListReq, callOptions ...callopt.Option) (r *favorite_rpc.RPCFavoriteListResp, err error)
FilterFavorite(ctx context.Context, Req *favorite_rpc.RPCFilterFavoriteReq, callOptions ...callopt.Option) (r *favorite_rpc.RPCFilterFavoriteResp, err error)
}
// NewClient creates a client for the service defined in IDL.
func NewClient(destService string, opts ...client.Option) (Client, error) {
var options []client.Option
options = append(options, client.WithDestService(destService))
options = append(options, opts...)
kc, err := client.NewClient(serviceInfo(), options...)
if err != nil {
return nil, err
}
return &kFavoriteServiceClient{
kClient: newServiceClient(kc),
}, nil
}
// MustNewClient creates a client for the service defined in IDL. It panics if any error occurs.
func MustNewClient(destService string, opts ...client.Option) Client {
kc, err := NewClient(destService, opts...)
if err != nil {
panic(err)
}
return kc
}
type kFavoriteServiceClient struct {
*kClient
}
func (p *kFavoriteServiceClient) CreateFavorite(ctx context.Context, Req *favorite_rpc.RPCFavoriteCreateReq, callOptions ...callopt.Option) (r *favorite_rpc.RPCFavoriteCreateResp, err error) {
ctx = client.NewCtxWithCallOptions(ctx, callOptions)
return p.kClient.CreateFavorite(ctx, Req)
}
func (p *kFavoriteServiceClient) DelFavorite(ctx context.Context, Req *favorite_rpc.RPCFavoriteDelReq, callOptions ...callopt.Option) (r *favorite_rpc.RPCFavoriteDelResp, err error) {
ctx = client.NewCtxWithCallOptions(ctx, callOptions)
return p.kClient.DelFavorite(ctx, Req)
}
func (p *kFavoriteServiceClient) FavoriteList(ctx context.Context, Req *favorite_rpc.RPCFavoriteListReq, callOptions ...callopt.Option) (r *favorite_rpc.RPCFavoriteListResp, err error) {
ctx = client.NewCtxWithCallOptions(ctx, callOptions)
return p.kClient.FavoriteList(ctx, Req)
}
func (p *kFavoriteServiceClient) FilterFavorite(ctx context.Context, Req *favorite_rpc.RPCFilterFavoriteReq, callOptions ...callopt.Option) (r *favorite_rpc.RPCFilterFavoriteResp, err error) {
ctx = client.NewCtxWithCallOptions(ctx, callOptions)
return p.kClient.FilterFavorite(ctx, Req)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。