modular

package
Version: v0.0.0-...-b45a7ae Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: Apache-2.0 Imports: 3 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 []ModuleFactory

func (App) InitializeStorage

func (m App) InitializeStorage(storage *domain.Engine) error

func (App) PopulateSchema

func (m App) PopulateSchema(domainSchema *model.Schema)

func (App) ProduceActions

func (m App) ProduceActions() map[string]appcore.ActionHandler

func (App) ProduceFunctions

func (m App) ProduceFunctions() (functions []domain.DomainFunction)

type Module

type Module struct {
	PopulateSchema func(schema *model.Schema)

	DomainFunctions []domain.DomainFunction
	Actions         map[string]appcore.ActionHandler

	EventHandler model.EventHandler
}

func (*Module) ProduceModule

func (m *Module) ProduceModule() *Module

type ModuleFactory

type ModuleFactory interface {
	// TODO: provide context for modules, maybe retrieve already set-up modules, or some factory to get options from
	ProduceModule() *Module
}

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL