Code angepasst
This commit is contained in:
51
models.go
Normal file
51
models.go
Normal file
@@ -0,0 +1,51 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"html/template"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Person struct {
|
||||
FirstName string
|
||||
LastName string
|
||||
Email string
|
||||
Department string
|
||||
Phones []Phone
|
||||
RawPhoneNumber string
|
||||
InternalPhone string
|
||||
IsContact bool // Neues Feld zur Unterscheidung zwischen Benutzern und Kontakten
|
||||
}
|
||||
|
||||
type Phone struct {
|
||||
PhoneNumber string
|
||||
Type string
|
||||
}
|
||||
|
||||
type Config struct {
|
||||
PhoneRules struct {
|
||||
Country struct {
|
||||
Prefix string `yaml:"prefix"`
|
||||
AreaCodes []string `yaml:"area_codes"`
|
||||
InternalPrefix string `yaml:"internal_prefix"`
|
||||
} `yaml:"country"`
|
||||
InvalidNumber string `yaml:"invalid_number"`
|
||||
} `yaml:"phone_rules"`
|
||||
}
|
||||
|
||||
type LDAPConfig struct {
|
||||
Server string
|
||||
Port string
|
||||
BindDN string
|
||||
BindPassword string
|
||||
BaseDN string
|
||||
Filter string
|
||||
}
|
||||
|
||||
var (
|
||||
cachedData []Person
|
||||
lastUpdate time.Time
|
||||
tmpl *template.Template
|
||||
ldapConfig LDAPConfig
|
||||
serverPort string
|
||||
config Config
|
||||
)
|
Reference in New Issue
Block a user