1 Star 0 Fork 29

wangyfbe/go-admin-core

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
message.go 851 Bytes
一键复制 编辑 原始数据 按行查看 历史
brandwwang 提交于 2023-06-03 18:01 +08:00 . change go mod
package queue
import (
"github.com/robinjoseph08/redisqueue/v2"
"gitee.com/wangyfbe/go-admin-core/storage"
)
type Message struct {
redisqueue.Message
}
func (m *Message) GetID() string {
return m.ID
}
func (m *Message) GetStream() string {
return m.Stream
}
func (m *Message) GetValues() map[string]interface{} {
return m.Values
}
func (m *Message) SetID(id string) {
m.ID = id
}
func (m *Message) SetStream(stream string) {
m.Stream = stream
}
func (m *Message) SetValues(values map[string]interface{}) {
m.Values = values
}
func (m *Message) GetPrefix() (prefix string) {
if m.Values == nil {
return
}
v, _ := m.Values[storage.PrefixKey]
prefix, _ = v.(string)
return
}
func (m *Message) SetPrefix(prefix string) {
if m.Values == nil {
m.Values = make(map[string]interface{})
}
m.Values[storage.PrefixKey] = prefix
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/wangyfbe/go-admin-core.git
git@gitee.com:wangyfbe/go-admin-core.git
wangyfbe
go-admin-core
go-admin-core
v1.10.3

搜索帮助