talkrpc

package
v0.0.0-...-b32e05d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TalkRpc_AddTalk_FullMethodName          = "/talkrpc.TalkRpc/AddTalk"
	TalkRpc_UpdateTalk_FullMethodName       = "/talkrpc.TalkRpc/UpdateTalk"
	TalkRpc_DeleteTalk_FullMethodName       = "/talkrpc.TalkRpc/DeleteTalk"
	TalkRpc_GetTalk_FullMethodName          = "/talkrpc.TalkRpc/GetTalk"
	TalkRpc_FindTalkList_FullMethodName     = "/talkrpc.TalkRpc/FindTalkList"
	TalkRpc_LikeTalk_FullMethodName         = "/talkrpc.TalkRpc/LikeTalk"
	TalkRpc_FindUserLikeTalk_FullMethodName = "/talkrpc.TalkRpc/FindUserLikeTalk"
)

Variables

View Source
var TalkRpc_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "talkrpc.TalkRpc",
	HandlerType: (*TalkRpcServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AddTalk",
			Handler:    _TalkRpc_AddTalk_Handler,
		},
		{
			MethodName: "UpdateTalk",
			Handler:    _TalkRpc_UpdateTalk_Handler,
		},
		{
			MethodName: "DeleteTalk",
			Handler:    _TalkRpc_DeleteTalk_Handler,
		},
		{
			MethodName: "GetTalk",
			Handler:    _TalkRpc_GetTalk_Handler,
		},
		{
			MethodName: "FindTalkList",
			Handler:    _TalkRpc_FindTalkList_Handler,
		},
		{
			MethodName: "LikeTalk",
			Handler:    _TalkRpc_LikeTalk_Handler,
		},
		{
			MethodName: "FindUserLikeTalk",
			Handler:    _TalkRpc_FindUserLikeTalk_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "talk.proto",
}

TalkRpc_ServiceDesc is the grpc.ServiceDesc for TalkRpc service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterTalkRpcServer

func RegisterTalkRpcServer(s grpc.ServiceRegistrar, srv TalkRpcServer)

Types

type BatchResp

type BatchResp struct {
	SuccessCount int64 `protobuf:"varint,1,opt,name=success_count,json=successCount,proto3" json:"success_count,omitempty"`
	// contains filtered or unexported fields
}

func (*BatchResp) Descriptor deprecated

func (*BatchResp) Descriptor() ([]byte, []int)

Deprecated: Use BatchResp.ProtoReflect.Descriptor instead.

func (*BatchResp) GetSuccessCount

func (x *BatchResp) GetSuccessCount() int64

func (*BatchResp) ProtoMessage

func (*BatchResp) ProtoMessage()

func (*BatchResp) ProtoReflect

func (x *BatchResp) ProtoReflect() protoreflect.Message

func (*BatchResp) Reset

func (x *BatchResp) Reset()

func (*BatchResp) String

func (x *BatchResp) String() string

type CountResp

type CountResp struct {
	Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
	// contains filtered or unexported fields
}

func (*CountResp) Descriptor deprecated

func (*CountResp) Descriptor() ([]byte, []int)

Deprecated: Use CountResp.ProtoReflect.Descriptor instead.

func (*CountResp) GetCount

func (x *CountResp) GetCount() int64

func (*CountResp) ProtoMessage

func (*CountResp) ProtoMessage()

func (*CountResp) ProtoReflect

func (x *CountResp) ProtoReflect() protoreflect.Message

func (*CountResp) Reset

func (x *CountResp) Reset()

func (*CountResp) String

func (x *CountResp) String() string

type EmptyReq

type EmptyReq struct {
	// contains filtered or unexported fields
}

func (*EmptyReq) Descriptor deprecated

func (*EmptyReq) Descriptor() ([]byte, []int)

Deprecated: Use EmptyReq.ProtoReflect.Descriptor instead.

func (*EmptyReq) ProtoMessage

func (*EmptyReq) ProtoMessage()

func (*EmptyReq) ProtoReflect

func (x *EmptyReq) ProtoReflect() protoreflect.Message

func (*EmptyReq) Reset

func (x *EmptyReq) Reset()

func (*EmptyReq) String

func (x *EmptyReq) String() string

type EmptyResp

type EmptyResp struct {
	// contains filtered or unexported fields
}

func (*EmptyResp) Descriptor deprecated

func (*EmptyResp) Descriptor() ([]byte, []int)

