service

package
v0.0.0-...-a6a042c Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: MIT Imports: 20 Imported by: 0

README

Service

业务逻辑层

Documentation

Index

Constants

View Source
const (
	LikeTypePost    = 1
	LikeTypeComment = 2
)

Variables

ProviderSet is repo providers.

Functions

func GetCurrentUserID

func GetCurrentUserID(c context.Context) int64

GetCurrentUserID get current user's id

Types

type CommentServiceServer

type CommentServiceServer struct {
	pb.UnimplementedCommentServiceServer
	// contains filtered or unexported fields
}

func (*CommentServiceServer) CreateComment

func (*CommentServiceServer) DeleteComment

func (*CommentServiceServer) GetComment

func (*CommentServiceServer) ListHotComment

func (*CommentServiceServer) ListLatestComment

func (s *CommentServiceServer) ListLatestComment(ctx context.Context, req *pb.ListCommentRequest) (*pb.ListCommentReply, error)

func (*CommentServiceServer) ListReply

func (*CommentServiceServer) ReplyComment

type LikeServiceServer

type LikeServiceServer struct {
	pb.UnimplementedLikeServiceServer
	// contains filtered or unexported fields
}

func (*LikeServiceServer) CreateCommentLike

func (*LikeServiceServer) CreatePostLike

func (*LikeServiceServer) DeleteCommentLike

func (*LikeServiceServer) DeletePostLike

func (*LikeServiceServer) ListCommentLike

func (*LikeServiceServer) ListPostLike

type PostServiceServer

type PostServiceServer struct {
	pb.UnimplementedPostServiceServer
	// contains filtered or unexported fields
}

func (*PostServiceServer) CreatePost

func (*PostServiceServer) DeletePost

func (*PostServiceServer) GetPost

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

type RelationServiceServer

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

func (*RelationServiceServer) Follow

func (*RelationServiceServer) GetFollowerUserList

func (*RelationServiceServer) GetFollowingUserList

func (*RelationServiceServer) Unfollow

type UserServiceServer

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

func NewUserServiceServer

func NewUserServiceServer(repo userv1.UserServiceClient) *UserServiceServer

func (*UserServiceServer) GetUser

func (*UserServiceServer) Login

func (*UserServiceServer) Logout

func (*UserServiceServer) Register

func (*UserServiceServer) UpdatePassword

func (*UserServiceServer) UpdateUser

Jump to

Keyboard shortcuts

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