// Code generated by protoc-gen-go-grpc. DO NOT EDIT. package base import ( context "context" common "git.ikuban.com/server/pw-protobuf/api/common" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 // BaseClient is the client API for Base service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type BaseClient interface { RandomNickname(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*RandomNicknameReply, error) RandomAvatar(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*RandomAvatarReply, error) // 随机介绍接口 RandomIntroduce(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*common.RandomIntroduceReply, error) // 随机头像列表 RandomAvatarList(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*RandomAvatarListReply, error) // 通过分组名和性别查询标签 FindTagListBySex(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*common.TagListReply, error) // 通过标签IDs查询标签 FindTagsByIDs(ctx context.Context, in *common.Ids, opts ...grpc.CallOption) (*common.TagListReply, error) // 通过类型获取表情包列表 FindMemeByType(ctx context.Context, in *common.MemeRequest, opts ...grpc.CallOption) (*common.MemeList, error) // 获取对方性别的聊天话题 FindChatTopic(ctx context.Context, in *common.FindChatTopicRequest, opts ...grpc.CallOption) (*common.ChatTopicList, error) // 随机表情包 RandomMeme(ctx context.Context, in *common.RandomNum, opts ...grpc.CallOption) (*common.CommonTextList, error) // 随机打招呼 RandomSwiftMessage(ctx context.Context, in *common.RandomNumAndSex, opts ...grpc.CallOption) (*common.CommonTextList, error) } type baseClient struct { cc grpc.ClientConnInterface } func NewBaseClient(cc grpc.ClientConnInterface) BaseClient { return &baseClient{cc} } func (c *baseClient) RandomNickname(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*RandomNicknameReply, error) { out := new(RandomNicknameReply) err := c.cc.Invoke(ctx, "/api.base.Base/RandomNickname", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *baseClient) RandomAvatar(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*RandomAvatarReply, error) { out := new(RandomAvatarReply) err := c.cc.Invoke(ctx, "/api.base.Base/RandomAvatar", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *baseClient) RandomIntroduce(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*common.RandomIntroduceReply, error) { out := new(common.RandomIntroduceReply) err := c.cc.Invoke(ctx, "/api.base.Base/RandomIntroduce", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *baseClient) RandomAvatarList(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*RandomAvatarListReply, error) { out := new(RandomAvatarListReply) err := c.cc.Invoke(ctx, "/api.base.Base/RandomAvatarList", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *baseClient) FindTagListBySex(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*common.TagListReply, error) { out := new(common.TagListReply) err := c.cc.Invoke(ctx, "/api.base.Base/FindTagListBySex", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *baseClient) FindTagsByIDs(ctx context.Context, in *common.Ids, opts ...grpc.CallOption) (*common.TagListReply, error) { out := new(common.TagListReply) err := c.cc.Invoke(ctx, "/api.base.Base/FindTagsByIDs", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *baseClient) FindMemeByType(ctx context.Context, in *common.MemeRequest, opts ...grpc.CallOption) (*common.MemeList, error) { out := new(common.MemeList) err := c.cc.Invoke(ctx, "/api.base.Base/FindMemeByType", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *baseClient) FindChatTopic(ctx context.Context, in *common.FindChatTopicRequest, opts ...grpc.CallOption) (*common.ChatTopicList, error) { out := new(common.ChatTopicList) err := c.cc.Invoke(ctx, "/api.base.Base/FindChatTopic", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *baseClient) RandomMeme(ctx context.Context, in *common.RandomNum, opts ...grpc.CallOption) (*common.CommonTextList, error) { out := new(common.CommonTextList) err := c.cc.Invoke(ctx, "/api.base.Base/RandomMeme", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *baseClient) RandomSwiftMessage(ctx context.Context, in *common.RandomNumAndSex, opts ...grpc.CallOption) (*common.CommonTextList, error) { out := new(common.CommonTextList) err := c.cc.Invoke(ctx, "/api.base.Base/RandomSwiftMessage", in, out, opts...) if err != nil { return nil, err } return out, nil } // BaseServer is the server API for Base service. // All implementations must embed UnimplementedBaseServer // for forward compatibility type BaseServer interface { RandomNickname(context.Context, *common.SexReq) (*RandomNicknameReply, error) RandomAvatar(context.Context, *common.SexReq) (*RandomAvatarReply, error) // 随机介绍接口 RandomIntroduce(context.Context, *common.SexReq) (*common.RandomIntroduceReply, error) // 随机头像列表 RandomAvatarList(context.Context, *common.SexReq) (*RandomAvatarListReply, error) // 通过分组名和性别查询标签 FindTagListBySex(context.Context, *common.SexReq) (*common.TagListReply, error) // 通过标签IDs查询标签 FindTagsByIDs(context.Context, *common.Ids) (*common.TagListReply, error) // 通过类型获取表情包列表 FindMemeByType(context.Context, *common.MemeRequest) (*common.MemeList, error) // 获取对方性别的聊天话题 FindChatTopic(context.Context, *common.FindChatTopicRequest) (*common.ChatTopicList, error) // 随机表情包 RandomMeme(context.Context, *common.RandomNum) (*common.CommonTextList, error) // 随机打招呼 RandomSwiftMessage(context.Context, *common.RandomNumAndSex) (*common.CommonTextList, error) mustEmbedUnimplementedBaseServer() } // UnimplementedBaseServer must be embedded to have forward compatible implementations. type UnimplementedBaseServer struct { } func (UnimplementedBaseServer) RandomNickname(context.Context, *common.SexReq) (*RandomNicknameReply, error) { return nil, status.Errorf(codes.Unimplemented, "method RandomNickname not implemented") } func (UnimplementedBaseServer) RandomAvatar(context.Context, *common.SexReq) (*RandomAvatarReply, error) { return nil, status.Errorf(codes.Unimplemented, "method RandomAvatar not implemented") } func (UnimplementedBaseServer) RandomIntroduce(context.Context, *common.SexReq) (*common.RandomIntroduceReply, error) { return nil, status.Errorf(codes.Unimplemented, "method RandomIntroduce not implemented") } func (UnimplementedBaseServer) RandomAvatarList(context.Context, *common.SexReq) (*RandomAvatarListReply, error) { return nil, status.Errorf(codes.Unimplemented, "method RandomAvatarList not implemented") } func (UnimplementedBaseServer) FindTagListBySex(context.Context, *common.SexReq) (*common.TagListReply, error) { return nil, status.Errorf(codes.Unimplemented, "method FindTagListBySex not implemented") } func (UnimplementedBaseServer) FindTagsByIDs(context.Context, *common.Ids) (*common.TagListReply, error) { return nil, status.Errorf(codes.Unimplemented, "method FindTagsByIDs not implemented") } func (UnimplementedBaseServer) FindMemeByType(context.Context, *common.MemeRequest) (*common.MemeList, error) { return nil, status.Errorf(codes.Unimplemented, "method FindMemeByType not implemented") } func (UnimplementedBaseServer) FindChatTopic(context.Context, *common.FindChatTopicRequest) (*common.ChatTopicList, error) { return nil, status.Errorf(codes.Unimplemented, "method FindChatTopic not implemented") } func (UnimplementedBaseServer) RandomMeme(context.Context, *common.RandomNum) (*common.CommonTextList, error) { return nil, status.Errorf(codes.Unimplemented, "method RandomMeme not implemented") } func (UnimplementedBaseServer) RandomSwiftMessage(context.Context, *common.RandomNumAndSex) (*common.CommonTextList, error) { return nil, status.Errorf(codes.Unimplemented, "method RandomSwiftMessage not implemented") } func (UnimplementedBaseServer) mustEmbedUnimplementedBaseServer() {} // UnsafeBaseServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to BaseServer will // result in compilation errors. type UnsafeBaseServer interface { mustEmbedUnimplementedBaseServer() } func RegisterBaseServer(s grpc.ServiceRegistrar, srv BaseServer) { s.RegisterService(&Base_ServiceDesc, srv) } func _Base_RandomNickname_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(common.SexReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BaseServer).RandomNickname(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/api.base.Base/RandomNickname", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BaseServer).RandomNickname(ctx, req.(*common.SexReq)) } return interceptor(ctx, in, info, handler) } func _Base_RandomAvatar_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(common.SexReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BaseServer).RandomAvatar(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/api.base.Base/RandomAvatar", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BaseServer).RandomAvatar(ctx, req.(*common.SexReq)) } return interceptor(ctx, in, info, handler) } func _Base_RandomIntroduce_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(common.SexReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BaseServer).RandomIntroduce(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/api.base.Base/RandomIntroduce", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BaseServer).RandomIntroduce(ctx, req.(*common.SexReq)) } return interceptor(ctx, in, info, handler) } func _Base_RandomAvatarList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(common.SexReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BaseServer).RandomAvatarList(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/api.base.Base/RandomAvatarList", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BaseServer).RandomAvatarList(ctx, req.(*common.SexReq)) } return interceptor(ctx, in, info, handler) } func _Base_FindTagListBySex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(common.SexReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BaseServer).FindTagListBySex(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/api.base.Base/FindTagListBySex", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BaseServer).FindTagListBySex(ctx, req.(*common.SexReq)) } return interceptor(ctx, in, info, handler) } func _Base_FindTagsByIDs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(common.Ids) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BaseServer).FindTagsByIDs(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/api.base.Base/FindTagsByIDs", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BaseServer).FindTagsByIDs(ctx, req.(*common.Ids)) } return interceptor(ctx, in, info, handler) } func _Base_FindMemeByType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(common.MemeRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BaseServer).FindMemeByType(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/api.base.Base/FindMemeByType", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BaseServer).FindMemeByType(ctx, req.(*common.MemeRequest)) } return interceptor(ctx, in, info, handler) } func _Base_FindChatTopic_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(common.FindChatTopicRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BaseServer).FindChatTopic(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/api.base.Base/FindChatTopic", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BaseServer).FindChatTopic(ctx, req.(*common.FindChatTopicRequest)) } return interceptor(ctx, in, info, handler) } func _Base_RandomMeme_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(common.RandomNum) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BaseServer).RandomMeme(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/api.base.Base/RandomMeme", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BaseServer).RandomMeme(ctx, req.(*common.RandomNum)) } return interceptor(ctx, in, info, handler) } func _Base_RandomSwiftMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(common.RandomNumAndSex) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BaseServer).RandomSwiftMessage(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/api.base.Base/RandomSwiftMessage", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BaseServer).RandomSwiftMessage(ctx, req.(*common.RandomNumAndSex)) } return interceptor(ctx, in, info, handler) } // Base_ServiceDesc is the grpc.ServiceDesc for Base service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Base_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.base.Base", HandlerType: (*BaseServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "RandomNickname", Handler: _Base_RandomNickname_Handler, }, { MethodName: "RandomAvatar", Handler: _Base_RandomAvatar_Handler, }, { MethodName: "RandomIntroduce", Handler: _Base_RandomIntroduce_Handler, }, { MethodName: "RandomAvatarList", Handler: _Base_RandomAvatarList_Handler, }, { MethodName: "FindTagListBySex", Handler: _Base_FindTagListBySex_Handler, }, { MethodName: "FindTagsByIDs", Handler: _Base_FindTagsByIDs_Handler, }, { MethodName: "FindMemeByType", Handler: _Base_FindMemeByType_Handler, }, { MethodName: "FindChatTopic", Handler: _Base_FindChatTopic_Handler, }, { MethodName: "RandomMeme", Handler: _Base_RandomMeme_Handler, }, { MethodName: "RandomSwiftMessage", Handler: _Base_RandomSwiftMessage_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "base.proto", }