Deprecated: Use EmptyResp.ProtoReflect.Descriptor instead.

func (*EmptyResp) ProtoMessage

func (*EmptyResp) ProtoMessage()

func (*EmptyResp) ProtoReflect

func (x *EmptyResp) ProtoReflect() protoreflect.Message

func (*EmptyResp) Reset

func (x *EmptyResp) Reset()

func (*EmptyResp) String

func (x *EmptyResp) String() string

type FindLikeTalkResp

type FindLikeTalkResp struct {
	LikeTalkList []int64 `protobuf:"varint,1,rep,packed,name=like_talk_list,json=likeTalkList,proto3" json:"like_talk_list,omitempty"`
	// contains filtered or unexported fields
}

func (*FindLikeTalkResp) Descriptor deprecated

func (*FindLikeTalkResp) Descriptor() ([]byte, []int)

Deprecated: Use FindLikeTalkResp.ProtoReflect.Descriptor instead.

func (*FindLikeTalkResp) GetLikeTalkList

func (x *FindLikeTalkResp) GetLikeTalkList() []int64

func (*FindLikeTalkResp) ProtoMessage

func (*FindLikeTalkResp) ProtoMessage()

func (*FindLikeTalkResp) ProtoReflect

func (x *FindLikeTalkResp) ProtoReflect() protoreflect.Message

func (*FindLikeTalkResp) Reset

func (x *FindLikeTalkResp) Reset()

func (*FindLikeTalkResp) String

func (x *FindLikeTalkResp) String() string

type FindTalkListReq

type FindTalkListReq struct {
	Page     int64    `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
	PageSize int64    `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	Sorts    []string `protobuf:"bytes,3,rep,name=sorts,proto3" json:"sorts,omitempty"`    // 排序
	Status   int64    `protobuf:"varint,6,opt,name=status,proto3" json:"status,omitempty"` // 状态 1.公开 2.私密
	// contains filtered or unexported fields
}

func (*FindTalkListReq) Descriptor deprecated

func (*FindTalkListReq) Descriptor() ([]byte, []int)

Deprecated: Use FindTalkListReq.ProtoReflect.Descriptor instead.

func (*FindTalkListReq) GetPage

func (x *FindTalkListReq) GetPage() int64

func (*FindTalkListReq) GetPageSize

func (x *FindTalkListReq) GetPageSize() int64

func (*FindTalkListReq) GetSorts

func (x *FindTalkListReq) GetSorts() []string

func (*FindTalkListReq) GetStatus

func (x *FindTalkListReq) GetStatus() int64

func (*FindTalkListReq) ProtoMessage

func (*FindTalkListReq) ProtoMessage()

func (*FindTalkListReq) ProtoReflect

func (x *FindTalkListReq) ProtoReflect() protoreflect.Message

func (*FindTalkListReq) Reset

func (x *FindTalkListReq) Reset()

func (*FindTalkListReq) String

func (x *FindTalkListReq) String() string

type FindTalkListResp

type FindTalkListResp struct {
	List  []*TalkDetails `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
	Total int64          `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
	// contains filtered or unexported fields
}

func (*FindTalkListResp) Descriptor deprecated

func (*FindTalkListResp) Descriptor() ([]byte, []int)

Deprecated: Use FindTalkListResp.ProtoReflect.Descriptor instead.

func (*FindTalkListResp) GetList

func (x *FindTalkListResp) GetList() []*TalkDetails

func (*FindTalkListResp) GetTotal

func (x *FindTalkListResp) GetTotal() int64

func (*FindTalkListResp) ProtoMessage

func (*FindTalkListResp) ProtoMessage()

func (*FindTalkListResp) ProtoReflect

func (x *FindTalkListResp) ProtoReflect() protoreflect.Message

func (*FindTalkListResp) Reset

func (x *FindTalkListResp) Reset()

func (*FindTalkListResp) String

func (x *FindTalkListResp) String() string

type IdReq

type IdReq struct {
	Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*IdReq) Descriptor deprecated

func (*IdReq) Descriptor() ([]byte, []int)

Deprecated: Use IdReq.ProtoReflect.Descriptor instead.

func (*IdReq) GetId

func (x *IdReq) GetId() int64

func (*IdReq) ProtoMessage

func (*IdReq) ProtoMessage()

func (*IdReq) ProtoReflect

func (x *IdReq) ProtoReflect() protoreflect.Message

func (*IdReq) Reset

func (x *IdReq) Reset()

