Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultIpAddresses() (types.BindAddr, types.BroadcastAddr, types.ListenAddr)
- type ACL
- type AWS
- type Alerts
- type Config
- type Connection
- type Device
- type DeviceMap
- type Disconnects
- type HMAC
- type HOTP
- type HTTPD
- type Lockfile
- type MQTT
- type Nonce
- type OpenAPI
- type Permissions
- type REST
- type RSA
- type System
- type Topics
- type WildApricot
Constants ¶
View Source
const (
// DefaultConfig is the default file path for the uhppoted configuration file
DefaultConfig = "/etc/uhppoted/uhppoted.conf"
)
Variables ¶
View Source
var BROADCAST_ADDR = netip.AddrFrom4([4]byte{255, 255, 255, 255})
View Source
var INADDR_ANY = netip.AddrFrom4([4]byte{0, 0, 0, 0})
Functions ¶
func DefaultIpAddresses ¶
func DefaultIpAddresses() (types.BindAddr, types.BroadcastAddr, types.ListenAddr)
Types ¶
type AWS ¶
type Config ¶
type Connection ¶
type Connection struct { Broker string `conf:"broker"` ClientID string `conf:"client.ID"` Username string `conf:"username"` Password string `conf:"password"` BrokerCertificate string `conf:"broker.certificate"` ClientCertificate string `conf:"client.certificate"` ClientKey string `conf:"client.key"` Verify string `conf:"verify"` }
type DeviceMap ¶
func (DeviceMap) ToControllers ¶ added in v0.8.9
* Returns a list of uhppote.Device sorted by controller ID (required for ACLs) *
type Disconnects ¶ added in v0.8.2
type HTTPD ¶
type HTTPD struct { HTML string `conf:"html"` HttpEnabled bool `conf:"http.enabled"` HttpPort uint16 `conf:"http.port"` HttpsEnabled bool `conf:"https.enabled"` HttpsPort uint16 `conf:"https.port"` CACertificate string `conf:"tls.ca"` TLSCertificate string `conf:"tls.certificate"` TLSKey string `conf:"tls.key"` RequireClientCertificate bool `conf:"tls.client.certificates.required"` Security struct { Auth string `conf:"auth"` AuthDB string `conf:"local.db"` CookieMaxAge int `conf:"cookie.max-age"` LoginExpiry string `conf:"login.expiry"` SessionExpiry string `conf:"session.expiry"` AdminRole string `conf:"admin.role"` NoSetup bool `conf:"no-setup"` OTP struct { Issuer string `conf:"issuer"` Login string `conf:"login"` } `conf:"otp"` } `conf:"security"` RequestTimeout time.Duration `conf:"request.timeout"` System struct { Interfaces string `conf:"interfaces"` Controllers string `conf:"controllers"` Doors string `conf:"doors"` Groups string `conf:"groups"` Cards string `conf:"cards"` Events string `conf:"events"` Logs string `conf:"logs"` Users string `conf:"users"` History string `conf:"history"` Refresh time.Duration `conf:"refresh"` Windows struct { Ok time.Duration `conf:"ok"` Uncertain time.Duration `conf:"uncertain"` Systime time.Duration `conf:"systime"` CacheExpiry time.Duration `conf:"expires"` } `conf:"windows"` } `conf:"system"` DB struct { Rules struct { ACL string `conf:"acl"` Interfaces string `conf:"interfaces"` Controllers string `conf:"controllers"` Cards string `conf:"cards"` Doors string `conf:"doors"` Groups string `conf:"groups"` Events string `conf:"events"` Logs string `conf:"logs"` Users string `conf:"users"` } `conf:"rules"` } `conf:"db"` Audit struct { File string `conf:"file"` } `conf:"audit"` Retention time.Duration `conf:"retention"` Timezones string `conf:"timezones"` PIN struct { Enabled bool `conf:"enabled"` } `conf:"PIN"` Cards struct { DefaultStartDate string `conf:"default-start-date"` DefaultEndDate string `conf:"default-end-date"` } `conf:"cards"` }
type MQTT ¶
type MQTT struct { ServerID string `conf:"server.ID"` Connection Connection `conf:"connection"` Topics Topics `conf:"topic"` Locale string `conf:"translation.locale"` Protocol string `conf:"protocol.version"` Alerts Alerts `conf:"alerts"` EventsKeyID string `conf:"events.key"` SystemKeyID string `conf:"system.key"` EventIDs string `conf:"events.index.filepath"` Permissions Permissions `conf:"permissions"` Cards string `conf:"cards"` HMAC HMAC `conf:"security.HMAC"` Authentication string `conf:"security.authentication"` HOTP HOTP `conf:"security.hotp"` RSA RSA `conf:"security.rsa"` Nonce Nonce `conf:"security.nonce"` SignOutgoing bool `conf:"security.outgoing.sign"` EncryptOutgoing bool `conf:"security.outgoing.encrypt"` LockfileRemove bool `conf:"lockfile.remove"` Disconnects Disconnects `conf:"disconnects"` ACL ACL `conf:"acl"` }
type OpenAPI ¶
func NewOpenAPI ¶
func NewOpenAPI() *OpenAPI
type Permissions ¶
type REST ¶
type REST struct { HttpEnabled bool `conf:"http.enabled"` HttpPort uint16 `conf:"http.port"` HttpsEnabled bool `conf:"https.enabled"` HttpsPort uint16 `conf:"https.port"` TLSKeyFile string `conf:"tls.key"` TLSCertificateFile string `conf:"tls.certificate"` CACertificateFile string `conf:"tls.ca"` RequireClientCertificates bool `conf:"tls.client.certificates"` CORSEnabled bool `conf:"CORS.enabled"` AuthEnabled bool `conf:"auth.enabled"` Users string `conf:"auth.users"` Groups string `conf:"auth.groups"` HOTP HOTP `conf:"auth.hotp"` Locale string `conf:"translation.locale"` Protocol string `conf:"protocol.version"` }
type System ¶
type System struct { BindAddress *types.BindAddr `conf:"bind.address"` BroadcastAddress *types.BroadcastAddr `conf:"broadcast.address"` ListenAddress *types.ListenAddr `conf:"listen.address"` Timeout time.Duration `conf:"timeout"` HealthCheckInterval time.Duration `conf:"monitoring.healthcheck.interval"` HealthCheckIdle time.Duration `conf:"monitoring.healthcheck.idle"` HealthCheckIgnore time.Duration `conf:"monitoring.healthcheck.ignore"` WatchdogInterval time.Duration `conf:"monitoring.watchdog.interval"` CardFormat types.CardFormat `conf:"card.format"` }
type Topics ¶
type WildApricot ¶
type WildApricot struct { HTTP struct { ClientTimeout time.Duration `conf:"client-timeout"` Retries int `conf:"retries"` RetryDelay time.Duration `conf:"retry-delay"` } `conf:"http"` Fields struct { CardNumber string `conf:"card-number"` PIN string `conf:"PIN"` } `conf:"fields"` DisplayOrder struct { Groups string `conf:"groups"` Doors string `conf:"doors"` } `conf:"display-order"` FacilityCode string `conf:"facility-code"` }
func NewWildApricot ¶
func NewWildApricot() *WildApricot
Click to show internal directories.
Click to hide internal directories.