event

package
v0.0.0-...-71a6408 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Produce

func Produce(et EventType, Obj interface{})

Types

type Event

type Event struct {
	Box    map[EventType]map[string]IEvent
	Events chan EventObject
	// contains filtered or unexported fields
}

func NewEvent

func NewEvent() *Event

func (*Event) Getter

func (evt *Event) Getter(et EventType, name string) IEvent

func (*Event) Listen

func (evt *Event) Listen()

func (*Event) Produce

func (evt *Event) Produce(Nt EventType, Obj interface{})

func (*Event) Register

func (evt *Event) Register(et EventType, name string, obj IEvent)

type EventObject

type EventObject struct {
	Et  EventType
	Obj interface{}
}

type EventType

type EventType int
const (
	ETconnectionAdd EventType = iota
	ETconnectionDel
	ETconnectionSelect
	ETconnectionInit

	ETredisKeyClick
	ETredisKeyDelete
	ETredisValDelete
	ETredisValUpdate

	ETqaClick
	ETqaReply

	ETapiLogin
	ETapiRegister
	ETapiPasswordReset
	ETapiLogout
)

type IEvent

type IEvent interface {
	//Build() fyne.CanvasObject
	//Reset()
	//ReBuild()
	//Clear()
	Notify(arg EventObject)
}

Jump to

Keyboard shortcuts

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