Documentation ¶
Index ¶
- Constants
- Variables
- func NewGoatApp(params Params) (a app.App, err error)
- func NewHealthCheckers() (healths app.AppHealthCheckers)
- func NewVersion(major int, minor int, path int, suffix string) app.Version
- type Filespaces
- type GoatApp
- func (gapp *GoatApp) Arguments() []string
- func (gapp *GoatApp) DependencyProvider() app.DependencyProvider
- func (gapp *GoatApp) Filespaces() app.AppFilespaces
- func (gapp *GoatApp) IOContext() app.IOContext
- func (gapp *GoatApp) InjectTo(obj interface{}) error
- func (gapp *GoatApp) Name() string
- func (gapp *GoatApp) Scopes() app.AppScopes
- func (gapp *GoatApp) Terminal() app.TerminalManager
- func (gapp *GoatApp) Version() app.Version
- type HealthCheckers
- type IO
- type MockupApp
- type Params
- type Scopes
- type Version
Constants ¶
View Source
const ( // ConfigFilePath is path to main config file ConfigFilePath = "/config/config_{{env}}.json" // CWDPath is default Current Working Directory (CWD) path CWDPath = "./" )
Variables ¶
View Source
var (
ErrAppNameIsRequired = fmt.Errorf("application name is required")
)
View Source
var (
NilVersion = NewVersion(0, 0, 0, "-dev")
)
Functions ¶
func NewGoatApp ¶
NewGoatApp create new app instance
func NewHealthCheckers ¶
func NewHealthCheckers() (healths app.AppHealthCheckers)
NewHealthChecker create new instance of app.HealthChecker
Types ¶
type Filespaces ¶
type Filespaces struct { CWD filesystem.Filespace Home filesystem.Filespace Root filesystem.Filespace Tmp filesystem.Filespace }
type GoatApp ¶
type GoatApp struct { app.AppHealthCheckers // contains filtered or unexported fields }
GoatApp is base app template
func (*GoatApp) DependencyProvider ¶
func (gapp *GoatApp) DependencyProvider() app.DependencyProvider
DependencyProvider return dependency provider
func (*GoatApp) Filespaces ¶
func (gapp *GoatApp) Filespaces() app.AppFilespaces
Filespaces return filespaces
func (*GoatApp) InjectTo ¶
InjectTo inject application dependencies, arguments, config and filespaces to
func (*GoatApp) Terminal ¶
func (gapp *GoatApp) Terminal() app.TerminalManager
Terminal return app terminal manager
type HealthCheckers ¶
type HealthCheckers struct {
// contains filtered or unexported fields
}
HealthCheckers is implements app.HealthCheckers
func (*HealthCheckers) HealthChecker ¶
func (healths *HealthCheckers) HealthChecker(name string) (health app.HealthCheckerCallback)
HealthChecker return a health by name
func (*HealthCheckers) HealthCheckerNames ¶
func (healths *HealthCheckers) HealthCheckerNames() (keys []string)
HealthChecker return health's names
func (*HealthCheckers) SetHealthChecker ¶
func (healths *HealthCheckers) SetHealthChecker(name string, health app.HealthCheckerCallback) (err error)
SetHealthChecker set new comamnd
type MockupApp ¶
MockupApp is default mockup applicationo (used by test code)
func NewMockupApp ¶
NewMockupApp create new mockup application
func (*MockupApp) ErrorBuffer ¶
ErrorBuffer return error output buffer
func (*MockupApp) OutputBuffer ¶
OutputBuffer return output buffer
type Params ¶
type Params struct { Arguments []string DP app.DependencyProvider Env string Filespaces Filespaces HealthCheckers app.AppHealthCheckers IO IO Name string Scopes Scopes Terminal app.TerminalManager Version app.Version }
Params define new app
Click to show internal directories.
Click to hide internal directories.