Documentation
¶
Index ¶
- Variables
- type Command
- type CompareACL
- type Context
- type DeleteAll
- type DeleteCard
- type GetACL
- type GetCard
- type GetCards
- type GetDevice
- type GetDevices
- type GetDoorControl
- type GetDoorDelay
- type GetEvent
- type GetEventIndex
- type GetEvents
- type GetListener
- type GetStatus
- type GetTime
- type Grant
- type Listen
- type LoadACL
- type OpenDoor
- type PutCard
- type RecordSpecialEvents
- type Revoke
- type SetAddress
- type SetDoorControl
- type SetDoorDelay
- type SetEventIndex
- type SetListener
- type SetTime
- type Show
- type Version
Constants ¶
This section is empty.
Variables ¶
var CompareACLCmd = CompareACL{ // contains filtered or unexported fields }
CompareACLCmd is an initialized CompareACL command for the main() command list
var DeleteAllCmd = DeleteAll{}
var DeleteCardCmd = DeleteCard{}
var GetACLCmd = GetACL{}
var GetCardCmd = GetCard{}
var GetCardsCmd = GetCards{}
var GetDeviceCmd = GetDevice{}
var GetDevicesCmd = GetDevices{}
var GetDoorControlCmd = GetDoorControl{}
var GetDoorDelayCmd = GetDoorDelay{}
var GetEventCmd = GetEvent{}
var GetEventIndexCmd = GetEventIndex{}
var GetEventsCmd = GetEvents{}
var GetListenerCmd = GetListener{}
var GetStatusCmd = GetStatus{}
var GetTimeCmd = GetTime{}
var GrantCmd = Grant{}
var ListenCmd = Listen{}
var LoadACLCmd = LoadACL{ // contains filtered or unexported fields }
var OpenDoorCmd = OpenDoor{}
var PutCardCmd = PutCard{}
var RecordSpecialEventsCmd = RecordSpecialEvents{}
var RevokeCmd = Revoke{}
var SetAddressCmd = SetAddress{}
var SetDoorControlCmd = SetDoorControl{}
var SetDoorDelayCmd = SetDoorDelay{}
var SetEventIndexCmd = SetEventIndex{}
var SetListenerCmd = SetListener{}
var SetTimeCmd = SetTime{}
var ShowCmd = Show{}
var VersionCmd = Version{}
VersionCmd is an initialized Version command for the main() command list
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command interface {
Execute(context Context) error
CLI() string
Description() string
Usage() string
Help()
RequiresConfig() bool
}
Command defines the common functions for CLI command implementations. This will be replaced with the 'uhppoted-api' implementation in a future iteration.
type CompareACL ¶
type CompareACL struct {
// contains filtered or unexported fields
}
func (*CompareACL) CLI ¶
func (c *CompareACL) CLI() string
func (*CompareACL) Description ¶
func (c *CompareACL) Description() string
func (*CompareACL) Execute ¶
func (c *CompareACL) Execute(ctx Context) error
func (*CompareACL) Help ¶
func (c *CompareACL) Help()
func (*CompareACL) RequiresConfig ¶
func (c *CompareACL) RequiresConfig() bool
Returns true - configuration is not optional for this command to return valid information.
func (*CompareACL) Usage ¶
func (c *CompareACL) Usage() string
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context contains the environment and configuration information required for all commands
type DeleteAll ¶
type DeleteAll struct {
}
func (*DeleteAll) Description ¶
func (*DeleteAll) RequiresConfig ¶
Returns false - configuration is useful but optional.
type DeleteCard ¶
type DeleteCard struct {
}
func (*DeleteCard) CLI ¶
func (c *DeleteCard) CLI() string
func (*DeleteCard) Description ¶
func (c *DeleteCard) Description() string
func (*DeleteCard) Execute ¶
func (c *DeleteCard) Execute(ctx Context) error
func (*DeleteCard) Help ¶
func (c *DeleteCard) Help()
func (*DeleteCard) RequiresConfig ¶
func (c *DeleteCard) RequiresConfig() bool
Returns false - configuration is useful but optional.
func (*DeleteCard) Usage ¶
func (c *DeleteCard) Usage() string
type GetACL ¶
type GetACL struct {
}
func (*GetACL) Description ¶
func (*GetACL) RequiresConfig ¶
Returns true - configuration is not optional for this command to return valid information.
type GetCard ¶
type GetCard struct {
}
func (*GetCard) Description ¶
func (*GetCard) RequiresConfig ¶
Returns false - configuration is useful but optional.
type GetCards ¶
type GetCards struct {
}
func (*GetCards) Description ¶
func (*GetCards) RequiresConfig ¶
Returns false - configuration is useful but optional.
type GetDevice ¶
type GetDevice struct {
}
func (*GetDevice) Description ¶
func (*GetDevice) RequiresConfig ¶
Returns false - configuration is useful but optional.
type GetDevices ¶
type GetDevices struct {
}
func (*GetDevices) CLI ¶
func (c *GetDevices) CLI() string
func (*GetDevices) Description ¶
func (c *GetDevices) Description() string
func (*GetDevices) Execute ¶
func (c *GetDevices) Execute(ctx Context) error
func (*GetDevices) Help ¶
func (c *GetDevices) Help()
func (*GetDevices) RequiresConfig ¶
func (c *GetDevices) RequiresConfig() bool
Returns false - configuration is useful but optional.
func (*GetDevices) Usage ¶
func (c *GetDevices) Usage() string
type GetDoorControl ¶
type GetDoorControl struct {
}
func (*GetDoorControl) CLI ¶
func (c *GetDoorControl) CLI() string
func (*GetDoorControl) Description ¶
func (c *GetDoorControl) Description() string
func (*GetDoorControl) Execute ¶
func (c *GetDoorControl) Execute(ctx Context) error
func (*GetDoorControl) Help ¶
func (c *GetDoorControl) Help()
func (*GetDoorControl) RequiresConfig ¶
func (c *GetDoorControl) RequiresConfig() bool
Returns false - configuration is useful but optional.
func (*GetDoorControl) Usage ¶
func (c *GetDoorControl) Usage() string
type GetDoorDelay ¶
type GetDoorDelay struct {
}
func (*GetDoorDelay) CLI ¶
func (c *GetDoorDelay) CLI() string
func (*GetDoorDelay) Description ¶
func (c *GetDoorDelay) Description() string
func (*GetDoorDelay) Execute ¶
func (c *GetDoorDelay) Execute(ctx Context) error
func (*GetDoorDelay) Help ¶
func (c *GetDoorDelay) Help()
func (*GetDoorDelay) RequiresConfig ¶
func (c *GetDoorDelay) RequiresConfig() bool
Returns false - configuration is useful but optional.
func (*GetDoorDelay) Usage ¶
func (c *GetDoorDelay) Usage() string
type GetEvent ¶
type GetEvent struct {
}
func (*GetEvent) Description ¶
func (*GetEvent) RequiresConfig ¶
Returns false - configuration is useful but optional.
type GetEventIndex ¶
type GetEventIndex struct {
}
func (*GetEventIndex) CLI ¶
func (c *GetEventIndex) CLI() string
func (*GetEventIndex) Description ¶
func (c *GetEventIndex) Description() string
func (*GetEventIndex) Execute ¶
func (c *GetEventIndex) Execute(ctx Context) error
func (*GetEventIndex) Help ¶
func (c *GetEventIndex) Help()
func (*GetEventIndex) RequiresConfig ¶
func (c *GetEventIndex) RequiresConfig() bool
Returns false - configuration is useful but optional.
func (*GetEventIndex) Usage ¶
func (c *GetEventIndex) Usage() string
type GetEvents ¶
type GetEvents struct {
}
func (*GetEvents) Description ¶
func (*GetEvents) RequiresConfig ¶
Returns false - configuration is useful but optional.
type GetListener ¶
type GetListener struct {
}
func (*GetListener) CLI ¶
func (c *GetListener) CLI() string
func (*GetListener) Description ¶
func (c *GetListener) Description() string
func (*GetListener) Execute ¶
func (c *GetListener) Execute(ctx Context) error
func (*GetListener) Help ¶
func (c *GetListener) Help()
func (*GetListener) RequiresConfig ¶
func (c *GetListener) RequiresConfig() bool
Returns false - configuration is useful but optional.
func (*GetListener) Usage ¶
func (c *GetListener) Usage() string
type GetStatus ¶
type GetStatus struct {
}
func (*GetStatus) Description ¶
func (*GetStatus) RequiresConfig ¶
Returns false - configuration is useful but optional.
type GetTime ¶
type GetTime struct {
}
func (*GetTime) Description ¶
func (*GetTime) RequiresConfig ¶
Returns false - configuration is useful but optional.
type Grant ¶
type Grant struct {
}
func (*Grant) Description ¶
func (*Grant) RequiresConfig ¶
Returns true - configuration is not optional for this command to return valid information.
type Listen ¶
type Listen struct {
}
func (*Listen) Description ¶
func (*Listen) RequiresConfig ¶
Returns false - configuration is useful but optional.
type LoadACL ¶
type LoadACL struct {
// contains filtered or unexported fields
}
func (*LoadACL) Description ¶
func (*LoadACL) RequiresConfig ¶
Returns true - configuration is not optional for this command to return valid information.
type OpenDoor ¶
type OpenDoor struct {
}
func (*OpenDoor) Description ¶
func (*OpenDoor) RequiresConfig ¶
Returns false - configuration is useful but optional.
type PutCard ¶
type PutCard struct {
}
func (*PutCard) Description ¶
func (*PutCard) RequiresConfig ¶
Returns false - configuration is useful but optional.
type RecordSpecialEvents ¶ added in v0.6.7
type RecordSpecialEvents struct {
}
Command implementation for record-special-events to enable or disable events for door open, door closed and door button pressed.
func (*RecordSpecialEvents) CLI ¶ added in v0.6.7
func (c *RecordSpecialEvents) CLI() string
Returns the 'record-special-events' command string for the CLI interface.
func (*RecordSpecialEvents) Description ¶ added in v0.6.7
func (c *RecordSpecialEvents) Description() string
Returns the 'record-special-events' command summary for the CLI interface.
func (*RecordSpecialEvents) Execute ¶ added in v0.6.7
func (c *RecordSpecialEvents) Execute(ctx Context) error
Gets the device ID and enable/disable value from the command line and sends a record-special-events to the designated controller.
func (*RecordSpecialEvents) Help ¶ added in v0.6.7
func (c *RecordSpecialEvents) Help()
Outputs the 'record-special-events' command help for the CLI interface.
func (*RecordSpecialEvents) RequiresConfig ¶ added in v0.6.7
func (c *RecordSpecialEvents) RequiresConfig() bool
Returns false - configuration is useful but optional.
func (*RecordSpecialEvents) Usage ¶ added in v0.6.7
func (c *RecordSpecialEvents) Usage() string
Returns the 'record-special-events' command parameters for the CLI interface.
type Revoke ¶
type Revoke struct {
}
func (*Revoke) Description ¶
func (*Revoke) RequiresConfig ¶
Returns true - configuration is not optional for this command to return valid information.
type SetAddress ¶
type SetAddress struct {
}
func (*SetAddress) CLI ¶
func (c *SetAddress) CLI() string
func (*SetAddress) Description ¶
func (c *SetAddress) Description() string
func (*SetAddress) Execute ¶
func (c *SetAddress) Execute(ctx Context) error
func (*SetAddress) Help ¶
func (c *SetAddress) Help()
func (*SetAddress) RequiresConfig ¶
func (c *SetAddress) RequiresConfig() bool
Returns false - configuration is useful but optional.
func (*SetAddress) Usage ¶
func (c *SetAddress) Usage() string
type SetDoorControl ¶
type SetDoorControl struct {
}
func (*SetDoorControl) CLI ¶
func (c *SetDoorControl) CLI() string
func (*SetDoorControl) Description ¶
func (c *SetDoorControl) Description() string
func (*SetDoorControl) Execute ¶
func (c *SetDoorControl) Execute(ctx Context) error
func (*SetDoorControl) Help ¶
func (c *SetDoorControl) Help()
func (*SetDoorControl) RequiresConfig ¶
func (c *SetDoorControl) RequiresConfig() bool
Returns false - configuration is useful but optional.
func (*SetDoorControl) Usage ¶
func (c *SetDoorControl) Usage() string
type SetDoorDelay ¶
type SetDoorDelay struct {
}
func (*SetDoorDelay) CLI ¶
func (c *SetDoorDelay) CLI() string
func (*SetDoorDelay) Description ¶
func (c *SetDoorDelay) Description() string
func (*SetDoorDelay) Execute ¶
func (c *SetDoorDelay) Execute(ctx Context) error
func (*SetDoorDelay) Help ¶
func (c *SetDoorDelay) Help()
func (*SetDoorDelay) RequiresConfig ¶
func (c *SetDoorDelay) RequiresConfig() bool
Returns false - configuration is useful but optional.
func (*SetDoorDelay) Usage ¶
func (c *SetDoorDelay) Usage() string
type SetEventIndex ¶
type SetEventIndex struct {
}
func (*SetEventIndex) CLI ¶
func (c *SetEventIndex) CLI() string
func (*SetEventIndex) Description ¶
func (c *SetEventIndex) Description() string
func (*SetEventIndex) Execute ¶
func (c *SetEventIndex) Execute(ctx Context) error
func (*SetEventIndex) Help ¶
func (c *SetEventIndex) Help()
func (*SetEventIndex) RequiresConfig ¶
func (c *SetEventIndex) RequiresConfig() bool
Returns false - configuration is useful but optional.
func (*SetEventIndex) Usage ¶
func (c *SetEventIndex) Usage() string
type SetListener ¶
type SetListener struct {
}
func (*SetListener) CLI ¶
func (c *SetListener) CLI() string
func (*SetListener) Description ¶
func (c *SetListener) Description() string
func (*SetListener) Execute ¶
func (c *SetListener) Execute(ctx Context) error
func (*SetListener) Help ¶
func (c *SetListener) Help()
func (*SetListener) RequiresConfig ¶
func (c *SetListener) RequiresConfig() bool
Returns false - configuration is useful but optional.
func (*SetListener) Usage ¶
func (c *SetListener) Usage() string
type SetTime ¶
type SetTime struct {
}
func (*SetTime) Description ¶
func (*SetTime) RequiresConfig ¶
Returns false - configuration is useful but optional.
type Show ¶
type Show struct {
}
func (*Show) Description ¶
func (*Show) RequiresConfig ¶
Returns true - configuration is not optional for this command to return valid information.
type Version ¶
type Version struct {
}
Version is a CLI command implementation that displays the CLI version information.
func (*Version) Description ¶
Description returns the 'version' command short form help
func (*Version) RequiresConfig ¶
Returns false - configuration is unused and optional.
Source Files
¶
- acl.go
- command.go
- common.go
- compare_acl.go
- delete_all.go
- delete_card.go
- get_acl.go
- get_card.go
- get_cards.go
- get_device.go
- get_devices.go
- get_door_control.go
- get_door_delay.go
- get_event.go
- get_event_index.go
- get_events.go
- get_listener.go
- get_status.go
- get_time.go
- grant.go
- listen.go
- load_acl.go
- open_door.go
- put_card.go
- record_special_events.go
- revoke.go
- set_address.go
- set_door_control.go
- set_door_delay.go
- set_event_index.go
- set_listener.go
- set_time.go
- show.go
- version.go