Versions in this module Expand all Collapse all v0 v0.1.0 Jul 20, 2021 Changes in this version + type AuthUsecase interface + GenerateAuthToken func(user entity.User, tokenizer Tokenizer) (string, error) + GetUserFromToken func(token string, tokenizer Tokenizer) (*entity.User, error) + SSO func(token string, authenticator SSOAuthenticator) (*entity.User, error) + type DiscussionRepository interface + AddMember func(discussionID interface{}, userID interface{}) error + Create func(param entity.CreateDiscussionParam) (*entity.Discussion, error) + DeleteByID func(discussionID interface{}) error + GetDiscussionByCode func(code string) (*entity.Discussion, error) + GetDiscussionsByID func(discussionID interface{}) (*entity.Discussion, error) + GetDiscussionsByUserID func(userID interface{}) ([]*entity.Discussion, error) + RemoveMember func(discussionID interface{}, userID interface{}) error + UpdateByID func(discussionID interface{}, param entity.UpdateDiscussionParam) error + UpdatePasswordByID func(discussionID interface{}, password string) error + UpdatePhotoByID func(discussionID interface{}, url string) error + type DiscussionUsecase interface + Create func(param entity.CreateDiscussionParam) (*entity.Discussion, error) + Delete func(discussionID interface{}) error + GetAllUserDiscussions func(userID interface{}) ([]*entity.Discussion, error) + GetDiscussionByCode func(code string) (*entity.Discussion, error) + GetDiscussionByID func(discussionID interface{}) (*entity.Discussion, error) + JoinDiscussion func(param entity.JoinDiscussionParam) (*entity.Discussion, error) + LeaveDiscussion func(discussionID interface{}, userID interface{}) error + Update func(discussionID interface{}, param entity.UpdateDiscussionParam) error + UpdatePassword func(discussionID interface{}, param entity.UpdateDiscussionPassword) error + UpdatePhoto func(discussionID interface{}, url string) error + type MessageRepository interface + Create func(param entity.CreateMessage) (*entity.Message, error) + GetPaginatedMessagesByDiscussionID func(discussionID interface{}, size, page int) ([]*entity.Message, error) + type MessageUsecase interface + GetMessagesByDiscussionID func(discussionID interface{}, size, page int) ([]*entity.Message, error) + SendMessage func(pubsub PubSub, message entity.CreateMessage) (*entity.Message, error) + type PubSub interface + Close func() error + Listen func(listener SubscribeListener) + Publish func(channel string, message interface{}) error + Subscribe func(channels ...string) error + Unsubscribe func(channels ...string) error + type SSOAuthenticator interface + Authenticate func(token string) (*entity.User, error) + type SubscribeListener func(channel string, message interface{}) + type Tokenizer interface + Generate func(entity.TokenPayload) (string, error) + Parse func(token string) (*entity.TokenPayload, error) + type UserRepository interface + Create func(param entity.CreateUserParam) (*entity.User, error) + GetUserByEmail func(email string) (*entity.User, error) + GetUserByID func(userID interface{}) (*entity.User, error)