mirror of
https://github.com/Icinga/icingadb.git
synced 2026-06-09 00:42:37 -04:00
Sync users as well
This commit is contained in:
parent
3a66f0372c
commit
0dd5e54b14
2 changed files with 40 additions and 0 deletions
|
|
@ -126,6 +126,8 @@ func main() {
|
|||
v1.NewNotesUrl,
|
||||
v1.NewService,
|
||||
v1.NewServiceCustomvar,
|
||||
v1.NewUser,
|
||||
v1.NewUserCustomvar,
|
||||
} {
|
||||
factoryFunc := factoryFunc
|
||||
|
||||
|
|
|
|||
38
pkg/icingadb/v1/user.go
Normal file
38
pkg/icingadb/v1/user.go
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
package v1
|
||||
|
||||
import (
|
||||
"github.com/icinga/icingadb/pkg/contracts"
|
||||
"github.com/icinga/icingadb/pkg/types"
|
||||
)
|
||||
|
||||
type User struct {
|
||||
EntityWithChecksum `json:",inline"`
|
||||
EnvironmentMeta `json:",inline"`
|
||||
NameCiMeta `json:",inline"`
|
||||
DisplayName string `json:"display_name"`
|
||||
Email string `json:"email"`
|
||||
Pager string `json:"pager"`
|
||||
NotificationsEnabled types.Bool `json:"notifications_enabled"`
|
||||
TimeperiodId types.Binary `json:"timeperiod_id"`
|
||||
States uint8 `json:"states"`
|
||||
Types uint16 `json:"types"`
|
||||
ZoneId types.Binary `json:"zone_id"`
|
||||
}
|
||||
|
||||
type UserCustomvar struct {
|
||||
CustomvarMeta `json:",inline"`
|
||||
UserId types.Binary `json:"object_id"`
|
||||
}
|
||||
|
||||
func NewUser() contracts.Entity {
|
||||
return &User{}
|
||||
}
|
||||
|
||||
func NewUserCustomvar() contracts.Entity {
|
||||
return &UserCustomvar{}
|
||||
}
|
||||
|
||||
// Assert interface compliance.
|
||||
var (
|
||||
_ contracts.Initer = (*User)(nil)
|
||||
)
|
||||
Loading…
Reference in a new issue