添加基础类

This commit is contained in:
2022-11-02 19:34:45 +08:00
parent e36c37b39b
commit bdc4a13e83
11 changed files with 1074 additions and 0 deletions

16
internal/enum/code.go Normal file
View File

@@ -0,0 +1,16 @@
/**
* @Author: wanglin
* @Author: wanglin@vspn.com
* @Date: 2021/11/3 10:45
* @Desc: TODO
*/
package enum
const (
SuccessActionStatus = "OK" // 成功状态
FailActionStatus = "FAIL" // 失败状态
SuccessCode = 0 // 成功
InvalidParamsCode = -1 // 无效参数(自定义)
InvalidResponseCode = -2 // 无效响应(自定义)
)

50
internal/enum/enum.go Normal file
View File

@@ -0,0 +1,50 @@
/**
* @Author: Echo
* @Email:1711788888@qq.com
* @Date: 2021/8/28 1:14 上午
* @Desc: TODO
*/
package enum
const (
// 消息类型
MsgText = "TIMTextElem" // 消息元素
MsgLocation = "TIMLocationElem" // 地理位置消息元素
MsgFace = "TIMFaceElem" // 表情消息元素
MsgCustom = "TIMCustomElem" // 自定义消息元素
MsgSound = "TIMSoundElem" // 语音消息元素
MsgImage = "TIMImageElem" // 图像消息元素
MsgFile = "TIMFileElem" // 文件消息元素
MsgVideo = "TIMVideoFileElem" // 视频消息元素
// 图片格式
ImageFormatJPG = 1 // JPG格式
ImageFormatGIF = 2 // GIF格式
ImageFormatPNG = 3 // PNG格式
ImageFormatBMP = 4 // BMP格式
ImageFormatOTHER = 255 // 其他格式
// 图片类型
ImageTypeOriginal = 1 // 原图
ImageTypePic = 2 // 大图
ImageTypeThumb = 3 // 缩略图
// 标准资料字段
StandardAttrNickname = "Tag_Profile_IM_Nick" // 昵称
StandardAttrGender = "Tag_Profile_IM_Gender" // 性别
StandardAttrBirthday = "Tag_Profile_IM_BirthDay" // 生日
StandardAttrLocation = "Tag_Profile_IM_Location" // 所在地
StandardAttrSignature = "Tag_Profile_IM_SelfSignature" // 个性签名
StandardAttrAllowType = "Tag_Profile_IM_AllowType" // 加好友验证方式
StandardAttrLanguage = "Tag_Profile_IM_Language" // 语言
StandardAttrAvatar = "Tag_Profile_IM_Image" // 头像URL
StandardAttrMsgSettings = "Tag_Profile_IM_MsgSettings" // 消息设置
StandardAttrAdminForbidType = "Tag_Profile_IM_AdminForbidType" // 管理员禁止加好友标识
StandardAttrLevel = "Tag_Profile_IM_Level" // 等级
StandardAttrRole = "Tag_Profile_IM_Role" // 角色
// 自定义属性前缀
CustomAttrPrefix = "Tag_Profile_Custom" // 自定义属性前缀
)