user

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2024 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Web3VerifyLogin 校验登录
	Web3VerifyLogin string = "login"
	// Web3VerifyPassword 校验密码
	Web3VerifyPassword string = "password"
)
View Source
const (
	// CategoryCustomerService 客服
	CategoryCustomerService = "customerService"
	// CategorySystem 系统账号
	CategorySystem = "system"
)
View Source
const (
	// CacheKeyFriends 好友key
	CacheKeyFriends string = "lm-friends:"
)
View Source
const (
	ChannelServiceName = "channel"
)
View Source
const (
	ThirdAuthcodePrefix = "thirdlogin:authcode:"
)
View Source
const (
	UserRedDotCategoryFriendApply = "friendApply"
)

Variables

View Source
var (
	ErrUserNeedVerification = errors.New("user need verification") // 用户需要验证
)
View Source
var ErrorUserNotExist = errors.New("用户不存在!")
View Source
var Names = []string{}/* 182 elements not displayed */

Names 注册用户随机名字

Functions

func SendQRCodeInfo

func SendQRCodeInfo(uuid string, qrcode *common.QRCodeModel)

SendQRCodeInfo 发送二维码数据

Types

type AddUserReq

type AddUserReq struct {
	Name     string
	UID      string // 如果无值,则随机生成
	Username string
	Zone     string
	Phone    string
	Email    string
	Password string
}

AddUserReq AddUserReq

type BlacklistModel

type BlacklistModel struct {
	UID      string // 用户唯一id
	Name     string // 用户名称
	Username string // 用户名
	db.BaseModel
}

BlacklistModel 黑名单用户

type Category

type Category string

type DB

type DB struct {
	// contains filtered or unexported fields
}

DB 用户db操作

func NewDB

func NewDB(ctx *config.Context) *DB

NewDB NewDB

func (*DB) AddOrRemoveBlacklistTx

func (d *DB) AddOrRemoveBlacklistTx(uid string, touid string, blacklist int, version int64, tx *dbr.Tx) error

AddOrRemoveBlacklist 添加黑名单

func (*DB) Blacklists

func (d *DB) Blacklists(uid string) ([]*BlacklistModel, error)

Blacklists 黑名单列表

func (*DB) Insert

func (d *DB) Insert(m *Model) error

Insert 添加用户

func (*DB) QueryByCategory

func (d *DB) QueryByCategory(category string) ([]*Model, error)

QueryByCategory 根据用户分类查询用户列表

func (*DB) QueryByKeyword

func (d *DB) QueryByKeyword(keyword string) (*Model, error)

QueryByKeyword 通过用户名查询用户信息

func (*DB) QueryByPhone

func (d *DB) QueryByPhone(zone string, phone string) (*Model, error)

QueryByPhone 通过手机号和区号查询用户信息

func (*DB) QueryByPhones

func (d *DB) QueryByPhones(phones []string) ([]*Model, error)

查询多个手机号用户

func (*DB) QueryByUID

func (d *DB) QueryByUID(uid string) (*Model, error)

QueryByUID 通过用户uid查询用户信息

func (*DB) QueryByUIDs

func (d *DB) QueryByUIDs(uids []string) ([]*Model, error)

QueryByUIDs 根据用户uid查询用户信息

func (*DB) QueryByUsername

func (d *DB) QueryByUsername(username string) (*Model, error)

QueryByUsername 通过用户名查询用户信息

func (*DB) QueryByUsernameCxt

func (d *DB) QueryByUsernameCxt(ctx context.Context, username string) (*Model, error)

QueryByUsernameCxt 通过用户名查询用户信息

func (*DB) QueryByVercode

func (d *DB) QueryByVercode(vercode string) (*Model, error)

QueryByVercode 通过用户vercode查询用户信息

func (*DB) QueryDetailByUID

func (d *DB) QueryDetailByUID(uid string, loginUID string) (*Detail, error)

QueryDetailByUID 查询用户详情

func (*DB) QueryDetailByUIDs

func (d *DB) QueryDetailByUIDs(uids []string, loginUID string) ([]*Detail, error)

QueryDetailByUIDs 查询用户详情集合

func (*DB) QueryUIDsByUsernames

func (d *DB) QueryUIDsByUsernames(usernames []string) ([]string, error)

QueryUIDsByUsernames 通过用户名查询用户uids

func (*DB) QueryUserWithOnlyShortNo

func (d *DB) QueryUserWithOnlyShortNo(shortNo string) (*Model, error)

