Documentation
¶
Index ¶
Constants ¶
View Source
const ( CommandStop = 1 CommandBoop = 5 // state machine button CommandClose = 4 CommandOpen = 2 )
Variables ¶
This section is empty.
Functions ¶
func CommandForRatio ¶
Returns the door command for the given position. This might not be the same if you changed it. :shrug:
Types ¶
type CommandInput ¶
type CommandOutput ¶
type CommandOutput struct {
Value string `json:"value"`
}
type DoorStatus ¶
type DoorStatus struct { DeviceOrder []string `json:"deviceOrder"` Devices []DoorStatusDevice `json:"devices"` // we might also _just_ see Users (the "admin update" payload) Users []DoorStatusUsers `json:"users"` }
DoorStatus is the top-level status structure for all devices. This is emitted regularly without a ProcessID, and is the response type for "/app/res/devices/fetch".
func (*DoorStatus) Get ¶
func (ds *DoorStatus) Get(id string) *DoorStatusDevice
Get returns a DoorStatusDevice by ID.
func (*DoorStatus) IsAdmin ¶
func (ds *DoorStatus) IsAdmin() bool
IsAdmin returns whether this is an admin-only payload.
type DoorStatusButton ¶
type DoorStatusButton struct { Action struct { Base int `json:"base"` Command int `json:"cmd"` } `json:"action"` Title string `json:"title"` Icon string `json:"icon"` Hide int `json:"hide"` Row int `json:"row"` Col int `json:"col"` }
DoorStatusButton is a button displayed in the UI.
type DoorStatusDevice ¶
type DoorStatusDevice struct { ID string `json:"deviceId"` ScreenFormat int `json:"screenFormat"` Time int64 `json:"time"` Hash int `json:"hash"` Name string `json:"name"` Buttons []DoorStatusButton `json:"buttons"` Aux []DoorStatusButton `json:"aux"` Device struct { Position int `json:"position"` // 0-100 } `json:"device"` Log struct { ID int64 `json:"logId"` Alert int `json:"alert"` Text string `json:"text"` Time int `json:"time"` } }
DoorStatusDevice is the status of a single device.
type DoorStatusUsers ¶
DoorStatusUsers lists the users available to the environment.
type RegisterRequest ¶
type RegisterResponse ¶
Click to show internal directories.
Click to hide internal directories.