Documentation
¶
Index ¶
- type Database
- type Message
- type MessageQuery
- func (mq *MessageQuery) GetAll(chat PortalKey) (messages []*Message)
- func (mq *MessageQuery) GetByGMID(chat PortalKey, gmid groupme.ID) *Message
- func (mq *MessageQuery) GetByMXID(mxid id.EventID) *Message
- func (mq *MessageQuery) GetFirstInChat(chat PortalKey) *Message
- func (mq *MessageQuery) GetLastInChat(chat PortalKey) *Message
- func (mq *MessageQuery) GetLastInChatBefore(chat PortalKey, maxTimestamp time.Time) *Message
- func (mq *MessageQuery) GetMessagesBetween(chat PortalKey, minTimestamp, maxTimestamp time.Time) (messages []*Message)
- func (mq *MessageQuery) New() *Message
- type Portal
- type PortalKey
- type PortalQuery
- func (pq *PortalQuery) FindPrivateChats(receiver groupme.ID) []*Portal
- func (pq *PortalQuery) GetAll() []*Portal
- func (pq *PortalQuery) GetAllByGMID(gmid groupme.ID) []*Portal
- func (pq *PortalQuery) GetByGMID(key PortalKey) *Portal
- func (pq *PortalQuery) GetByMXID(mxid id.RoomID) *Portal
- func (pq *PortalQuery) New() *Portal
- type Puppet
- type PuppetQuery
- type Reaction
- type ReactionQuery
- type User
- type UserQuery
Constants ¶
This section is empty.
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 Reaction *ReactionQuery }
type Message ¶
type MessageQuery ¶
type MessageQuery struct {
// contains filtered or unexported fields
}
func (*MessageQuery) GetAll ¶
func (mq *MessageQuery) GetAll(chat PortalKey) (messages []*Message)
func (*MessageQuery) GetByGMID ¶
func (mq *MessageQuery) GetByGMID(chat PortalKey, gmid groupme.ID) *Message
func (*MessageQuery) GetFirstInChat ¶
func (mq *MessageQuery) GetFirstInChat(chat PortalKey) *Message
func (*MessageQuery) GetLastInChat ¶
func (mq *MessageQuery) GetLastInChat(chat PortalKey) *Message
func (*MessageQuery) GetLastInChatBefore ¶
func (mq *MessageQuery) GetLastInChatBefore(chat PortalKey, maxTimestamp time.Time) *Message
func (*MessageQuery) GetMessagesBetween ¶
func (mq *MessageQuery) GetMessagesBetween(chat PortalKey, minTimestamp, maxTimestamp time.Time) (messages []*Message)
func (*MessageQuery) New ¶
func (mq *MessageQuery) New() *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 // contains filtered or unexported fields }
func (*Portal) Update ¶
func (portal *Portal) Update(txn dbutil.Transaction)
type PortalKey ¶
type PortalKey struct { GMID groupme.ID Receiver groupme.ID }
GMID is the puppet or the group Receiver is the "Other Person" in a DM or the group itself in a group
func GroupPortalKey ¶
func GroupPortalKey(gmid groupme.ID) PortalKey
func NewPortalKey ¶
func NewPortalKey(gmid, receiver groupme.ID) PortalKey
func ParsePortalKey ¶
type PortalQuery ¶
type PortalQuery struct {
// contains filtered or unexported fields
}
func (*PortalQuery) FindPrivateChats ¶
func (pq *PortalQuery) FindPrivateChats(receiver groupme.ID) []*Portal
func (*PortalQuery) GetAll ¶
func (pq *PortalQuery) GetAll() []*Portal
func (*PortalQuery) GetAllByGMID ¶
func (pq *PortalQuery) GetAllByGMID(gmid groupme.ID) []*Portal
func (*PortalQuery) GetByGMID ¶
func (pq *PortalQuery) GetByGMID(key PortalKey) *Portal
func (*PortalQuery) New ¶
func (pq *PortalQuery) New() *Portal
type Puppet ¶
type Puppet struct { GMID groupme.ID Displayname string NameSet bool Avatar string AvatarURL id.ContentURI AvatarSet bool CustomMXID id.UserID AccessToken string NextBatch string EnableReceipts bool // contains filtered or unexported fields }
Puppet is comment
type PuppetQuery ¶
type PuppetQuery struct {
// contains filtered or unexported fields
}
func (*PuppetQuery) Get ¶
func (pq *PuppetQuery) Get(gmid groupme.ID) *Puppet
func (*PuppetQuery) GetAll ¶
func (pq *PuppetQuery) GetAll() (puppets []*Puppet)
func (*PuppetQuery) GetAllWithCustomMXID ¶
func (pq *PuppetQuery) GetAllWithCustomMXID() (puppets []*Puppet)
func (*PuppetQuery) GetByCustomMXID ¶
func (pq *PuppetQuery) GetByCustomMXID(mxid id.UserID) *Puppet
func (*PuppetQuery) New ¶
func (pq *PuppetQuery) New() *Puppet
type Reaction ¶
type ReactionQuery ¶
type ReactionQuery struct {
// contains filtered or unexported fields
}
func (*ReactionQuery) GetByTargetGMID ¶
func (rq *ReactionQuery) GetByTargetGMID(chat PortalKey, gmid groupme.ID, sender groupme.ID) *Reaction
func (*ReactionQuery) New ¶
func (mq *ReactionQuery) New() *Reaction
type User ¶
type User struct { MXID id.UserID GMID groupme.ID ManagementRoom id.RoomID SpaceRoom id.RoomID Token string // contains filtered or unexported fields }
func (*User) MarkInSpace ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.