Documentation
¶
Overview ¶
Package state is an example of the State Pattern.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MobileAlert ¶
type MobileAlert struct {
// contains filtered or unexported fields
}
MobileAlert implements an alert depending on its state.
func NewMobileAlert ¶
func NewMobileAlert() *MobileAlert
NewMobileAlert is the MobileAlert constructor.
func (*MobileAlert) SetState ¶
func (a *MobileAlert) SetState(state MobileAlertStater)
SetState changes state
type MobileAlertSong ¶
type MobileAlertSong struct {
}
MobileAlertSong implements beep alert
func (*MobileAlertSong) Alert ¶
func (a *MobileAlertSong) Alert() string
Alert returns a alert string
type MobileAlertStater ¶
type MobileAlertStater interface {
Alert() string
}
MobileAlertStater provides a common interface for various states.
type MobileAlertVibration ¶
type MobileAlertVibration struct {
}
MobileAlertVibration implements vibration alert
func (*MobileAlertVibration) Alert ¶
func (a *MobileAlertVibration) Alert() string
Alert returns a alert string
Click to show internal directories.
Click to hide internal directories.