mirror of
https://github.com/quexten/goldwarden.git
synced 2024-11-30 22:22:51 +03:00
20 lines
351 B
Go
20 lines
351 B
Go
package messages
|
|
|
|
import "encoding/json"
|
|
|
|
type ActionResponse struct {
|
|
Success bool
|
|
Message string
|
|
}
|
|
|
|
func init() {
|
|
registerPayloadParser(func(payload []byte) (interface{}, error) {
|
|
var req ActionResponse
|
|
err := json.Unmarshal(payload, &req)
|
|
if err != nil {
|
|
panic("Unmarshal: " + err.Error())
|
|
}
|
|
return req, nil
|
|
}, ActionResponse{})
|
|
}
|