func (*IdReq) String

func (x *IdReq) String() string

type IdsReq

type IdsReq struct {
	Ids []int64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"`
	// contains filtered or unexported fields
}

func (*IdsReq) Descriptor deprecated

func (*IdsReq) Descriptor() ([]byte, []int)

Deprecated: Use IdsReq.ProtoReflect.Descriptor instead.

func (*IdsReq) GetIds

func (x *IdsReq) GetIds() []int64

func (*IdsReq) ProtoMessage

func (*IdsReq) ProtoMessage()

func (*IdsReq) ProtoReflect

func (x *IdsReq) ProtoReflect() protoreflect.Message

func (*IdsReq) Reset

func (x *IdsReq) Reset()

func (*IdsReq) String

func (x *IdsReq) String() string

type TalkDetails

type TalkDetails struct {
	Id           int64    `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`                                          // 说说id
	UserId       string   `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`                     // 用户id
	Content      string   `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`                                 // 说说内容
	ImgList      []string `protobuf:"bytes,4,rep,name=img_list,json=imgList,proto3" json:"img_list,omitempty"`                  // 图片URL列表
	IsTop        int64    `protobuf:"varint,5,opt,name=is_top,json=isTop,proto3" json:"is_top,omitempty"`                       // 是否置顶
	Status       int64    `protobuf:"varint,6,opt,name=status,proto3" json:"status,omitempty"`                                  // 状态 1.公开 2.私密
	CreatedAt    int64    `protobuf:"varint,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`           // 创建时间
	UpdatedAt    int64    `protobuf:"varint,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`           // 更新时间
	LikeCount    int64    `protobuf:"varint,9,opt,name=like_count,json=likeCount,proto3" json:"like_count,omitempty"`           // 点赞量
	CommentCount int64    `protobuf:"varint,10,opt,name=comment_count,json=commentCount,proto3" json:"comment_count,omitempty"` // 评论量
	// contains filtered or unexported fields
}

func (*TalkDetails) Descriptor deprecated

func (*TalkDetails) Descriptor() ([]byte, []int)

Deprecated: Use TalkDetails.ProtoReflect.Descriptor instead.

func (*TalkDetails) GetCommentCount

func (x *TalkDetails) GetCommentCount() int64

func (*TalkDetails) GetContent

func (x *TalkDetails) GetContent() string

func (*TalkDetails) GetCreatedAt

func (x *TalkDetails) GetCreatedAt() int64

func (*TalkDetails) GetId

func (x *TalkDetails) GetId() int64

func (*TalkDetails) GetImgList

func (x *TalkDetails) GetImgList() []string

func (*TalkDetails) GetIsTop

func (x *TalkDetails) GetIsTop() int64

func (*TalkDetails) GetLikeCount

func (x *TalkDetails) GetLikeCount() int64

func (*TalkDetails) GetStatus

func (x *TalkDetails) GetStatus() int64

func (*TalkDetails) GetUpdatedAt

func (x *TalkDetails) GetUpdatedAt() int64

func (*TalkDetails) GetUserId

func (x *TalkDetails) GetUserId() string

func (*TalkDetails) ProtoMessage

func (*TalkDetails) ProtoMessage()

func (*TalkDetails) ProtoReflect

func (x *TalkDetails) ProtoReflect() protoreflect.Message

func (*TalkDetails) Reset

func (x *TalkDetails) Reset()

func (*TalkDetails) String

func (x *TalkDetails) String() string

type TalkNewReq

type TalkNewReq struct {
	Id      int64    `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`                         // 说说id
	UserId  string   `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`    // 用户id
	Content string   `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`                // 说说内容
	ImgList []string `protobuf:"bytes,4,rep,name=img_list,json=imgList,proto3" json:"img_list,omitempty"` // 图片URL列表
	IsTop   int64    `protobuf:"varint,5,opt,name=is_top,json=isTop,proto3" json:"is_top,omitempty"`      // 是否置顶
	Status  int64    `protobuf:"varint,6,opt,name=status,proto3" json:"status,omitempty"`                 // 状态 1.公开 2.私密
	// contains filtered or unexported fields
}

************* blog 说说管理 *************

func (*TalkNewReq) Descriptor deprecated

func (*TalkNewReq) Descriptor() ([]byte, []int)

Deprecated: Use TalkNewReq.ProtoReflect.Descriptor instead.

func (*TalkNewReq) GetContent

func (x *TalkNewReq) GetContent() string

