Skip to content

Commit 5fce793

Browse files
committed
Add json annotations for the GatheredResource type so that it can be unmarshaled
Signed-off-by: Richard Wall <[email protected]>
1 parent 667a065 commit 5fce793

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

api/datareading.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ type DataReading struct {
2828
type GatheredResource struct {
2929
// Resource is a reference to a k8s object that was found by the informer
3030
// should be of type unstructured.Unstructured, raw Object
31-
Resource interface{}
32-
DeletedAt Time
31+
Resource interface{} `json:"resource"`
32+
DeletedAt Time `json:"deleted_at,omitempty"`
3333
}
3434

3535
func (v GatheredResource) MarshalJSON() ([]byte, error) {

0 commit comments

Comments
 (0)