Sync URLs as well

This commit is contained in:
Alexander A. Klimov 2021-03-12 16:44:19 +01:00
parent 4d24c97d90
commit aa3dfc2afc
2 changed files with 36 additions and 0 deletions

View file

@ -117,9 +117,12 @@ func main() {
})
for _, factoryFunc := range []contracts.EntityFactoryFunc{
v1.NewActionUrl,
v1.NewCustomvar,
v1.NewHost,
v1.NewHostCustomvar,
v1.NewIconImage,
v1.NewNotesUrl,
v1.NewService,
v1.NewServiceCustomvar,
} {

33
pkg/icingadb/v1/url.go Normal file
View file

@ -0,0 +1,33 @@
package v1
import "github.com/icinga/icingadb/pkg/contracts"
type ActionUrl struct {
EntityWithoutChecksum `json:",inline"`
EnvironmentMeta `json:",inline"`
ActionUrl string `json:"action_url"`
}
type NotesUrl struct {
EntityWithoutChecksum `json:",inline"`
EnvironmentMeta `json:",inline"`
NotesUrl string `json:"notes_url"`
}
type IconImage struct {
EntityWithoutChecksum `json:",inline"`
EnvironmentMeta `json:",inline"`
IconImage string `json:"icon_image"`
}
func NewActionUrl() contracts.Entity {
return &ActionUrl{}
}
func NewNotesUrl() contracts.Entity {
return &NotesUrl{}
}
func NewIconImage() contracts.Entity {
return &IconImage{}
}