types

package
v0.0.0-...-59da782 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2020 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CountNew    = 0
	CountActive = 1
	CountOpen   = 2
	CountAll    = 3

	BanUser       = 1
	BanRoom       = 2
	BanUserCancel = 3
	BanRoomCancel = 4

	QueryUsersAll     = 99
	QueryUsersUnClose = 0
	QueryUsersClosed  = 1

	QueryRoomsAll       = 99
	QueryRoomsUnClose   = 0
	QueryRoomsClosed    = 1
	QueryRoomsRecommend = 2

	QueryAdminOptLogAll           = 99
	QueryAdminOptLogBanUser       = 0
	QueryAdminOptLogBanRoom       = 1
	QueryAdminOptLogCancleBanUser = 2
	QueryAdminOptLogCancleBanRoom = 3

	AdIsNotDelete = 0
	AdIsDelete    = 1
	MaxAdNumbers  = 5
	AdIsActive    = 1
	AdIsNotActive = 0
)
View Source
const (
	IsInnerAccount    = 1
	IsNotInnerAccount = 0

	IsOtc = 1
)
View Source
const (
	DbMsgLength = 7168 //

	AppIdZhaobi      = "1001" //找币
	AppIdPWalelt     = "1002" //敢么
	AppIdYuanScraper = "1003" //
	AppIdFunnyChat   = "1004" //趣信
	AppIdTwitter     = "1005" //推特链
	AppIdTSC         = "1006" //TS钱包

	DeviceWeb     = "Web"
	DeviceAndroid = "Android"
	DeviceIOS     = "iOS"
	DevicePC      = "PC"

	//用户登录身份
	LevelVisitor = 0
	LevelMember  = 1
	LevelCs      = 2
	LevelAdmin   = 3

	//登录时的验证方式
	LoginTypeSms      = 1
	LoginTypePwd      = 2
	LoginTypeEmail    = 3
	LoginTypeEmailPwd = 4

	// 获取聊天历史记录条数上限
	ChatHistoryLimit = 1000

	//分页搜索
	SearchAll = -1
)
View Source
const (
	IsRoom   = 1
	IsFriend = 2
)
View Source
const (
	// channelType
	ToGroup = 1
	ToRoom  = 2
	ToUser  = 3

	IsSnap    = 1 //阅后即焚
	IsNotSnap = 2

	//message state
	HadRead  = 1 //已读
	NotRead  = 2 //未读
	HadBurnt = 3 //已经被焚毁
)

message about

View Source
const (
	//event type
	EventCommonMsg        = 0 //普通消息
	EventOtherDeviceLogin = 9
	EventUserClosed       = 10
	EventRoomClosed       = 11

	EventJoinRoom         = 20
	EventLogOutRoom       = 21
	EventRemoveRoom       = 22
	EventJoinApply        = 23
	EventRoomOnlineNumber = 24
	EventRoomMuted        = 25
	//更新加密群会话秘钥
	EventUpdateSKey = 26

	//同步群会话秘钥
	EventStartGetAllSKey   = 27
	EventGetAllSKey        = 28
	EventGetAllSKeySuccess = 29

	EventAddFriend = 31
	//C->S 用户更新公钥
	EventUpdatePublicKey = 33
	//S->C 广播用户更新的公钥
	EventBroadcastPubKey = 34

	EventBatchPush       = 40
	EventBatchPushUnread = 41
	EventSyncMsg         = 42
	EventSyncMsgRlt      = 43
	//批量推送
	EventBatchCustomize = 44

	//开始消息确认
	EventStartAck   = 45
	EventBatchAck   = 46
	EventAckSuccess = 47

	// msgType
	System     = 0
	Text       = 1
	Audio      = 2
	Photo      = 3
	RedPack    = 4
	Video      = 5
	Alert      = 6
	Forward    = 8
	File       = 9
	Transfer   = 10 //转账
	Receipt    = 11 //收款
	RoomInvite = 12 //入群邀请

	//alert type
	//ws消息通知类型
	AlertRevokeMsg         = 1
	AlertCreateRoom        = 2
	AlertLoginOutRoom      = 3
	AlertKickOutRoom       = 4
	AlertJoinInRoom        = 5
	AlertRemoveRoom        = 6
	AlertAddFriendInRoom   = 7
	AlertDeleteFriend      = 8
	AlertSetAsMaster       = 9
	AlertSetAsManager      = 10
	AlertRenameRoom        = 11
	AlertReceiveRedpackage = 12
	AlertAddFriend         = 13
	AlertRoomMuted         = 14
	AlertHadBurntMsg       = 15
	AlertPrintScreen       = 16
	AlertInviteJoinRoom    = 17
	//收款成功
	AlertPayment = 18
	//更新群秘钥
	AlertUpdateSKey = 19
	//拒绝加入群聊
	AlertRoomInviteReject = 20
	//赞赏通知
	AlertPraise = 22
)
View Source
const (
	//是否消息免打扰 1免打扰 2关闭
	NoDisturbingOn  = 1
	NoDisturbingOff = 2

	//是否是常用类型 1 普通 2 常用
	UncommonUse      = 1
	CommonUse        = 2
	CommonUseFindAll = 3

	//是否置顶 1置顶 2不置顶
	OnTop    = 1
	NotOnTop = 2

	//是否可查看入群之前历史记录
	CanVisitLog    = 1
	CanNotVisitLog = 2

	IsEncrypt    = 1
	IsNotEncrypt = 2
)

