Documentation ¶
Index ¶
- type ConversationRepository
- func (r *ConversationRepository) ConversationExists(ctx context.Context, senderID, receiverID string) (bool, error)
- func (r *ConversationRepository) CreateConversation(ctx context.Context, senderID, receiverID string) error
- func (r *ConversationRepository) GetConversations(ctx context.Context, usrID string) ([]*domain.Conversation, error)
- type DB
- type MessageRepository
- func (r *MessageRepository) DeleteMessage(ctx context.Context, mID string) error
- func (r *MessageRepository) GetByID(ctx context.Context, id string, op domain.MsgOperation) (*domain.Message, error)
- func (r *MessageRepository) GetUnDeliveredMessages(ctx context.Context, rcvrID string, op domain.MsgOperation, c domain.MsgChan) error
- func (r *MessageRepository) InsertMessage(ctx context.Context, m *domain.Message) error
- type TX
- type TokenRepository
- type UserRepository
- func (r *UserRepository) ActivateUser(ctx context.Context, user *domain.User) error
- func (r *UserRepository) ExistsUser(ctx context.Context, email string) (bool, error)
- func (r *UserRepository) GetByQuery(ctx context.Context, paramName, paramValue string, filter domain.Filter) ([]*domain.User, *domain.Metadata, error)
- func (r *UserRepository) GetByUniqueField(ctx context.Context, fieldName, fieldValue string) (*domain.User, error)
- func (r *UserRepository) GetForToken(ctx context.Context, scope string, hash []byte) (*domain.User, error)
- func (r *UserRepository) RegisterUser(ctx context.Context, u *domain.User) (string, error)
- func (r *UserRepository) SetOnlineUsersLastSeen(ctx context.Context, t time.Time) error
- func (r *UserRepository) UpdateUser(ctx context.Context, u *domain.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConversationRepository ¶
type ConversationRepository struct {
DB *DB
}
func NewConversationRepository ¶
func NewConversationRepository(db *DB) *ConversationRepository
func (*ConversationRepository) ConversationExists ¶
func (*ConversationRepository) CreateConversation ¶
func (r *ConversationRepository) CreateConversation(ctx context.Context, senderID, receiverID string) error
func (*ConversationRepository) GetConversations ¶
func (r *ConversationRepository) GetConversations(ctx context.Context, usrID string) ([]*domain.Conversation, error)
type MessageRepository ¶
type MessageRepository struct {
// contains filtered or unexported fields
}
func NewMessageRepository ¶
func NewMessageRepository(db *DB) *MessageRepository
func (*MessageRepository) DeleteMessage ¶
func (r *MessageRepository) DeleteMessage(ctx context.Context, mID string) error
func (*MessageRepository) GetByID ¶
func (r *MessageRepository) GetByID(ctx context.Context, id string, op domain.MsgOperation) (*domain.Message, error)
func (*MessageRepository) GetUnDeliveredMessages ¶
func (r *MessageRepository) GetUnDeliveredMessages(ctx context.Context, rcvrID string, op domain.MsgOperation, c domain.MsgChan) error
func (*MessageRepository) InsertMessage ¶
type TokenRepository ¶
type TokenRepository struct {
// contains filtered or unexported fields
}
func NewTokenRepository ¶
func NewTokenRepository(db *DB) *TokenRepository
func (*TokenRepository) DeleteAllForUser ¶
func (r *TokenRepository) DeleteAllForUser(ctx context.Context, userID, scope string) error
type UserRepository ¶
type UserRepository struct {
// contains filtered or unexported fields
}
func NewUserRepository ¶
func NewUserRepository(db *DB) *UserRepository
func (*UserRepository) ActivateUser ¶
func (*UserRepository) ExistsUser ¶
func (*UserRepository) GetByQuery ¶
func (*UserRepository) GetByUniqueField ¶
func (*UserRepository) GetForToken ¶
func (*UserRepository) RegisterUser ¶
func (*UserRepository) SetOnlineUsersLastSeen ¶
func (*UserRepository) UpdateUser ¶
Click to show internal directories.
Click to hide internal directories.