Compare commits

2 Commits

Author SHA1 Message Date
Adrian Zuercher
fee2381a45 Merge branch 'main' of https://gitea.tecamino.com/paadi/pubSub 2025-08-22 14:35:04 +02:00
Adrian Zuercher
a92a4d9fde . 2025-08-22 14:35:01 +02:00

View File

@@ -1,7 +1,14 @@
package models
import "encoding/json"
type Data struct {
Action string `json:"action,omitempty"`
Topic string `json:"topic"`
Data any `json:"data"`
}
func (*Data) ReadData(data []byte) (request Data, err error) {
err = json.Unmarshal(data, &request)
return
}