Personal set

View Source
const (
	SingleForward = 1
	MergeForward  = 2
)

forward

View Source
const (
	//http request 参数
	AcceptRequest = 1
	RejectRequest = 2

	//apply ack
	AwaitState  = 1
	RejectState = 2
	AcceptState = 3
)

Apply

View Source
const (
	//红包toid   1群 0好友
	RPToUser = 0
	RPToRoom = 1

	PacketTypeLucky = 1 //拼手气红包
	PacketTypeAdv   = 2 //推广红包

	RecvForOldCustomer = 1 //老用户领取
	RecvForNewCustomer = 2 //未注册用户领取

	PageNo    = 1
	PageLimit = 15
)

red packet

View Source
const (
	//消息是否同步推送
	RecentUnpush = 1
	RecentPushed = 2
)
View Source
const (
	DevAndroid = 1
	DevIOS     = 2
)

个推安卓ios

View Source
const (
	//加群/好友来源
	Search = 1
	Scan   = 2
	Group  = 4 //通过群
	//
	Share  = 3
	Invite = 4
	Unknow = 5
)
View Source
const (
	//认证对象
	VerifyForUser = 1
	VerifyForRoom = 2

	//认证状态
	//1:待审核;2已认证;3未通过
	VerifyStateWait   = 1
	VerifyStateAccept = 2
	VerifyStateReject = 3

	//认证处理请求参数
	VerifyApproveReject  = 0
	VerifyApproveAccept  = 1
	VerifyApproveFeeBack = 2

	//认证费用去向
	VerifyRecordCost   = 1
	VerifyRecordRefund = 2

	//认证费用到账状态
	VerifyFeeStateCosting     = 0
	VerifyFeeStateSuccess     = 1
	VerifyFeeStateFailed      = 2
	VerifyFeeStateBacking     = 3
	VerifyFeeStateBackSuccess = 4
	VerifyFeeStateBackFailed  = 5

	//群和用户状态 是否认证
	Unverified = 0
	Verified   = 1

	//群 认证人数限制
	VerifiedLimitMembers = 5000

	//加v申请时间间隔 单位分钟
	//7天
	VerifyApplyInterval = 10080
)
View Source
const (
	//是否删除 1 未删除 2 已删除
	FriendIsNotDelete = 1
	FriendIsDelete    = 2
)

好友表里的字段