QueryUserWithOnlyShortNo 通过short_no获取用户信息

func (*DB) QueryWithAppID

func (d *DB) QueryWithAppID(appID string) ([]*Model, error)

QueryWithAppID 根据appID查询用户列表

func (*DB) UpdateUsersWithField

func (d *DB) UpdateUsersWithField(field string, value string, uid string) error

UpdateUsersWithField 修改用户基本资料

type Detail

type Detail struct {
	Model
	Mute         int // 免打扰
	Top          int // 置顶
	ChatPwdOn    int //是否开启聊天密码
	Screenshot   int //截屏通知
	RevokeRemind int //撤回提醒
	Receipt      int //消息回执
	db.BaseModel
}

Detail 详情

type DetailModel

type DetailModel struct {
	Remark     string //好友备注
	ToUID      string // 好友uid
	ToName     string // 好友名字
	ToCategory string // 用户分类
	Mute       int    // 免打扰
	Top        int    // 置顶
	Version    int64  // 版本
	Vercode    string // 验证码 加好友需要
	IsDeleted  int    // 是否删除
	IsAlone    int    // 是否为单项好友
	ShortNo    string //短编号
	ChatPwdOn  int    // 是否开启聊天密码
	Blacklist  int    //是否在黑名单
	Receipt    int    //消息是否回执
	Robot      int    // 机器人0.否1.是
	db.BaseModel
}

DetailModel 好友详情

type Friend

type Friend struct {
	log.Log
	// contains filtered or unexported fields
}

Friend 好友

func NewFriend

func NewFriend(ctx *config.Context) *Friend

NewFriend 创建

func (*Friend) Route

func (f *Friend) Route(r *wkhttp.WKHttp)

Route 配置路由规则

type FriendApplyModel

type FriendApplyModel struct {
	UID    string
	ToUID  string
	Remark string
	Token  string
	Status int // 状态 0.未处理 1.通过 2.拒绝
	db.BaseModel
}

FriendApplyModel 好友申请记录

type FriendDetailModel

type FriendDetailModel struct {
	FriendModel
	Name   string // 用户名称
	ToName string //对方用户名称
}

FriendDetailModel 好友资料

type FriendModel

type FriendModel struct {
	UID           string
	ToUID         string
	Flag          int
	Version       int64
	IsDeleted     int
	IsAlone       int // 是否为单项好友
	Vercode       string
	SourceVercode string //来源验证码
	Initiator     int    //1:发起方
	db.BaseModel
}

FriendModel 好友对象

type FriendReq

type FriendReq struct {
	UID     string
	ToUID   string
	Flag    int
	Version int64
}

FriendReq FriendReq

type FriendResp

type FriendResp struct {
	Name    string
	UID     string
	IsAlone int // 是否为单项好友
	Remark  string
}

FriendResp 用户好友

type IOnlineService

type IOnlineService interface {
	// 获取用户最新在线状态
	GetUserLastOnlineStatus(uids []string) ([]*config.OnlinestatusResp, error)

	// 判断用户设备是否在线
	DeviceOnline(uid string, device config.DeviceFlag) (bool, error)

	// 总在线人数
	GetOnlineCount() (int64, error)
}

type IService

