Documentation ¶
Index ¶
- Constants
- Variables
- type CommentServiceServer
- func (s *CommentServiceServer) BatchGetComment(ctx context.Context, req *v1.BatchGetCommentRequest) (*v1.BatchGetCommentReply, 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.ListCommentRequest) (*v1.ListCommentReply, error)
- func (s *CommentServiceServer) ListLatestComment(ctx context.Context, req *v1.ListCommentRequest) (*v1.ListCommentReply, error)
- func (s *CommentServiceServer) ListReplyComment(ctx context.Context, req *v1.ListReplyCommentRequest) (*v1.ListReplyCommentReply, 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) BatchGetLike(ctx context.Context, req *v1.BatchGetLikeRequest) (*v1.BatchGetLikeReply, 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) ListCommentLike(ctx context.Context, req *v1.ListCommentLikeRequest) (*v1.ListLikeReply, error)
- func (s *LikeServiceServer) ListPostLike(ctx context.Context, req *v1.ListPostLikeRequest) (*v1.ListLikeReply, 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) BatchGetPost(ctx context.Context, req *v1.BatchGetPostRequest) (*v1.BatchGetPostReply, 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) ListHotPost(ctx context.Context, req *v1.ListHotPostRequest) (*v1.ListHotPostReply, error)
- func (s *PostServiceServer) ListLatestPost(ctx context.Context, req *v1.ListLatestPostRequest) (*v1.ListLatestPostReply, error)
- func (s *PostServiceServer) ListMyPost(ctx context.Context, req *v1.ListMyPostRequest) (*v1.ListMyPostReply, 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.BatchGetCommentRequest) (*v1.BatchGetCommentReply, 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.ListCommentRequest) (*v1.ListCommentReply, error)
func (*CommentServiceServer) ListLatestComment ¶
func (s *CommentServiceServer) ListLatestComment(ctx context.Context, req *v1.ListCommentRequest) (*v1.ListCommentReply, error)
func (*CommentServiceServer) ListReplyComment ¶
func (s *CommentServiceServer) ListReplyComment(ctx context.Context, req *v1.ListReplyCommentRequest) (*v1.ListReplyCommentReply, 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) BatchGetLike ¶
func (s *LikeServiceServer) BatchGetLike(ctx context.Context, req *v1.BatchGetLikeRequest) (*v1.BatchGetLikeReply, 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) ListCommentLike ¶
func (s *LikeServiceServer) ListCommentLike(ctx context.Context, req *v1.ListCommentLikeRequest) (*v1.ListLikeReply, error)
func (*LikeServiceServer) ListPostLike ¶
func (s *LikeServiceServer) ListPostLike(ctx context.Context, req *v1.ListPostLikeRequest) (*v1.ListLikeReply, 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) BatchGetPost ¶
func (s *PostServiceServer) BatchGetPost(ctx context.Context, req *v1.BatchGetPostRequest) (*v1.BatchGetPostReply, 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) ListHotPost ¶
func (s *PostServiceServer) ListHotPost(ctx context.Context, req *v1.ListHotPostRequest) (*v1.ListHotPostReply, error)
func (*PostServiceServer) ListLatestPost ¶
func (s *PostServiceServer) ListLatestPost(ctx context.Context, req *v1.ListLatestPostRequest) (*v1.ListLatestPostReply, error)
func (*PostServiceServer) ListMyPost ¶
func (s *PostServiceServer) ListMyPost(ctx context.Context, req *v1.ListMyPostRequest) (*v1.ListMyPostReply, 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.