View Source
const (
	//PS praise state
	PS_Like = 1 << iota
	PS_Reward
)
View Source
const (
	Like   = 1
	Reward = 2
)
View Source
const (
	PraiseIsDelete    = 1
	PraiseIsNotDelete = 0
)
View Source
const (
	RoomLevelNotExist = 0
	RoomLevelNomal    = 1
	RoomLevelManager  = 2
	RoomLevelMaster   = 3

	CanAddFriend      = 1
	CanNotAddFriend   = 2
	ShouldApproval    = 1
	ShouldNotApproval = 2
	CanNotJoinRoom    = 3
	CanReadAllLog     = 1
	CanNotReadAllLog  = 2

	RoomUserNotDeleted   = 1
	RoomUserDeleted      = 2
	RoomUserDeletedOrNot = 99

	RoomMsgNotDelete = 1
	RoomMsgDeleted   = 2

	RoomNotDeleted   = 1
	RoomDeleted      = 2
	RoomDeletedOrNot = 99

	RoomRecommend    = 1
	RoomNotRecommend = 0
)
View Source
const (
	AdminMuted    = 2
	AdminNotMuted = 1

	MasterMuted    = 2
	MasterNotMuted = 1

	AllSpeak  = 1
	Blacklist = 2
	Whitelist = 3
	AllMuted  = 4

	MutedEnable  = 1
	MutedDisable = 2
	MutedForvevr = 7258089600000
)

Room Muted

View Source
const AddSuccess = 3 //添加成功
View Source
const AnswerFalse = 1 //答案错误
View Source
const (
	AuthType = "Bearer"
)
View Source
const FriendMsgIsDelete = 1
View Source
const FriendMsgIsNotDelete = 2
View Source
const IsBlocked = 1
View Source
const IsDelete = 2
View Source
const IsNotBlocked = 0
View Source
const IsNotDelete = 1

是否删除 1 未删除 2 已删除

View Source
const NeedAnswer = 1

1 需要回答问题 2 不需要回答

View Source
const NeedConfirm = 1

加好友设置 1需要验证 2 不需要验证

View Source
const NotNeedAnswer = 2
View Source
const NotNeedConfirm = 2
View Source
const RemarkLengthLimit = 20
View Source
const RoomInviteNeedConfirm = 1

邀请入群 1需要验证 0 不需要验证

View Source
const RoomInviteNotNeedConfirm = 2
View Source
const SendSuccess = 2 //请求发送成功

Variables

View Source
var CustomServiceInfo = map[string]string{
	AppIdZhaobi:    "微信号zhaobikefu",
	AppIdFunnyChat: "QQ号762389302",
	AppIdTSC:       "微信号17621543259",
}

chat appId --> red packet Platform

View Source
var DefaultInviteConfig = map[string]int{
	"1001": RoomInviteNotNeedConfirm,
	"1006": RoomInviteNeedConfirm,
}
View Source
var ERR_APPNOTFIND = errors.New("app未认证")
View Source
var ERR_LOGIN_EXPIRED = errors.New("登录过期")
View Source
var ERR_NOTSUPPORT = errors.New("暂不支持该功能")
View Source
var ERR_REPEAT_MSG = errors.New("重复发送的消息")
View Source
var ERR_SYS_RESULT = errors.New("该功能无法使用")
View Source
var ExcelAddr = ""
View Source
var QueryAdminOptDbToParam = map[int]int{
	BanUser:       QueryAdminOptLogBanUser,
	BanRoom:       QueryAdminOptLogBanRoom,
	BanUserCancel: QueryAdminOptLogCancleBanUser,
	BanRoomCancel: QueryAdminOptLogCancleBanRoom,
}

request param --> db tag

View Source
var QueryAdminOptParamToDb = map[int]int{
	QueryAdminOptLogBanUser:       BanUser,
	QueryAdminOptLogBanRoom:       BanRoom,
	QueryAdminOptLogCancleBanUser: BanUserCancel,
	QueryAdminOptLogCancleBanRoom: BanRoomCancel,
}

request param --> db tag

Functions

func GetGroupRouteById

func GetGroupRouteById(str string) string

func GetRoomRouteById

