Merge pull request #8 from lippserd/feature/endpoint

Sync endpoints as well
This commit is contained in:
Eric Lippmann 2021-03-18 13:42:20 +01:00 committed by GitHub
commit e4539d90fc
2 changed files with 23 additions and 0 deletions

View file

@ -120,6 +120,7 @@ func main() {
for _, factoryFunc := range []contracts.EntityFactoryFunc{
v1.NewActionUrl,
v1.NewCustomvar,
v1.NewEndpoint,
v1.NewHost,
v1.NewHostCustomvar,
v1.NewIconImage,

View file

@ -0,0 +1,22 @@
package v1
import (
"github.com/icinga/icingadb/pkg/contracts"
"github.com/icinga/icingadb/pkg/types"
)
type Endpoint struct {
EntityWithChecksum `json:",inline"`
EnvironmentMeta `json:",inline"`
NameCiMeta `json:",inline"`
ZoneId types.Binary `json:"zone_id"`
}
func NewEndpoint() contracts.Entity {
return &Endpoint{}
}
// Assert interface compliance.
var (
_ contracts.Initer = (*Endpoint)(nil)
)