core

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Actor added in v0.12.0

type Actor int
const (
	ActorUnknown Actor = iota
	ActorSystem
)

type App

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

func NewApp

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

func (App) Context

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

func (App) SystemContext added in v0.12.0

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

type Bus

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

func NewBus

func NewBus() *Bus

type Context

type Context struct {
	Actor  Actor
	Bus    *Bus
	DB     *bun.DB
	File   FileStore
	Config *models.Config
	// 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 EventTrimStart added in v0.11.2

type EventTrimStart struct {
	Response chan<- bool
}

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