func (*TalkNewReq) GetId

func (x *TalkNewReq) GetId() int64

func (*TalkNewReq) GetImgList

func (x *TalkNewReq) GetImgList() []string

func (*TalkNewReq) GetIsTop

func (x *TalkNewReq) GetIsTop() int64

func (*TalkNewReq) GetStatus

func (x *TalkNewReq) GetStatus() int64

func (*TalkNewReq) GetUserId

func (x *TalkNewReq) GetUserId() string

func (*TalkNewReq) ProtoMessage

func (*TalkNewReq) ProtoMessage()

func (*TalkNewReq) ProtoReflect

func (x *TalkNewReq) ProtoReflect() protoreflect.Message

func (*TalkNewReq) Reset

func (x *TalkNewReq) Reset()

func (*TalkNewReq) String

func (x *TalkNewReq) String() string

type TalkRpcClient

type TalkRpcClient interface {
	// 创建说说
	AddTalk(ctx context.Context, in *TalkNewReq, opts ...grpc.CallOption) (*TalkDetails, error)
	// 更新说说
	UpdateTalk(ctx context.Context, in *TalkNewReq, opts ...grpc.CallOption) (*TalkDetails, error)
	// 删除说说
	DeleteTalk(ctx context.Context, in *IdsReq, opts ...grpc.CallOption) (*BatchResp, error)
	// 查询说说
	GetTalk(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*TalkDetails, error)
	// 查询说说列表
	FindTalkList(ctx context.Context, in *FindTalkListReq, opts ...grpc.CallOption) (*FindTalkListResp, error)
	// 点赞说说
	LikeTalk(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*EmptyResp, error)
	// 用户点赞的说说
	FindUserLikeTalk(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*FindLikeTalkResp, error)
}

TalkRpcClient is the client API for TalkRpc 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.

func NewTalkRpcClient

func NewTalkRpcClient(cc grpc.ClientConnInterface) TalkRpcClient

type TalkRpcServer

type TalkRpcServer interface {
	// 创建说说
	AddTalk(context.Context, *TalkNewReq) (*TalkDetails, error)
	// 更新说说
	UpdateTalk(context.Context, *TalkNewReq) (*TalkDetails, error)
	// 删除说说
	DeleteTalk(context.Context, *IdsReq) (*BatchResp, error)
	// 查询说说
	GetTalk(context.Context, *IdReq) (*TalkDetails, error)
	// 查询说说列表
	FindTalkList(context.Context, *FindTalkListReq) (*FindTalkListResp, error)
	// 点赞说说
	LikeTalk(context.Context, *IdReq) (*EmptyResp, error)
	// 用户点赞的说说
	FindUserLikeTalk(context.Context, *UserIdReq) (*FindLikeTalkResp, error)
	// contains filtered or unexported methods
}

TalkRpcServer is the server API for TalkRpc service. All implementations must embed UnimplementedTalkRpcServer for forward compatibility

type UnimplementedTalkRpcServer

type UnimplementedTalkRpcServer struct {
}

UnimplementedTalkRpcServer must be embedded to have forward compatible implementations.

func (UnimplementedTalkRpcServer) AddTalk

func (UnimplementedTalkRpcServer) DeleteTalk

func (UnimplementedTalkRpcServer) FindTalkList

func (UnimplementedTalkRpcServer) FindUserLikeTalk

func (UnimplementedTalkRpcServer) GetTalk

func (UnimplementedTalkRpcServer) LikeTalk

func (UnimplementedTalkRpcServer) UpdateTalk

type UnsafeTalkRpcServer

type UnsafeTalkRpcServer interface {
	// contains filtered or unexported methods
}

UnsafeTalkRpcServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TalkRpcServer will result in compilation errors.

type UserIdReq

type UserIdReq struct {
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

func (*UserIdReq) Descriptor deprecated

func (*UserIdReq) Descriptor() ([]byte, []int)

Deprecated: Use UserIdReq.ProtoReflect.Descriptor instead.

func (*UserIdReq) GetUserId

func (x *UserIdReq) GetUserId() string

func (*UserIdReq) ProtoMessage

func (*UserIdReq) ProtoMessage()

func (*UserIdReq) ProtoReflect

func (x *UserIdReq) ProtoReflect() protoreflect.Message

func (*UserIdReq) Reset

func (x *UserIdReq) Reset()

func (*UserIdReq) String

func (x *UserIdReq) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL