Documentation
¶
Index ¶
- Constants
- type Address
- type BindAddr
- type BroadcastAddr
- type Card
- type ControlState
- type Date
- func (d Date) After(date Date) bool
- func (d Date) Before(date Date) bool
- func (d Date) Equals(date Date) bool
- func (d Date) IsValid() bool
- func (d Date) MarshalJSON() ([]byte, error)
- func (d Date) MarshalUT0311L0x() ([]byte, error)
- func (d Date) String() string
- func (d *Date) UnmarshalJSON(bytes []byte) error
- func (d *Date) UnmarshalUT0311L0x(bytes []byte) (any, error)
- func (d Date) Weekday() time.Weekday
- type DateTime
- func (d DateTime) Add(dt time.Duration) DateTime
- func (d DateTime) Before(t time.Time) bool
- func (d DateTime) IsZero() bool
- func (d DateTime) MarshalJSON() ([]byte, error)
- func (d DateTime) MarshalText() ([]byte, error)
- func (d DateTime) MarshalUT0311L0x() ([]byte, error)
- func (d DateTime) String() string
- func (d *DateTime) UnmarshalJSON(bytes []byte) error
- func (d *DateTime) UnmarshalUT0311L0x(b []byte) (any, error)
- type Device
- type DoorControlState
- type Event
- type EventIndex
- type EventIndexResult
- type HHmm
- func (h HHmm) After(t HHmm) bool
- func (h HHmm) Before(t HHmm) bool
- func (h HHmm) Equals(t HHmm) bool
- func (h HHmm) MarshalJSON() ([]byte, error)
- func (h HHmm) MarshalUT0311L0x() ([]byte, error)
- func (h HHmm) String() string
- func (h *HHmm) UnmarshalJSON(bytes []byte) error
- func (h *HHmm) UnmarshalUT0311L0x(bytes []byte) (interface{}, error)
- type ListenAddr
- type Listener
- type MacAddress
- type MsgType
- type PIN
- type Result
- type SOM
- type Segment
- type Segments
- type SerialNumber
- type Status
- type StatusEvent
- type SystemDate
- type SystemTime
- type Task
- type TaskType
- type Time
- type TimeProfile
- type Version
- type Weekdays
Constants ¶
View Source
const BIND_PORT = 0
View Source
const BROADCAST_PORT = 60000
View Source
const DEFAULT_PORT = 60000
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶ added in v0.7.2
func ResolveAddr ¶ added in v0.7.2
func (*Address) MarshalJSON ¶ added in v0.7.2
func (*Address) UnmarshalJSON ¶ added in v0.7.2
type BindAddr ¶ added in v0.7.2
func ResolveBindAddr ¶ added in v0.7.2
func (BindAddr) MarshalJSON ¶ added in v0.7.2
func (*BindAddr) UnmarshalJSON ¶ added in v0.7.2
type BroadcastAddr ¶ added in v0.7.2
func ResolveBroadcastAddr ¶ added in v0.7.2
func ResolveBroadcastAddr(s string) (*BroadcastAddr, error)
func (*BroadcastAddr) Clone ¶ added in v0.7.2
func (a *BroadcastAddr) Clone() *BroadcastAddr
func (*BroadcastAddr) Equal ¶ added in v0.7.2
func (a *BroadcastAddr) Equal(addr *BroadcastAddr) bool
func (BroadcastAddr) MarshalJSON ¶ added in v0.7.2
func (a BroadcastAddr) MarshalJSON() ([]byte, error)
func (*BroadcastAddr) Set ¶ added in v0.7.2
func (a *BroadcastAddr) Set(v string) error
func (BroadcastAddr) String ¶ added in v0.7.2
func (a BroadcastAddr) String() string
func (*BroadcastAddr) UnmarshalJSON ¶ added in v0.7.2
func (a *BroadcastAddr) UnmarshalJSON(bytes []byte) error
type Card ¶
type Card struct {
CardNumber uint32 `json:"card-number"`
From *Date `json:"start-date"`
To *Date `json:"end-date"`
Doors map[uint8]uint8 `json:"doors"`
PIN PIN `json:"PIN,omitempty"`
}
func (Card) MarshalJSON ¶ added in v0.8.4
func (*Card) UnmarshalJSON ¶
type ControlState ¶ added in v0.7.2
type ControlState int
const ( NormallyOpen ControlState = iota + 1 NormallyClosed Controlled )
const ( ModeUnknown ControlState = iota ModeNormallyOpen ModeNormallyClosed ModeControlled )
func (ControlState) MarshalJSON ¶ added in v0.7.2
func (v ControlState) MarshalJSON() ([]byte, error)
func (ControlState) String ¶ added in v0.7.2
func (v ControlState) String() string
func (*ControlState) UnmarshalJSON ¶ added in v0.7.2
func (v *ControlState) UnmarshalJSON(b []byte) error
type Date ¶
func DateFromString ¶
func (Date) MarshalJSON ¶
func (Date) MarshalUT0311L0x ¶
func (*Date) UnmarshalJSON ¶
type DateTime ¶
func DateTimeNow ¶ added in v0.7.3
func DateTimeNow() DateTime
func (DateTime) Before ¶ added in v0.7.3
Because time.Truncate does not in any way behave like your would expect it to :-(
func (DateTime) MarshalJSON ¶
func (DateTime) MarshalText ¶ added in v0.7.1
func (DateTime) MarshalUT0311L0x ¶
func (*DateTime) UnmarshalJSON ¶
type Device ¶
type DoorControlState ¶
type DoorControlState struct {
SerialNumber SerialNumber
Door uint8
ControlState ControlState
Delay uint8
}
func (*DoorControlState) String ¶
func (d *DoorControlState) String() string
type Event ¶
type EventIndex ¶
type EventIndex struct {
SerialNumber SerialNumber
Index uint32
}
func (*EventIndex) String ¶
func (s *EventIndex) String() string
type EventIndexResult ¶
type EventIndexResult struct {
SerialNumber SerialNumber
Index uint32
Changed bool
}
func (*EventIndexResult) String ¶
func (s *EventIndexResult) String() string
type HHmm ¶ added in v0.7.0
type HHmm struct {
// contains filtered or unexported fields
}
func HHmmFromString ¶ added in v0.7.0
func HHmmFromTime ¶ added in v0.7.0
func (HHmm) MarshalJSON ¶ added in v0.7.0
func (HHmm) MarshalUT0311L0x ¶ added in v0.7.0
func (*HHmm) UnmarshalJSON ¶ added in v0.7.0
func (*HHmm) UnmarshalUT0311L0x ¶ added in v0.7.0
type ListenAddr ¶ added in v0.7.2
func ResolveListenAddr ¶ added in v0.7.2
func ResolveListenAddr(s string) (*ListenAddr, error)
func (*ListenAddr) Clone ¶ added in v0.7.2
func (a *ListenAddr) Clone() *ListenAddr
func (*ListenAddr) Equal ¶ added in v0.7.2
func (a *ListenAddr) Equal(addr *ListenAddr) bool
func (ListenAddr) MarshalJSON ¶ added in v0.7.2
func (a ListenAddr) MarshalJSON() ([]byte, error)
func (*ListenAddr) Set ¶ added in v0.7.2
func (a *ListenAddr) Set(v string) error
func (ListenAddr) String ¶ added in v0.7.2
func (a ListenAddr) String() string
func (*ListenAddr) UnmarshalJSON ¶ added in v0.7.2
func (a *ListenAddr) UnmarshalJSON(bytes []byte) error
type Listener ¶
type Listener struct {
SerialNumber SerialNumber
Address net.UDPAddr
}
type MacAddress ¶
type MacAddress net.HardwareAddr
func (MacAddress) MarshalJSON ¶
func (m MacAddress) MarshalJSON() ([]byte, error)
func (MacAddress) MarshalUT0311L0x ¶
func (m MacAddress) MarshalUT0311L0x() ([]byte, error)
func (MacAddress) String ¶
func (m MacAddress) String() string
func (*MacAddress) UnmarshalJSON ¶
func (m *MacAddress) UnmarshalJSON(bytes []byte) error
func (*MacAddress) UnmarshalUT0311L0x ¶
func (m *MacAddress) UnmarshalUT0311L0x(bytes []byte) (interface{}, error)
type PIN ¶ added in v0.8.4
type PIN uint32
func (PIN) MarshalJSON ¶ added in v0.8.4
func (PIN) MarshalUT0311L0x ¶ added in v0.8.4
func (*PIN) UnmarshalJSON ¶ added in v0.8.4
type Result ¶
type Result struct {
SerialNumber SerialNumber
Succeeded bool
}
type Segments ¶ added in v0.7.0
func (Segments) MarshalJSON ¶ added in v0.7.0
func (*Segments) UnmarshalJSON ¶ added in v0.7.0
type SerialNumber ¶
type SerialNumber uint32
func (SerialNumber) MarshalUT0311L0x ¶
func (s SerialNumber) MarshalUT0311L0x() ([]byte, error)
func (SerialNumber) String ¶
func (s SerialNumber) String() string
func (*SerialNumber) UnmarshalUT0311L0x ¶
func (s *SerialNumber) UnmarshalUT0311L0x(bytes []byte) (interface{}, error)
type Status ¶
type StatusEvent ¶ added in v0.6.12
type SystemDate ¶
func (SystemDate) Format ¶ added in v0.8.4
func (d SystemDate) Format(format string) string
func (SystemDate) IsZero ¶ added in v0.8.4
func (d SystemDate) IsZero() bool
func (SystemDate) MarshalUT0311L0x ¶
func (d SystemDate) MarshalUT0311L0x() ([]byte, error)
func (SystemDate) String ¶
func (d SystemDate) String() string
func (*SystemDate) UnmarshalUT0311L0x ¶
func (d *SystemDate) UnmarshalUT0311L0x(b []byte) (interface{}, error)
type SystemTime ¶
func TimeFromString ¶ added in v0.7.0
func TimeFromString(s string) (*SystemTime, error)
func (SystemTime) Format ¶ added in v0.8.4
func (t SystemTime) Format(format string) string
func (SystemTime) MarshalUT0311L0x ¶
func (d SystemTime) MarshalUT0311L0x() ([]byte, error)
func (SystemTime) String ¶
func (t SystemTime) String() string
func (*SystemTime) UnmarshalUT0311L0x ¶
func (t *SystemTime) UnmarshalUT0311L0x(bytes []byte) (interface{}, error)
type Task ¶ added in v0.7.1
type Task struct {
Task TaskType `json:"task"`
Door uint8 `json:"door,omitempty"`
From Date `json:"start-date,omitempty"`
To Date `json:"end-date,omitempty"`
Weekdays Weekdays `json:"weekdays,omitempty"`
Start HHmm `json:"start,omitempty"`
Cards uint8 `json:"cards,omitempty"`
}
func (*Task) UnmarshalJSON ¶ added in v0.7.1
type TaskType ¶ added in v0.7.1
type TaskType int
func (TaskType) MarshalJSON ¶ added in v0.7.1
func (*TaskType) UnmarshalJSON ¶ added in v0.7.1
func (*TaskType) UnmarshalTSV ¶ added in v0.7.1
type Time ¶
type Time struct {
SerialNumber SerialNumber
DateTime DateTime
}
type TimeProfile ¶ added in v0.7.0
type TimeProfile struct {
ID uint8 `json:"id"`
LinkedProfileID uint8 `json:"linked-profile,omitempty"`
From *Date `json:"start-date,omitempty"`
To *Date `json:"end-date,omitempty"`
Weekdays Weekdays `json:"weekdays,omitempty"`
Segments Segments `json:"segments,omitempty"`
}
func (TimeProfile) String ¶ added in v0.7.0
func (t TimeProfile) String() string
func (*TimeProfile) UnmarshalJSON ¶ added in v0.7.0
func (t *TimeProfile) UnmarshalJSON(bytes []byte) error
type Version ¶
type Version uint16
func (Version) MarshalJSON ¶
func (Version) MarshalUT0311L0x ¶
func (*Version) UnmarshalJSON ¶
func (*Version) UnmarshalUT0311L0x ¶
type Weekdays ¶ added in v0.7.0
func (Weekdays) MarshalJSON ¶ added in v0.7.0
func (*Weekdays) UnmarshalJSON ¶ added in v0.7.0
Click to show internal directories.
Click to hide internal directories.