Documentation ¶
Index ¶
- type 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
- 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthUsecase ¶
type AuthUsecase struct {
// contains filtered or unexported fields
}
func NewAuthUsecase ¶
func NewAuthUsecase(userRepo internal.UserRepository) *AuthUsecase
func (AuthUsecase) GenerateAuthToken ¶
func (AuthUsecase) GetUserFromToken ¶
func (AuthUsecase) SSO ¶
func (service AuthUsecase) SSO(token string, authenticator internal.SSOAuthenticator) (*entity.User, error)
type DiscussionUsecase ¶
type DiscussionUsecase struct {
// contains filtered or unexported fields
}
func NewDiscussionUsecase ¶
func NewDiscussionUsecase(discussionRepo internal.DiscussionRepository) *DiscussionUsecase
func (DiscussionUsecase) Create ¶
func (du DiscussionUsecase) Create(param entity.CreateDiscussionParam) (*entity.Discussion, error)
func (DiscussionUsecase) Delete ¶
func (du DiscussionUsecase) Delete(discussionID interface{}) error
func (DiscussionUsecase) GetAllUserDiscussions ¶
func (du DiscussionUsecase) GetAllUserDiscussions(userID interface{}) ([]*entity.Discussion, error)
func (DiscussionUsecase) GetDiscussionByCode ¶
func (du DiscussionUsecase) GetDiscussionByCode(code string) (*entity.Discussion, error)
func (DiscussionUsecase) GetDiscussionByID ¶
func (du DiscussionUsecase) GetDiscussionByID(discussionID interface{}) (*entity.Discussion, error)
func (DiscussionUsecase) JoinDiscussion ¶
func (du DiscussionUsecase) JoinDiscussion(param entity.JoinDiscussionParam) (*entity.Discussion, error)
func (DiscussionUsecase) LeaveDiscussion ¶
func (du DiscussionUsecase) LeaveDiscussion(discussionID, userID interface{}) error
func (DiscussionUsecase) Update ¶
func (du DiscussionUsecase) Update(discussionID interface{}, param entity.UpdateDiscussionParam) error
func (DiscussionUsecase) UpdatePassword ¶
func (du DiscussionUsecase) UpdatePassword(discussionID interface{}, param entity.UpdateDiscussionPassword) error
func (DiscussionUsecase) UpdatePhoto ¶
func (du DiscussionUsecase) UpdatePhoto(discussionID interface{}, param string) error
type MessageUsecase ¶
type MessageUsecase struct {
// contains filtered or unexported fields
}
func NewMessageUsecase ¶
func NewMessageUsecase(messageRepo internal.MessageRepository) *MessageUsecase
func (MessageUsecase) GetMessagesByDiscussionID ¶
func (muc MessageUsecase) GetMessagesByDiscussionID(discussionID interface{}, size, page int) ([]*entity.Message, error)
func (MessageUsecase) SendMessage ¶
func (muc MessageUsecase) SendMessage(pubsub internal.PubSub, param entity.CreateMessage) (*entity.Message, error)
Click to show internal directories.
Click to hide internal directories.