Documentation ¶
Index ¶
- func ServerCommandToLocalCommand(data *user.AllCommandInfoResp) *model_struct.LocalUserCommand
- func ServerUserToLocalUser(user *sdkws.UserInfo) *model_struct.LocalUser
- type BasicInfo
- type CommandInfoResponse
- 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) 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) ParseTokenFromSvr(ctx context.Context) (int64, error)
- func (u *User) ProcessUserCommandAdd(ctx context.Context, userCommand *userPb.ProcessUserCommandAddReq) error
- func (u *User) ProcessUserCommandDelete(ctx context.Context, userCommand *userPb.ProcessUserCommandDeleteReq) error
- func (u *User) ProcessUserCommandGetAll(ctx context.Context) ([]*userPb.CommandInfoResp, error)
- func (u *User) ProcessUserCommandUpdate(ctx context.Context, userCommand *userPb.ProcessUserCommandUpdateReq) error
- func (u *User) SetGlobalRecvMessageOpt(ctx context.Context, opt int) error
- func (u *User) SetListener(listener func() open_im_sdk_callback.OnUserListener)
- func (u *User) SetSelfInfo(ctx context.Context, userInfo *sdkws.UserInfo) errordeprecated
- func (u *User) SetSelfInfoEx(ctx context.Context, userInfo *sdkws.UserInfoWithEx) error
- func (u *User) SyncAllCommand(ctx context.Context) error
- func (u *User) SyncAllCommandWithoutNotice(ctx context.Context) error
- func (u *User) SyncLoginUserInfo(ctx context.Context) error
- func (u *User) SyncLoginUserInfoWithoutNotice(ctx context.Context) error
- func (u *User) UpdateMsgSenderInfo(ctx context.Context, nickname, faceURL string) (err error)
- func (u *User) UserOnlineStatusChange(users map[string][]int32)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ServerCommandToLocalCommand ¶ added in v3.8.0
func ServerCommandToLocalCommand(data *user.AllCommandInfoResp) *model_struct.LocalUserCommand
func ServerUserToLocalUser ¶
func ServerUserToLocalUser(user *sdkws.UserInfo) *model_struct.LocalUser
Types ¶
type CommandInfoResponse ¶ added in v3.8.0
type CommandInfoResponse struct {
CommandResp []*userPb.AllCommandInfoResp `json:"CommandResp"`
}
type User ¶
type User struct { db_interface.DataBase UserBasicCache *cache.Cache[string, *BasicInfo] // 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) 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) ProcessUserCommandAdd ¶ added in v3.8.0
func (u *User) ProcessUserCommandAdd(ctx context.Context, userCommand *userPb.ProcessUserCommandAddReq) error
CRUD user command
func (*User) ProcessUserCommandDelete ¶ added in v3.8.0
func (u *User) ProcessUserCommandDelete(ctx context.Context, userCommand *userPb.ProcessUserCommandDeleteReq) error
ProcessUserCommandDelete delete user's choice
func (*User) ProcessUserCommandGetAll ¶ added in v3.8.0
ProcessUserCommandGet get user's choice
func (*User) ProcessUserCommandUpdate ¶ added in v3.8.0
func (u *User) ProcessUserCommandUpdate(ctx context.Context, userCommand *userPb.ProcessUserCommandUpdateReq) error
ProcessUserCommandUpdate update user's choice
func (*User) SetGlobalRecvMessageOpt ¶ added in v3.4.0
func (*User) SetListener ¶
func (u *User) SetListener(listener func() open_im_sdk_callback.OnUserListener)
SetListener sets the user's listener.
func (*User) SetSelfInfoEx ¶ added in v3.5.0
func (*User) SyncAllCommand ¶ added in v3.8.0
func (*User) SyncAllCommandWithoutNotice ¶ added in v3.8.0
func (*User) SyncLoginUserInfoWithoutNotice ¶ added in v3.8.0
func (*User) UpdateMsgSenderInfo ¶
func (*User) UserOnlineStatusChange ¶ added in v3.8.0
Click to show internal directories.
Click to hide internal directories.