| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496 |
- // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
- // versions:
- // - protoc-gen-go-grpc v1.3.0
- // - protoc v4.22.3
- // source: basics.proto
- package basics
- 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
- const (
- Basics_RandomNickname_FullMethodName = "/api.basics.Basics/RandomNickname"
- Basics_RandomAvatar_FullMethodName = "/api.basics.Basics/RandomAvatar"
- Basics_RandomIntroduce_FullMethodName = "/api.basics.Basics/RandomIntroduce"
- Basics_BannerConf_FullMethodName = "/api.basics.Basics/BannerConf"
- Basics_RandomAvatarList_FullMethodName = "/api.basics.Basics/RandomAvatarList"
- Basics_FindTagListBySex_FullMethodName = "/api.basics.Basics/FindTagListBySex"
- Basics_FindTagsByIDs_FullMethodName = "/api.basics.Basics/FindTagsByIDs"
- Basics_FindMemeByType_FullMethodName = "/api.basics.Basics/FindMemeByType"
- Basics_FindChatTopic_FullMethodName = "/api.basics.Basics/FindChatTopic"
- Basics_RandomMeme_FullMethodName = "/api.basics.Basics/RandomMeme"
- Basics_RandomSwiftMessage_FullMethodName = "/api.basics.Basics/RandomSwiftMessage"
- )
- // BasicsClient is the client API for Basics 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 BasicsClient 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)
- BannerConf(ctx context.Context, in *BannerConfRequest, opts ...grpc.CallOption) (*BannerConfReply, 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 basicsClient struct {
- cc grpc.ClientConnInterface
- }
- func NewBasicsClient(cc grpc.ClientConnInterface) BasicsClient {
- return &basicsClient{cc}
- }
- func (c *basicsClient) RandomNickname(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*RandomNicknameReply, error) {
- out := new(RandomNicknameReply)
- err := c.cc.Invoke(ctx, Basics_RandomNickname_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *basicsClient) RandomAvatar(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*RandomAvatarReply, error) {
- out := new(RandomAvatarReply)
- err := c.cc.Invoke(ctx, Basics_RandomAvatar_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *basicsClient) RandomIntroduce(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*common.RandomIntroduceReply, error) {
- out := new(common.RandomIntroduceReply)
- err := c.cc.Invoke(ctx, Basics_RandomIntroduce_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *basicsClient) BannerConf(ctx context.Context, in *BannerConfRequest, opts ...grpc.CallOption) (*BannerConfReply, error) {
- out := new(BannerConfReply)
- err := c.cc.Invoke(ctx, Basics_BannerConf_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *basicsClient) RandomAvatarList(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*RandomAvatarListReply, error) {
- out := new(RandomAvatarListReply)
- err := c.cc.Invoke(ctx, Basics_RandomAvatarList_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *basicsClient) FindTagListBySex(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*common.TagListReply, error) {
- out := new(common.TagListReply)
- err := c.cc.Invoke(ctx, Basics_FindTagListBySex_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *basicsClient) FindTagsByIDs(ctx context.Context, in *common.Ids, opts ...grpc.CallOption) (*common.TagListReply, error) {
- out := new(common.TagListReply)
- err := c.cc.Invoke(ctx, Basics_FindTagsByIDs_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *basicsClient) FindMemeByType(ctx context.Context, in *common.MemeRequest, opts ...grpc.CallOption) (*common.MemeList, error) {
- out := new(common.MemeList)
- err := c.cc.Invoke(ctx, Basics_FindMemeByType_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *basicsClient) FindChatTopic(ctx context.Context, in *common.FindChatTopicRequest, opts ...grpc.CallOption) (*common.ChatTopicList, error) {
- out := new(common.ChatTopicList)
- err := c.cc.Invoke(ctx, Basics_FindChatTopic_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *basicsClient) RandomMeme(ctx context.Context, in *common.RandomNum, opts ...grpc.CallOption) (*common.CommonTextList, error) {
- out := new(common.CommonTextList)
- err := c.cc.Invoke(ctx, Basics_RandomMeme_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *basicsClient) RandomSwiftMessage(ctx context.Context, in *common.RandomNumAndSex, opts ...grpc.CallOption) (*common.CommonTextList, error) {
- out := new(common.CommonTextList)
- err := c.cc.Invoke(ctx, Basics_RandomSwiftMessage_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- // BasicsServer is the server API for Basics service.
- // All implementations must embed UnimplementedBasicsServer
- // for forward compatibility
- type BasicsServer interface {
- RandomNickname(context.Context, *common.SexReq) (*RandomNicknameReply, error)
- RandomAvatar(context.Context, *common.SexReq) (*RandomAvatarReply, error)
- // 随机介绍接口
- RandomIntroduce(context.Context, *common.SexReq) (*common.RandomIntroduceReply, error)
- BannerConf(context.Context, *BannerConfRequest) (*BannerConfReply, 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)
- mustEmbedUnimplementedBasicsServer()
- }
- // UnimplementedBasicsServer must be embedded to have forward compatible implementations.
- type UnimplementedBasicsServer struct {
- }
- func (UnimplementedBasicsServer) RandomNickname(context.Context, *common.SexReq) (*RandomNicknameReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method RandomNickname not implemented")
- }
- func (UnimplementedBasicsServer) RandomAvatar(context.Context, *common.SexReq) (*RandomAvatarReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method RandomAvatar not implemented")
- }
- func (UnimplementedBasicsServer) RandomIntroduce(context.Context, *common.SexReq) (*common.RandomIntroduceReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method RandomIntroduce not implemented")
- }
- func (UnimplementedBasicsServer) BannerConf(context.Context, *BannerConfRequest) (*BannerConfReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method BannerConf not implemented")
- }
- func (UnimplementedBasicsServer) RandomAvatarList(context.Context, *common.SexReq) (*RandomAvatarListReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method RandomAvatarList not implemented")
- }
- func (UnimplementedBasicsServer) FindTagListBySex(context.Context, *common.SexReq) (*common.TagListReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method FindTagListBySex not implemented")
- }
- func (UnimplementedBasicsServer) FindTagsByIDs(context.Context, *common.Ids) (*common.TagListReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method FindTagsByIDs not implemented")
- }
- func (UnimplementedBasicsServer) FindMemeByType(context.Context, *common.MemeRequest) (*common.MemeList, error) {
- return nil, status.Errorf(codes.Unimplemented, "method FindMemeByType not implemented")
- }
- func (UnimplementedBasicsServer) FindChatTopic(context.Context, *common.FindChatTopicRequest) (*common.ChatTopicList, error) {
- return nil, status.Errorf(codes.Unimplemented, "method FindChatTopic not implemented")
- }
- func (UnimplementedBasicsServer) RandomMeme(context.Context, *common.RandomNum) (*common.CommonTextList, error) {
- return nil, status.Errorf(codes.Unimplemented, "method RandomMeme not implemented")
- }
- func (UnimplementedBasicsServer) RandomSwiftMessage(context.Context, *common.RandomNumAndSex) (*common.CommonTextList, error) {
- return nil, status.Errorf(codes.Unimplemented, "method RandomSwiftMessage not implemented")
- }
- func (UnimplementedBasicsServer) mustEmbedUnimplementedBasicsServer() {}
- // UnsafeBasicsServer may be embedded to opt out of forward compatibility for this service.
- // Use of this interface is not recommended, as added methods to BasicsServer will
- // result in compilation errors.
- type UnsafeBasicsServer interface {
- mustEmbedUnimplementedBasicsServer()
- }
- func RegisterBasicsServer(s grpc.ServiceRegistrar, srv BasicsServer) {
- s.RegisterService(&Basics_ServiceDesc, srv)
- }
- func _Basics_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.(BasicsServer).RandomNickname(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: Basics_RandomNickname_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(BasicsServer).RandomNickname(ctx, req.(*common.SexReq))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Basics_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.(BasicsServer).RandomAvatar(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: Basics_RandomAvatar_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(BasicsServer).RandomAvatar(ctx, req.(*common.SexReq))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Basics_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.(BasicsServer).RandomIntroduce(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: Basics_RandomIntroduce_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(BasicsServer).RandomIntroduce(ctx, req.(*common.SexReq))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Basics_BannerConf_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(BannerConfRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(BasicsServer).BannerConf(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: Basics_BannerConf_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(BasicsServer).BannerConf(ctx, req.(*BannerConfRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Basics_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.(BasicsServer).RandomAvatarList(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: Basics_RandomAvatarList_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(BasicsServer).RandomAvatarList(ctx, req.(*common.SexReq))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Basics_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.(BasicsServer).FindTagListBySex(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: Basics_FindTagListBySex_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(BasicsServer).FindTagListBySex(ctx, req.(*common.SexReq))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Basics_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.(BasicsServer).FindTagsByIDs(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: Basics_FindTagsByIDs_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(BasicsServer).FindTagsByIDs(ctx, req.(*common.Ids))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Basics_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.(BasicsServer).FindMemeByType(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: Basics_FindMemeByType_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(BasicsServer).FindMemeByType(ctx, req.(*common.MemeRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Basics_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.(BasicsServer).FindChatTopic(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: Basics_FindChatTopic_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(BasicsServer).FindChatTopic(ctx, req.(*common.FindChatTopicRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Basics_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.(BasicsServer).RandomMeme(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: Basics_RandomMeme_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(BasicsServer).RandomMeme(ctx, req.(*common.RandomNum))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Basics_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.(BasicsServer).RandomSwiftMessage(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: Basics_RandomSwiftMessage_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(BasicsServer).RandomSwiftMessage(ctx, req.(*common.RandomNumAndSex))
- }
- return interceptor(ctx, in, info, handler)
- }
- // Basics_ServiceDesc is the grpc.ServiceDesc for Basics service.
- // It's only intended for direct use with grpc.RegisterService,
- // and not to be introspected or modified (even as a copy)
- var Basics_ServiceDesc = grpc.ServiceDesc{
- ServiceName: "api.basics.Basics",
- HandlerType: (*BasicsServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "RandomNickname",
- Handler: _Basics_RandomNickname_Handler,
- },
- {
- MethodName: "RandomAvatar",
- Handler: _Basics_RandomAvatar_Handler,
- },
- {
- MethodName: "RandomIntroduce",
- Handler: _Basics_RandomIntroduce_Handler,
- },
- {
- MethodName: "BannerConf",
- Handler: _Basics_BannerConf_Handler,
- },
- {
- MethodName: "RandomAvatarList",
- Handler: _Basics_RandomAvatarList_Handler,
- },
- {
- MethodName: "FindTagListBySex",
- Handler: _Basics_FindTagListBySex_Handler,
- },
- {
- MethodName: "FindTagsByIDs",
- Handler: _Basics_FindTagsByIDs_Handler,
- },
- {
- MethodName: "FindMemeByType",
- Handler: _Basics_FindMemeByType_Handler,
- },
- {
- MethodName: "FindChatTopic",
- Handler: _Basics_FindChatTopic_Handler,
- },
- {
- MethodName: "RandomMeme",
- Handler: _Basics_RandomMeme_Handler,
- },
- {
- MethodName: "RandomSwiftMessage",
- Handler: _Basics_RandomSwiftMessage_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "basics.proto",
- }
|