func GetRoomRouteById(str string) string

func NewackChatLogs

func NewackChatLogs() ackChatLogs

func NewchatLogs

func NewchatLogs() chatLogs

Types

type ActiveUsersView

type ActiveUsersView struct {
	UserId string
	AppId  string
	Count  string
}

type AddFriendConf

type AddFriendConf struct {
	Id          string
	UserId      string
	NeedConfirm string
	NeedAnswer  string
	Question    string
	Answer      string
}

type Admin

type Admin struct {
	Id       string
	AppId    string
	Account  string
	Password string
	Salt     string
}

---------------admin--------//

type AdminOptLog

type AdminOptLog struct {
	Id            string
	Operator      string
	Type          int
	Target        string
	OperateType   int
	Reason        string
	CreateTime    int64
	EffectiveTime int64
}

type AdminOptLogView

type AdminOptLogView struct {
	Id            string
	AppId         string
	Operator      string
	Type          int
	Target        string
	MarkId        string
	Name          string
	OperateType   int
	Reason        string
	CreateTime    int64
	EffectiveTime int64
}
type Advertisement struct {
	Id       string `json:"id"`
	AppId    string `json:"-"`
	Name     string `json:"name"`
	Url      string `json:"url"`
	Duration int    `json:"duration"`
	Link     string `json:"link"`
	IsActive int    `json:"isActive"`
	IsDelete int    `json:"isDelete"`
}

type App

type App struct {
	AppId         string `json:"app_id"`
	AccountServer string `json:"user_info_url"`
	RPPid         string
	RPServer      string
	RPUrl         string
	IsInner       int
	MainCoin      string

	AppKey    string //`json:"-"`
	AppSecret string //`json:"-"`

	//推送相关
	PushAppKey          UPushType
	PushAppMasterSecret UPushType
	PushMiActive        UPushType //走系统推送时打开的active
	//模块启用状态
	Modules []*Module

	//otc
	IsOtc     int
	OtcServer string

	//oss
	OssConfig *OssAddress
}

type Apply

type Apply struct {
	Id          string
	Type        int
	ApplyUser   string
	Target      string
	ApplyReason string
	State       int
	Remark      string
	Datetime    int64
	Source      string
}

type ApplyInfo

type ApplyInfo struct {
	Id                 string `json:"id"`
	MarkId             string `json:"markId"`
	Name               string `json:"name"`
	Avatar             string `json:"avatar"`
	Position           string `json:"position"`
	Identification     int    `json:"identification"`
	IdentificationInfo string `json:"identificationInfo"`
}

type ApplyList

type ApplyList struct {
	SenderInfo  *ApplyInfo  `json:"senderInfo"`
	ReceiveInfo *ApplyInfo  `json:"receiveInfo"`
	Id          string      `json:"id"`
	Type        int         `json:"type"`
	ApplyReason string      `json:"applyReason"`
	Status      int         `json:"status"`
	Datetime    int64       `json:"datetime"`
	Source      string      `json:"source"`
	Source2     interface{} `json:"source2"`
}

type BatchConfig

type BatchConfig struct {
	//new device batch day
	BatchDayAgo int
	//pack length
	BatchPackLength int
	//batch push interval: Millisecond
	BatchInterval int64
}

type CacheType

type CacheType struct {
	Enable    bool
	CacheType string
}

type ChatLog

type ChatLog struct {
	LogId       string      `json:"logId"`
	MsgId       string      `json:"msgId"`
	ChannelType int         `json:"channelType"`
	IsSnap      int         `json:"isSnap"`
	FromId      string      `json:"fromId"`
	TargetId    string      `json:"targetId"`
	MsgType     int         `json:"msgType"`
	Msg         interface{} `json:"msg"`
	Datetime    int64       `json:"datetime"`
	SenderInfo  interface{} `json:"senderInfo"`
	Ext         interface{} `json:"ext"`
	Praise      interface{} `json:"praise",omitempty`
	// contains filtered or unexported fields
}

