Documentation ¶
Index ¶
- Constants
- Variables
- func GetCurrentUserID(c context.Context) int64
- type CommentServiceServer
- func (s *CommentServiceServer) CreateComment(ctx context.Context, req *pb.CreateCommentRequest) (*pb.CreateCommentReply, error)
- func (s *CommentServiceServer) DeleteComment(ctx context.Context, req *pb.DeleteCommentRequest) (*pb.DeleteCommentReply, error)
- func (s *CommentServiceServer) GetComment(ctx context.Context, req *pb.GetCommentRequest) (*pb.GetCommentReply, error)
- func (s *CommentServiceServer) ListHotComment(ctx context.Context, req *pb.ListCommentRequest) (*pb.ListCommentReply, error)
- func (s *CommentServiceServer) ListLatestComment(ctx context.Context, req *pb.ListCommentRequest) (*pb.ListCommentReply, error)
- func (s *CommentServiceServer) ListReply(ctx context.Context, req *pb.ListReplyRequest) (*pb.ListReplyReply, error)
- func (s *CommentServiceServer) ReplyComment(ctx context.Context, req *pb.ReplyCommentRequest) (*pb.ReplyCommentReply, error)
- type LikeServiceServer
- func (s *LikeServiceServer) CreateCommentLike(ctx context.Context, req *pb.CreateCommentLikeRequest) (*pb.CreateCommentLikeReply, error)
- func (s *LikeServiceServer) CreatePostLike(ctx context.Context, req *pb.CreatePostLikeRequest) (*pb.CreatePostLikeReply, error)
- func (s *LikeServiceServer) DeleteCommentLike(ctx context.Context, req *pb.DeleteCommentLikeRequest) (*pb.DeleteCommentLikeReply, error)
- func (s *LikeServiceServer) DeletePostLike(ctx context.Context, req *pb.DeletePostLikeRequest) (*pb.DeletePostLikeReply, error)
- func (s *LikeServiceServer) ListCommentLike(ctx context.Context, req *pb.ListCommentLikeRequest) (*pb.ListCommentLikeReply, error)
- func (s *LikeServiceServer) ListPostLike(ctx context.Context, req *pb.ListPostLikeRequest) (*pb.ListPostLikeReply, error)
- type PostServiceServer
- func (s *PostServiceServer) CreatePost(ctx context.Context, req *pb.CreatePostRequest) (*pb.CreatePostReply, error)
- func (s *PostServiceServer) DeletePost(ctx context.Context, req *pb.DeletePostRequest) (*pb.DeletePostReply, error)
- func (s *PostServiceServer) GetPost(ctx context.Context, req *pb.GetPostRequest) (*pb.GetPostReply, error)
- func (s *PostServiceServer) ListHotPost(ctx context.Context, req *pb.ListPostRequest) (*pb.ListPostReply, error)
- func (s *PostServiceServer) ListLatestPost(ctx context.Context, req *pb.ListPostRequest) (*pb.ListPostReply, error)
- func (s *PostServiceServer) UpdatePost(ctx context.Context, req *pb.UpdatePostRequest) (*pb.UpdatePostReply, error)
- type RelationServiceServer
- func (s *RelationServiceServer) Follow(ctx context.Context, req *pb.FollowRequest) (*pb.FollowReply, error)
- func (s *RelationServiceServer) GetFollowerUserList(ctx context.Context, req *pb.GetFollowerUserListRequest) (*pb.GetFollowerUserListReply, error)
- func (s *RelationServiceServer) GetFollowingUserList(ctx context.Context, req *pb.GetFollowingUserListRequest) (*pb.GetFollowingUserListReply, error)
- func (s *RelationServiceServer) Unfollow(ctx context.Context, req *pb.UnfollowRequest) (*pb.UnfollowReply, error)
- type UserServiceServer
- func (s *UserServiceServer) GetUser(ctx context.Context, req *pb.GetUserRequest) (*pb.GetUserReply, error)
- func (s *UserServiceServer) Login(ctx context.Context, req *pb.LoginRequest) (*pb.LoginReply, error)
- func (s *UserServiceServer) Logout(ctx context.Context, req *pb.LogoutRequest) (*pb.LogoutReply, error)
- func (s *UserServiceServer) Register(ctx context.Context, req *pb.RegisterRequest) (*pb.RegisterReply, error)
- func (s *UserServiceServer) UpdatePassword(ctx context.Context, req *pb.UpdatePasswordRequest) (*pb.UpdatePasswordReply, error)
- func (s *UserServiceServer) UpdateUser(ctx context.Context, req *pb.UpdateUserRequest) (*pb.UpdateUserReply, error)
Constants ¶
View Source
const ( LikeTypePost = 1 LikeTypeComment = 2 )
Variables ¶
View Source
var ProviderSet = wire.NewSet( NewUserServiceServer, NewRelationServiceServer, NewPostServiceServer, NewCommentServiceServer, NewLikeServiceServer, )
ProviderSet is repo providers.
Functions ¶
func GetCurrentUserID ¶
GetCurrentUserID get current user's id
Types ¶
type CommentServiceServer ¶
type CommentServiceServer struct { pb.UnimplementedCommentServiceServer // contains filtered or unexported fields }
func NewCommentServiceServer ¶
func NewCommentServiceServer( repo momentv1.CommentServiceClient, postRPC momentv1.PostServiceClient, userRepo userv1.UserServiceClient, ) *CommentServiceServer
func (*CommentServiceServer) CreateComment ¶
func (s *CommentServiceServer) CreateComment(ctx context.Context, req *pb.CreateCommentRequest) (*pb.CreateCommentReply, error)
func (*CommentServiceServer) DeleteComment ¶
func (s *CommentServiceServer) DeleteComment(ctx context.Context, req *pb.DeleteCommentRequest) (*pb.DeleteCommentReply, error)
func (*CommentServiceServer) GetComment ¶
func (s *CommentServiceServer) GetComment(ctx context.Context, req *pb.GetCommentRequest) (*pb.GetCommentReply, error)
func (*CommentServiceServer) ListHotComment ¶
func (s *CommentServiceServer) ListHotComment(ctx context.Context, req *pb.ListCommentRequest) (*pb.ListCommentReply, error)
func (*CommentServiceServer) ListLatestComment ¶
func (s *CommentServiceServer) ListLatestComment(ctx context.Context, req *pb.ListCommentRequest) (*pb.ListCommentReply, error)
func (*CommentServiceServer) ListReply ¶
func (s *CommentServiceServer) ListReply(ctx context.Context, req *pb.ListReplyRequest) (*pb.ListReplyReply, error)
func (*CommentServiceServer) ReplyComment ¶
func (s *CommentServiceServer) ReplyComment(ctx context.Context, req *pb.ReplyCommentRequest) (*pb.ReplyCommentReply, error)
type LikeServiceServer ¶
type LikeServiceServer struct { pb.UnimplementedLikeServiceServer // contains filtered or unexported fields }
func NewLikeServiceServer ¶
func NewLikeServiceServer( repo momentv1.LikeServiceClient, postRepo momentv1.PostServiceClient, commentRepo momentv1.CommentServiceClient, userRepo userv1.UserServiceClient, ) *LikeServiceServer
func (*LikeServiceServer) CreateCommentLike ¶
func (s *LikeServiceServer) CreateCommentLike(ctx context.Context, req *pb.CreateCommentLikeRequest) (*pb.CreateCommentLikeReply, error)
func (*LikeServiceServer) CreatePostLike ¶
func (s *LikeServiceServer) CreatePostLike(ctx context.Context, req *pb.CreatePostLikeRequest) (*pb.CreatePostLikeReply, error)
func (*LikeServiceServer) DeleteCommentLike ¶
func (s *LikeServiceServer) DeleteCommentLike(ctx context.Context, req *pb.DeleteCommentLikeRequest) (*pb.DeleteCommentLikeReply, error)
func (*LikeServiceServer) DeletePostLike ¶
func (s *LikeServiceServer) DeletePostLike(ctx context.Context, req *pb.DeletePostLikeRequest) (*pb.DeletePostLikeReply, error)
func (*LikeServiceServer) ListCommentLike ¶
func (s *LikeServiceServer) ListCommentLike(ctx context.Context, req *pb.ListCommentLikeRequest) (*pb.ListCommentLikeReply, error)
func (*LikeServiceServer) ListPostLike ¶
func (s *LikeServiceServer) ListPostLike(ctx context.Context, req *pb.ListPostLikeRequest) (*pb.ListPostLikeReply, error)
type PostServiceServer ¶
type PostServiceServer struct { pb.UnimplementedPostServiceServer // contains filtered or unexported fields }
func NewPostServiceServer ¶
func NewPostServiceServer( repo momentv1.PostServiceClient, likeRepo momentv1.LikeServiceClient, userRepo userv1.UserServiceClient) *PostServiceServer
func (*PostServiceServer) CreatePost ¶
func (s *PostServiceServer) CreatePost(ctx context.Context, req *pb.CreatePostRequest) (*pb.CreatePostReply, error)
func (*PostServiceServer) DeletePost ¶
func (s *PostServiceServer) DeletePost(ctx context.Context, req *pb.DeletePostRequest) (*pb.DeletePostReply, error)
func (*PostServiceServer) GetPost ¶
func (s *PostServiceServer) GetPost(ctx context.Context, req *pb.GetPostRequest) (*pb.GetPostReply, error)
func (*PostServiceServer) ListHotPost ¶
func (s *PostServiceServer) ListHotPost(ctx context.Context, req *pb.ListPostRequest) (*pb.ListPostReply, error)
func (*PostServiceServer) ListLatestPost ¶
func (s *PostServiceServer) ListLatestPost(ctx context.Context, req *pb.ListPostRequest) (*pb.ListPostReply, error)
func (*PostServiceServer) UpdatePost ¶
func (s *PostServiceServer) UpdatePost(ctx context.Context, req *pb.UpdatePostRequest) (*pb.UpdatePostReply, error)
type RelationServiceServer ¶
type RelationServiceServer struct {
// contains filtered or unexported fields
}
func NewRelationServiceServer ¶
func NewRelationServiceServer(repo relationV1.RelationServiceClient, userRepo userv1.UserServiceClient) *RelationServiceServer
func (*RelationServiceServer) Follow ¶
func (s *RelationServiceServer) Follow(ctx context.Context, req *pb.FollowRequest) (*pb.FollowReply, error)
func (*RelationServiceServer) GetFollowerUserList ¶
func (s *RelationServiceServer) GetFollowerUserList(ctx context.Context, req *pb.GetFollowerUserListRequest) (*pb.GetFollowerUserListReply, error)
func (*RelationServiceServer) GetFollowingUserList ¶
func (s *RelationServiceServer) GetFollowingUserList(ctx context.Context, req *pb.GetFollowingUserListRequest) (*pb.GetFollowingUserListReply, error)
func (*RelationServiceServer) Unfollow ¶
func (s *RelationServiceServer) Unfollow(ctx context.Context, req *pb.UnfollowRequest) (*pb.UnfollowReply, error)
type UserServiceServer ¶
type UserServiceServer struct {
// contains filtered or unexported fields
}
func NewUserServiceServer ¶
func NewUserServiceServer(repo userv1.UserServiceClient) *UserServiceServer
func (*UserServiceServer) GetUser ¶
func (s *UserServiceServer) GetUser(ctx context.Context, req *pb.GetUserRequest) (*pb.GetUserReply, error)
func (*UserServiceServer) Login ¶
func (s *UserServiceServer) Login(ctx context.Context, req *pb.LoginRequest) (*pb.LoginReply, error)
func (*UserServiceServer) Logout ¶
func (s *UserServiceServer) Logout(ctx context.Context, req *pb.LogoutRequest) (*pb.LogoutReply, error)
func (*UserServiceServer) Register ¶
func (s *UserServiceServer) Register(ctx context.Context, req *pb.RegisterRequest) (*pb.RegisterReply, error)
func (*UserServiceServer) UpdatePassword ¶
func (s *UserServiceServer) UpdatePassword(ctx context.Context, req *pb.UpdatePasswordRequest) (*pb.UpdatePasswordReply, error)
func (*UserServiceServer) UpdateUser ¶
func (s *UserServiceServer) UpdateUser(ctx context.Context, req *pb.UpdateUserRequest) (*pb.UpdateUserReply, error)
Click to show internal directories.
Click to hide internal directories.