Documentation ¶
Index ¶
- type DB
- type ReadTx
- func (tx *ReadTx) IsBlocked(target facechat.ID) error
- func (tx *ReadTx) IsInRoom(roomID facechat.ID) error
- func (tx *ReadTx) IsMutual(target facechat.ID) error
- func (tx *ReadTx) JoinedRooms() ([]facechat.Room, error)
- func (tx *ReadTx) Messages(roomID, beforeID facechat.ID, limit int) ([]facechat.Message, error)
- func (tx *ReadTx) PrivateRooms() ([]facechat.PrivateRoom, error)
- func (tx *ReadTx) Relationship(self, target facechat.ID) (facechat.RelationshipType, error)
- func (tx *ReadTx) Room(roomID facechat.ID) (*facechat.Room, error)
- func (tx *ReadTx) RoomParticipants(roomID facechat.ID) ([]facechat.ID, error)
- func (tx *ReadTx) SearchRoom(query string) ([]facechat.Room, error)
- func (tx *ReadTx) Session(token string) (*facechat.Session, error)
- func (tx *ReadTx) User(id facechat.ID) (*facechat.User, error)
- func (tx *ReadTx) UserAccounts(id facechat.ID) ([]facechat.Account, error)
- func (tx *ReadTx) UserAccountsLen(id facechat.ID) (n int, err error)
- type Tx
- func (tx *Tx) AddAccount(acc facechat.Account) error
- func (tx *Tx) AddMessage(msg *facechat.Message) error
- func (tx *Tx) CreateMessage(room facechat.ID, content string) (*facechat.Message, error)
- func (tx *Tx) CreatePrivateRoom(targetUser facechat.ID) (*facechat.Room, error)
- func (tx *Tx) CreatePublicLobby(name string, lvl facechat.SecretLevel) (*facechat.Room, error)
- func (tx *Tx) JoinRoom(room facechat.ID) error
- func (tx *Tx) LeaveRoom(room facechat.ID) error
- func (tx *Tx) Login(email, password string) (*facechat.Session, error)
- func (tx *Tx) Register(username, password, email string) (*facechat.User, *facechat.Session, error)
- func (tx *Tx) SetRelationship(targetID facechat.ID, rel facechat.RelationshipType) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReadTx ¶
type ReadTx struct {
// contains filtered or unexported fields
}
func (*ReadTx) IsMutual ¶
IsMutual returns nil if self is a friend of target and target is also a friend of self.
func (*ReadTx) PrivateRooms ¶
func (tx *ReadTx) PrivateRooms() ([]facechat.PrivateRoom, error)
func (*ReadTx) Relationship ¶
func (*ReadTx) Room ¶
Room returns a public room. It returns an ErrRoomNotFound if the room is private.
func (*ReadTx) RoomParticipants ¶
func (*ReadTx) UserAccounts ¶
type Tx ¶
type Tx struct {
*ReadTx
}
func (*Tx) CreateMessage ¶
func (*Tx) CreatePrivateRoom ¶
func (*Tx) CreatePublicLobby ¶
func (*Tx) SetRelationship ¶
Click to show internal directories.
Click to hide internal directories.