1234567891011121314151617181920212223242526 |
- package dao
- import (
- "context"
- "go-common/library/log"
- "strconv"
- )
- type PubMessage struct {
- RoomId int64 `json:"room_id"`
- Uid int64 `json:"uid"`
- Ip string `json:"ip"`
- Action int `json:"action"`
- ReqType int64 `json:"req_type"`
- ResType int64 `json:"res_type"`
- ResCode int64 `json:"res_code"`
- }
- func (d *Dao) Pub(ctx context.Context, message PubMessage) (err error) {
- if err = d.captchaAnti.Send(ctx, strconv.FormatInt(message.Uid, 10), message); err != nil {
- log.Error("[XCaptcha][DataBus] call for publish error, err:%v, msg:%v", err, message)
- }
- return
- }
|