Documentation ¶
Index ¶
- func AddHistory(msg *message)
- func GetUIDByPhone(ctx *gin.Context)
- func PushMessage(ctx *gin.Context)
- func QueryHistory(ctx *gin.Context)
- func RecordEmailReq(msg *message, m *gomail.Message)
- func RecordHttpReq(msg *message) resty.PreRequestHook
- func RecordResp(msg *message, err error, resp *resty.Response)
- func Start() error
- type History
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddHistory ¶
func AddHistory(msg *message)
func GetUIDByPhone ¶
GetUIDByPhone
@Tags send @Description get user's uid by he or she's phone number @Description https://github.com/veops/messenger?tab=readme-ov-file#查询用户ID @Accept json @Produce json @Param body body getUIDByPhoneReq true " " @Success 200 {object} map[string]string "a map with phone as key and uid as value" @Router /v1/uid/getbyphone [POST]
func PushMessage ¶
PushMessage
@Tags send @Description send a new message @Description https://github.com/veops/messenger?tab=readme-ov-file#发送消息 @Accept json @Produce json @Param body body message true " " @Success 200 {object} map[string]string "a map with msg info, eg. {msg:ok}" @Router /v1/message [POST]
func QueryHistory ¶
QueryHistory
@Tags send @Description query message history @Param page_index query int true "page_index" @Param page_size query int true "page_size" @Param start query int false "start time" @Param end query int false "end time" @Param status query string false "false failed, true sent successfully" @Param sender query string false "sender name" @Param content query string false "content" @Success 200 {object} map[string]any @Router /v1/history [GET]
func RecordEmailReq ¶
func RecordEmailReq(msg *message, m *gomail.Message)
func RecordHttpReq ¶
func RecordHttpReq(msg *message) resty.PreRequestHook
func RecordResp ¶
func RecordResp(msg *message, err error, resp *resty.Response)
Types ¶
type History ¶
type History struct { Id int `gorm:"column:id" json:"id"` Message string `gorm:"column:message" json:"message"` Err string `gorm:"column:err" json:"err"` Req string `gorm:"column:req" json:"req"` Resp string `gorm:"column:resp" json:"resp"` Status bool `gorm:"column:status" json:"status"` ReceivedAt int64 `gorm:"column:received_at" json:"received_at"` CreatedAt int64 `gorm:"column:created_at" json:"created_at"` }
Click to show internal directories.
Click to hide internal directories.