Documentation ¶
Overview ¶
Package system provides system builder which response for properties dependency injection.
The auto configuration composes properties object
Example ¶
This example shows how to use the system build
package main import () func main() { }
Output:
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { // project name Project string `json:"project" default:"hidevopsio"` // app name Name string `json:"name" default:"hiboot-app"` // app description Description string `json:"description" default:"${app.name} is a Hiboot Application"` // profiles Profiles Profiles `json:"profiles"` // banner Banner banner }
App is the properties of the application, it hold the base info of the application
type Builder ¶
type Builder interface { Init() error Build(profiles ...string) (interface{}, error) BuildWithProfile(profile string) (interface{}, error) Save(p interface{}) error Replace(source string) (retVal interface{}) GetProperty(name string) (retVal interface{}) SetProperty(name string, val interface{}) Builder SetConfiguration(in interface{}) }
Builder is the config file (yaml, json) builder
type Configuration ¶
type Configuration struct { App App `mapstructure:"app"` Server Server `mapstructure:"server"` Logging Logging `mapstructure:"logging"` }
Configuration is the system configuration
type Env ¶
Env is the name value pair of environment variable
type ErrInvalidController ¶ added in v0.7.1
type ErrInvalidController struct {
Name string
}
ErrInvalidController invalid controller
func (*ErrInvalidController) Error ¶ added in v0.7.1
func (e *ErrInvalidController) Error() string
type ErrNotFound ¶ added in v0.7.1
type ErrNotFound struct {
Name string
}
ErrNotFound resource not found error
func (*ErrNotFound) Error ¶ added in v0.7.1
func (e *ErrNotFound) Error() string
type Logging ¶
type Logging struct {
Level string `json:"level" default:"info"`
}
Logging is the properties of logging
type Profiles ¶
type Profiles struct { // set to true or false to filter in included profiles or not Filter bool `json:"filter" default:"false"` // included profiles Include []string `json:"include"` // active profile Active string `json:"active" default:"${APP_PROFILES_ACTIVE:default}"` }
Profiles is app profiles .include auto configuration starter should be included inside this slide .active active profile