Documentation
¶
Index ¶
- Constants
- Variables
- type CommentServiceServer
- func (s *CommentServiceServer) BatchGetComment(ctx context.Context, req *v1.BatchGetCommentsRequest) (*v1.BatchGetCommentsReply, error)
- func (s *CommentServiceServer) CreateComment(ctx context.Context, req *v1.CreateCommentRequest) (*v1.CreateCommentReply, error)
- func (s *CommentServiceServer) DeleteComment(ctx context.Context, req *v1.DeleteCommentRequest) (*v1.DeleteCommentReply, error)
- func (s *CommentServiceServer) GetComment(ctx context.Context, req *v1.GetCommentRequest) (*v1.GetCommentReply, error)
- func (s *CommentServiceServer) ListHotComment(ctx context.Context, req *v1.ListCommentsRequest) (*v1.ListCommentsReply, error)
- func (s *CommentServiceServer) ListLatestComment(ctx context.Context, req *v1.ListCommentsRequest) (*v1.ListCommentsReply, error)
- func (s *CommentServiceServer) ListReplyComment(ctx context.Context, req *v1.ListReplyCommentsRequest) (*v1.ListReplyCommentsReply, error)
- func (s *CommentServiceServer) ReplyComment(ctx context.Context, req *v1.ReplyCommentRequest) (*v1.ReplyCommentReply, error)
- func (s *CommentServiceServer) UpdateComment(ctx context.Context, req *v1.UpdateCommentRequest) (*v1.UpdateCommentReply, error)
- type CommentType
- type DeleteType
- type IGreeterService
- type LikeServiceServer
- func (s *LikeServiceServer) BatchGetLikes(ctx context.Context, req *v1.BatchGetLikesRequest) (*v1.BatchGetLikesReply, error)
- func (s *LikeServiceServer) CreateLike(ctx context.Context, req *v1.CreateLikeRequest) (*v1.CreateLikeReply, error)
- func (s *LikeServiceServer) DeleteLike(ctx context.Context, req *v1.DeleteLikeRequest) (*v1.DeleteLikeReply, error)
- func (s *LikeServiceServer) GetLike(ctx context.Context, req *v1.GetLikeRequest) (*v1.GetLikeReply, error)
- func (s *LikeServiceServer) ListCommentLikes(ctx context.Context, req *v1.ListCommentLikesRequest) (*v1.ListCommentLikesReply, error)
- func (s *LikeServiceServer) ListPostLikes(ctx context.Context, req *v1.ListPostLikesRequest) (*v1.ListPostLikesReply, error)
- func (s *LikeServiceServer) UpdateLike(ctx context.Context, req *v1.UpdateLikeRequest) (*v1.UpdateLikeReply, error)
- type LikeStatus
- type LikeType
- type PostImage
- type PostServiceServer
- func (s *PostServiceServer) BatchGetPosts(ctx context.Context, req *v1.BatchGetPostsRequest) (*v1.BatchGetPostsReply, error)
- func (s *PostServiceServer) CreatePost(ctx context.Context, req *v1.CreatePostRequest) (*v1.CreatePostReply, error)
- func (s *PostServiceServer) DeletePost(ctx context.Context, req *v1.DeletePostRequest) (*v1.DeletePostReply, error)
- func (s *PostServiceServer) GetPost(ctx context.Context, req *v1.GetPostRequest) (*v1.GetPostReply, error)
- func (s *PostServiceServer) ListHotPosts(ctx context.Context, req *v1.ListHotPostsRequest) (*v1.ListHotPostsReply, error)
- func (s *PostServiceServer) ListLatestPosts(ctx context.Context, req *v1.ListLatestPostsRequest) (*v1.ListLatestPostsReply, error)
- func (s *PostServiceServer) ListMyPosts(ctx context.Context, req *v1.ListMyPostsRequest) (*v1.ListMyPostsReply, error)
- func (s *PostServiceServer) UpdatePost(ctx context.Context, req *v1.UpdatePostRequest) (*v1.UpdatePostReply, error)
- type PostText
- type PostType
- type PostVideo
- type Service
- type VisibleType
Constants ¶
View Source
const ( // LikeTypeUnknown 未知类型 LikeTypeUnknown LikeType = 0 // LikeTypePost 帖子 LikeTypePost LikeType = 1 // LikeTypeComment 评论 LikeTypeComment LikeType = 2 // LikeStatusDisliked 未点赞 LikeStatusDisliked LikeStatus = 0 // LikeStatusLiked 已点赞 LikeStatusLiked LikeStatus = 1 )
View Source
const ( // PostTypeUnknown Post 类型 PostTypeUnknown PostType = 0 // 未知 PostTypeText PostType = 1 // 文本 PostTypeImage PostType = 2 // 图片 PostTypeVideo PostType = 3 // 视频 DelFlagNormal DeleteType = 0 // 正常 DelFlagByUser DeleteType = 1 // 用户删除 DelFlagByAdmin DeleteType = 2 // 管理员删除 VisibleAll VisibleType = 0 // 公开 VisibleOnlySelf VisibleType = 1 // 仅自己可见 )
Variables ¶
View Source
var ProviderSet = wire.NewSet( NewPostServiceServer, NewCommentServiceServer, NewLikeServiceServer, )
ProviderSet is service providers.
Functions ¶
This section is empty.
Types ¶
type CommentServiceServer ¶
type CommentServiceServer struct { v1.UnimplementedCommentServiceServer // contains filtered or unexported fields }
func NewCommentServiceServer ¶
func NewCommentServiceServer( postRepo repository.PostInfoRepo, cmtInfoRepo repository.CommentInfoRepo, cmtContentRepo repository.CommentContentRepo, cmtLatestRepo repository.CommentLatestRepo, cmtTopRepo repository.CommentHotRepo, userCmtRepo repository.UserCommentRepo, ) *CommentServiceServer
func (*CommentServiceServer) BatchGetComment ¶
func (s *CommentServiceServer) BatchGetComment(ctx context.Context, req *v1.BatchGetCommentsRequest) (*v1.BatchGetCommentsReply, error)
func (*CommentServiceServer) CreateComment ¶
func (s *CommentServiceServer) CreateComment(ctx context.Context, req *v1.CreateCommentRequest) (*v1.CreateCommentReply, error)
func (*CommentServiceServer) DeleteComment ¶
func (s *CommentServiceServer) DeleteComment(ctx context.Context, req *v1.DeleteCommentRequest) (*v1.DeleteCommentReply, error)
func (*CommentServiceServer) GetComment ¶
func (s *CommentServiceServer) GetComment(ctx context.Context, req *v1.GetCommentRequest) (*v1.GetCommentReply, error)
func (*CommentServiceServer) ListHotComment ¶
func (s *CommentServiceServer) ListHotComment(ctx context.Context, req *v1.ListCommentsRequest) (*v1.ListCommentsReply, error)
func (*CommentServiceServer) ListLatestComment ¶
func (s *CommentServiceServer) ListLatestComment(ctx context.Context, req *v1.ListCommentsRequest) (*v1.ListCommentsReply, error)
func (*CommentServiceServer) ListReplyComment ¶
func (s *CommentServiceServer) ListReplyComment(ctx context.Context, req *v1.ListReplyCommentsRequest) (*v1.ListReplyCommentsReply, error)
func (*CommentServiceServer) ReplyComment ¶
func (s *CommentServiceServer) ReplyComment(ctx context.Context, req *v1.ReplyCommentRequest) (*v1.ReplyCommentReply, error)
func (*CommentServiceServer) UpdateComment ¶
func (s *CommentServiceServer) UpdateComment(ctx context.Context, req *v1.UpdateCommentRequest) (*v1.UpdateCommentReply, error)
type CommentType ¶
type CommentType int
const ( // CommentTypeText text comment type CommentTypeText CommentType = 1 // CommentTypeImage image comment type CommentTypeImage CommentType = 2 )
type DeleteType ¶
type DeleteType int
type IGreeterService ¶
type LikeServiceServer ¶
type LikeServiceServer struct { v1.UnimplementedLikeServiceServer // contains filtered or unexported fields }
func NewLikeServiceServer ¶
func NewLikeServiceServer( likeRepo repository.UserLikeRepo, postRepo repository.PostInfoRepo, cmtInfoRepo repository.CommentInfoRepo, ) *LikeServiceServer
func (*LikeServiceServer) BatchGetLikes ¶
func (s *LikeServiceServer) BatchGetLikes(ctx context.Context, req *v1.BatchGetLikesRequest) (*v1.BatchGetLikesReply, error)
func (*LikeServiceServer) CreateLike ¶
func (s *LikeServiceServer) CreateLike(ctx context.Context, req *v1.CreateLikeRequest) (*v1.CreateLikeReply, error)
func (*LikeServiceServer) DeleteLike ¶
func (s *LikeServiceServer) DeleteLike(ctx context.Context, req *v1.DeleteLikeRequest) (*v1.DeleteLikeReply, error)
func (*LikeServiceServer) GetLike ¶
func (s *LikeServiceServer) GetLike(ctx context.Context, req *v1.GetLikeRequest) (*v1.GetLikeReply, error)
func (*LikeServiceServer) ListCommentLikes ¶
func (s *LikeServiceServer) ListCommentLikes(ctx context.Context, req *v1.ListCommentLikesRequest) (*v1.ListCommentLikesReply, error)
func (*LikeServiceServer) ListPostLikes ¶
func (s *LikeServiceServer) ListPostLikes(ctx context.Context, req *v1.ListPostLikesRequest) (*v1.ListPostLikesReply, error)
func (*LikeServiceServer) UpdateLike ¶
func (s *LikeServiceServer) UpdateLike(ctx context.Context, req *v1.UpdateLikeRequest) (*v1.UpdateLikeReply, error)
type LikeStatus ¶
type LikeStatus int
type PostServiceServer ¶
type PostServiceServer struct { v1.UnimplementedPostServiceServer // contains filtered or unexported fields }
func NewPostServiceServer ¶
func NewPostServiceServer( postRepo repository.PostInfoRepo, latestRepo repository.PostLatestRepo, hotRepo repository.PostHotRepo, userPostRepo repository.UserPostRepo, ) *PostServiceServer
func (*PostServiceServer) BatchGetPosts ¶
func (s *PostServiceServer) BatchGetPosts(ctx context.Context, req *v1.BatchGetPostsRequest) (*v1.BatchGetPostsReply, error)
func (*PostServiceServer) CreatePost ¶
func (s *PostServiceServer) CreatePost(ctx context.Context, req *v1.CreatePostRequest) (*v1.CreatePostReply, error)
func (*PostServiceServer) DeletePost ¶
func (s *PostServiceServer) DeletePost(ctx context.Context, req *v1.DeletePostRequest) (*v1.DeletePostReply, error)
func (*PostServiceServer) GetPost ¶
func (s *PostServiceServer) GetPost(ctx context.Context, req *v1.GetPostRequest) (*v1.GetPostReply, error)
func (*PostServiceServer) ListHotPosts ¶
func (s *PostServiceServer) ListHotPosts(ctx context.Context, req *v1.ListHotPostsRequest) (*v1.ListHotPostsReply, error)
func (*PostServiceServer) ListLatestPosts ¶
func (s *PostServiceServer) ListLatestPosts(ctx context.Context, req *v1.ListLatestPostsRequest) (*v1.ListLatestPostsReply, error)
func (*PostServiceServer) ListMyPosts ¶
func (s *PostServiceServer) ListMyPosts(ctx context.Context, req *v1.ListMyPostsRequest) (*v1.ListMyPostsReply, error)
func (*PostServiceServer) UpdatePost ¶
func (s *PostServiceServer) UpdatePost(ctx context.Context, req *v1.UpdatePostRequest) (*v1.UpdatePostReply, error)
type Service ¶
type Service interface {
Greeter() IGreeterService
}
Service define all service
var Svc Service
Svc global var
type VisibleType ¶
type VisibleType int
Click to show internal directories.
Click to hide internal directories.