events

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: GPL-3.0 Imports: 3 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Simple Event System

Index

Constants

View Source
const T_BUY = "BUY"
View Source
const T_CREATED = "CREATED"
View Source
const T_ENDED = "ENDED"
View Source
const T_PAID = "PAID"
View Source
const T_PURCHASED = "PURCHASED"
View Source
const T_SELL = "SELL"

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event interface {
	New(args ...interface{}) Event
	Name() string
	Time() time.Time
}

type EventManager

type EventManager struct {
	EventChannel chan Event
	// contains filtered or unexported fields
}

func NewManager

func NewManager() EventManager

func (*EventManager) Emit

func (em *EventManager) Emit(event Event)

type FlightPlan

type FlightPlan struct {
	Type string
	Plan models.FlightPlan
	// contains filtered or unexported fields
}

func (*FlightPlan) Name

func (e *FlightPlan) Name() string

func (FlightPlan) New

func (e FlightPlan) New(args ...interface{}) Event

func (*FlightPlan) Time

func (e *FlightPlan) Time() time.Time

type Loan

type Loan struct {
	Type    string
	Account models.Account
	// contains filtered or unexported fields
}

func (*Loan) Name

func (e *Loan) Name() string

func (Loan) New

func (e Loan) New(args ...interface{}) Event

func (*Loan) Time

func (e *Loan) Time() time.Time

type ShipOrder

type ShipOrder struct {
	Type  string
	Order models.ShipOrder
	// contains filtered or unexported fields
}

func (*ShipOrder) Name

func (e *ShipOrder) Name() string

func (ShipOrder) New

func (e ShipOrder) New(args ...interface{}) Event

func (*ShipOrder) Time

func (e *ShipOrder) Time() time.Time

type ShipPurchased

type ShipPurchased struct {
	Account models.Account
	// contains filtered or unexported fields
}

func (*ShipPurchased) Name

func (e *ShipPurchased) Name() string

func (ShipPurchased) New

func (e ShipPurchased) New(args ...interface{}) Event

func (*ShipPurchased) Time

func (e *ShipPurchased) Time() time.Time

type UserRegistered

type UserRegistered struct {
	Username string
	Token    string
	// contains filtered or unexported fields
}

func (*UserRegistered) Name

func (e *UserRegistered) Name() string

func (UserRegistered) New

func (e UserRegistered) New(args ...interface{}) Event

func (*UserRegistered) Time

func (e *UserRegistered) Time() time.Time

type UserSwitched

type UserSwitched struct {
	Username string
	Token    string
	// contains filtered or unexported fields
}

func (*UserSwitched) Name

func (e *UserSwitched) Name() string

func (UserSwitched) New

func (e UserSwitched) New(args ...interface{}) Event

func (*UserSwitched) Time

func (e *UserSwitched) Time() time.Time

Jump to

Keyboard shortcuts

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