Documentation ¶
Index ¶
- type Service
- func (service *Service) CreateOrLoginUserWithGoogle(newUserGoogle *model.UserGoogle) (*model.PublicUser, error)
- func (service *Service) DeleteTweet(tweetID, requestingUserID int64) error
- func (service *Service) Feed(requestingUserID int64) ([]*model.Tweet, error)
- func (service *Service) FollowUser(userID, requestingUserID int64) (*model.PublicUser, error)
- func (service *Service) FullTextSearch(queryString string, requestingUserID int64) (*model.FullTextSearchResponse, error)
- func (service *Service) GetTweet(tweetID, requestingUserID int64) (*model.Tweet, error)
- func (service *Service) GetTweetsOfUserWithID(userID, requestingUserID int64) ([]*model.Tweet, error)
- func (service *Service) GetUser(userID, requestingUserID int64) (*model.PublicUser, error)
- func (service *Service) LikeTweet(tweetID, requestingUserID int64) (*model.Tweet, error)
- func (service *Service) LoginUser(loginForm *model.LoginForm) (*model.PublicUser, error)
- func (service *Service) PostTweet(tweet *model.NewTweet, requestingUserID int64) (*model.Tweet, error)
- func (service *Service) RegisterUser(newUserForm *model.NewUserForm) (*model.PublicUser, error)
- func (service *Service) UnfollowUser(userID, requestingUserID int64) (*model.PublicUser, error)
- func (service *Service) UnlikeTweet(tweetID, requestingUserID int64) (*model.Tweet, error)
- func (service *Service) UserFollowees(userID, requestingUserID int64) ([]*model.PublicUser, error)
- func (service *Service) UserFollowers(userID, requestingUserID int64) ([]*model.PublicUser, error)
- type ServiceProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Struct that implements APIProvider
func (*Service) CreateOrLoginUserWithGoogle ¶
func (service *Service) CreateOrLoginUserWithGoogle(newUserGoogle *model.UserGoogle) (*model.PublicUser, error)
func (*Service) DeleteTweet ¶
func (*Service) FollowUser ¶
func (service *Service) FollowUser(userID, requestingUserID int64) (*model.PublicUser, error)
func (*Service) FullTextSearch ¶
func (*Service) GetTweetsOfUserWithID ¶
func (*Service) GetUser ¶
func (service *Service) GetUser(userID, requestingUserID int64) (*model.PublicUser, error)
func (*Service) RegisterUser ¶
func (service *Service) RegisterUser(newUserForm *model.NewUserForm) (*model.PublicUser, error)
func (*Service) UnfollowUser ¶
func (service *Service) UnfollowUser(userID, requestingUserID int64) (*model.PublicUser, error)
func (*Service) UnlikeTweet ¶
func (*Service) UserFollowees ¶
func (service *Service) UserFollowees(userID, requestingUserID int64) ([]*model.PublicUser, error)
func (*Service) UserFollowers ¶
func (service *Service) UserFollowers(userID, requestingUserID int64) ([]*model.PublicUser, error)
type ServiceProvider ¶
type ServiceProvider interface { GetTweetsOfUserWithID(userID, requestingUserID int64) ([]*model.Tweet, error) GetTweet(tweetID, requestingUserID int64) (*model.Tweet, error) PostTweet(newTweet *model.NewTweet, requestingUserID int64) (*model.Tweet, error) DeleteTweet(tweetID, requestingUserID int64) error LikeTweet(tweetID, requestingUserID int64) (*model.Tweet, error) UnlikeTweet(tweetID, requestingUserID int64) (*model.Tweet, error) GetUser(userID, requestingUserID int64) (*model.PublicUser, error) FollowUser(userID, requestingUserID int64) (*model.PublicUser, error) UnfollowUser(userID, requestingUserID int64) (*model.PublicUser, error) UserFollowers(userID, requestingUserID int64) ([]*model.PublicUser, error) UserFollowees(userID, requestingUserID int64) ([]*model.PublicUser, error) Feed(userID int64) ([]*model.Tweet, error) FullTextSearch(queryString string, requestingUserID int64) (*model.FullTextSearchResponse, error) RegisterUser(newUserForm *model.NewUserForm) (*model.PublicUser, error) LoginUser(loginForm *model.LoginForm) (*model.PublicUser, error) CreateOrLoginUserWithGoogle(userGoogle *model.UserGoogle) (*model.PublicUser, error) }
TODO: Maybe split into 2 services: tweet and user service?
Click to show internal directories.
Click to hide internal directories.