Documentation ¶
Index ¶
- Constants
- type ColumnInfo
- type DBWrapper
- func (d *DBWrapper) AccountSetReplicationAutoEnable(pk string, enabled bool) error
- func (d *DBWrapper) AccountUpdateFlag(pk string, flagName string, enabled bool) error
- func (d *DBWrapper) AddContactRequestIncomingAccepted(contactPK, groupPK string) (*messengertypes.Contact, error)
- func (d *DBWrapper) AddContactRequestIncomingReceived(contactPK, displayName, groupPk string) (*messengertypes.Contact, error)
- func (d *DBWrapper) AddContactRequestOutgoingEnqueued(contactPK, displayName, convPK string) (*messengertypes.Contact, error)
- func (d *DBWrapper) AddContactRequestOutgoingSent(contactPK string) (*messengertypes.Contact, error)
- func (d *DBWrapper) AddConversation(groupPK, ownMemberPK, ownDevicePK string) (*messengertypes.Conversation, error)
- func (d *DBWrapper) AddConversationForContact(groupPK, ownMemberPK, ownDevicePK, contactPK string) (*messengertypes.Conversation, error)
- func (d *DBWrapper) AddDevice(devicePK string, memberPK string) (*messengertypes.Device, error)
- func (d *DBWrapper) AddInteraction(rawInte messengertypes.Interaction) (*messengertypes.Interaction, bool, error)
- func (d *DBWrapper) AddMedias(medias []*messengertypes.Media) ([]bool, error)
- func (d *DBWrapper) AddMember(memberPK, groupPK, displayName, avatarCID string, isMe bool, isCreator bool) (*messengertypes.Member, error)
- func (d *DBWrapper) AddServiceToken(serviceToken *protocoltypes.ServiceToken) error
- func (d *DBWrapper) AttributeBacklogInteractions(devicePK, groupPK, memberPK string) ([]*messengertypes.Interaction, error)
- func (d *DBWrapper) BuildReactionsView(cid string) ([]*messengertypes.Interaction_ReactionView, error)
- func (d *DBWrapper) CreateOrUpdateReaction(reaction *messengertypes.Reaction) (bool, error)
- func (d *DBWrapper) DeleteInteractions(cids []string) error
- func (d *DBWrapper) DisableFTS() *DBWrapper
- func (d *DBWrapper) FirstOrCreateAccount(pk, link string) error
- func (d *DBWrapper) GetAccount() (*messengertypes.Account, error)
- func (d *DBWrapper) GetAcknowledgementsCIDsForInteraction(cid string) ([]string, error)
- func (d *DBWrapper) GetAllContacts() ([]*messengertypes.Contact, error)
- func (d *DBWrapper) GetAllConversations() ([]*messengertypes.Conversation, error)
- func (d *DBWrapper) GetAllInteractions() ([]*messengertypes.Interaction, error)
- func (d *DBWrapper) GetAllMedias() ([]*messengertypes.Media, error)
- func (d *DBWrapper) GetAllMembers() ([]*messengertypes.Member, error)
- func (d *DBWrapper) GetAugmentedInteraction(cid string) (*messengertypes.Interaction, error)
- func (d *DBWrapper) GetContactByPK(publicKey string) (*messengertypes.Contact, error)
- func (d *DBWrapper) GetContactsByState(state messengertypes.Contact_State) ([]*messengertypes.Contact, error)
- func (d *DBWrapper) GetConversationByPK(publicKey string) (*messengertypes.Conversation, error)
- func (d *DBWrapper) GetCurrentReactionsByValueAndMember(memberPublicKey string, targetCID string, emoji string) ([]*messengertypes.Reaction, error)
- func (d *DBWrapper) GetDBInfo() (*messengertypes.SystemInfo_DB, error)
- func (d *DBWrapper) GetDeviceByPK(publicKey string) (*messengertypes.Device, error)
- func (d *DBWrapper) GetDevicesForMember(conversationPK string, memberPK string) ([]*messengertypes.Device, error)
- func (d *DBWrapper) GetInteractionByCID(cid string) (*messengertypes.Interaction, error)
- func (d *DBWrapper) GetInteractionReactionsForEmoji(cid string, emoji string) ([]*messengertypes.Reaction, error)
- func (d *DBWrapper) GetMedias(cids []string) ([]*messengertypes.Media, error)
- func (d *DBWrapper) GetMemberByPK(publicKey string, convPK string) (*messengertypes.Member, error)
- func (d *DBWrapper) GetMuteStatusForConversation(key string) (accountMuted bool, conversationMuted bool, err error)
- func (d *DBWrapper) GetNextMedia(lastCID string, opts NextMediaOpts) (*messengertypes.Media, error)
- func (d *DBWrapper) GetPaginatedInteractions(opts *messengertypes.PaginatedInteractionsOptions) ([]*messengertypes.Interaction, []*messengertypes.Media, error)
- func (d *DBWrapper) GetPushTokenSharedForConversation(pk string) ([]*messengertypes.SharedPushToken, error)
- func (d *DBWrapper) GetReplyOptionsCIDForConversation(pk string) (string, error)
- func (d *DBWrapper) InitDB(replayer func(d *DBWrapper) error) error
- func (d *DBWrapper) InteractionIndexText(interactionCID string, text string) error
- func (d *DBWrapper) InteractionsSearch(query string, options *SearchOptions) ([]*messengertypes.Interaction, error)
- func (d *DBWrapper) IsConversationOpened(conversationPK string) (bool, error)
- func (d *DBWrapper) IsFromSelf(groupPK string, devicePK string) (bool, error)
- func (d *DBWrapper) KeepDatabaseLocalState() *messengertypes.LocalDatabaseState
- func (d *DBWrapper) MarkInteractionAsAcknowledged(cid string) (*messengertypes.Interaction, error)
- func (d *DBWrapper) MarkMemberAsConversationCreator(memberPK, conversationPK string) error
- func (d *DBWrapper) MarkMetadataEventHandled(eventContext *protocoltypes.EventContext) (bool, error)
- func (d *DBWrapper) MuteConversation(pk string, until int64) error
- func (d *DBWrapper) PushSetReplicationAutoShare(pk string, enabled bool) error
- func (d *DBWrapper) RestoreFromBackup(backup *messengertypes.LocalDatabaseState, replayLogsToDB func() error) error
- func (d *DBWrapper) SaveConversationReplicationInfo(c messengertypes.ConversationReplicationInfo) error
- func (d *DBWrapper) SetConversationIsOpenStatus(conversationPK string, status bool) (*messengertypes.Conversation, bool, error)
- func (d *DBWrapper) TX(ctx context.Context, txFunc func(*DBWrapper) error) (err error)
- func (d *DBWrapper) UpdateAccount(pk, url, displayName, avatarCID string) (*messengertypes.Account, error)
- func (d *DBWrapper) UpdateAccountFields(fields map[string]interface{}) error
- func (d *DBWrapper) UpdateContact(pk string, contact messengertypes.Contact) error
- func (d *DBWrapper) UpdateConversation(c messengertypes.Conversation) (bool, error)
- func (d *DBWrapper) UpdateConversationReadState(pk string, newUnread bool, eventDate time.Time) error
- func (d *DBWrapper) UpdateDevicePushServer(server *protocoltypes.PushServer) (*messengertypes.Account, error)
- func (d *DBWrapper) UpdateDevicePushToken(token *protocoltypes.PushServiceReceiver) (*messengertypes.Account, error)
- func (d *DBWrapper) UpdateDeviceSetPushToken(ctx context.Context, memberPK string, devicePK string, conversationPK string, ...) error
- func (d *DBWrapper) UpsertMember(memberPK, groupPK string, m messengertypes.Member) (*messengertypes.Member, bool, error)
- type GetInMemoryTestDBOpts
- type NextMediaOpts
- type SearchOptions
Constants ¶
View Source
const ( GetInMemoryTestDBOptsUndefined = iota GetInMemoryTestDBOptsNoInit GetInMemoryTestDBOptsStdOutLogger GetInMemoryTestDBOptsNoFTS )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColumnInfo ¶
type ColumnInfo struct { ColumnID string Name string Type string NotNull *string DfltValue *string PK string }
func (*ColumnInfo) Equals ¶
func (t *ColumnInfo) Equals(other *ColumnInfo) bool
type DBWrapper ¶
type DBWrapper struct {
// contains filtered or unexported fields
}
func GetInMemoryTestDB ¶
func (*DBWrapper) AccountSetReplicationAutoEnable ¶
func (*DBWrapper) AccountUpdateFlag ¶
func (*DBWrapper) AddContactRequestIncomingAccepted ¶
func (d *DBWrapper) AddContactRequestIncomingAccepted(contactPK, groupPK string) (*messengertypes.Contact, error)
func (*DBWrapper) AddContactRequestIncomingReceived ¶
func (d *DBWrapper) AddContactRequestIncomingReceived(contactPK, displayName, groupPk string) (*messengertypes.Contact, error)
func (*DBWrapper) AddContactRequestOutgoingEnqueued ¶
func (d *DBWrapper) AddContactRequestOutgoingEnqueued(contactPK, displayName, convPK string) (*messengertypes.Contact, error)
func (*DBWrapper) AddContactRequestOutgoingSent ¶
func (d *DBWrapper) AddContactRequestOutgoingSent(contactPK string) (*messengertypes.Contact, error)
func (*DBWrapper) AddConversation ¶
func (d *DBWrapper) AddConversation(groupPK, ownMemberPK, ownDevicePK string) (*messengertypes.Conversation, error)
func (*DBWrapper) AddConversationForContact ¶
func (d *DBWrapper) AddConversationForContact(groupPK, ownMemberPK, ownDevicePK, contactPK string) (*messengertypes.Conversation, error)
func (*DBWrapper) AddInteraction ¶
func (d *DBWrapper) AddInteraction(rawInte messengertypes.Interaction) (*messengertypes.Interaction, bool, error)
func (*DBWrapper) AddMedias ¶
func (d *DBWrapper) AddMedias(medias []*messengertypes.Media) ([]bool, error)
func (*DBWrapper) AddServiceToken ¶
func (d *DBWrapper) AddServiceToken(serviceToken *protocoltypes.ServiceToken) error
func (*DBWrapper) AttributeBacklogInteractions ¶
func (d *DBWrapper) AttributeBacklogInteractions(devicePK, groupPK, memberPK string) ([]*messengertypes.Interaction, error)
func (*DBWrapper) BuildReactionsView ¶
func (d *DBWrapper) BuildReactionsView(cid string) ([]*messengertypes.Interaction_ReactionView, error)
func (*DBWrapper) CreateOrUpdateReaction ¶
func (d *DBWrapper) CreateOrUpdateReaction(reaction *messengertypes.Reaction) (bool, error)
func (*DBWrapper) DeleteInteractions ¶
func (*DBWrapper) DisableFTS ¶
func (*DBWrapper) FirstOrCreateAccount ¶
func (*DBWrapper) GetAccount ¶
func (d *DBWrapper) GetAccount() (*messengertypes.Account, error)
atomic
func (*DBWrapper) GetAcknowledgementsCIDsForInteraction ¶
func (*DBWrapper) GetAllContacts ¶
func (d *DBWrapper) GetAllContacts() ([]*messengertypes.Contact, error)
func (*DBWrapper) GetAllConversations ¶
func (d *DBWrapper) GetAllConversations() ([]*messengertypes.Conversation, error)
func (*DBWrapper) GetAllInteractions ¶
func (d *DBWrapper) GetAllInteractions() ([]*messengertypes.Interaction, error)
func (*DBWrapper) GetAllMedias ¶
func (d *DBWrapper) GetAllMedias() ([]*messengertypes.Media, error)
func (*DBWrapper) GetAllMembers ¶
func (d *DBWrapper) GetAllMembers() ([]*messengertypes.Member, error)
func (*DBWrapper) GetAugmentedInteraction ¶
func (d *DBWrapper) GetAugmentedInteraction(cid string) (*messengertypes.Interaction, error)
func (*DBWrapper) GetContactByPK ¶
func (d *DBWrapper) GetContactByPK(publicKey string) (*messengertypes.Contact, error)
atomic
func (*DBWrapper) GetContactsByState ¶
func (d *DBWrapper) GetContactsByState(state messengertypes.Contact_State) ([]*messengertypes.Contact, error)
func (*DBWrapper) GetConversationByPK ¶
func (d *DBWrapper) GetConversationByPK(publicKey string) (*messengertypes.Conversation, error)
func (*DBWrapper) GetCurrentReactionsByValueAndMember ¶
func (*DBWrapper) GetDBInfo ¶
func (d *DBWrapper) GetDBInfo() (*messengertypes.SystemInfo_DB, error)
func (*DBWrapper) GetDeviceByPK ¶
func (d *DBWrapper) GetDeviceByPK(publicKey string) (*messengertypes.Device, error)
func (*DBWrapper) GetDevicesForMember ¶ added in v2.344.0
func (*DBWrapper) GetInteractionByCID ¶
func (d *DBWrapper) GetInteractionByCID(cid string) (*messengertypes.Interaction, error)
func (*DBWrapper) GetInteractionReactionsForEmoji ¶ added in v2.349.0
func (*DBWrapper) GetMedias ¶
func (d *DBWrapper) GetMedias(cids []string) ([]*messengertypes.Media, error)
atomic
func (*DBWrapper) GetMemberByPK ¶
func (*DBWrapper) GetMuteStatusForConversation ¶ added in v2.381.0
func (*DBWrapper) GetNextMedia ¶
func (d *DBWrapper) GetNextMedia(lastCID string, opts NextMediaOpts) (*messengertypes.Media, error)
func (*DBWrapper) GetPaginatedInteractions ¶
func (d *DBWrapper) GetPaginatedInteractions(opts *messengertypes.PaginatedInteractionsOptions) ([]*messengertypes.Interaction, []*messengertypes.Media, error)
func (*DBWrapper) GetPushTokenSharedForConversation ¶ added in v2.344.0
func (d *DBWrapper) GetPushTokenSharedForConversation(pk string) ([]*messengertypes.SharedPushToken, error)
func (*DBWrapper) GetReplyOptionsCIDForConversation ¶
func (*DBWrapper) InteractionIndexText ¶
func (*DBWrapper) InteractionsSearch ¶
func (d *DBWrapper) InteractionsSearch(query string, options *SearchOptions) ([]*messengertypes.Interaction, error)
func (*DBWrapper) IsConversationOpened ¶
func (*DBWrapper) IsFromSelf ¶
func (*DBWrapper) KeepDatabaseLocalState ¶
func (d *DBWrapper) KeepDatabaseLocalState() *messengertypes.LocalDatabaseState
func (*DBWrapper) MarkInteractionAsAcknowledged ¶
func (d *DBWrapper) MarkInteractionAsAcknowledged(cid string) (*messengertypes.Interaction, error)
func (*DBWrapper) MarkMemberAsConversationCreator ¶
func (*DBWrapper) MarkMetadataEventHandled ¶
func (d *DBWrapper) MarkMetadataEventHandled(eventContext *protocoltypes.EventContext) (bool, error)
func (*DBWrapper) MuteConversation ¶ added in v2.381.0
func (*DBWrapper) PushSetReplicationAutoShare ¶
func (*DBWrapper) RestoreFromBackup ¶
func (d *DBWrapper) RestoreFromBackup(backup *messengertypes.LocalDatabaseState, replayLogsToDB func() error) error
func (*DBWrapper) SaveConversationReplicationInfo ¶
func (d *DBWrapper) SaveConversationReplicationInfo(c messengertypes.ConversationReplicationInfo) error
func (*DBWrapper) SetConversationIsOpenStatus ¶
func (d *DBWrapper) SetConversationIsOpenStatus(conversationPK string, status bool) (*messengertypes.Conversation, bool, error)
func (*DBWrapper) UpdateAccount ¶
func (d *DBWrapper) UpdateAccount(pk, url, displayName, avatarCID string) (*messengertypes.Account, error)
func (*DBWrapper) UpdateAccountFields ¶ added in v2.381.0
func (*DBWrapper) UpdateContact ¶
func (d *DBWrapper) UpdateContact(pk string, contact messengertypes.Contact) error
func (*DBWrapper) UpdateConversation ¶
func (d *DBWrapper) UpdateConversation(c messengertypes.Conversation) (bool, error)
func (*DBWrapper) UpdateConversationReadState ¶
func (*DBWrapper) UpdateDevicePushServer ¶
func (d *DBWrapper) UpdateDevicePushServer(server *protocoltypes.PushServer) (*messengertypes.Account, error)
func (*DBWrapper) UpdateDevicePushToken ¶
func (d *DBWrapper) UpdateDevicePushToken(token *protocoltypes.PushServiceReceiver) (*messengertypes.Account, error)
func (*DBWrapper) UpdateDeviceSetPushToken ¶ added in v2.344.0
func (*DBWrapper) UpsertMember ¶
func (d *DBWrapper) UpsertMember(memberPK, groupPK string, m messengertypes.Member) (*messengertypes.Member, bool, error)
type GetInMemoryTestDBOpts ¶
type GetInMemoryTestDBOpts int32
type NextMediaOpts ¶
Click to show internal directories.
Click to hide internal directories.