Documentation
¶
Index ¶
- Constants
- type Database
- type Message
- type MessageErrorType
- type MessageQuery
- type MessageType
- type Portal
- type PortalKey
- type PortalQuery
- func (pq *PortalQuery) FindPrivateChats(receiver types.UID) []*Portal
- func (pq *PortalQuery) FindPrivateChatsNotInSpace(receiver types.UID) []PortalKey
- func (pq *PortalQuery) GetAll() []*Portal
- func (pq *PortalQuery) GetAllByUID(uid types.UID) []*Portal
- func (pq *PortalQuery) GetByMXID(mxid id.RoomID) *Portal
- func (pq *PortalQuery) GetByUID(key PortalKey) *Portal
- func (pq *PortalQuery) New() *Portal
- type Puppet
- type PuppetQuery
- type User
- func (u *User) GetLastReadTS(portal PortalKey) time.Time
- func (u *User) Insert()
- func (u *User) IsInSpace(portal PortalKey) bool
- func (u *User) MarkInSpace(portal PortalKey)
- func (u *User) Scan(row dbutil.Scannable) *User
- func (u *User) SetLastReadTS(portal PortalKey, ts time.Time)
- func (u *User) Update()
- type UserQuery
Constants ¶
View Source
const SEP_PORTAL = "\u0002"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct { *dbutil.Database User *UserQuery Portal *PortalQuery Puppet *PuppetQuery Message *MessageQuery }
type Message ¶
type Message struct { Chat PortalKey MsgID string MXID id.EventID Sender types.UID Timestamp time.Time Sent bool Type MessageType Error MessageErrorType // contains filtered or unexported fields }
func (*Message) Insert ¶
func (m *Message) Insert(txn dbutil.Transaction)
func (*Message) IsFakeMXID ¶
func (*Message) IsFakeMsgID ¶
func (*Message) UpdateMXID ¶
func (m *Message) UpdateMXID(txn dbutil.Transaction, mxid id.EventID, newType MessageType, newError MessageErrorType)
type MessageErrorType ¶
type MessageErrorType string
const ( MsgNoError MessageErrorType = "" MsgErrDecryptionFailed MessageErrorType = "decryption_failed" MsgErrMediaNotFound MessageErrorType = "media_not_found" )
type MessageQuery ¶
type MessageQuery struct {
// contains filtered or unexported fields
}
func (*MessageQuery) GetAll ¶
func (mq *MessageQuery) GetAll(chat PortalKey) []*Message
func (*MessageQuery) GetByMsgID ¶
func (mq *MessageQuery) GetByMsgID(chat PortalKey, msgID string) *Message
func (*MessageQuery) New ¶
func (mq *MessageQuery) New() *Message
type MessageType ¶
type MessageType string
const ( MsgUnknown MessageType = "" MsgFake MessageType = "fake" MsgNormal MessageType = "message" )
type Portal ¶
type Portal struct { Key PortalKey MXID id.RoomID Name string NameSet bool Topic string TopicSet bool Avatar string AvatarURL id.ContentURI AvatarSet bool Encrypted bool LastSync time.Time FirstEventID id.EventID NextBatchID id.BatchID // contains filtered or unexported fields }
func (*Portal) Update ¶
func (p *Portal) Update(txn dbutil.Transaction)
type PortalKey ¶
func NewPortalKey ¶
type PortalQuery ¶
type PortalQuery struct {
// contains filtered or unexported fields
}
func (*PortalQuery) FindPrivateChats ¶
func (pq *PortalQuery) FindPrivateChats(receiver types.UID) []*Portal
func (*PortalQuery) FindPrivateChatsNotInSpace ¶
func (pq *PortalQuery) FindPrivateChatsNotInSpace(receiver types.UID) []PortalKey
func (*PortalQuery) GetAll ¶
func (pq *PortalQuery) GetAll() []*Portal
func (*PortalQuery) GetAllByUID ¶
func (pq *PortalQuery) GetAllByUID(uid types.UID) []*Portal
func (*PortalQuery) GetByUID ¶
func (pq *PortalQuery) GetByUID(key PortalKey) *Portal
func (*PortalQuery) New ¶
func (pq *PortalQuery) New() *Portal
type Puppet ¶
type PuppetQuery ¶
type PuppetQuery struct {
// contains filtered or unexported fields
}
func (*PuppetQuery) GetAll ¶
func (pq *PuppetQuery) GetAll() []*Puppet
func (*PuppetQuery) GetAllWithCustomMXID ¶
func (pq *PuppetQuery) GetAllWithCustomMXID() []*Puppet
func (*PuppetQuery) GetByCustomMXID ¶
func (pq *PuppetQuery) GetByCustomMXID(mxid id.UserID) *Puppet
func (*PuppetQuery) New ¶
func (pq *PuppetQuery) New() *Puppet
type User ¶
type User struct { MXID id.UserID UID types.UID ManagementRoom id.RoomID SpaceRoom id.RoomID // contains filtered or unexported fields }
func (*User) MarkInSpace ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.