聊天记录

func (*ChatLog) GetCon

func (c *ChatLog) GetCon() map[string]interface{}

func (*ChatLog) GetIsDel

func (c *ChatLog) GetIsDel() int

func (*ChatLog) SetCon

func (c *ChatLog) SetCon(con map[string]interface{})

func (*ChatLog) SetIsDel

func (c *ChatLog) SetIsDel(isDel int)

type Clist

type Clist struct {
	Enterprise struct {
		Name string `json:"name"`
	} `json:"enterprise"`
	Members []*Member
}

公司-员工列表

type Coin

type Coin struct {
	CoinId   int    `json:"coin_id"`
	CoinName string `json:"coin_name"`
}

type CoinInfoParams

type CoinInfoParams struct {
	PlatformId string `json:"platform_id"`
}

type Config

type Config struct {
	Loglevel        string
	LogFile         string
	Server          Server
	Mysql           Mysql
	Service         Service
	Limit           Limit
	Log             Log
	CacheType       CacheType
	Redis           Redis
	NotConfirmAppId NotConfirmAppId
	FileStore       FileStore
	BatchConfig     BatchConfig
	Work            work_model.Config
	Rate            Rate
	SMS             SMS
	Env             Env
}

type Env

type Env struct {
	Env   string
	Super map[string]string
}

type ExtRemark

type ExtRemark struct {
	Telephones []struct {
		Remark *string `json:"remark"`
		Phone  string  `json:"phone"`
	} `json:"telephones"`
	Description *string  `json:"description"`
	Pictures    []string `json:"pictures"`
	Encrypt     string   `json:"encrypt"`
}

type FileStore

type FileStore struct {
	Path     string
	FilePath string
}

type Friend

type Friend struct {
	UserId    string
	FriendId  string
	Remark    string
	AddTime   int64
	DND       int
	Top       int
	Type      int
	IsDelete  int
	Source    string
	ExtRemark string
	IsBlocked int
}

--------------friend-------------//

type FriendInfoApi

type FriendInfoApi struct {
	Uid                string `json:"uid"`
	Id                 string `json:"id"`
	Name               string `json:"name"`
	Avatar             string `json:"avatar"`
	Remark             string `json:"remark"`
	PublicKey          string `json:"publicKey"`
	NoDisturbing       int    `json:"noDisturbing"`
	CommonlyUsed       int    `json:"commonlyUsed"`
	OnTop              int    `json:"onTop"`
	IsDelete           int    `json:"isDelete"`
	AddTime            int64  `json:"addTime"`
	DepositAddress     string `json:"depositAddress"`
	Identification     int    `json:"identification"`
	IdentificationInfo string `json:"identificationInfo"`
	IsBlocked          int    `json:"isBlocked"`
}

type FriendJoinUser

type FriendJoinUser struct {
	*Friend
	*User
}

type InfoParams

type InfoParams struct {
	PacketId string `json:"packet_id"`
}

type InviteRoomConf

type InviteRoomConf struct {
	UserId      string
	NeedConfirm int
}

type LastLoginInfo

type LastLoginInfo struct {
	Uuid       string
	Device     string
	DeviceName string
	LoginType  int
	LoginTime  int64
}

type Limit

type Limit struct {
	ChatPool int
	ChatRate int
}

type Log

type Log struct {
	Level string
}

type LoginLog

type LoginLog struct {
	Id         string
	UserId     string
	LoginTime  int64
	Device     string
	DeviceName string
	LoginType  int
	Uuid       string
	Version    string
}

type Member

type Member struct {
	Id     string `json:"id"`
	Name   string `json:"name"`
	Avatar string `json:"avatar"`
}

type MemberJoinRoom

type MemberJoinRoom struct {
	*Room
	*RoomMember
}

type MemberJoinUser

type MemberJoinUser struct {
	*RoomMember
	*User
}

type Module

type Module struct {
	Type   int    `json:"type"`
	Name   string `json:"name"`
	Enable bool   `json:"enable"`
}

