Documentation ¶
Index ¶
- type Server
- func (s *Server) ClearNotifs(ctx context.Context, req *pbApi.ClearNotifsRequest) (*pbApi.ClearNotifsResponse, error)
- func (s *Server) Comment(ctx context.Context, req *pbApi.CommentRequest) (*pbApi.CommentResponse, error)
- func (s *Server) CreateThread(ctx context.Context, req *pbApi.CreateThreadRequest) (*pbApi.CreateThreadResponse, error)
- func (s *Server) DeleteComment(ctx context.Context, req *pbApi.DeleteCommentRequest) (*pbApi.DeleteCommentResponse, error)
- func (s *Server) DeleteSubcomment(ctx context.Context, req *pbApi.DeleteSubcommentRequest) (*pbApi.DeleteSubcommentResponse, error)
- func (s *Server) DeleteThread(ctx context.Context, req *pbApi.DeleteThreadRequest) (*pbApi.DeleteThreadResponse, error)
- func (s *Server) FollowUser(ctx context.Context, req *pbApi.FollowUserRequest) (*pbApi.FollowUserResponse, error)
- func (s *Server) GetBasicUserData(ctx context.Context, req *pbApi.GetBasicUserDataRequest) (*pbDataFormat.BasicUserData, error)
- func (s *Server) GetDashboardData(ctx context.Context, req *pbApi.GetDashboardDataRequest) (*pbApi.DashboardData, error)
- func (s *Server) GetUserFollowingIds(ctx context.Context, req *pbApi.GetBasicUserDataRequest) (*pbApi.UserList, error)
- func (s *Server) GetUserHeaderData(ctx context.Context, req *pbApi.GetBasicUserDataRequest) (*pbApi.UserHeaderData, error)
- func (s *Server) Login(ctx context.Context, req *pbApi.LoginRequest) (*pbApi.LoginResponse, error)
- func (s *Server) MarkAllAsRead(ctx context.Context, req *pbApi.ReadNotifsRequest) (*pbApi.ReadNotifsResponse, error)
- func (s *Server) OldComment(ctx context.Context, req *pbApi.OldCommentRequest) (*pbApi.OldCommentResponse, error)
- func (s *Server) OldSubcomment(ctx context.Context, req *pbApi.OldSubcommentRequest) (*pbApi.OldSubcommentResponse, error)
- func (s *Server) OldThread(ctx context.Context, req *pbApi.OldThreadRequest) (*pbApi.OldThreadResponse, error)
- func (s *Server) RecentActivity(ctx context.Context, req *pbApi.RecentActivityRequest) (*pbApi.RecentActivityResponse, error)
- func (s *Server) RegisterUser(ctx context.Context, req *pbApi.RegisterUserRequest) (*pbApi.RegisterUserResponse, error)
- func (s *Server) RemoveSaved(ctx context.Context, req *pbApi.RemoveSavedRequest) (*pbApi.RemoveSavedResponse, error)
- func (s *Server) SaveNotif(ctx context.Context, req *pbContents.NotifyUser) (*pbApi.SaveNotifResponse, error)
- func (s *Server) SaveThread(ctx context.Context, req *pbApi.SaveThreadRequest) (*pbApi.SaveThreadResponse, error)
- func (s *Server) SavedThreads(ctx context.Context, req *pbApi.SavedThreadsRequest) (*pbApi.SavedThreadsResponse, error)
- func (s *Server) Subcomment(ctx context.Context, req *pbApi.SubcommentRequest) (*pbApi.SubcommentResponse, error)
- func (s *Server) UnfollowUser(ctx context.Context, req *pbApi.UnfollowUserRequest) (*pbApi.UnfollowUserResponse, error)
- func (s *Server) UpdateBasicUserData(ctx context.Context, req *pbApi.UpdateBasicUserDataRequest) (*pbApi.UpdateBasicUserDataResponse, error)
- func (s *Server) ViewUserByUsername(ctx context.Context, req *pbApi.ViewUserByUsernameRequest) (*pbApi.ViewUserResponse, error)
- func (s *Server) ViewUsers(ctx context.Context, req *pbApi.ViewUsersRequest) (*pbApi.ViewUsersResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) ClearNotifs ¶
func (s *Server) ClearNotifs(ctx context.Context, req *pbApi.ClearNotifsRequest) (*pbApi.ClearNotifsResponse, error)
Clear all the notifications
func (*Server) Comment ¶
func (s *Server) Comment(ctx context.Context, req *pbApi.CommentRequest) (*pbApi.CommentResponse, error)
Append comment to list of recent activity of user.
func (*Server) CreateThread ¶
func (s *Server) CreateThread(ctx context.Context, req *pbApi.CreateThreadRequest) (*pbApi.CreateThreadResponse, error)
Append thread to list of recent activity of the given user.
func (*Server) DeleteComment ¶
func (s *Server) DeleteComment(ctx context.Context, req *pbApi.DeleteCommentRequest) (*pbApi.DeleteCommentResponse, error)
Remove reference to comment from list of activity of user.
func (*Server) DeleteSubcomment ¶
func (s *Server) DeleteSubcomment(ctx context.Context, req *pbApi.DeleteSubcommentRequest) (*pbApi.DeleteSubcommentResponse, error)
Remove reference to subcomment from list of activity of user.
func (*Server) DeleteThread ¶
func (s *Server) DeleteThread(ctx context.Context, req *pbApi.DeleteThreadRequest) (*pbApi.DeleteThreadResponse, error)
Remove reference to thread from list of activity of user.
func (*Server) FollowUser ¶
func (s *Server) FollowUser(ctx context.Context, req *pbApi.FollowUserRequest) (*pbApi.FollowUserResponse, error)
Follow a user
func (*Server) GetBasicUserData ¶
func (s *Server) GetBasicUserData(ctx context.Context, req *pbApi.GetBasicUserDataRequest) (*pbDataFormat.BasicUserData, error)
Get a user's basic data to be dislayed in page
func (*Server) GetDashboardData ¶
func (s *Server) GetDashboardData(ctx context.Context, req *pbApi.GetDashboardDataRequest) (*pbApi.DashboardData, error)
Get dashboard data for a given user
func (*Server) GetUserFollowingIds ¶
func (s *Server) GetUserFollowingIds(ctx context.Context, req *pbApi.GetBasicUserDataRequest) (*pbApi.UserList, error)
Get the list of users followed by a given user
func (*Server) GetUserHeaderData ¶
func (s *Server) GetUserHeaderData(ctx context.Context, req *pbApi.GetBasicUserDataRequest) (*pbApi.UserHeaderData, error)
Get a user's basic data to be displayed in the header navigation section
func (*Server) Login ¶
func (s *Server) Login(ctx context.Context, req *pbApi.LoginRequest) (*pbApi.LoginResponse, error)
Validate user credentials to login
func (*Server) MarkAllAsRead ¶
func (s *Server) MarkAllAsRead(ctx context.Context, req *pbApi.ReadNotifsRequest) (*pbApi.ReadNotifsResponse, error)
Mark unread notifications as read
func (*Server) OldComment ¶
func (s *Server) OldComment(ctx context.Context, req *pbApi.OldCommentRequest) (*pbApi.OldCommentResponse, error)
Move comment from recent activity of user to list of old activity.
func (*Server) OldSubcomment ¶
func (s *Server) OldSubcomment(ctx context.Context, req *pbApi.OldSubcommentRequest) (*pbApi.OldSubcommentResponse, error)
Move subcomment from recent activity of user to list of old activity.
func (*Server) OldThread ¶
func (s *Server) OldThread(ctx context.Context, req *pbApi.OldThreadRequest) (*pbApi.OldThreadResponse, error)
Move thread from recent activity of user to list of old activity.
func (*Server) RecentActivity ¶
func (s *Server) RecentActivity(ctx context.Context, req *pbApi.RecentActivityRequest) (*pbApi.RecentActivityResponse, error)
Get the recent activity of different users and discard those that the user has already seen.
func (*Server) RegisterUser ¶
func (s *Server) RegisterUser(ctx context.Context, req *pbApi.RegisterUserRequest) (*pbApi.RegisterUserResponse, error)
Register new user
func (*Server) RemoveSaved ¶
func (s *Server) RemoveSaved(ctx context.Context, req *pbApi.RemoveSavedRequest) (*pbApi.RemoveSavedResponse, error)
Remove reference to thread from list of saved threads of user.
func (*Server) SaveNotif ¶
func (s *Server) SaveNotif(ctx context.Context, req *pbContents.NotifyUser) (*pbApi.SaveNotifResponse, error)
SaveNotif updates the given notification if it was already there, or appends it to the list of unread notifications of the given user. If the notification was in the list of read notifications, it removes it from there.
func (*Server) SaveThread ¶
func (s *Server) SaveThread(ctx context.Context, req *pbApi.SaveThreadRequest) (*pbApi.SaveThreadResponse, error)
Request to save thread
func (*Server) SavedThreads ¶
func (s *Server) SavedThreads(ctx context.Context, req *pbApi.SavedThreadsRequest) (*pbApi.SavedThreadsResponse, error)
Get the list of saved threads of a user.
func (*Server) Subcomment ¶
func (s *Server) Subcomment(ctx context.Context, req *pbApi.SubcommentRequest) (*pbApi.SubcommentResponse, error)
Append subcomment to list of recent activity of user.
func (*Server) UnfollowUser ¶
func (s *Server) UnfollowUser(ctx context.Context, req *pbApi.UnfollowUserRequest) (*pbApi.UnfollowUserResponse, error)
Unfollow a user
func (*Server) UpdateBasicUserData ¶
func (s *Server) UpdateBasicUserData(ctx context.Context, req *pbApi.UpdateBasicUserDataRequest) (*pbApi.UpdateBasicUserDataResponse, error)
Update a user's basic data
func (*Server) ViewUserByUsername ¶
func (s *Server) ViewUserByUsername(ctx context.Context, req *pbApi.ViewUserByUsernameRequest) (*pbApi.ViewUserResponse, error)
Get username basic data, following, followers and threads created
func (*Server) ViewUsers ¶
func (s *Server) ViewUsers(ctx context.Context, req *pbApi.ViewUsersRequest) (*pbApi.ViewUsersResponse, error)
Get either following or followers users' basic data