core

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Bus  *Bus
	DB   *bun.DB
	File FileStore
}

func NewApp

func NewApp(bunDB *bun.DB, fileStore FileStore) App

func (App) Context

func (a App) Context(ctx context.Context) *Context

type Bus

type Bus struct {
	Mutex           sync.Mutex
	EnvelopeCreated []func(cc *Context, evt EventEnvelopeCreated)
	EnvelopeDeleted []func(cc *Context, evt EventEnvelopeDeleted)
}

func NewBus

func NewBus() *Bus

type Context

type Context struct {
	Bus  *Bus
	DB   *bun.DB
	File FileStore
	// contains filtered or unexported fields
}

func (*Context) Context

func (c *Context) Context() context.Context

type EventEnvelopeCreated

type EventEnvelopeCreated struct {
	ID int64
}

type EventEnvelopeDeleted

type EventEnvelopeDeleted struct {
	IDS []int64
}

type FileStore

type FileStore struct {
	Dir string
	FS  fs.FS
}

func NewFileStore

func NewFileStore(dir string) FileStore

Jump to

Keyboard shortcuts

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