Back to godoc.org

Package types

v0.0.0-...-3a1b8ae
Latest Go to latest

The latest major version is .

Published: Feb 27, 2020 | License: MIT | Module: bitbucket.org/twyst/uhppote-go

Index

type Authorised

type Authorised struct {
	SerialNumber uint32
	Authorised   bool
}

func (*Authorised) String

func (r *Authorised) String() string

type Card

type Card struct {
	CardNumber uint32 `json:"card-number"`
	From       Date   `json:"valid-from"`
	To         Date   `json:"valid-until"`
	Doors      []bool `json:"doors"`
}

func (Card) String

func (c Card) String() string

type Date

type Date time.Time

func DateFromString

func DateFromString(s string) (*Date, error)

func (Date) MarshalJSON

func (d Date) MarshalJSON() ([]byte, error)

func (Date) MarshalUT0311L0x

func (d Date) MarshalUT0311L0x() ([]byte, error)

func (Date) String

func (d Date) String() string

func (*Date) UnmarshalJSON

func (d *Date) UnmarshalJSON(bytes []byte) error

func (*Date) UnmarshalUT0311L0x

func (d *Date) UnmarshalUT0311L0x(bytes []byte) (interface{}, error)

type DateTime

type DateTime time.Time

func DateTimeFromString

func DateTimeFromString(s string) (*DateTime, error)

func (DateTime) MarshalJSON

func (d DateTime) MarshalJSON() ([]byte, error)

func (DateTime) MarshalUT0311L0x

func (d DateTime) MarshalUT0311L0x() ([]byte, error)

func (DateTime) String

func (d DateTime) String() string

func (*DateTime) UnmarshalJSON

func (d *DateTime) UnmarshalJSON(bytes []byte) error

func (*DateTime) UnmarshalUT0311L0x

func (d *DateTime) UnmarshalUT0311L0x(bytes []byte) (interface{}, error)

type Device

type Device struct {
	SerialNumber SerialNumber
	IpAddress    net.IP
	SubnetMask   net.IP
	Gateway      net.IP
	MacAddress   MacAddress
	Version      Version
	Date         Date
}

func (*Device) String

func (device *Device) String() string

type DoorControlState

type DoorControlState struct {
	SerialNumber SerialNumber
	Door         uint8
	ControlState uint8
	Delay        uint8
}

func (*DoorControlState) String

func (d *DoorControlState) String() string

type Event

type Event struct {
	SerialNumber SerialNumber
	Index        uint32
	Type         byte
	Granted      bool
	Door         byte
	DoorOpened   bool
	UserID       uint32
	Timestamp    DateTime
	Result       byte
}

func (*Event) String

func (s *Event) String() string

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 Listener

type Listener struct {
	SerialNumber SerialNumber
	Address      net.UDPAddr
}

func (*Listener) String

func (l *Listener) String() string

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 MsgType

type MsgType uint8

type RecordCount

type RecordCount struct {
	SerialNumber SerialNumber
	Records      uint32
}

func (*RecordCount) String

func (r *RecordCount) String() string

type Result

type Result struct {
	SerialNumber SerialNumber
	Succeeded    bool
}

func (*Result) String

func (r *Result) String() string

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 Status struct {
	SerialNumber   SerialNumber
	LastIndex      uint32
	EventType      byte
	Granted        bool
	Door           byte
	DoorOpened     bool
	UserID         uint32
	EventTimestamp DateTime
	EventResult    byte
	DoorState      []bool
	DoorButton     []bool
	SystemState    byte
	SystemDateTime DateTime
	PacketNumber   uint32
	Backup         uint32
	SpecialMessage byte
	Battery        byte
	FireAlarm      byte
}

func (*Status) String

func (s *Status) String() string

type SystemDate

type SystemDate time.Time

func (SystemDate) MarshalUT0311L0x

func (d SystemDate) MarshalUT0311L0x() ([]byte, error)

func (SystemDate) String

func (d SystemDate) String() string

func (*SystemDate) UnmarshalUT0311L0x

func (d *SystemDate) UnmarshalUT0311L0x(bytes []byte) (interface{}, error)

type SystemTime

type SystemTime time.Time

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 Time

type Time struct {
	SerialNumber SerialNumber
	DateTime     DateTime
}

func (Time) String

func (t Time) String() string

type Version

type Version uint16

func (Version) MarshalJSON

func (v Version) MarshalJSON() ([]byte, error)

func (Version) MarshalUT0311L0x

func (v Version) MarshalUT0311L0x() ([]byte, error)

func (*Version) UnmarshalJSON

func (v *Version) UnmarshalJSON(bytes []byte) error

func (*Version) UnmarshalUT0311L0x

func (v *Version) UnmarshalUT0311L0x(bytes []byte) (interface{}, error)

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier