users

package
v0.0.0-...-741ce34 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

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 New

func New(dbh dbmodel.Handler) *Server

func (*Server) ClearNotifs

Clear all the notifications

func (*Server) Comment

Append comment to list of recent activity of user.

func (*Server) CreateThread

Append thread to list of recent activity of the given user.

func (*Server) DeleteComment

Remove reference to comment from list of activity of user.

func (*Server) DeleteSubcomment

Remove reference to subcomment from list of activity of user.

func (*Server) DeleteThread

Remove reference to thread from list of activity of user.

func (*Server) FollowUser

Follow a user

func (*Server) GetBasicUserData

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

Move comment from recent activity of user to list of old activity.

func (*Server) OldSubcomment

Move subcomment from recent activity of user to list of old activity.

func (*Server) OldThread

Move thread from recent activity of user to list of old activity.

func (*Server) RecentActivity

Get the recent activity of different users and discard those that the user has already seen.

func (*Server) RegisterUser

Register new user

func (*Server) RemoveSaved

Remove reference to thread from list of saved threads of user.

func (*Server) SaveNotif

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

Request to save thread

func (*Server) SavedThreads

Get the list of saved threads of a user.

func (*Server) Subcomment

Append subcomment to list of recent activity of user.

func (*Server) UnfollowUser

Unfollow a user

func (*Server) UpdateBasicUserData

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

Get either following or followers users' basic data

Jump to

Keyboard shortcuts

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