events

package
v0.0.0-...-176ae2a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2021 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventTypeInit            = EventType("Init")
	EventTypeRunMediaStart   = EventType("RunMediaStart")
	EventTypeRunMediaEnd     = EventType("RunMediaEnd")
	EventTypeFeedsDownloaded = EventType("FeedsDownloaded")
)

Variables

This section is empty.

Functions

func Emit

func Emit(e Event)

func Loader

func Loader(L *lua.LState) int

func Subscribe

func Subscribe(et EventType, c EventCallback)

Types

type Event

type Event interface {
	Type() EventType
}

type EventCallback

type EventCallback func(Event) error

type EventCallbacks

type EventCallbacks map[EventType][]EventCallback

func (EventCallbacks) Emit

func (ec EventCallbacks) Emit(e Event)

func (EventCallbacks) Subscribe

func (ec EventCallbacks) Subscribe(et EventType, c EventCallback)

type EventType

type EventType string

type FeedsDownloaded

type FeedsDownloaded struct{}

func (*FeedsDownloaded) Type

func (e *FeedsDownloaded) Type() EventType

type Init

type Init struct{}

func (*Init) Type

func (e *Init) Type() EventType

type RunMediaEnd

type RunMediaEnd struct {
	Link string
}

func (*RunMediaEnd) Type

func (e *RunMediaEnd) Type() EventType

type RunMediaStart

type RunMediaStart struct {
	Link string
}

func (*RunMediaStart) Type

func (e *RunMediaStart) Type() EventType

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL