Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type User ¶ added in v0.3.0
type User struct {
Bio string
MemberOf []int
Pfp []byte
Username string
Visibility prot.UserVisibility
}
Data of a user
type UserCache ¶ added in v0.3.0
type UserCache struct {
// Cache of this client's user, this same pointer should also be present in Users at any time after logging in
ThisUser *User
// Cache of other users' data
// Key (string) - Username
// Val (User) - User data
Users map[string]*User
// Binding to cache of other users' data
UsersBind map[string]*UserBind
}
Data about the client's user and other user data received from the server
func NewUserCache ¶ added in v0.4.0
func NewUserCache() *UserCache
func (*UserCache) CacheUserBack ¶ added in v0.4.0
func (u *UserCache) CacheUserBack(userRaw prot.UserRaw)
Caches all avaliable data of a user
func (*UserCache) CacheUserFront ¶ added in v0.4.0
Caches only the data of a user required to render a message from or card of them
func (*UserCache) SetThisUser ¶ added in v0.4.0
Click to show internal directories.
Click to hide internal directories.