summaryrefslogtreecommitdiff
path: root/helpers.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-10-30 18:10:40 -0500
committerJeff Carr <[email protected]>2024-10-30 18:10:40 -0500
commit18053caca8605895c0e6e2f8555c1ffa642a076a (patch)
treee8ae67fce227621973c5137b6b59cbdd21589def /helpers.go
parent9608bb680f4679d16985f34d227f1bcf8a0d6c87 (diff)
events are in cluster.E
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'helpers.go')
-rw-r--r--helpers.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/helpers.go b/helpers.go
index 49f8cfb..6a8fe69 100644
--- a/helpers.go
+++ b/helpers.go
@@ -6,6 +6,7 @@ package virtbuf
import (
"google.golang.org/protobuf/encoding/protojson"
"google.golang.org/protobuf/encoding/prototext"
+ "google.golang.org/protobuf/proto"
)
// human readable JSON
@@ -77,3 +78,7 @@ func (d *Droplet) UnmarshalJSON(data []byte) error {
func (e *Events) UnmarshalJSON(data []byte) error {
return protojson.Unmarshal(data, e)
}
+
+func (d *Droplet) Unmarshal(data []byte) error {
+ return proto.Unmarshal(data, d)
+}