dispatcher

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRepository

func NewRepository(ctx context.Context, config cfg.Config, logger log.Logger, repo db_repo.Repository) (db_repo.Repository, error)

Types

type Callback

type Callback func(ctx context.Context, event interface{}) error

type Dispatcher

type Dispatcher interface {
	Fire(ctx context.Context, name string, event interface{}) Result
	On(name string, call Callback)
}

func ProvideDispatcher

func ProvideDispatcher(ctx context.Context, _ cfg.Config, logger log.Logger) (Dispatcher, error)

type Repository

type Repository struct {
	db_repo.Repository
	// contains filtered or unexported fields
}

func (Repository) Create

func (r Repository) Create(ctx context.Context, value db_repo.ModelBased) error

func (Repository) Delete

func (r Repository) Delete(ctx context.Context, value db_repo.ModelBased) error

func (Repository) Update

func (r Repository) Update(ctx context.Context, value db_repo.ModelBased) error

type Result

type Result map[string]error

Jump to

Keyboard shortcuts

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