Documentation ¶
Index ¶
- func ServerUserToLocalUser(user *sdkws.UserInfo) *model_struct.LocalUser
- type BasicInfo
- type User
- func (u *User) DoNotification(ctx context.Context, msg *sdkws.MsgData)
- func (u *User) GetSelfUserInfo(ctx context.Context) (*model_struct.LocalUser, error)
- func (u *User) GetServerUserInfo(ctx context.Context, userIDs []string) ([]*sdkws.UserInfo, error)
- func (u *User) GetSingleUserFromSvr(ctx context.Context, userID string) (*model_struct.LocalUser, error)
- func (u *User) GetSubscribeUsersStatus(ctx context.Context) ([]*userPb.OnlineStatus, error)
- func (u *User) GetUserStatus(ctx context.Context, userIDs []string) ([]*userPb.OnlineStatus, error)
- func (u *User) GetUsersInfo(ctx context.Context, userIDs []string) ([]*model_struct.LocalUser, error)
- func (u *User) GetUsersInfoFromSvr(ctx context.Context, userIDs []string) ([]*model_struct.LocalUser, error)
- func (u *User) LoginTime() int64
- func (u *User) ParseTokenFromSvr(ctx context.Context) (int64, error)
- func (u *User) SetGlobalRecvMessageOpt(ctx context.Context, opt int) error
- func (u *User) SetListener(listener open_im_sdk_callback.OnUserListener)
- func (u *User) SetLoginTime(loginTime int64)
- func (u *User) SetSelfInfo(ctx context.Context, userInfo *sdkws.UserInfo) error
- func (u *User) SubscribeUsersStatus(ctx context.Context, userIDs []string) ([]*userPb.OnlineStatus, error)
- func (u *User) SyncLoginUserInfo(ctx context.Context) error
- func (u *User) SyncUserStatus(ctx context.Context, fromUserID string, status int32, platformID int32)
- func (u *User) UnsubscribeUsersStatus(ctx context.Context, userIDs []string) error
- func (u *User) UpdateMsgSenderInfo(ctx context.Context, nickname, faceURL string) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ServerUserToLocalUser ¶
func ServerUserToLocalUser(user *sdkws.UserInfo) *model_struct.LocalUser
Types ¶
type User ¶
type User struct { db_interface.DataBase UserBasicCache *cache.Cache[string, *BasicInfo] OnlineStatusCache *cache.Cache[string, *userPb.OnlineStatus] // contains filtered or unexported fields }
User is a struct that represents a user in the system.
func NewUser ¶
func NewUser(dataBase db_interface.DataBase, loginUserID string, conversationCh chan common.Cmd2Value) *User
NewUser creates a new User object.
func (*User) DoNotification ¶
DoNotification handles incoming notifications for the user.
func (*User) GetSelfUserInfo ¶
func (*User) GetServerUserInfo ¶
GetServerUserInfo retrieves user information from the server.
func (*User) GetSingleUserFromSvr ¶
func (u *User) GetSingleUserFromSvr(ctx context.Context, userID string) (*model_struct.LocalUser, error)
GetSingleUserFromSvr retrieves user information from the server.
func (*User) GetSubscribeUsersStatus ¶
func (*User) GetUserStatus ¶
func (*User) GetUsersInfo ¶
func (*User) GetUsersInfoFromSvr ¶
func (u *User) GetUsersInfoFromSvr(ctx context.Context, userIDs []string) ([]*model_struct.LocalUser, error)
GetUsersInfoFromSvr retrieves user information from the server.
func (*User) ParseTokenFromSvr ¶
ParseTokenFromSvr parses a token from the server.
func (*User) SetGlobalRecvMessageOpt ¶ added in v3.4.0
func (*User) SetListener ¶
func (u *User) SetListener(listener open_im_sdk_callback.OnUserListener)
SetListener sets the user's listener.
func (*User) SetLoginTime ¶
SetLoginTime sets the login time of the user.
func (*User) SetSelfInfo ¶
func (*User) SubscribeUsersStatus ¶
func (*User) SyncUserStatus ¶
func (*User) UnsubscribeUsersStatus ¶
Click to show internal directories.
Click to hide internal directories.