type IService interface {
	//获取用户
	GetUser(uid string) (*Resp, error)
	// 获取用户详情(包括与loginUID的关系等等)
	GetUserDetail(uid string, loginUID string) (*UserDetailResp, error)
	// 批量获取用户详情
	GetUserDetails(uids []string, loginUID string) ([]*UserDetailResp, error)
	// 通过用户名获取用户
	GetUserWithUsername(username string) (*Resp, error)
	// 通过用户名获取用户uid集合
	GetUserUIDWithUsernames(usernames []string) ([]string, error)
	// 批量获取用户信息
	GetUsers(uids []string) ([]*Resp, error)
	// 通过APPID获取用户
	GetUsersWithAppID(appID string) ([]*Resp, error)
	// 获取用户集合
	GetUsersWithCategory(category Category) ([]*Resp, error)
	// 获取指定类别的用户列表
	GetUsersWithCategories(categories []string) ([]*Resp, error)
	//查询某个人好友
	GetFriendsWithToUIDs(uid string, toUIDs []string) ([]*FriendResp, error)
	//查询某个用户的所有好友
	GetFriends(uid string) ([]*FriendResp, error)
	//添加一个好友
	AddFriend(uid string, friend *FriendReq) error
	//添加一个用户
	AddUser(user *AddUserReq) error
	// 通过qrvercode获取用户信息
	GetUserWithQRVercode(qrVercode string) (*Resp, error)
	// 获取总用户数量
	GetAllUserCount() (int64, error)
	// 查询某天注册用户数
	GetRegisterWithDate(date string) (int64, error)
	// 获取某个时间区间的注册数量
	GetRegisterCountWithDateSpace(startDate, endDate string) (map[string]int64, error)
	// IsFriend 查询两个用户是否为好友关系
	IsFriend(uid string, toUID string) (bool, error)
	// 获取在线用户
	GetUserOnlineStatus([]string) ([]*OnLineUserResp, error)
	// 更新用户信息
	UpdateUser(req UserUpdateReq) error
	// 获取所有用户
	GetAllUsers() ([]*Resp, error)
	// 更新登录密码
	UpdateLoginPassword(req UpdateLoginPasswordReq) error

	// GetUserSettings 获取用户的配置
	GetUserSettings(uids []string, loginUID string) ([]*SettingResp, error)

	// GetOnetimePrekeyCount 获取用户一次性signal key的数量(决定是否可以开启加密通讯)
	GetOnetimePrekeyCount(uid string) (int, error)

	// 获取设备在线状态
	GetDeviceOnline(uid string, deviceFlag config.DeviceFlag) (*config.OnlinestatusResp, error)
	// 查询在线用户总数量
	GetOnlineCount() (int64, error)
	// 存在黑明单
	ExistBlacklist(uid string, toUID string) (bool, error)
	// 更新用户消息过期时长
	UpdateUserMsgExpireSecond(uid string, msgExpireSecond int64) error
	// 搜索好友
	SearchFriendsWithKeyword(uid string, keyword string) ([]*FriendResp, error)
}

IService 用户服务接口

func NewService

func NewService(ctx *config.Context) IService

NewService NewService

type LoginLog

type LoginLog struct {
	log.Log
	// contains filtered or unexported fields
}

LoginLog 用户设置

func NewLoginLog

func NewLoginLog(ctx *config.Context) *LoginLog

NewLoginLog 创建

type LoginLogDB

type LoginLogDB struct {
	// contains filtered or unexported fields
}

LoginLogDB 登录日志DB

func NewLoginLogDB

func NewLoginLogDB(session *dbr.Session) *LoginLogDB

NewLoginLogDB NewDB

type LoginLogModel

type LoginLogModel struct {
	LoginIP string //登录IP
	UID     string
	db.BaseModel
}

LoginLogModel 登录日志

type Manager

type Manager struct {
	log.Log
	// contains filtered or unexported fields
}

Manager 用户管理

func NewManager

func NewManager(ctx *config.Context) *Manager

NewManager NewManager

func (*Manager) Route

func (m *Manager) Route(r *wkhttp.WKHttp)

Route 配置路由规则

type Model

type Model struct {
	AppID             string //app id
	UID               string // 用户唯一id
	Name              string // 用户名称
	Username          string // 用户名
	Email             string // email地址
	Password          string // 用户密码
	Category          string //用户分类
	Sex               int    //性别
	ShortNo           string //唯一短编号
	ShortStatus       int    //唯一短编号是否修改0.否1.是
	Zone              string //区号
	Phone             string //手机号
	ChatPwd           string //聊天密码
	LockScreenPwd     string // 锁屏密码
	LockAfterMinute   int    // 在几分钟后锁屏 0表示立即
	DeviceLock        int    //是否开启设备锁
	SearchByPhone     int    //是否可以通过手机号搜索0.否1.是
	SearchByShort     int    //是否可以通过短编号搜索0.否1.是
	NewMsgNotice      int    //新消息通知0.否1.是
	MsgShowDetail     int    //显示消息通知详情0.否1.是
	VoiceOn           int    //声音0.否1.是
	ShockOn           int    //震动0.否1.是
	OfflineProtection int    // 离线保护
	Version           int64
	Status            int    // 状态 0.禁用 1.启用
	Vercode           string //验证码
	QRVercode         string // 二维码验证码
	IsUploadAvatar    int    // 是否上传过头像0:未上传1:已上传
	Role              string // 角色 admin/superAdmin
	Robot             int    // 机器人0.否1.是
	MuteOfApp         int    // app是否禁音(当pc登录的时候app可以设置禁音,当pc登录后有效)
	IsDestroy         int    // 是否已注销0.否1.是
	WXOpenid          string // 微信openid
	WXUnionid         string // 微信unionid
	GiteeUID          string // gitee uid
	GithubUID         string // github uid
	Web3PublicKey     string // web3公钥
	MsgExpireSecond   int64  // 消息过期时长
	db.BaseModel
}

