application

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2024 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExitWrapper

func ExitWrapper(err error) (int, error)

func NewIO

func NewIO(
	inputReader io.Reader,
	outputWriter io.Writer,
	errorOutputWriter io.Writer,
) componego.ApplicationIO

Types

type Factory

type Factory interface {
	SetApplicationName(name string)
	SetApplicationComponents(components func() ([]componego.Component, error))
	SetApplicationDependencies(dependencies func() ([]componego.Dependency, error))
	SetApplicationConfigInit(configInit func(appMode componego.ApplicationMode, options any) (map[string]any, error))
	SetApplicationErrorHandler(errorHandler func(err error, appIO componego.ApplicationIO, appMode componego.ApplicationMode) error)
	SetApplicationAction(action func(env componego.Environment, options any) (int, error))
	Build() componego.Application
}

func NewFactory

func NewFactory(name string) Factory

type QuickApplication

type QuickApplication struct {
	Name         string
	Components   func() ([]componego.Component, error)
	Dependencies func() ([]componego.Dependency, error)
	ConfigInit   func(appMode componego.ApplicationMode, options any) (map[string]any, error)
	ErrorHandler func(err error, appIO componego.ApplicationIO, appMode componego.ApplicationMode) error
	Action       func(env componego.Environment, options any) (int, error)
}

func (*QuickApplication) ApplicationAction

func (q *QuickApplication) ApplicationAction(env componego.Environment, options any) (int, error)

ApplicationAction belongs to interface componego.Application.

func (*QuickApplication) ApplicationComponents

func (q *QuickApplication) ApplicationComponents() ([]componego.Component, error)

ApplicationComponents belongs to interface componego.ApplicationComponents.

func (*QuickApplication) ApplicationConfigInit

func (q *QuickApplication) ApplicationConfigInit(appMode componego.ApplicationMode, options any) (map[string]any, error)

ApplicationConfigInit belongs to interface componego.ApplicationConfigInit.

func (*QuickApplication) ApplicationDependencies

func (q *QuickApplication) ApplicationDependencies() ([]componego.Dependency, error)

ApplicationDependencies belongs to interface componego.ApplicationDependencies.

func (*QuickApplication) ApplicationErrorHandler

func (q *QuickApplication) ApplicationErrorHandler(err error, appIO componego.ApplicationIO, appMode componego.ApplicationMode) error

ApplicationErrorHandler belongs to interface componego.ApplicationErrorHandler.

func (*QuickApplication) ApplicationName

func (q *QuickApplication) ApplicationName() string

ApplicationName belongs to interface componego.Application.

Jump to

Keyboard shortcuts

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