Documentation
¶
Index ¶
- Constants
- Variables
- func BaseImg(datasource, url string) error
- func CheckArgIdCard(idCard string) bool
- func CheckArgNotNull(a ...interface{}) bool
- func CheckArgPhone(phone string) bool
- func CheckArgString(a ...string) bool
- func CheckArgZfpwd(zfpwd string) bool
- func CheckStructArgNotNull(stru interface{}, fields ...string) string
- func CheckStructStringSql(stru interface{}, fields ...string) string
- func CheckVcode(telnum, vcode string) (err error)
- func ErWeiImg(link string) (string, error)
- func Generator() chan int
- func GetSid() string
- func NewPool(function func(interface{}), size int) *pool
- func NewRedis(table string) (rs proredis)
- func Newimage(digits []byte, width, height int) (string, error)
- func OnlyNumber(str string, maxLimit string) (bool, string)
- func PushRoomMessage(op int32, rid int, v interface{}) bool
- func PushUserMessage(op int32, uid int, v interface{}) bool
- func RedisConnect()
- func SendMsgToPhone(telnum string, label string) bool
- func SendVcode(telnum string) bool
- func StartTimer(f func())
- func StrToMD5(str string) string
- func TransFlowRedisDelete(Account string, OrderNo string) (err error)
- func TransFlowRedisDone(Account string, AimAccount string, WtAmt int64, OrderNo string) (err error)
- type Image
- type Maps
- type RedisType
- type SystemMessage
- type Worker
Constants ¶
View Source
const ( // Standard length of uniuri string to achive ~95 bits of entropy. StdLen = 16 // Length of uniurl string to achive ~119 bits of entropy, closest // to what can be losslessly converted to UUIDv4 (122 bits). UUIDLen = 20 )
View Source
const ( // 客户端请求建立握手 OP_HANDSHAKE = int32(0) OP_HANDSHAKE_REPLY = int32(1) // 客户端发起心跳包 OP_HEARTBEAT = int32(2) OP_HEARTBEAT_REPLY = int32(3) // 断开连接 OP_DISCONNECT = int32(4) OP_DISCONNECT_REPLY = int32(5) // 客户端发起权限认证 OP_AUTH = int32(6) OP_AUTH_REPLY = int32(7) // 系统警告通知 OP_SYS_WARNING_REPLY = int32(9) // 系统信息通知 OP_SYS_INFO_REPLY = int32(11) // 系统资金变化通知 OP_SYS_AMT_REPLY = int32(13) // 系统ODS行情推送 OP_SYS_ODS_REPLY = int32(15) // 进入和退出房间 OP_ROOM_IN = int32(16) OP_ROOM_IN_REPLY = int32(17) OP_ROOM_OUT = int32(18) OP_ROOM_OUT_REPLY = int32(19) // 客户端给用户或者房间发消息 OP_SEND_USER_MSG = int32(20) OP_SEND_USER_MSG_REPLY = int32(21) OP_SEND_ROOM_MSG = int32(22) OP_SEND_ROOM_MSG_REPLY = int32(23) // 用户A收到用户B的消息 OP_RECV_USER_MSG_REPLY = int32(25) // 用户A收到房间001的消息 OP_RECV_ROOM_MSG_REPLY = int32(27) // 系统订单结算通知 OP_SYS_SETTLE_REPLY = int32(29) // 系统用户信息变化通知 OP_SYS_USER_INFO_REPLY = int32(31) // 消息系统内部专用 OP_RAW = int32(255) OP_PROTO_READY = int32(254) OP_PROTO_FINISH = int32(253) )
Variables ¶
View Source
var HttpGet = http.Get
View Source
var HttpPost = http.Post
Functions ¶
func CheckStructArgNotNull ¶
结构体参数非空校验
func CheckStructStringSql ¶
结构体参数非空校验
func PushRoomMessage ¶
func PushUserMessage ¶
func RedisConnect ¶
func RedisConnect()
func SendMsgToPhone ¶
func TransFlowRedisDelete ¶
Types ¶
type SystemMessage ¶
消息推送更新用户账户余额
Click to show internal directories.
Click to hide internal directories.