Documentation ¶
Index ¶
- type ConversationService
- func (s *ConversationService) ConversationExists(ctx context.Context, senderID, receiverID string) (bool, error)
- func (s *ConversationService) CreateConversation(ctx context.Context, senderID, receiverID string) error
- func (s *ConversationService) GetConversations(ctx context.Context) ([]*domain.Conversation, error)
- type MessageService
- func (s *MessageService) GetUnDeliveredMessages(ctx context.Context, c domain.MsgChan) error
- func (*MessageService) PopulateMessage(m domain.MessageSent, sndr *domain.User) *domain.Message
- func (s *MessageService) ProcessSentMessages(ctx context.Context, m *domain.Message) error
- func (s *MessageService) SaveMessage(ctx context.Context, m *domain.Message) error
- type Service
- type TokenService
- type UserService
- func (s *UserService) ActivateUser(ctx context.Context, user *domain.User) error
- func (s *UserService) AuthenticateUser(ctx context.Context, u *domain.UserAuth) (string, error)
- func (s *UserService) ExistsUser(ctx context.Context, email string) (bool, error)
- func (s *UserService) GetByQuery(ctx context.Context, queryParam string, filter domain.Filter) ([]*domain.User, *domain.Metadata, error)
- func (s *UserService) GetByUniqueField(ctx context.Context, fieldValue string) (*domain.User, error)
- func (s *UserService) GetForToken(ctx context.Context, scope string, plainToken string) (*domain.User, error)
- func (s *UserService) RegisterUser(ctx context.Context, u *domain.UserRegister) (string, error)
- func (s *UserService) SetOnlineUsersLastSeen(ctx context.Context, t time.Time) error
- func (s *UserService) UpdateUser(ctx context.Context, u *domain.UserUpdate) error
- func (s *UserService) UpdateUserOnlineStatus(ctx context.Context, usr *domain.User, online bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConversationService ¶
type ConversationService struct {
// contains filtered or unexported fields
}
func NewConversationService ¶
func NewConversationService(cr domain.ConversationRepository) *ConversationService
func (*ConversationService) ConversationExists ¶
func (*ConversationService) CreateConversation ¶
func (s *ConversationService) CreateConversation(ctx context.Context, senderID, receiverID string) error
func (*ConversationService) GetConversations ¶
func (s *ConversationService) GetConversations(ctx context.Context) ([]*domain.Conversation, error)
type MessageService ¶
type MessageService struct {
// contains filtered or unexported fields
}
func NewMessageService ¶
func NewMessageService(messageRepo domain.MessageRepository) *MessageService
func (*MessageService) GetUnDeliveredMessages ¶
func (*MessageService) PopulateMessage ¶
func (*MessageService) PopulateMessage(m domain.MessageSent, sndr *domain.User) *domain.Message
func (*MessageService) ProcessSentMessages ¶
func (*MessageService) SaveMessage ¶
type Service ¶
type Service struct { domain.UserService domain.TokenService domain.MessageService domain.ConversationService }
func New ¶
func New(us domain.UserService, ts domain.TokenService, ms domain.MessageService, cs domain.ConversationService) *Service
type TokenService ¶
type TokenService struct {
// contains filtered or unexported fields
}
func NewTokenService ¶
func NewTokenService(tokenRepo domain.TokenRepository) *TokenService
func (*TokenService) DeleteAllForUser ¶
func (*TokenService) GenerateToken ¶
func (s *TokenService) GenerateToken(ctx context.Context, userID string, scope string) (string, error)
GenerateToken generates OTP if scope is ScopeActivation & AuthenticationToken if scope is ScopeAuthentication
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func NewUserService(userRepo domain.UserRepository) *UserService
func (*UserService) ActivateUser ¶
func (*UserService) AuthenticateUser ¶
func (*UserService) ExistsUser ¶
func (*UserService) GetByQuery ¶
func (*UserService) GetByUniqueField ¶
func (*UserService) GetForToken ¶
func (*UserService) RegisterUser ¶
func (s *UserService) RegisterUser(ctx context.Context, u *domain.UserRegister) (string, error)
func (*UserService) SetOnlineUsersLastSeen ¶
func (*UserService) UpdateUser ¶
func (s *UserService) UpdateUser(ctx context.Context, u *domain.UserUpdate) error
func (*UserService) UpdateUserOnlineStatus ¶
Click to show internal directories.
Click to hide internal directories.