2022-03-23 02:12:54 +00:00
|
|
|
package appier
|
|
|
|
|
2022-03-24 10:04:34 +00:00
|
|
|
import (
|
|
|
|
"encoding/json"
|
|
|
|
"fmt"
|
|
|
|
)
|
2022-03-23 02:12:54 +00:00
|
|
|
|
|
|
|
// toBytes ...
|
|
|
|
func toBytes(data interface{}) []byte {
|
|
|
|
b, _ := json.Marshal(data)
|
|
|
|
return b
|
|
|
|
}
|
2022-03-24 10:04:34 +00:00
|
|
|
|
|
|
|
// getRedisKey ...
|
|
|
|
func getRedisKey(prefix string, targetID string) string {
|
|
|
|
return fmt.Sprintf("%s%s_%s", RedisSyncAppierPrefix, prefix, targetID)
|
|
|
|
}
|