Versions in this module Expand all Collapse all v0 v0.1.0 Jul 20, 2021 Changes in this version + type AuthUsecase struct + func NewAuthUsecase(userRepo internal.UserRepository) *AuthUsecase + func (service AuthUsecase) GenerateAuthToken(user entity.User, tokenizer internal.Tokenizer) (string, error) + func (service AuthUsecase) GetUserFromToken(token string, tokenizer internal.Tokenizer) (*entity.User, error) + func (service AuthUsecase) SSO(token string, authenticator internal.SSOAuthenticator) (*entity.User, error) + type DiscussionUsecase struct + func NewDiscussionUsecase(discussionRepo internal.DiscussionRepository) *DiscussionUsecase + func (du DiscussionUsecase) Create(param entity.CreateDiscussionParam) (*entity.Discussion, error) + func (du DiscussionUsecase) Delete(discussionID interface{}) error + func (du DiscussionUsecase) GetAllUserDiscussions(userID interface{}) ([]*entity.Discussion, error) + func (du DiscussionUsecase) GetDiscussionByCode(code string) (*entity.Discussion, error) + func (du DiscussionUsecase) GetDiscussionByID(discussionID interface{}) (*entity.Discussion, error) + func (du DiscussionUsecase) JoinDiscussion(param entity.JoinDiscussionParam) (*entity.Discussion, error) + func (du DiscussionUsecase) LeaveDiscussion(discussionID, userID interface{}) error + func (du DiscussionUsecase) Update(discussionID interface{}, param entity.UpdateDiscussionParam) error + func (du DiscussionUsecase) UpdatePassword(discussionID interface{}, param entity.UpdateDiscussionPassword) error + func (du DiscussionUsecase) UpdatePhoto(discussionID interface{}, param string) error + type MessageUsecase struct + func NewMessageUsecase(messageRepo internal.MessageRepository) *MessageUsecase + func (muc MessageUsecase) GetMessagesByDiscussionID(discussionID interface{}, size, page int) ([]*entity.Message, error) + func (muc MessageUsecase) SendMessage(pubsub internal.PubSub, param entity.CreateMessage) (*entity.Message, error)