3 Star 5 Fork 6

三三物联网/ssiot-core

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
message.go 849 Bytes
Copy Edit Raw Blame History
zou qinqin authored 2023-03-02 17:42 +08:00 . 修改模块名
package cache
import (
"gitee.com/sansaniot/sansan-core/storage"
"github.com/robinjoseph08/redisqueue/v2"
)
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 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/sansaniot/ssiot-core.git
git@gitee.com:sansaniot/ssiot-core.git
sansaniot
ssiot-core
ssiot-core
v1.5.0

Search