Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterEventParser ¶
func RegisterEventParser(name string, p EventParser)
Types ¶
type Destination ¶
type Destination struct { System int64 `json:"system"` Body int64 `json:"body"` Name string `json:"name"` }
func (*Destination) String ¶
func (d *Destination) String() string
type ErrAncientJournal ¶
type ErrAncientJournal struct {
Err error
}
func (ErrAncientJournal) Error ¶
func (e ErrAncientJournal) Error() string
type ErrUnknownEvent ¶
type ErrUnknownEvent struct {
Err error
}
func (ErrUnknownEvent) Error ¶
func (e ErrUnknownEvent) Error() string
type EventParser ¶
func GetRegisteredEventParsers ¶
func GetRegisteredEventParsers() []EventParser
type Fuel ¶
type GenericEvent ¶
type GenericEvent struct { Timestamp time.Time Event string // contains filtered or unexported fields }
func NewGenericEvent ¶
func NewGenericEvent() *GenericEvent
func (*GenericEvent) Name ¶
func (e *GenericEvent) Name() string
func (*GenericEvent) String ¶
func (e *GenericEvent) String() string
func (*GenericEvent) Time ¶
func (e *GenericEvent) Time() time.Time
func (*GenericEvent) UnmarshalJSON ¶
func (e *GenericEvent) UnmarshalJSON(data []byte) error
type GenericEventParser ¶
type GenericEventParser struct {
// contains filtered or unexported fields
}
func NewGenericEventParser ¶
func NewGenericEventParser() *GenericEventParser
func (GenericEventParser) IsEnabled ¶
func (p GenericEventParser) IsEnabled() bool
type Status ¶
type Status struct { Timestamp time.Time `json:"timestamp"` Event string `json:"event"` Flags int64 `json:"flags"` Flags2 int64 `json:"flags2"` Pips []int64 `json:"pips"` Firegroup int64 `json:"firegroup"` GuiFocus int64 `json:"guifocus"` Fuel *Fuel `json:"fuel"` Cargo float64 `json:"cargo"` LegalState string `json:"legalstate"` Latitude float64 `json:"latitude"` Altitude float64 `json:"altitude"` Longitude float64 `json:"longitude"` Heading int `json:"heading"` BodyName string `json:"bodyname"` PlanetRadius float64 `json:"planetradius"` Balance float64 `json:"balance"` Destination *Destination `json:"destination"` Oxygen float64 `json:"oxygen"` Health float64 `json:"health"` Temperature float64 `json:"temperature"` SelectedWeapon string `json:"selectedweapon"` Gravity float64 `json:"gravity"` }
func (*Status) UnmarshalJSON ¶
type StatusWatcher ¶
type StatusWatcher struct {
// contains filtered or unexported fields
}
func NewStatusWatcher ¶
func NewStatusWatcher(path string) (*StatusWatcher, error)
func (*StatusWatcher) Changed ¶
func (s *StatusWatcher) Changed() <-chan bool
func (*StatusWatcher) Close ¶
func (s *StatusWatcher) Close() error
func (*StatusWatcher) Status ¶
func (s *StatusWatcher) Status() *Status
type StatusWatcherer ¶
Click to show internal directories.
Click to hide internal directories.