Model 用户db model

type OnLineUserResp

type OnLineUserResp struct {
	UID         string
	LastOffline int
	Online      int
	DeviceFlag  uint8
}

type OnlineService

type OnlineService struct {
	log.Log
	// contains filtered or unexported fields
}

func NewOnlineService

func NewOnlineService(ctx *config.Context) *OnlineService

func (*OnlineService) DeviceOnline

func (o *OnlineService) DeviceOnline(uid string, device config.DeviceFlag) (bool, error)

func (*OnlineService) GetOnlineCount

func (o *OnlineService) GetOnlineCount() (int64, error)

func (*OnlineService) GetUserLastOnlineStatus

func (o *OnlineService) GetUserLastOnlineStatus(uids []string) ([]*config.OnlinestatusResp, error)

type Resp

type Resp struct {
	UID             string
	Name            string
	Zone            string
	Phone           string
	Email           string
	Status          int // 用户状态 1 正常 2:黑名单 0 禁用
	Password        string
	IsUploadAvatar  int
	NewMsgNotice    int
	MsgShowDetail   int //显示消息通知详情0.否1.是
	MsgExpireSecond int64
	CreatedAt       int64 // 注册时间 10位时间戳
	IsDestroy       int   // 是否注销
}

Resp 用户返回

type Service

type Service struct {
	log.Log
	// contains filtered or unexported fields
}

Service Service

func (*Service) AddFriend

func (s *Service) AddFriend(uid string, friend *FriendReq) error

AddFriend 添加一个好友

func (*Service) AddUser

func (s *Service) AddUser(user *AddUserReq) error

AddUser AddUser

func (*Service) ExistBlacklist

func (s *Service) ExistBlacklist(uid string, toUID string) (bool, error)

func (*Service) GetAllUserCount

func (s *Service) GetAllUserCount() (int64, error)

GetAllUserCount 获取总用户数量

func (*Service) GetAllUsers

func (s *Service) GetAllUsers() ([]*Resp, error)

获取所有用户

func (*Service) GetDeviceOnline

func (s *Service) GetDeviceOnline(uid string, deviceFlag config.DeviceFlag) (*config.OnlinestatusResp, error)

func (*Service) GetFriends

func (s *Service) GetFriends(uid string) ([]*FriendResp, error)

GetFriends 查询某个用户的所有好友

func (*Service) GetFriendsWithToUIDs

func (s *Service) GetFriendsWithToUIDs(uid string, toUIDs []string) ([]*FriendResp, error)

GetFriendsWithToUIDs 查询一批好友

func (*Service) GetOnetimePrekeyCount

func (s *Service) GetOnetimePrekeyCount(uid string) (int, error)

func (*Service) GetOnlineCount

func (s *Service) GetOnlineCount() (int64, error)

查询在线总数量

func (*Service) GetRegisterCountWithDateSpace

func (s *Service) GetRegisterCountWithDateSpace(startDate, endDate string) (map[string]int64, error)

GetRegisterCountWithDateSpace 获取某个时间区间的注册数量

func (*Service) GetRegisterWithDate

func (s *Service) GetRegisterWithDate(date string) (int64, error)

GetRegisterWithDate 查询某天的注册量

func (*Service) GetUser

func (s *Service) GetUser(uid string) (*Resp, error)

GetUser 获取用户

func (*Service) GetUserDetail

func (s *Service) GetUserDetail(uid string, loginUID string) (*UserDetailResp, error)

func (*Service) GetUserDetails

func (s *Service) GetUserDetails(uids []string, loginUID string) ([]*UserDetailResp, error)

func (*Service) GetUserOnlineStatus

func (s *Service) GetUserOnlineStatus(uids []string) ([]*OnLineUserResp, error)

GetUserOnlineStatus 查询在线用户

func (*Service) GetUserSettings

func (s *Service) GetUserSettings(uids []string, loginUID string) ([]*SettingResp, error)

func (*Service) GetUserUIDWithUsernames

func (s *Service) GetUserUIDWithUsernames(usernames []string) ([]string, error)

GetUserUIDWithUsernames 获取用户uid集合

func (*Service) GetUserWithQRVercode

