Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultTarget ¶
type DefaultTarget struct {
// contains filtered or unexported fields
}
A DefaultTarget wraps another target and
func NewDefaultTarget ¶
func NewDefaultTarget(tgt Target, def Interaction) DefaultTarget
NewDefaultTarget wraps tgt, creating a target that provides def as the sole possible interaction when tgt reports none.
func (DefaultTarget) Interactions ¶
func (t DefaultTarget) Interactions() []Interaction
type Interaction ¶
type Interaction interface {
Interact()
}
An Interaction is an instantaneous state change that can be applied to a target.
type Target ¶
type Target interface {
Interactions() []Interaction
}
A Target is something that might provide interactions to perform against it.
Any zero-length slice means the target has no available interactions right now.
Click to show internal directories.
Click to hide internal directories.