app

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InvalidObjectTypeError        = errors.New("[app] invalid Configuration type, one of app.Configuration, app.PreConfiguration, or app.PostConfiguration need to be embedded")
	ConfigurationNameIsTakenError = errors.New("[app] configuration name is already taken")
	ComponentNameIsTakenError     = errors.New("[app] component name is already taken")
)

Functions

func AutoConfiguration

func AutoConfiguration(params ...interface{}) (err error)

AutoConfiguration

func Component

func Component(params ...interface{}) error

Component

func HideBanner added in v0.5.4

func HideBanner()

func RegisterPostProcessor

func RegisterPostProcessor(p ...PostProcessor)

Types

type Application

type Application interface {
	Init(args ...interface{}) error
	Run()
}

type ApplicationContext added in v0.5.4

type ApplicationContext interface {
	RegisterController(controller interface{}) error
	Use(handlers ...context.Handler)
}

type BaseApplication

type BaseApplication struct {
	WorkDir string
	// contains filtered or unexported fields
}

func (*BaseApplication) AfterInitialization

func (a *BaseApplication) AfterInitialization(configs ...cmap.ConcurrentMap)

func (*BaseApplication) BeforeInitialization

func (a *BaseApplication) BeforeInitialization()

func (*BaseApplication) BuildConfigurations

func (a *BaseApplication) BuildConfigurations()

func (*BaseApplication) ConfigurableFactory

func (a *BaseApplication) ConfigurableFactory() *autoconfigure.ConfigurableFactory

func (*BaseApplication) Init

func (a *BaseApplication) Init(args ...interface{}) error

BeforeInitialization ?

func (*BaseApplication) RegisterController

func (a *BaseApplication) RegisterController(controller interface{}) error

func (*BaseApplication) SystemConfig

func (a *BaseApplication) SystemConfig() *system.Configuration

Config returns application config

func (*BaseApplication) Use

func (a *BaseApplication) Use(handlers ...context.Handler)

type Configuration

type Configuration interface{}

type PostConfiguration

type PostConfiguration interface{}

type PostProcessor

type PostProcessor interface {
	BeforeInitialization(factory interface{})
	AfterInitialization(factory interface{})
}

type PreConfiguration

type PreConfiguration interface{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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