events

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2025 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CurrentEvents = 1
)

Variables

This section is empty.

Functions

func GetallAvblkEvent

func GetallAvblkEvent(ctrl *controller.Controller) map[string]Event

Types

type Aplusconf

type Aplusconf struct {
	// contains filtered or unexported fields
}

func (*Aplusconf) Excute

func (a *Aplusconf) Excute(eventctx Eventctx) error

func (*Aplusconf) ExcuteComplete

func (a *Aplusconf) ExcuteComplete(eventctx Eventctx) error

func (*Aplusconf) Expired

func (a *Aplusconf) Expired() bool

func (*Aplusconf) Info

func (a *Aplusconf) Info() string

func (*Aplusconf) Name

func (a *Aplusconf) Name() string

func (*Aplusconf) Price

func (a *Aplusconf) Price() int64

type Event

type Event interface {
	Name() string
	Expired() bool
	Price() int64
	Excute(eventctx Eventctx) error
	ExcuteComplete(eventctx Eventctx) error
	Info() string
}

all events should implemet this interface after creating a event add it to GetallAvblkEvent

type Eventctx

type Eventctx struct {
	Ctx             context.Context        // required
	Upx             *update.Updatectx      // required
	Btns            *botapi.Buttons        // required
	Alertsender     common.Alertsender     // required
	Sendreciver     common.Sendreciver     // required
	Callbackreciver common.Callbackreciver // required
	Ctrl            *controller.Controller // required by aplusconf

}

Jump to

Keyboard shortcuts

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