Skip to content

Commit baa6bc0

Browse files
committed
chore(resources): resources instance add message
1 parent 8bbfc02 commit baa6bc0

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

api/resource.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ type Resource struct {
4949
Binding string `json:"binding,omitempty"`
5050
// Resource Options
5151
Options map[string]interface{} `json:"options,omitempty"`
52+
// Resource instance message
53+
Message string `json:"message,omitempty"`
5254
}
5355

5456
type Resources []Resource

resources/resources_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ const resourceCreateFixture string = `
5353
"options": {},
5454
"status": null,
5555
"binding": null,
56+
"message": null,
5657
"created": "2020-09-08T00:00:00UTC",
5758
"updated": "2020-09-08T00:00:00UTC"
5859
}
@@ -69,6 +70,7 @@ const resourcePutFixture string = `
6970
"options": {},
7071
"status": null,
7172
"binding": null,
73+
"message": null,
7274
"created": "2020-09-08T00:00:00UTC",
7375
"updated": "2020-09-08T00:00:00UTC"
7476
}
@@ -90,6 +92,7 @@ const resourcesFixture string = `
9092
"options": {},
9193
"status": null,
9294
"binding": null,
95+
"message": null,
9396
"created": "2020-09-08T00:00:00UTC",
9497
"updated": "2020-09-08T00:00:00UTC"
9598
}
@@ -108,6 +111,7 @@ const resourceFixture string = `
108111
"options": {},
109112
"status": null,
110113
"binding": null,
114+
"message": null,
111115
"created": "2020-09-08T00:00:00UTC",
112116
"updated": "2020-09-08T00:00:00UTC"
113117
}
@@ -124,6 +128,7 @@ const resourceBindingFixture string = `
124128
"options": {},
125129
"status": null,
126130
"binding": null,
131+
"message": null,
127132
"created": "2020-09-08T00:00:00UTC",
128133
"updated": "2020-09-08T00:00:00UTC"
129134
}
@@ -140,6 +145,7 @@ const resourceUnbindFixture string = `
140145
"options": {},
141146
"status": null,
142147
"binding": null,
148+
"message": null,
143149
"created": "2020-09-08T00:00:00UTC",
144150
"updated": "2020-09-08T00:00:00UTC"
145151
}
@@ -277,6 +283,7 @@ func TestResourcesCreate(t *testing.T) {
277283
Binding: "",
278284
Data: map[string]interface{}{},
279285
Options: map[string]interface{}{},
286+
Message: "",
280287
Created: "2020-09-08T00:00:00UTC",
281288
Updated: "2020-09-08T00:00:00UTC",
282289
}
@@ -380,6 +387,7 @@ func TestResourcesList(t *testing.T) {
380387
Binding: "",
381388
Data: map[string]interface{}{},
382389
Options: map[string]interface{}{},
390+
Message: "",
383391
Created: "2020-09-08T00:00:00UTC",
384392
Updated: "2020-09-08T00:00:00UTC",
385393
},
@@ -435,6 +443,7 @@ func TestResourceGet(t *testing.T) {
435443
Binding: "",
436444
Data: map[string]interface{}{},
437445
Options: map[string]interface{}{},
446+
Message: "",
438447
Created: "2020-09-08T00:00:00UTC",
439448
Updated: "2020-09-08T00:00:00UTC",
440449
}
@@ -472,6 +481,7 @@ func TestResourcePut(t *testing.T) {
472481
Binding: "",
473482
Data: map[string]interface{}{},
474483
Options: map[string]interface{}{},
484+
Message: "",
475485
Created: "2020-09-08T00:00:00UTC",
476486
Updated: "2020-09-08T00:00:00UTC",
477487
}
@@ -520,6 +530,7 @@ func TestResourceBind(t *testing.T) {
520530
Binding: "",
521531
Data: map[string]interface{}{},
522532
Options: map[string]interface{}{},
533+
Message: "",
523534
Created: "2020-09-08T00:00:00UTC",
524535
Updated: "2020-09-08T00:00:00UTC",
525536
}
@@ -560,6 +571,7 @@ func TestResourceUnbind(t *testing.T) {
560571
Binding: "",
561572
Data: map[string]interface{}{},
562573
Options: map[string]interface{}{},
574+
Message: "",
563575
Created: "2020-09-08T00:00:00UTC",
564576
Updated: "2020-09-08T00:00:00UTC",
565577
}

0 commit comments

Comments
 (0)