func (s *Service) GetUserWithQRVercode(qrVercode string) (*Resp, error)

GetUserWithQRVercode 通过qrvercode获取用户信息

func (*Service) GetUserWithUsername

func (s *Service) GetUserWithUsername(username string) (*Resp, error)

GetUserWithUsername 获取用户

func (*Service) GetUsers

func (s *Service) GetUsers(uids []string) ([]*Resp, error)

GetUsers 批量获取用户

func (*Service) GetUsersWithAppID

func (s *Service) GetUsersWithAppID(appID string) ([]*Resp, error)

GetUsersWithAppID 通过appID获取用户集合

func (*Service) GetUsersWithCategories

func (s *Service) GetUsersWithCategories(categories []string) ([]*Resp, error)

GetUsersWithCategories 获取指定类别的用户列表

func (*Service) GetUsersWithCategory

func (s *Service) GetUsersWithCategory(category Category) ([]*Resp, error)

GetUsersWithCategory 获取用户列表

func (*Service) IsFriend

func (s *Service) IsFriend(uid string, toUID string) (bool, error)

IsFriend 查询两个用户是否为好友关系

func (*Service) SearchFriendsWithKeyword

func (s *Service) SearchFriendsWithKeyword(uid string, keyword string) ([]*FriendResp, error)

搜索好友

func (*Service) UpdateLoginPassword

func (s *Service) UpdateLoginPassword(req UpdateLoginPasswordReq) error

func (*Service) UpdateUser

func (s *Service) UpdateUser(req UserUpdateReq) error

func (*Service) UpdateUserMsgExpireSecond

func (s *Service) UpdateUserMsgExpireSecond(uid string, msgExpireSecond int64) error

type Setting

type Setting struct {
	log.Log
	// contains filtered or unexported fields
}

Setting 用户设置

func NewSetting

func NewSetting(ctx *config.Context) *Setting

NewSetting 创建

type SettingDB

type SettingDB struct {
	// contains filtered or unexported fields
}

SettingDB 设置db

func NewSettingDB

func NewSettingDB(session *dbr.Session) *SettingDB

NewSettingDB NewDB

func (*SettingDB) InsertUserSettingModel

func (d *SettingDB) InsertUserSettingModel(setting *SettingModel) error

InsertUserSettingModel 插入用户设置

func (*SettingDB) InsertUserSettingModelTx

func (d *SettingDB) InsertUserSettingModelTx(setting *SettingModel, tx *dbr.Tx) error

InsertUserSettingModelTx 插入用户设置

func (*SettingDB) QueryTwoUserSettingModel

func (d *SettingDB) QueryTwoUserSettingModel(uid, loginUID string) ([]*SettingModel, error)

QueryTwoUserSettingModel 查询双方用户设置

func (*SettingDB) QueryUserSettingModel

func (d *SettingDB) QueryUserSettingModel(uid, loginUID string) (*SettingModel, error)

QueryUserSettingModel 查询用户设置

func (*SettingDB) QueryUserSettings

func (d *SettingDB) QueryUserSettings(uids []string, loginUID string) ([]*SettingModel, error)

func (*SettingDB) QueryWithUidsAndToUID

func (d *SettingDB) QueryWithUidsAndToUID(uids []string, toUID string) ([]*SettingModel, error)

func (*SettingDB) UpdateUserSettingModel

func (d *SettingDB) UpdateUserSettingModel(setting *SettingModel) error

UpdateUserSettingModel 更新用户设置

type SettingModel

type SettingModel struct {
	UID          string // 用户UID
	ToUID        string // 对方uid
	Mute         int    // 免打扰
	Top          int    // 置顶
	ChatPwdOn    int    // 是否开启聊天密码
	Screenshot   int    //截屏通知
	RevokeRemind int    //撤回提醒
	Blacklist    int    //黑名单
	Receipt      int    //消息是否回执
	Flame        int    // 是否开启阅后即焚
	FlameSecond  int    // 阅后即焚秒数
	Version      int64  // 版本
	Remark       string // 备注
	db.BaseModel
}

SettingModel 用户设置

type SettingResp

type SettingResp struct {
	UID          string // 用户UID
	Mute         int    // 免打扰
	Top          int    // 置顶
	ChatPwdOn    int    // 是否开启聊天密码
	Screenshot   int    //截屏通知
	RevokeRemind int    //撤回提醒
	Blacklist    int    //黑名单
	Receipt      int    //消息是否回执
	Version      int64  // 版本
}