--------------app----------------//

type Mysql

type Mysql struct {
	Host string
	Port int32
	User string
	Pwd  string
	Db   string
}

type NotConfirmAppId

type NotConfirmAppId struct {
	AppIds string `json:"appIds"`
}

type Order

type Order struct {
	OrderId  string
	Uid      string //用户uid
	Opposite string //对方uid
}

----------------otc 交易关系---------------------//

type OssAddress

type OssAddress struct {
	AccessKeyID     string `json:"accessKeyID"`
	AccessKeySecret string `json:"accessKeySecret"`
	BucketName      string `json:"bucketName"`
}

type Praise

type Praise struct {
	Id          string
	ChannelType int
	TargetId    string
	LogId       string
	SenderId    string
	OptId       string
	Type        int
	RecordId    string
	CoinId      string
	CoinName    string
	Amount      float64
	CreateTime  int64
	IsDelete    int
}

--------------Parise------------------------//

type PraiseBoardHistory

type PraiseBoardHistory struct {
	Like struct {
		Ranking int `json:"ranking"`
		Number  int `json:"number"`
	} `json:"like"`
	Reward struct {
		Ranking int     `json:"ranking"`
		Price   float64 `json:"price"`
	} `json:"reward"`
	StartTime int64 `json:"startTime"`
	EndTime   int64 `json:"endTime"`
}

type PraiseRecord

type PraiseRecord struct {
	RecordId    string `json:"recordId"`
	LogId       string `json:"logId"`
	ChannelType int    `json:"channelType"`
	CreateTime  int64  `json:"createTime"`
	User        struct {
		Id     string `json:"id"`
		Name   string `json:"name"`
		Avatar string `json:"avatar"`
	} `json:"user"`
	Type     int     `json:"type"`
	CoinName string  `json:"coinName"`
	Amount   float64 `json:"amount"`
}

praise record api

type PraiseUser

type PraiseUser struct {
	Id         string
	TargetId   string
	OptId      string
	RecordId   string
	CoinId     string
	CoinName   string
	Amount     float64
	CreateTime int64
	IsDelete   int
}

type PrivateLog

type PrivateLog struct {
	Id        string
	MsgId     string
	SenderId  string
	ReceiveId string
	IsSnap    int
	MsgType   int
	Content   string
	Status    int
	SendTime  int64
	Ext       string
	IsDelete  int
}

type PrivateLogJoinUser

type PrivateLogJoinUser struct {
	*PrivateLog
	*User
	Remark string //用于解决,私聊历史记录 返回的好友信息 remark字段
}

type RPReceiveInfo

type RPReceiveInfo struct {
	UserId      string  `json:"userId"`
	UserName    string  `json:"userName"`
	UserAvatar  string  `json:"userAvatar"`
	CoinId      int     `json:"coinId"`
	CoinName    string  `json:"coinName"`
	Amount      float64 `json:"amount"`
	CreatedAt   int64   `json:"createdAt"`
	Status      int     `json:"status"`
	FailMessage string  `json:"failMessage"`
}

-----api result---------//

type RPStatisticInfo

type RPStatisticInfo struct {
	Count      int              `json:"count"`
	Sum        float64          `json:"sum"`
	CoinId     int              `json:"coinId"`
	CoinName   string           `json:"coinName"`
	RedPackets []*RedPacketInfo `json:"redPackets"`
}

type RankingItem

type RankingItem struct {
	UserId string
	Type   int
	Number int
	Price  float64
}

赞赏榜单 redis使用

type RankingItemWrapper

type RankingItemWrapper struct {
	Items []*RankingItem
	By    func(p, q *RankingItem) bool
}

排序

func (RankingItemWrapper) Len

func (pw RankingItemWrapper) Len() int

func (RankingItemWrapper) Less

func (pw RankingItemWrapper) Less(i, j int) bool

func (RankingItemWrapper) Swap

func (pw RankingItemWrapper) Swap(i, j int)

type Rate

type Rate struct {
	TradeUrl string
	UsdtUrl  string
}

