Documentation ¶
Index ¶
- Constants
- Variables
- type ClearTimeProfilesRequest
- type ClearTimeProfilesResponse
- type DateRange
- type DeleteCardRequest
- type DeleteCardResponse
- type DeleteCardsRequest
- type DeleteCardsResponse
- type DeviceID
- type DeviceSummary
- type Event
- type GetCardRecordsRequest
- type GetCardRecordsResponse
- type GetCardRequest
- type GetCardResponse
- type GetCardsRequest
- type GetCardsResponse
- type GetDeviceRequest
- type GetDeviceResponse
- type GetDevicesRequest
- type GetDevicesResponse
- type GetDoorControlRequest
- type GetDoorControlResponse
- type GetDoorDelayRequest
- type GetDoorDelayResponse
- type GetTimeProfileRequest
- type GetTimeProfileResponse
- type GetTimeProfilesRequest
- type GetTimeProfilesResponse
- type GetTimeRequest
- type GetTimeResponse
- type IUHPPOTED
- type OpenDoorRequest
- type OpenDoorResponse
- type PutTaskListRequest
- type PutTaskListResponse
- type PutTimeProfileRequest
- type PutTimeProfileResponse
- type PutTimeProfilesRequest
- type PutTimeProfilesResponse
- type SetTimeRequest
- type SetTimeResponse
- type Status
- type UHPPOTED
- func (u *UHPPOTED) ActivateKeypads(controller uint32, keypads map[uint8]bool) error
- func (u *UHPPOTED) ClearTimeProfiles(request ClearTimeProfilesRequest) (*ClearTimeProfilesResponse, error)
- func (u *UHPPOTED) DeleteCard(request DeleteCardRequest) (*DeleteCardResponse, error)
- func (u *UHPPOTED) DeleteCards(request DeleteCardsRequest) (*DeleteCardsResponse, error)
- func (u *UHPPOTED) FetchEvents(controller uint32, from uint32, N uint32) ([]types.Event, error)
- func (u *UHPPOTED) GetCard(request GetCardRequest) (*GetCardResponse, error)
- func (u *UHPPOTED) GetCardRecords(request GetCardRecordsRequest) (*GetCardRecordsResponse, error)
- func (u *UHPPOTED) GetCards(request GetCardsRequest) (*GetCardsResponse, error)
- func (u *UHPPOTED) GetDevice(request GetDeviceRequest) (*GetDeviceResponse, error)
- func (u *UHPPOTED) GetDevices(request GetDevicesRequest) (*GetDevicesResponse, error)
- func (u *UHPPOTED) GetDoorControl(request GetDoorControlRequest) (*GetDoorControlResponse, error)
- func (u *UHPPOTED) GetDoorDelay(request GetDoorDelayRequest) (*GetDoorDelayResponse, error)
- func (u *UHPPOTED) GetEvent(deviceID uint32, index uint32) (*Event, error)
- func (u *UHPPOTED) GetEventIndices(deviceID uint32) (uint32, uint32, uint32, error)
- func (u *UHPPOTED) GetEvents(deviceID uint32, N int) ([]Event, error)
- func (u *UHPPOTED) GetStatus(deviceID uint32) (*Status, error)
- func (u *UHPPOTED) GetTime(request GetTimeRequest) (*GetTimeResponse, error)
- func (u *UHPPOTED) GetTimeProfile(request GetTimeProfileRequest) (*GetTimeProfileResponse, error)
- func (u *UHPPOTED) GetTimeProfiles(request GetTimeProfilesRequest) (*GetTimeProfilesResponse, error)
- func (u *UHPPOTED) OpenDoor(request OpenDoorRequest) (*OpenDoorResponse, error)
- func (u *UHPPOTED) PutCard(deviceID uint32, card types.Card) (bool, error)
- func (u *UHPPOTED) PutTaskList(request PutTaskListRequest) (*PutTaskListResponse, int, error)
- func (u *UHPPOTED) PutTimeProfile(request PutTimeProfileRequest) (*PutTimeProfileResponse, error)
- func (u *UHPPOTED) PutTimeProfiles(request PutTimeProfilesRequest) (*PutTimeProfilesResponse, int, error)
- func (u *UHPPOTED) RecordSpecialEvents(deviceID uint32, enable bool) (bool, error)
- func (u *UHPPOTED) RestoreDefaultParameters(controller uint32) error
- func (u *UHPPOTED) SetDoorControl(controller uint32, door uint8, mode types.ControlState) error
- func (u *UHPPOTED) SetDoorDelay(controller uint32, door uint8, delay uint8) error
- func (u *UHPPOTED) SetDoorPasscodes(controller uint32, door uint8, passcodes ...uint32) error
- func (u *UHPPOTED) SetEventListener(deviceID uint32, address types.ListenAddr) (bool, error)
- func (u *UHPPOTED) SetInterlock(controller uint32, interlock types.Interlock) error
- func (u *UHPPOTED) SetTime(request SetTimeRequest) (*SetTimeResponse, error)
Constants ¶
View Source
const ( StatusOK = http.StatusOK StatusBadRequest = http.StatusBadRequest StatusNotFound = http.StatusNotFound StatusInternalServerError = http.StatusInternalServerError )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ClearTimeProfilesRequest ¶
type ClearTimeProfilesRequest struct {
DeviceID uint32
}
type DateRange ¶
type DeleteCardRequest ¶
type DeleteCardResponse ¶
type DeleteCardsRequest ¶
type DeleteCardsRequest struct {
DeviceID DeviceID
}
type DeleteCardsResponse ¶
type DeviceSummary ¶
type DeviceSummary struct { DeviceType string `json:"device-type"` Address net.IP `json:"ip-address"` Port int `json:"port"` }
TODO rename Address to IpAddress and use Address for IP:Port
type Event ¶
type Event struct { DeviceID uint32 `json:"device-id"` Index uint32 `json:"event-id"` Type uint8 `json:"event-type"` Granted bool `json:"access-granted"` Door uint8 `json:"door-id"` Direction uint8 `json:"direction"` CardNumber uint32 `json:"card-number"` Timestamp types.DateTime `json:"timestamp"` Reason uint8 `json:"event-reason"` }
FIXME: remove - superseded by reworked uhppote-core/types/Event
type GetCardRecordsRequest ¶
type GetCardRecordsRequest struct {
DeviceID DeviceID
}
type GetCardRecordsResponse ¶
type GetCardRequest ¶
type GetCardResponse ¶
type GetCardsRequest ¶
type GetCardsRequest struct {
DeviceID DeviceID
}
type GetCardsResponse ¶
type GetDeviceRequest ¶
type GetDeviceRequest struct {
DeviceID DeviceID
}
type GetDeviceResponse ¶
type GetDeviceResponse struct { DeviceType string `json:"device-type"` DeviceID DeviceID `json:"device-id"` IpAddress net.IP `json:"ip-address"` SubnetMask net.IP `json:"subnet-mask"` Gateway net.IP `json:"gateway-address"` MacAddress types.MacAddress `json:"mac-address"` Version types.Version `json:"version"` Date types.Date `json:"date"` Address net.UDPAddr `json:"address"` TimeZone *time.Location `json:"timezone,omitempty"` }
type GetDevicesRequest ¶
type GetDevicesRequest struct { }
type GetDevicesResponse ¶
type GetDevicesResponse struct {
Devices map[uint32]DeviceSummary `json:"devices"`
}
type GetDoorControlRequest ¶
type GetDoorControlResponse ¶
type GetDoorControlResponse struct { DeviceID DeviceID `json:"device-id"` Door uint8 `json:"door"` Control types.ControlState `json:"control"` }
type GetDoorDelayRequest ¶
type GetDoorDelayResponse ¶
type GetTimeProfileRequest ¶
type GetTimeProfileResponse ¶
type GetTimeProfileResponse struct { DeviceID DeviceID `json:"device-id"` TimeProfile types.TimeProfile `json:"time-profile"` }
type GetTimeProfilesRequest ¶
type GetTimeProfilesResponse ¶
type GetTimeProfilesResponse struct { DeviceID DeviceID `json:"device-id"` Profiles []types.TimeProfile `json:"profiles"` }
type GetTimeRequest ¶
type GetTimeRequest struct {
DeviceID DeviceID
}
type GetTimeResponse ¶
type IUHPPOTED ¶
type IUHPPOTED interface { GetDevices(request GetDevicesRequest) (*GetDevicesResponse, error) GetDevice(request GetDeviceRequest) (*GetDeviceResponse, error) GetTime(request GetTimeRequest) (*GetTimeResponse, error) SetTime(request SetTimeRequest) (*SetTimeResponse, error) GetDoorDelay(request GetDoorDelayRequest) (*GetDoorDelayResponse, error) GetDoorControl(request GetDoorControlRequest) (*GetDoorControlResponse, error) GetCardRecords(request GetCardRecordsRequest) (*GetCardRecordsResponse, error) GetCards(request GetCardsRequest) (*GetCardsResponse, error) DeleteCards(request DeleteCardsRequest) (*DeleteCardsResponse, error) GetCard(request GetCardRequest) (*GetCardResponse, error) DeleteCard(request DeleteCardRequest) (*DeleteCardResponse, error) GetTimeProfiles(request GetTimeProfilesRequest) (*GetTimeProfilesResponse, error) PutTimeProfiles(request PutTimeProfilesRequest) (*PutTimeProfilesResponse, int, error) GetTimeProfile(request GetTimeProfileRequest) (*GetTimeProfileResponse, error) PutTimeProfile(request PutTimeProfileRequest) (*PutTimeProfileResponse, error) ClearTimeProfiles(request ClearTimeProfilesRequest) (*ClearTimeProfilesResponse, error) PutTaskList(request PutTaskListRequest) (*PutTaskListResponse, int, error) OpenDoor(request OpenDoorRequest) (*OpenDoorResponse, error) SetDoorControl(controller uint32, door uint8, mode types.ControlState) error SetDoorDelay(controller uint32, door uint8, delay uint8) error SetDoorPasscodes(controller uint32, door uint8, passcodes ...uint32) error SetInterlock(controller uint32, interlock types.Interlock) error ActivateKeypads(controller uint32, keypads map[uint8]bool) error GetStatus(controller uint32) (*Status, error) GetEventIndices(controller uint32) (uint32, uint32, uint32, error) GetEvent(controller uint32, index uint32) (*Event, error) GetEvents(controller uint32, N int) ([]Event, error) FetchEvents(controller uint32, from, N uint32) ([]types.Event, error) RecordSpecialEvents(controller uint32, enable bool) (bool, error) PutCard(controller uint32, card types.Card) (bool, error) RestoreDefaultParameters(controller uint32) error }
type OpenDoorRequest ¶
type OpenDoorResponse ¶
type PutTaskListRequest ¶
type PutTaskListResponse ¶
type PutTimeProfileRequest ¶
type PutTimeProfileRequest struct { DeviceID uint32 TimeProfile types.TimeProfile }
type PutTimeProfileResponse ¶
type PutTimeProfileResponse struct { DeviceID DeviceID `json:"device-id"` TimeProfile types.TimeProfile `json:"time-profile"` }
type PutTimeProfilesRequest ¶
type PutTimeProfilesRequest struct { DeviceID uint32 Profiles []types.TimeProfile `json:"profiles"` }
type PutTimeProfilesResponse ¶
type SetTimeRequest ¶
type SetTimeResponse ¶
type Status ¶
type Status struct { DoorState map[uint8]bool `json:"door-states"` DoorButton map[uint8]bool `json:"door-buttons"` SystemError uint8 `json:"system-error"` SystemDateTime types.DateTime `json:"system-datetime"` SequenceId uint32 `json:"sequence-id"` SpecialInfo uint8 `json:"special-info"` RelayState uint8 `json:"relay-state"` InputState uint8 `json:"input-state"` Event Event `json:"event,omitempty"` }
type UHPPOTED ¶
func (*UHPPOTED) ActivateKeypads ¶ added in v0.8.6
func (*UHPPOTED) ClearTimeProfiles ¶
func (u *UHPPOTED) ClearTimeProfiles(request ClearTimeProfilesRequest) (*ClearTimeProfilesResponse, error)
func (*UHPPOTED) DeleteCard ¶
func (u *UHPPOTED) DeleteCard(request DeleteCardRequest) (*DeleteCardResponse, error)
func (*UHPPOTED) DeleteCards ¶
func (u *UHPPOTED) DeleteCards(request DeleteCardsRequest) (*DeleteCardsResponse, error)
func (*UHPPOTED) FetchEvents ¶ added in v0.8.7
func (*UHPPOTED) GetCard ¶
func (u *UHPPOTED) GetCard(request GetCardRequest) (*GetCardResponse, error)
func (*UHPPOTED) GetCardRecords ¶
func (u *UHPPOTED) GetCardRecords(request GetCardRecordsRequest) (*GetCardRecordsResponse, error)
func (*UHPPOTED) GetCards ¶
func (u *UHPPOTED) GetCards(request GetCardsRequest) (*GetCardsResponse, error)
func (*UHPPOTED) GetDevice ¶
func (u *UHPPOTED) GetDevice(request GetDeviceRequest) (*GetDeviceResponse, error)
func (*UHPPOTED) GetDevices ¶
func (u *UHPPOTED) GetDevices(request GetDevicesRequest) (*GetDevicesResponse, error)
func (*UHPPOTED) GetDoorControl ¶
func (u *UHPPOTED) GetDoorControl(request GetDoorControlRequest) (*GetDoorControlResponse, error)
func (*UHPPOTED) GetDoorDelay ¶
func (u *UHPPOTED) GetDoorDelay(request GetDoorDelayRequest) (*GetDoorDelayResponse, error)
func (*UHPPOTED) GetEventIndices ¶ added in v0.7.2
func (*UHPPOTED) GetEvents ¶ added in v0.7.2
Retrieves up to N events subsequent to the 'current' event index (or the 'first' event if the current event index is less than the first event index). The on-device index is updated to the index of the last retrieved event.
func (*UHPPOTED) GetTime ¶
func (u *UHPPOTED) GetTime(request GetTimeRequest) (*GetTimeResponse, error)
func (*UHPPOTED) GetTimeProfile ¶
func (u *UHPPOTED) GetTimeProfile(request GetTimeProfileRequest) (*GetTimeProfileResponse, error)
func (*UHPPOTED) GetTimeProfiles ¶
func (u *UHPPOTED) GetTimeProfiles(request GetTimeProfilesRequest) (*GetTimeProfilesResponse, error)
func (*UHPPOTED) OpenDoor ¶
func (u *UHPPOTED) OpenDoor(request OpenDoorRequest) (*OpenDoorResponse, error)
func (*UHPPOTED) PutTaskList ¶
func (u *UHPPOTED) PutTaskList(request PutTaskListRequest) (*PutTaskListResponse, int, error)
func (*UHPPOTED) PutTimeProfile ¶
func (u *UHPPOTED) PutTimeProfile(request PutTimeProfileRequest) (*PutTimeProfileResponse, error)
func (*UHPPOTED) PutTimeProfiles ¶
func (u *UHPPOTED) PutTimeProfiles(request PutTimeProfilesRequest) (*PutTimeProfilesResponse, int, error)
func (*UHPPOTED) RecordSpecialEvents ¶
Unwraps the request and dispatches the corresponding controller command to enable or disable door open, door close and door button press events for the controller.
func (*UHPPOTED) RestoreDefaultParameters ¶ added in v0.8.8
Unwraps the request and dispatches the corresponding controller command to restore the manufacturer default configuration.
func (*UHPPOTED) SetDoorControl ¶
func (*UHPPOTED) SetDoorDelay ¶
func (*UHPPOTED) SetDoorPasscodes ¶ added in v0.8.7
func (*UHPPOTED) SetEventListener ¶ added in v0.7.3
func (*UHPPOTED) SetInterlock ¶ added in v0.8.5
func (*UHPPOTED) SetTime ¶
func (u *UHPPOTED) SetTime(request SetTimeRequest) (*SetTimeResponse, error)
Click to show internal directories.
Click to hide internal directories.