From 7bc8bddc5aed12e20a588d6698017f9dc637b6dc Mon Sep 17 00:00:00 2001 From: Noah Hilverling Date: Thu, 22 Apr 2021 09:59:04 +0200 Subject: [PATCH] Add service state --- pkg/icingadb/v1/service.go | 9 +++++++++ pkg/icingadb/v1/v1.go | 1 + 2 files changed, 10 insertions(+) diff --git a/pkg/icingadb/v1/service.go b/pkg/icingadb/v1/service.go index d8f6192f..66ff3d17 100644 --- a/pkg/icingadb/v1/service.go +++ b/pkg/icingadb/v1/service.go @@ -15,6 +15,11 @@ type ServiceCustomvar struct { ServiceId types.Binary `json:"object_id"` } +type ServiceState struct { + State `json:",inline"` + ServiceId types.Binary `json:"object_id"` +} + type Servicegroup struct { GroupMeta `json:",inline"` } @@ -38,6 +43,10 @@ func NewServiceCustomvar() contracts.Entity { return &ServiceCustomvar{} } +func NewServiceState() contracts.Entity { + return &ServiceState{} +} + func NewServicegroup() contracts.Entity { return &Servicegroup{} } diff --git a/pkg/icingadb/v1/v1.go b/pkg/icingadb/v1/v1.go index b3d80af0..f8cef88a 100644 --- a/pkg/icingadb/v1/v1.go +++ b/pkg/icingadb/v1/v1.go @@ -37,6 +37,7 @@ var Factories = []contracts.EntityFactoryFunc{ NewNotificationUsergroup, NewService, NewServiceCustomvar, + NewServiceState, NewServicegroup, NewServicegroupCustomvar, NewServicegroupMember,