type ReceiveDetailParams

type ReceiveDetailParams struct {
	PacketId string `json:"packet_id"`
}

type ReceiveParams

type ReceiveParams struct {
	PacketId string `json:"packet_id"`
}

type Record

type Record struct {
	Ranking int `json:"ranking"`
	User    struct {
		Id     string `json:"id"`
		Name   string `json:"name"`
		Avatar string `json:"avatar"`
	} `json:"user"`
	Number int     `json:"number"`
	Price  float64 `json:"price"`
}

赞赏榜单

type RedPacket

type RedPacket struct {
	PacketId   string `json:"packetId"`
	PacketUrl  string `json:"packetUrl"`
	PacketType int    `json:"packetType"`
	Coin       int    `json:"coin"`
	Remark     string `json:"remark"`
}

type RedPacketInfo

type RedPacketInfo struct {
	SenderId           string         `json:"senderId"`
	SenderUid          string         `json:"senderUid"`
	SenderAvatar       string         `json:"senderAvatar"`
	SenderName         string         `json:"senderName"`
	Identification     int            `json:"identification"`
	IdentificationInfo string         `json:"identificationInfo"`
	Type               int            `json:"type"`
	CoinId             int            `json:"coinId"`
	CoinName           string         `json:"coinName"`
	Amount             float64        `json:"amount"`
	Size               int            `json:"size"`
	ToUsers            string         `json:"toUsers"`
	Remain             int            `json:"remain"`
	Status             int            `json:"status"`
	Remark             string         `json:"remark"`
	CreatedAt          int64          `json:"createdAt"`
	PacketId           string         `json:"packetId"`
	PacketUrl          string         `json:"packetUrl"`
	RevInfo            *RPReceiveInfo `json:"revInfo"`
}

type RedPacketLog

type RedPacketLog struct {
	PacketId  string
	CType     int
	UserId    string
	ToId      string
	Coin      int
	Size      int
	Amount    float64
	Remark    string
	Type      int
	CreatedAt int64
}

type Redis

type Redis struct {
	Url         string `json:"url"`
	Password    string `json:"password"`
	MaxIdle     int    `json:"maxIdle"`
	MaxActive   int    `json:"maxActive"`
	IdleTimeout int    `json:"idleTimeout"`
}

redis的一些配置

type ReqBase

type ReqBase struct {
	Method string      `json:"method"`
	Params interface{} `json:"params"`
}

type Room

type Room struct {
	Id                 string `json:"id"`
	MarkId             string `json:"markId"`
	Name               string `json:"name"`
	Avatar             string `json:"avatar"`
	MasterId           string `json:"masterId"`
	CreateTime         int64  `json:"-"`
	CanAddFriend       int    `json:"canAddFriend"`
	JoinPermission     int    `json:"joinPermission"`
	RecordPermision    int    `json:"recordPermission"`
	AdminMuted         int    `json:"-"`
	MasterMuted        int    `json:"-"`
	Encrypt            int    `json:"encrypt"`
	IsDelete           int    `json:"-"`
	RoomLevel          int    `json:"-"`
	CloseUntil         int64  `json:"-"`
	Recommend          int    `json:"recommend"`
	Identification     int    `json:"identification"`
	IdentificationInfo string `json:"identificationInfo"`
}

db room table

type RoomCid

type RoomCid struct {
	UserId   string
	GetuiCid string
}

群 个推

type RoomConfig

type RoomConfig struct {
	AppId string
	Level int
	Limit int
}

type RoomJoinUser

type RoomJoinUser struct {
	*Room
	*User
}

type RoomLog

type RoomLog struct {
	Id       string
	MsgId    string
	RoomId   string
	SenderId string
	IsSnap   int
	MsgType  int
	Content  string
	Datetime int64
	Ext      string
	IsDelete int
}

type RoomLogJoinUser

type RoomLogJoinUser struct {
	*RoomLog
	*User
}

type RoomMember