type Status

type Status int

Status 状态

const (
	// StatusDisable 禁用
	StatusDisable Status = iota
	// StatusEnable 启用
	StatusEnable
)

func (Status) Int

func (s Status) Int() int

Int Int

type UpdateLoginPasswordReq

type UpdateLoginPasswordReq struct {
	UID         string // 用户uid
	Password    string // 用户旧密码
	NewPassword string // 用户新密码
}

type User

type User struct {
	log.Log
	// contains filtered or unexported fields
}

User 用户相关API

func New

func New(ctx *config.Context) *User

New New

func (*User) GetFriendByVercode

func (u *User) GetFriendByVercode(vercode string) (*source.FriendModel, error)

GetFriendByVercode 通过vercode获取好友信息

func (*User) GetFriendByVercodes

func (u *User) GetFriendByVercodes(vercodes []string) ([]*source.FriendModel, error)

func (*User) GetUserByMailListVercode

func (u *User) GetUserByMailListVercode(vercode string) (*source.UserModel, error)

通过通讯录验证码获取用户信息

func (*User) GetUserByQRVercode

func (u *User) GetUserByQRVercode(qrvercode string) (*source.UserModel, error)

GetUserByQRVercode 通过二维码验证码获取用户信息

func (*User) GetUserByUID

func (u *User) GetUserByUID(uid string) (*source.UserModel, error)

GetUserByUID 通过UID获取用户信息

func (*User) GetUserByVercode

func (u *User) GetUserByVercode(vercode string) (*source.UserModel, error)

GetUserByVercode 通过vercode获取用户信息

func (*User) Route

func (u *User) Route(r *wkhttp.WKHttp)

Route 路由配置

func (*User) UserAvatar

func (u *User) UserAvatar(c *wkhttp.Context)

UserAvatar 用户头像

type UserDetailResp

type UserDetailResp struct {
	UID            string            `json:"uid"`
	Name           string            `json:"name"`
	Username       string            `json:"username"`
	Email          string            `json:"email,omitempty"`  // email(仅自己能看)
	Zone           string            `json:"zone,omitempty"`   // 手机区号(仅自己能看)
	Phone          string            `json:"phone,omitempty"`  // 手机号(仅自己能看)
	Mute           int               `json:"mute"`             // 免打扰
	Top            int               `json:"top"`              // 置顶
	Sex            int               `json:"sex"`              //性别1:男
	Category       string            `json:"category"`         //用户分类 '客服'
	ShortNo        string            `json:"short_no"`         // 用户唯一短编号
	ChatPwdOn      int               `json:"chat_pwd_on"`      //是否开启聊天密码
	Screenshot     int               `json:"screenshot"`       //截屏通知
	RevokeRemind   int               `json:"revoke_remind"`    //撤回提醒
	Receipt        int               `json:"receipt"`          //消息是否回执
	Online         int               `json:"online"`           //是否在线
	LastOffline    int               `json:"last_offline"`     //最后一次离线时间
	DeviceFlag     config.DeviceFlag `json:"device_flag"`      // 在线设备标记
	Follow         int               `json:"follow"`           //是否是好友
	BeDeleted      int               `json:"be_deleted"`       // 被删除
	BeBlacklist    int               `json:"be_blacklist"`     // 被拉黑
	Code           string            `json:"code"`             //加好友所需vercode TODO: code不再使用 请使用Vercode
	Vercode        string            `json:"vercode"`          //
	SourceDesc     string            `json:"source_desc"`      // 好友来源
	Remark         string            `json:"remark"`           //好友备注
	IsUploadAvatar int               `json:"is_upload_avatar"` // 是否上传头像
	Status         int               `json:"status"`           //用户状态 1 正常 2:黑名单
	Robot          int               `json:"robot"`            // 机器人0.否1.是
	IsDestroy      int               `json:"is_destroy"`       // 是否注销0.否1.是
	Flame          int               `json:"flame"`            // 是否开启阅后即焚
	FlameSecond    int               `json:"flame_second"`     // 阅后即焚秒数
}

func NewUserDetailResp

func NewUserDetailResp(m *Detail, remark, loginUID string, sourceFrom string, onLine int, lastOffline int, deviceFlag config.DeviceFlag, follow int, status int, beDeleted int, beBlacklist int, setting *SettingModel, vercode string) *UserDetailResp

type UserUpdateReq

type UserUpdateReq struct {
	UID  string
	Name *string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL