Documentation ¶
Index ¶
- func DeleteDBFile(filesDir string) error
- type DB
- type LatestMsgs
- type LocalConversationRepository
- func (r LocalConversationRepository) DeleteAllConversations() error
- func (r LocalConversationRepository) GetConversationByUserID(id string) (*domain.Conversation, error)
- func (r LocalConversationRepository) GetConversations() ([]*domain.Conversation, error)
- func (r LocalConversationRepository) SaveConversations(convos ...*domain.Conversation) error
- type LocalMessageRepository
- func (r LocalMessageRepository) DeleteAllForSenderAndReceiver(senderId, receiverId string) error
- func (r LocalMessageRepository) DeleteMsg(id string) error
- func (r LocalMessageRepository) GetLatestMsgBodyForConvos(cui ...string) (LatestMsgs, error)
- func (r LocalMessageRepository) GetMsgByID(id string) (*domain.Message, error)
- func (r LocalMessageRepository) GetMsgsAsPage(sen string, fil domain.Filter) ([]*domain.Message, *domain.Metadata, error)
- func (r LocalMessageRepository) SaveMsg(msg *domain.Message) error
- func (r LocalMessageRepository) UpdateMsg(msg *domain.Message) error
- type LocalRepository
- type LocalUserRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteDBFile ¶
Types ¶
type DB ¶
func (*DB) RunMigrations ¶
type LatestMsgs ¶
type LatestMsgs map[string]*domain.LatestMsgBody
type LocalConversationRepository ¶
type LocalConversationRepository struct {
// contains filtered or unexported fields
}
func NewLocalConversationRepository ¶
func NewLocalConversationRepository(db *DB) LocalConversationRepository
func (LocalConversationRepository) DeleteAllConversations ¶
func (r LocalConversationRepository) DeleteAllConversations() error
func (LocalConversationRepository) GetConversationByUserID ¶
func (r LocalConversationRepository) GetConversationByUserID(id string) (*domain.Conversation, error)
func (LocalConversationRepository) GetConversations ¶
func (r LocalConversationRepository) GetConversations() ([]*domain.Conversation, error)
func (LocalConversationRepository) SaveConversations ¶
func (r LocalConversationRepository) SaveConversations(convos ...*domain.Conversation) error
type LocalMessageRepository ¶
type LocalMessageRepository struct {
// contains filtered or unexported fields
}
func NewLocalMessageRepository ¶
func NewLocalMessageRepository(db *DB) LocalMessageRepository
func (LocalMessageRepository) DeleteAllForSenderAndReceiver ¶
func (r LocalMessageRepository) DeleteAllForSenderAndReceiver(senderId, receiverId string) error
func (LocalMessageRepository) DeleteMsg ¶
func (r LocalMessageRepository) DeleteMsg(id string) error
func (LocalMessageRepository) GetLatestMsgBodyForConvos ¶
func (r LocalMessageRepository) GetLatestMsgBodyForConvos(cui ...string) (LatestMsgs, error)
func (LocalMessageRepository) GetMsgByID ¶
func (r LocalMessageRepository) GetMsgByID(id string) (*domain.Message, error)
func (LocalMessageRepository) GetMsgsAsPage ¶
type LocalRepository ¶
type LocalRepository struct { LocalUserRepository LocalConversationRepository LocalMessageRepository }
func NewLocalRepository ¶
func NewLocalRepository(db *DB) *LocalRepository
type LocalUserRepository ¶
type LocalUserRepository struct {
// contains filtered or unexported fields
}
func (LocalUserRepository) DeletePreviousUser ¶
func (r LocalUserRepository) DeletePreviousUser() error
func (LocalUserRepository) GetCurrentUser ¶
func (r LocalUserRepository) GetCurrentUser() (*domain.User, error)
func (LocalUserRepository) SaveCurrentUser ¶
func (r LocalUserRepository) SaveCurrentUser(u *domain.User) error
func (LocalUserRepository) UpdateCurrentUser ¶
func (r LocalUserRepository) UpdateCurrentUser(u *domain.User) error
Click to show internal directories.
Click to hide internal directories.