type RoomMember struct {
	Id           string
	RoomId       string
	UserId       string
	UserNickname string
	Level        int
	NoDisturbing int
	CommonUse    int
	RoomTop      int
	CreateTime   int64
	IsDelete     int
	Source       string
}

type RoomMemberInfo

type RoomMemberInfo RoomMember

群成员信息

type RoomMsgReceive

type RoomMsgReceive struct {
	Id        string
	RoomMsgId string
	ReceiveId string
	State     int
}

type RoomUserMued

type RoomUserMued struct {
	UserId   string
	ListType int
	Deadline int64
}

群禁言

type RoomUserMuted

type RoomUserMuted struct {
	Id       string
	RoomId   string
	UserId   string
	ListType int
	Deadline int64
}

type SMS

type SMS struct {
	Surl     string
	Curl     string
	CodeType string
	Msg      string
}

type SendParams

type SendParams struct {
	Amount float64     `json:"amount"`
	CoinId int         `json:"coin_id"`
	Size   int         `json:"size"`
	Type   int         `json:"type"`
	Remark string      `json:"remark"`
	To     string      `json:"to"`
	Ext    interface{} `json:"ext"`
}

type Sender

type Sender struct {
	UserId   string
	NickName string
	Avatar   string
}

type Server

type Server struct {
	Addr string
}

type Service

type Service struct {
	DockingDeadline int64
}

type StatisticParams

type StatisticParams struct {
	CoinId    int   `json:"coin_id"`
	Operation int   `json:"operation"`
	Type      int   `json:"type"`
	StartTime int64 `json:"start_time"`
	EndTime   int64 `json:"end_time"`
	PageNumer int   `json:"page_num"`
	PageSize  int   `json:"page_size"`
}

type Tx

type Tx interface {
	RollBack()
	Commit() error
}

type UPushType

type UPushType struct {
	IOS     string `json:"iOS"`
	Android string `json:"Android"`
}

type User

type User struct {
	UserId             string
	MarkId             string
	Uid                string
	AppId              string
	Username           string
	Account            string
	UserLevel          int
	Verified           int //是否实名制
	Avatar             string
	CompanyId          string
	Position           string
	Area               string
	Phone              string
	Sex                int
	Email              string
	InviteCode         string
	DeviceToken        string
	DepositAddress     string
	PublicKey          string
	PrivateKey         string
	Device             string
	CreateTime         int64
	RegVersion         string
	NowVersion         string
	CloseUntil         int64
	SuperUserLevel     int
	Identification     int
	IdentificationInfo string
	//
	IsSetPayPwd int
	//是否上链
	IsChain int
}

---------user----------//

type UserConfig

type UserConfig struct {
	AppId string
	Level int
	Limit int
}

type VerifyApply

type VerifyApply struct {
	Id          string
	AppId       string
	Type        int
	TargetId    string
	Description string
	Amount      float64
	Currency    string
	State       int
	RecordId    string
	UpdateTime  int64
	FeeState    int
}

--------认证申请-------------------//

type VerifyApplyJoinRoomAndUser

type VerifyApplyJoinRoomAndUser struct {
	*VerifyApply
	*Room
	*User
}

type VerifyApplyJoinUser

type VerifyApplyJoinUser struct {
	*VerifyApply
	*User
}

type VerifyFee

type VerifyFee struct {
	AppId    string  `json:"-"`
	Type     int     `json:"type"`
	Currency string  `json:"currency"`
	Amount   float64 `json:"amount,string"`
}

----------认证手续费表--------------//

type Version

type Version struct {
	AppId          string
	Name           string
	Compatible     bool   `json:"compatible"`
	MinVersionCode int    `json:"minVersionCode"`
	VersionCode    int    `json:"versionCode"`
	VersionName    string `json:"versionName"`
	Description    string `json:"description"`
	Url            string `json:"url"`
	Size           int64  `json:"size"`
	Md5            string `json:"md5"`
	ForceList      string `json:"forceList"`
}

--------------version----------------//

Jump to

Keyboard shortcuts

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