event

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dispatch

func Dispatch(evt interface{})

Dispatch an event to Dispatcher

func SetDispatcher

func SetDispatcher(disp Dispatcher)

SetDispatcher set a event dispatcher

Types

type Dispatcher

type Dispatcher interface {
	Publish(evt interface{})
}

Dispatcher is an interface for event dispatcher

type MigrationEndedEvent

type MigrationEndedEvent struct {
	SQL string
}

type MigrationStartedEvent

type MigrationStartedEvent struct {
	SQL string
}

type MigrationsEndedEvent

type MigrationsEndedEvent struct{}

type MigrationsStartedEvent

type MigrationsStartedEvent struct{}

type QueryExecutedEvent

type QueryExecutedEvent struct {
	SQL      string
	Bindings []interface{}
	Time     time.Duration
}

QueryExecutedEvent each SQL query executed by your application will publish a QueryExecutedEvent

type TransactionBeginningEvent

type TransactionBeginningEvent struct{}

TransactionBeginningEvent fired when a new transaction started

type TransactionCommittedEvent

type TransactionCommittedEvent struct{}

TransactionCommittedEvent fired when a transaction has been committed

type TransactionRolledBackEvent

type TransactionRolledBackEvent struct{}

TransactionRolledBackEvent fired when a transaction has been rollback

Jump to

Keyboard shortcuts

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